From b230ee47fc811af8e2ea5256631e0144d9b6cb34 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期四, 27 四月 2023 10:47:36 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 68 +---------------------------------
1 files changed, 2 insertions(+), 66 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 71310b7..e86f238 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")
@@ -353,7 +289,7 @@
url: this.baseHttp + this.baseIP + ':' + this.basePORT + "/" + this.baseUrl +
'/login.action',
data: {
- username: this.userName,
+ mobile: this.userName,
password: md5.hex_md5(this.password)
},
header: {
@@ -379,7 +315,7 @@
setTimeout(() => {
// uni.navigateBack(); // 灏忕▼搴忕敤杩欎釜 鎶婇椤佃矾鐢辨斁绗竴涓�
uni.reLaunch({
- url: '../index/index2'
+ url: '../index/index'
});
}, 1000);
} else {
--
Gitblit v1.9.1