From 56ef552ecc4cf835f15547c7bdbb4151ecc023aa Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 19 九月 2023 15:10:42 +0800
Subject: [PATCH] #
---
pages/login/login.vue | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 8c7adf8..4e0725a 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -66,15 +66,15 @@
<view class="title">閰嶇疆</view>
<view class="popup-item">
<view class="popup-item-left">IP:</view>
- <view class="popup-item-right"><input type="text" v-model="url.ip"></view>
+ <view class="popup-item-right"><input type="text" v-model="Lurl.ip"></view>
</view>
<view class="popup-item">
<view class="popup-item-left">绔彛:</view>
- <view class="popup-item-right"><input type="text" v-model="url.port"></view>
+ <view class="popup-item-right"><input type="text" v-model="Lurl.port"></view>
</view>
<view class="popup-item">
<view class="popup-item-left">椤圭洰:</view>
- <view class="popup-item-right"><input type="text" v-model="url.project"></view>
+ <view class="popup-item-right"><input type="text" v-model="Lurl.project"></view>
</view>
<view class="btn">
<view class="btn-left" @click="close">鍙栨秷</view>
@@ -87,7 +87,7 @@
<view>
<!-- 鎻愮ず绐楃ず渚� -->
<uni-popup ref="upVersion" type="dialog">
- <uni-popup-dialog :type="msgType" title="閫氱煡" content="鍙戠幇鏂扮増鏈�,鏄惁闇�瑕佹洿鏂�" @confirm="dialogConfirm"
+ <uni-popup-dialog :type="msgType" title="閫氱煡" :content="dialogContent" @confirm="dialogConfirm"
@close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view>
@@ -110,7 +110,7 @@
showPassword: false,
value: '',
remberPassword: true,
- url: {
+ Lurl: {
ip: '',
port: '',
project: ''
@@ -126,28 +126,21 @@
},
msgType: 'success',
filename: '',
+ dialogContent: ''
}
},
onLoad() {
this.user = uni.getStorageSync('user')
- this.url = uni.getStorageSync('url')
+ this.Lurl = uni.getStorageSync('Lurl')
this.baseUrl = uni.getStorageSync('baseUrl')
if (!this.user) {
this.user = {userName: '',password: ''}
}
- if (!this.url) {
- this.url = {ip: '',port: '',project: ''}
+ if (!this.Lurl) {
+ this.Lurl = {ip: '',port: '',project: ''}
}
- // this.getVersion()
},
onShow () {
- // 鎵嬫満绔増鏈彿
- // // #ifdef APP-PLUS
- // var that = this
- // plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
- // that.version = wgtinfo.version
- // });
- // // #endif
this.getVersion()
},
methods: {
@@ -172,9 +165,9 @@
},
// 淇濆瓨ip
settingConfirm() {
- this.baseUrl = "http://" + this.url.ip + ':' + this.url.port + '/' + this.url.project
+ this.baseUrl = "http://" + this.Lurl.ip + ':' + this.Lurl.port + '/' + this.Lurl.project
uni.setStorageSync('baseUrl', this.baseUrl);
- uni.setStorageSync('url', this.url);
+ uni.setStorageSync('Lurl', this.Lurl);
this.$refs.inputDialog.close()
},
onLogin() {
@@ -259,16 +252,23 @@
return
}
- let url = that.baseUrl + '/appVersion/checkUpdate/' + that.version + '/' + type
+ let Lurl = that.baseUrl + '/appVersion/checkUpdate/' + that.version + '/' + type
uni.request({
- url: url,
+ url: Lurl,
method: 'GET',
success(res) {
console.log(res);
var res = res.data
if (res.data) {
that.filename = res.data.path
+ that.dialogContent = '鍙戠幇鏂扮増鏈�:' + res.data.version + ', 鏄惁绔嬪嵆鏇存柊'
that.$refs.upVersion.open()
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: "none",
+ position: 'top'
+ })
}
}
--
Gitblit v1.9.1