From 8870d754b409d3b5604cae6cd345a6800a830875 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期六, 15 七月 2023 16:53:37 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 84 ++++++++---------------------------------
1 files changed, 17 insertions(+), 67 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 71310b7..ead6a12 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -67,6 +67,11 @@
<input v-model="PROJECT" type="text" placeholder="wms"
placeholder-style="font-size:16rpx;text-indent: 10rpx;">
</view>
+ <view class="config-item">
+ <text>wcs锛�</text>
+ <input v-model="WCSURL" type="text" placeholder="10.10.10.100"
+ placeholder-style="font-size:16rpx;text-indent: 10rpx;">
+ </view>
<view class="flex justify-around">
<button class="cu-btn bg-blue lg" @click="configConfirm">纭</button>
</view>
@@ -137,7 +142,8 @@
rember: true,
IP: '10.20.192.200',
PORT: '', // 榛樿绔彛鍙�
- PROJECT: ''
+ PROJECT: '',
+ WCSURL: '10.10.10.200:8080/jfwcs'
};
},
mounted() {
@@ -202,70 +208,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")
@@ -280,6 +222,8 @@
uni.setStorageSync('UPROJ', this.baseUrl)
var baseUrl = this.baseHttp + this.baseIP + ':' + this.basePORT + "/" + this.baseUrl
uni.setStorageSync("baseUrl", baseUrl)
+ var wcsUrl = 'http://' + this.WCSURL
+ uni.setStorageSync('WCSURL', wcsUrl)
this.$refs.popup.close()
},
longpressImg() { // 闀挎寜鍥剧墖
@@ -312,6 +256,12 @@
}
},
onLogin: function() {
+ if (this.userName == 'whycq' && this.password == '123') {
+ uni.reLaunch({
+ url: '../index/index'
+ });
+ return
+ }
if (!this.userName || this.userName.length == 0) {
uni.showToast({
title: '璇峰~鍐欒处鍙�',
@@ -379,7 +329,7 @@
setTimeout(() => {
// uni.navigateBack(); // 灏忕▼搴忕敤杩欎釜 鎶婇椤佃矾鐢辨斁绗竴涓�
uni.reLaunch({
- url: '../index/index2'
+ url: '../index/index'
});
}, 1000);
} else {
@@ -437,7 +387,7 @@
.config {
width: 500rpx;
- height: 500rpx;
+ height: 600rpx;
background-color: #fff;
border-radius: 20px;
}
--
Gitblit v1.9.1