From a9614291d80f96a1bbd370fa4ca82b164320f086 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 04 五月 2023 16:05:16 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 64 --------------------------------
1 files changed, 0 insertions(+), 64 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 71310b7..7145c5a 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -202,70 +202,6 @@
},
},
methods: {
- downWgt() {
- let that = this;
- const downloadUrl = "http://192.168.4.188:8088/jfwms/static/appupload/android_debug.apk"
- console.log('url:' + downloadUrl)
- uni.showLoading({
- title: '鏇存柊涓�︹��'
- })
- // return
- const downloadTask = uni.downloadFile({ //鎵ц涓嬭浇
- url: downloadUrl, //涓嬭浇鍦板潃
- timeout: 1000 * 30, //30绉掕秴鏃舵椂闂�
- success: downloadResult => { //涓嬭浇鎴愬姛
- console.log(downloadResult);
- that.showdownLine = false
- uni.hideLoading();
- console.log('downloadResult.statusCode' + downloadResult.statusCode)
- if (downloadResult.statusCode == 200) {
- console.log('鏇存柊涓�')
- uni.showModal({
- title: '',
- content: '鏇存柊鎴愬姛锛岀‘瀹氱幇鍦ㄩ噸鍚悧锛�',
- confirmText: '閲嶅惎',
- confirmColor: '#EE8F57',
- success: function(res) {
- if (res.confirm == true) {
- plus.runtime.install( //瀹夎
- downloadResult.tempFilePath, {
- force: true
- },
- function(res) {
- utils.showToast('鏇存柊鎴愬姛锛岄噸鍚腑');
- plus.runtime.restart();
- }
- );
- }
- }
- });
- }
- },
- fail: err => {
- uni.hideLoading();
- that.showdownLine = false
- that.$u.toast(err.errMsg)
- console.log(err)
- },
- complete: com => {
- console.log(com)
- }
- });
-
- // 涓嬭浇杩涘害
- downloadTask.onProgressUpdate(res => {
- // that.$u.toast(res.progress)
- that.downloadNum = res.progress
- console.log('涓嬭浇杩涘害' + that.downloadNum);
- // console.log('宸茬粡涓嬭浇鐨勬暟鎹暱搴�' + res.totalBytesWritten);
- // console.log('棰勬湡闇�瑕佷笅杞界殑鏁版嵁鎬婚暱搴�' + res.totalBytesExpectedToWrite);
-
- // 婊¤冻娴嬭瘯鏉′欢锛屽彇娑堜笅杞戒换鍔°��
- // if (res.progress > 50) {
- // downloadTask.abort();
- // }
- });
- },
// 閰嶇疆 URL PORT 椤圭洰(jkwms)
config() {
this.$refs.popup.open("center")
--
Gitblit v1.9.1