UNIapp實現局域網內在線升級

首先是UNIapp 生成apk

用Hbuilder 進行打包云打包
可以從網站https://www.yunedit.com/reg?goto=cert 使用自有證書,目測比直接使用云證書要快一些。

發布apk 網站

發布內容用IIS發布即可
注意事項中記錄如下內容

第一、需要在 iis 的MiMe 中添加apk 的格式,否則無法下載apk 文件到手持機中。 添加方式 打開MIME 點擊添加
分別輸入 apk application/vnd.android.package-archive 點擊保存即可

第二、發布新的apk 的時候,需要修改應用版本號(往大了修改),同時版本號.json 文件中
newVersionCode對應的值,也要和新的應用版本號相同(方便檢測更新) newVersionName 中保存的是當前PDA的版本名稱
versionDesc 中可以添加修改的內容 appName 需要添加新發布的apk 名稱(用于下載對應的文件)

第三、將對應的文件夾發布在iis中,同時要修改uniapp 中的http.js文件
uni.setStorageSync(‘loadVersion’, ‘http://127.0.0.1:8032/’); 修改內部的url

要在IIS中添加.apk文件的MIME類型,可以按照以下步驟操作:

打開IIS管理器,找到服務器,右鍵選擇“屬性”。
在打開的屬性窗口中,選擇“MIME類型”選項卡。
點擊“MIME類型”按鈕,打開MIME類型設置窗口。
選擇“新建”來添加一個新的MIME類型。
在“擴展名”中填寫“.apk”,在“MIME類型”中填寫“.apk”的MIME類型“application/vnd.android.package-archive”。
點擊“確定”保存設置。
重啟IIS服務,以使更改生效。
完成以上步驟后,IIS就能夠正確識別和處理.apk文件了

版本號.json中的內容為

{"newVersionCode":223,"newVersionName":"V1.2.0","versionDesc":"升級了部分功能","appName":"android_debug.apk"}

uniapp相關代碼

結構
upgrade.vue中存在

<template><view class="upgrade-popup"><view class="main"><view class="version">發現新版本{{versionName}}</view><view class="content"><text class="title">更新內容</text><view class="desc" v-html="versionDesc"></view></view><!--下載狀態-進度條顯示 --><view class="footer" v-if="isStartDownload"><view class="progress-view" :class="{'active':!hasProgress}" @click="handleInstallApp"><!-- 進度條 --><view v-if="hasProgress" style="height: 100%;"><view class="txt">{{percentText}}</view><view class="progress" :style="setProStyle"></view></view><view v-else><view class="btn upgrade force">{{ isDownloadFinish  ? '立即安裝' :'下載中...'}}</view></view></view></view><!-- 強制更新 --><view class="footer" v-else-if="isForceUpdate"><view class="btn upgrade force" @click="handleUpgrade">立即更新</view></view><!-- 可選擇更新 --><view class="footer" v-else><view class="btn close" @click="handleClose">以后再說</view><view class="btn upgrade" @click="handleUpgrade">立即更新</view></view></view></view>
</template><script>import {downloadApp,installApp} from './upgrade.js'export default {data() {return {isForceUpdate: false, //是否強制更新versionName: '', //版本名稱versionDesc: '', //更新說明downloadUrl: '', //APP下載鏈接isDownloadFinish: false, //是否下載完成hasProgress: false, //是否能顯示進度條currentPercent: 0, //當前下載百分比isStartDownload: false, //是否開始下載fileName: '', //下載后app本地路徑名稱}},computed: {//設置進度條樣式,實時更新進度位置setProStyle() {return {width: (510 * this.currentPercent / 100) + 'rpx' //510:按鈕進度條寬度}},//百分比文字percentText() {let percent = this.currentPercent;if (typeof percent !== 'number' || isNaN(percent)) return '下載中...'if (percent < 100) return `下載中${percent}%`return '立即安裝'}},onLoad(options) {this.init(options)},onBackPress(options) {// 禁用返回if (options.from == 'backbutton') {return true;}},methods: {//初始化獲取最新APP版本信息init(options) {let randomNum = Math.random();//模擬接口獲取最新版本號,版本號固定為整數const baseurl = uni.getStorageSync('loadVersion')+options.appName+'?V='+randomNum;;console.log('結果為')console.log((baseurl))//模擬接口獲取setTimeout(() => {//演示數據請根據實際修改this.versionName = options.versionName; //版本名稱this.versionDesc = options.versionDesc; //更新說明this.downloadUrl = baseurl; //下載鏈接this.isForceUpdate = false; //是否強制更新}, 200)},//更新handleUpgrade() {console.log('Hello UniApp!-----------------------------------------------')uni.getStorage({key: 'loadVersion',success: function (res) {console.log(res.data);}});//requestTask.abort();if (this.downloadUrl) {this.isStartDownload = true//開始下載AppdownloadApp(this.downloadUrl, current => {//下載進度監聽this.hasProgress = truethis.currentPercent = current}).then(fileName => {//下載完成this.isDownloadFinish = truethis.fileName = fileNameif (fileName) {//自動安裝Appthis.handleInstallApp()}}).catch(e => {console.log(e, 'e')})} else {uni.showToast({title: '下載鏈接不存在',icon: 'none'})}},//安裝apphandleInstallApp() {//下載完成才能安裝,防止下載過程中點擊if (this.isDownloadFinish && this.fileName) {installApp(this.fileName, () => {//安裝成功,關閉升級彈窗uni.navigateBack()})}},//關閉返回handleClose() {uni.navigateBack()},}}
</script><style>page {background: rgba(0, 0, 0, 0.5);/**設置窗口背景半透明*/}
</style>
<style lang="scss" scoped>.upgrade-popup {width: 580rpx;height: auto;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);background: #fff;border-radius: 20rpx;box-sizing: border-box;border: 1px solid #eee;}.header-bg {width: 100%;margin-top: -112rpx;}.main {padding: 10rpx 30rpx 30rpx;box-sizing: border-box;.version {font-size: 36rpx;color: #026DF7;font-weight: 700;width: 100%;text-align: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;letter-spacing: 1px;}.content {margin-top: 60rpx;.title {font-size: 28rpx;font-weight: 700;color: #000000;}.desc {box-sizing: border-box;margin-top: 20rpx;font-size: 28rpx;color: #6A6A6A;max-height: 80vh;overflow-y: auto;}}.footer {width: 100%;display: flex;justify-content: center;align-items: center;position: relative;flex-shrink: 0;margin-top: 100rpx;.btn {width: 246rpx;display: flex;justify-content: center;align-items: center;position: relative;z-index: 999;height: 96rpx;box-sizing: border-box;font-size: 32rpx;border-radius: 10rpx;letter-spacing: 2rpx;&.force {width: 500rpx;}&.close {border: 1px solid #E0E0E0;margin-right: 25rpx;color: #000;}&.upgrade {background-color: #026DF7;color: white;}}.progress-view {width: 510rpx;height: 90rpx;display: flex;position: relative;align-items: center;border-radius: 6rpx;background-color: #dcdcdc;display: flex;justify-content: flex-start;padding: 0px;box-sizing: border-box;border: none;overflow: hidden;&.active {background-color: #026DF7;}.progress {height: 100%;background-color: #026DF7;padding: 0px;box-sizing: border-box;border: none;border-top-left-radius: 10rpx;border-bottom-left-radius: 10rpx;}.txt {font-size: 28rpx;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);color: #fff;}}}}
</style>

upgrade.js

/*** @description H5+下載App* @param downloadUrl:App下載鏈接* @param progressCallBack:下載進度回調*/
export const downloadApp = (downloadUrl, progressCallBack = () => {}, ) => {return new Promise((resolve, reject) => {//創建下載任務const downloadTask = plus.downloader.createDownload(downloadUrl, {method: "GET"}, (task, status) => {console.log(status,'status')if (status == 200) { //下載成功resolve(task.filename)} else {reject('fail')uni.showToast({title: '下載失敗',duration: 1500,icon: "none"});}})//監聽下載過程downloadTask.addEventListener("statechanged", (task, status) => {switch (task.state) {case 1: // 開始  break;case 2: //已連接到服務器  break;case 3: // 已接收到數據  let hasProgress = task.totalSize && task.totalSize > 0 //是否能獲取到App大小if (hasProgress) {let current = parseInt(100 * task.downloadedSize / task.totalSize); //獲取下載進度百分比progressCallBack(current)}break;case 4: // 下載完成       break;}});//開始執行下載downloadTask.start();})}
/*** @description H5+安裝APP* @param fileName:app文件名* @param callBack:安裝成功回調*/
export const installApp = (fileName, callBack = () => {}) => {//注冊廣播監聽app安裝情況onInstallListening(callBack);//開始安裝plus.runtime.install(plus.io.convertLocalFileSystemURL(fileName), {}, () => {//成功跳轉到安裝界面}, function(error) {uni.showToast({title: '安裝失敗',duration: 1500,icon: "none"});})}
/*** @description 注冊廣播監聽APP是否安裝成功* @param callBack:安裝成功回調函數*/
const onInstallListening = (callBack = () => {}) => {let mainActivity = plus.android.runtimeMainActivity(); //獲取activity//生成廣播接收器let receiver = plus.android.implements('io.dcloud.android.content.BroadcastReceiver', {onReceive: (context, intent) => { //接收廣播回調  plus.android.importClass(intent);mainActivity.unregisterReceiver(receiver); //取消監聽callBack()}});let IntentFilter = plus.android.importClass('android.content.IntentFilter');let Intent = plus.android.importClass('android.content.Intent');let filter = new IntentFilter();filter.addAction(Intent.ACTION_PACKAGE_ADDED); //監聽APP安裝     filter.addDataScheme("package");mainActivity.registerReceiver(receiver, filter); //注冊廣播}

home.vue

<template><view><image style="width: 100%;" mode="widthFix" src="/static/swiper1.png"></image><!-- 	<u-swiper height="360rpx" :list="swiperList" :radius="0"></u-swiper> --><view class="home-content"><view class="app-name">WMS手持機系統</view><view class="card-container"><view class="fn-title">基礎功能</view><u-grid :border="false" @click="gridClick" col="4"><u-grid-item v-for="(item,index) in fn" :key="index"><view :class="['grid-item-bg','grid-item-bg-'+(index+1)]"><u-icon :name='item.icon' :color="item.color" size="28"></u-icon></view><view class="grid-text">{{item.name}}</view></u-grid-item></u-grid></view><view style="padding:30rpx;padding-top:0;"><vol-alert type="primary"></vol-alert></view></view></view>
</template><script>export default {data() {return {height: 0,swiperList: ['/static/swiper1.png','/static/swiper2.png','/static/swiper3.png'],fn: [{name: "有單據組盤1",icon: '/static/fc.png',path: "/pages/basics/T_In_ReceiptNoticeDetail/T_In_ReceiptNoticeDetail",color: '#EE0000',subPage: true //二級頁面}, {name: "手動入庫",icon: '/static/fc.png',path: "",color: '#EE0000',subPage: true //二級頁面}, {name: "無單據組盤",icon: 'edit-pen-fill',color: '#8B8989',path: "/pages/createbyus/HaveOrderGroup/HaveOrderGroup",subPage: true //二級頁面}, {name: "入庫計劃",icon: '/static/fc.png',path: "/pages/basics/T_In_ReceiptNotice/T_In_ReceiptNotice",color: '#EE0000',subPage: true //二級頁面}, {name: "確認出庫",icon: '/static/fc.png',path: "/pages/reportvshow/V_OutboundDetail/V_OutboundDetail",color: '#EE0000',subPage: true //二級頁面}, {name: "托盤處理",icon: '/static/fc.png',path: "/pages/strategy/DealTrayCURD/DealTrayCURD",color: '#EE0000',subPage: true //二級頁面}, {name: "盤點處理",icon: '/static/fc.png',path: "/pages/strategy/T_InventoryCheckDetail/T_InventoryCheckDetail",color: '#EE0000',subPage: true //二級頁面}, {name: "出庫計劃",icon: '/static/flow.png',color: '#EE0000',path: "/pages/basics/T_Out_DeliveryNotice/T_Out_DeliveryNotice",subPage: true //二級頁面},{name: "審批流程",icon: '/static/flow.png',color: '#EE0000',path: "/pages/flow/flow",subPage: false //二級頁面}, {name: "表單示例",icon: '/static/form.png',color: '#EE0000',path: "/pages/form/form",subPage: true //二級頁面},{name: "Table組件",icon: '/static/fc.png',color: '#EE0000',path: "/pages/form/form",subPage: true //二級頁面},{name: "菜單列表",icon: '/static/table.png',color: '#EE0000',path: "/pages/menu/menu",subPage: false //二級頁面},// {// 	name: "地圖導航",// 	icon: '/static/fc.png',// 	color:'#EE0000',// 	path: "/pages/map/map",// 	subPage: true //二級頁面// },// //待開發功能// {// 	name: "敬請期待",// 	icon: '/static/fc.png',// 	path: "pages/basics/T_In_ReceiptNotice/T_In_ReceiptNotice",// 	color:'#EE0000',// 	subPage: true //二級頁面// },// {// 	name: "敬請期待",// 	icon: '/static/fc.png',// 	color:'#EE0000',// 	path: "",// }],}},onLoad() {var _this = this;// 獲取手機狀態欄高度uni.getSystemInfo({success: function(data) {// 將其賦值給this_this.height = data.statusBarHeight;}});_this.init();},onReady(){this.checkVersion(1)},onShow() {},methods: {//初始化init() {},//檢查版本更新情況checkVersion(indexValue) {var _this = this;let index=0;setTimeout(() => {let randomNum = Math.random();//模擬接口獲取最新版本號,版本號固定為整數const baseurl = uni.getStorageSync('loadVersion')+'版本號.json?V='+randomNum;console.log(baseurl)var requestTask = uni.request({url: baseurl, //僅為示例,并非真實接口地址。method:'GET',success: function(res) {index++;console.log(res.data);	const newVersionName =res.data.newVersionName //線上最新版本名const newVersionCode =res.data.newVersionCode; //線上最新版本號const selfVersionCode = Number(uni.getSystemInfoSync().appVersionCode) //當前App版本號console.log(index+'../index/upgrade?versionName='+newVersionName+'&versionDesc='+res.data.versionDesc)console.log(selfVersionCode)console.log(newVersionCode)//線上版本號高于當前,進行在線升級if (selfVersionCode < newVersionCode) {let platform = uni.getSystemInfoSync().platform //手機平臺uni.navigateTo({url: '../index/upgrade?versionName='+newVersionName+'&versionDesc='+res.data.versionDesc+'&appName='+res.data.appName})}else{_this.clickUseInfo(indexValue);}},fail :function(res){console.log(res);},complete: ()=> {}});}, 200)},getStyle(item) {return {paddingTop: 20 + 'rpx',background: item.color,padding: '50%',color: "#ffff",'border-radius': '50%',left: '-24rpx'}},gridClick(index) {this.checkVersion(index)},clickUseInfo(index){const item = this.fn[index];console.log(index)if (!item.path) {this.$toast('開發中')return;}//注意下面的跳轉方式,一級頁面指pages.json中tabBar配置path//具體見uni頁面跳轉文檔if (item.subPage) {//二級頁面用navigateTo跳轉uni.navigateTo({url: this.fn[index].path})return;}//一級頁面uni.switchTab({url: this.fn[index].path})},swiperClick(index) {}}}
</script>
<style lang="less" scoped>.home-content {z-index: 999;position: relative;margin-top: -220rpx;}.app-name {text-align: center;color: #ffff;font-weight: bolder;font-size: 60rpx;top: -40rpx;position: relative;}.card-container {box-shadow: 1px 1px 9px #b9b6b629;margin: 30rpx 30rpx 30rpx 30rpx;border: 1px solid #f1f1f1;border-radius: 10rpx;padding: 26rpx 10rpx 14rpx 10rpx;background: #ffff;.fn-title {font-family: 黑體;font-size: 30rpx;font-weight: bold;//color: #8f9ca2;padding: 4rpx 20rpx 30rpx 20rpx;}.grid-text {padding-top: 8rpx;font-size: 26rpx;color: #626262;padding-bottom: 20rpx;}}.grid-item-bg {border-radius: 50%;width: 86rpx;height: 86rpx;display: flex;align-items: center;justify-content: center;box-shadow: 5px 3px 6px #e0ddddb0;}.grid-item-bg-1 {background-image: linear-gradient(to bottom right, #97caff, #47a1fe);}.grid-item-bg-2 {background-image: linear-gradient(to bottom right, #f8bcbc, #f07e7e);}.grid-item-bg-3 {background-image: linear-gradient(to bottom right, #afb5e6, #808cf0);}.grid-item-bg-4 {background-image: linear-gradient(to bottom right, #98e4e2, #56c3bf);}.grid-item-bg-5 {background-image: linear-gradient(to bottom right, #d1d1d1, #c878e7);}.grid-item-bg-6 {background-image: linear-gradient(to bottom right, #97caff, #47a1fe);}.grid-item-bg-7 {background-image: linear-gradient(to bottom right, #98e4e2, #56c3bf);}.grid-item-bg-8 {background-image: linear-gradient(to bottom right, #afb5e6, #808cf0);}
</style>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/719174.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/719174.shtml
英文地址,請注明出處:http://en.pswp.cn/news/719174.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

如何本地創建websocket服務端并發布到公網實現遠程訪問

文章目錄 1. Java 服務端demo環境2. 在pom文件引入第三包封裝的netty框架maven坐標3. 創建服務端,以接口模式調用,方便外部調用4. 啟動服務,出現以下信息表示啟動成功,暴露端口默認99995. 創建隧道映射內網端口6. 查看狀態->在線隧道,復制所創建隧道的公網地址加端口號7. 以…

如何實現飛書與金蝶無縫對接,提升業務效率與客戶滿意度?

一、客戶介紹 某貿易有限公司是一家專業從事進口葡萄酒和高端烈酒銷售的企業。在市場競爭日益激烈的今天&#xff0c;該公司始終堅持以客戶為中心&#xff0c;以市場為導向&#xff0c;不斷創新和進步。公司不僅注重傳統銷售渠道的拓展&#xff0c;還積極擁抱互聯網&#xff0…

processing繪制笑臉

笑臉效果圖&#xff1a; processing代碼&#xff1a; void setup(){size(1000,1000);//Canvas sizebackground(#ffcc33);//Canvas background color } void draw(){ strokeWeight(12);//face-width12px fill(#ffffcc);//face arc(500,500,200,200,0,TWO_PI);//face-size strok…

Python中的自然語言處理和文本挖掘

在Python中&#xff0c;自然語言處理&#xff08;NLP&#xff09;和文本挖掘通常涉及對文本數據進行清洗、轉換、分析和提取有用信息的過程。Python有許多庫和工具可以幫助我們完成這些任務&#xff0c;其中最常用的包括nltk&#xff08;自然語言處理工具包&#xff09;、spaCy…

統計C語言代碼行數的pyton代碼

首先是白嫖以下大神的代碼&#xff1a;統計python代碼行數小工具_linecount工具-CSDN博客 然后&#xff0c;讓ChatGPT幫我改為如下的完整代碼&#xff1a; import os from tkinter import Tk, Label, Button, filedialog def open_file(file_path, encoding): try: file op…

【推薦算法系列十八】:DSSM 召回算法

參考 推薦系統中 DSSM 雙塔模型匯總&#xff08;二更&#xff09; DSSM 和 YouTubeDNN 都是比較經典的 U2I 模型。 U2I 召回 U2I 召回也就是 User-to-Item 召回&#xff0c;它基于用戶的歷史行為以及用戶的一些個人信息&#xff0c;對系統中的候選物品進行篩選&#xff0c;挑…

備考2024年上海高考數學:歷年選擇題真題練一練(2014~2023)

今天距離2024年高考還有三個多月的時間&#xff0c;今天我們來看一下2014~2023年的上海高考數學的選擇題&#xff0c;從過去十年的真題中隨機抽取5道題&#xff0c;并且提供解析。 后附六分成長獨家制作的在線練習集&#xff0c;科學、高效地反復刷這些真題&#xff0c;吃透真題…

Dockerfile執行的時候沒有執行CMD

參考&#xff1a;https://blog.csdn.net/Zx13170918986/article/details/130831052 在dockerfile中編寫CMD后&#xff0c;發現如果執行docker run -itd這樣的指令&#xff0c;是沒法啟動CMD腳本的&#xff0c;例如以下的dockerfile FROM node:16 WORKDIR /home/ COPY start_…

Sora爆火,數字人IP如何借助AIGC視頻生成軟件制作短視頻營銷?

ChatGPT、Sora等大模型的出現&#xff0c;創新了短視頻內容創作生產方式。但目前Sora模型無法準確模擬復雜場景的物理特性&#xff0c;并且可能無法理解因果關系導致視頻失真。 廣州虛擬動力基于用戶使用需求&#xff0c;推出了AIGC數字人視頻生成平臺&#xff0c;企業、品牌可…

c++基礎學習第三天(指針,結構體)

c基礎學習第三天&#xff08;指針&#xff0c;結構體&#xff09; 文章目錄 1、指針1.1、指針的基本概念1.2、指針變量的定義和使用1.3、 指針所占內存空間1.4、空指針和野指針1.5、 const修飾指針1.5.1、const修飾指針-常量指針1.5.2、const修飾常量-指針常量1.5.3、const即修…

Android MediaCodec 簡明教程(五):使用 MediaCodec 編碼 ByteBuffer 數據,并保存為 MP4 文件

系列文章目錄 Android MediaCodec 簡明教程&#xff08;一&#xff09;&#xff1a;使用 MediaCodecList 查詢 Codec 信息&#xff0c;并創建 MediaCodec 編解碼器Android MediaCodec 簡明教程&#xff08;二&#xff09;&#xff1a;使用 MediaCodecInfo.CodecCapabilities 查…

php:實現字符串補零str_pad()

說明 str_pad($input_string, $total_length, $pad_string, $pad_type); $input_string 是要填充的原始字符串。$total_length 是填充后的字符串總長度&#xff0c;包括原始字符串的長度。$pad_string 是用于填充的字符&#xff0c;通常是零。$pad_type 是填充的位置&#xff0…

欲哭無淚,2024年軟考有變!中高項只考1次了

今天可能最重磅的消息是&#xff1a;2024年軟考工作安排及有關事項的通知文件在瘋傳&#xff0c;這份文件中提到了&#xff1a; 軟考高級方面&#xff1a; 信息系統項目管理師從2次改為了1年只考1次&#xff0c;放在了上半年考。 系統規劃與管理師依然保持1次&#xff0c;但是…

每日一練:LeeCode-707. 設計鏈表 【鏈表+虛擬頭結點+設計】

每日一練&#xff1a;LeeCode-707. 設計鏈表 【鏈表虛擬頭結點設計】 思路設置虛擬頭節點 本文是力扣 每日一練&#xff1a;LeeCode-707. 設計鏈表 【鏈表虛擬頭結點設計】 學習與理解過程&#xff0c;本文僅做學習之用&#xff0c;對本題感興趣的小伙伴可以出門左拐LeeCode-70…

0101二階與三階行列式-行列式-線性代數

一 引例 求解二元一次方程組 { a 11 x 1 a 12 x 2 b 1 a 21 x 1 a 22 x 2 b 2 \begin{cases} a_{11}x_1a_{12}x_2b_1\\ a_{21}x_1a_{22}x_2b_2\\ \end{cases} {a11?x1?a12?x2?b1?a21?x1?a22?x2?b2?? 解&#xff1a; 1 a 21 ? 2 a 11 ? x 2 a 11 b 2 ? a…

Python函數的閉包

嵌套函數 在一個函數內部定義的函數稱為嵌套函數 閉包的形成 內層函數對外層函數非全局變量的引用就會形成閉包 閉包作用 保證數據安全 例子 li [] def average(value):li.append(value)return sum(li)/len(li) 如上面代碼li[]這個列表人人都能修改&#xff0c;這樣就…

自然語言處理實戰項目26-NLP模型訓練中前置應用之分詞方法的應用

大家好,我是微學AI,今天給大家介紹一下自然語言處理實戰項目26-NLP模型訓練中前置應用之分詞方法的應用。本文詳細介紹了自然語言處理(NLP)模型訓練中前置應用之分詞方法的應用。文章首先簡要概述了NLP的概念和分詞在其中的重要性。隨后,文章詳細介紹了四種主要的分詞方法…

MQL5學習之簡單移動平均線MA的編寫

昨天還是有點高估自己了&#xff0c;MACD相對較難一點&#xff0c;改學MA的編寫&#xff0c;首先明確MA的計算&#xff0c;假如有4個值&#xff0c;p[1&#xff0c;2&#xff0c; 3&#xff0c; 4], period3, 則v[0]p[0], v[1]p[1],v[2](p[0]p[1]p[2])/32, v[3](v[2]*3p[3]-p…

瀏覽器展示Blob/File文件

1. 瀏覽器展示Blob/File文件 I.Blob格式轉Base64格式 當我們接收到后端傳輸過來的文件時&#xff0c;很多時候我們需要將傳過來的文件轉為Base64格式。如后端傳來驗證碼圖片時等 下面將提供函數&#xff1a; // Blob轉Base64 export const blobToBase64 (blob: Blob) >ne…

ChatGPT論文指南|ChatGPT如何助力論文中的數據分析!【建議收藏】

點擊下方▼▼▼▼鏈接直達AIPaperPass &#xff01; AIPaperPass - AI論文寫作指導平臺 公眾號原文▼▼▼▼&#xff1a; ChatGPT論文指南|ChatGPT如何助力論文中的數據分析&#xff01;【建議收藏】 小編在之前的論文寫作流程中&#xff0c;介紹了大量論文文字工作&#xff…