修改
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model="addrip">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row" style="justify-content: flex-end;margin-bottom: 30rpx">
|
||||
<view class="zd-col-5 setup-text" @tap="isUpdate">升级版本</view>
|
||||
</view>
|
||||
<button class="login-btn" @tap="toLogin">进入</button>
|
||||
<view v-if="version !== ''" class="version-name">v{{version}}</view>
|
||||
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
|
||||
@@ -41,6 +44,9 @@
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
isUpdate () {
|
||||
this._pdaUpdate()
|
||||
},
|
||||
toLogin() {
|
||||
if (this.addrip === '') {
|
||||
uni.showToast({
|
||||
@@ -55,16 +61,14 @@
|
||||
})
|
||||
},
|
||||
async _pdaUpdate () {
|
||||
let res = await pdaUpdate()
|
||||
if (res.versionName === this.version) {
|
||||
uni.showToast({
|
||||
title: '当前为最新版本',
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
try {
|
||||
let res = await pdaUpdate()
|
||||
this.grade = true
|
||||
this.androidUrl = res.url
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
},
|
||||
closeUpdate () {
|
||||
this.grade = false
|
||||
@@ -84,7 +88,6 @@
|
||||
margin-bottom 10vh
|
||||
.input-wrap
|
||||
width 100%
|
||||
margin-bottom 10vh
|
||||
.input-label
|
||||
_font(30rpx,70rpx,#333)
|
||||
margin-bottom 2vh
|
||||
@@ -110,4 +113,6 @@
|
||||
position: absolute
|
||||
bottom: 30rpx
|
||||
_font(30rpx, 60rpx, #999,,center)
|
||||
.setup-text
|
||||
_font(28rpx, 28rpx,$red,,right)
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user