联调接口
This commit is contained in:
@@ -110,7 +110,6 @@ onMounted(async () => {
|
|||||||
navBarPaddingTop.value = getNavBarPaddingTop();
|
navBarPaddingTop.value = getNavBarPaddingTop();
|
||||||
deviceId.value = uni.getStorageSync('app_device_id');// 本地设备ID
|
deviceId.value = uni.getStorageSync('app_device_id');// 本地设备ID
|
||||||
await selectBindStatus();
|
await selectBindStatus();
|
||||||
console.log("333bindStatus=>",bindStatus.value)
|
|
||||||
if(bindStatus.value==2){
|
if(bindStatus.value==2){
|
||||||
// bindStatus=2-----到等待页面(定时任务查询 10秒查询一次)
|
// bindStatus=2-----到等待页面(定时任务查询 10秒查询一次)
|
||||||
timer = setInterval(()=>{
|
timer = setInterval(()=>{
|
||||||
@@ -152,7 +151,7 @@ let refreshBindStatus = async ()=>{
|
|||||||
bindStatus.value = res.bindStatus;
|
bindStatus.value = res.bindStatus;
|
||||||
console.log("222bindStatus=>",bindStatus.value)
|
console.log("222bindStatus=>",bindStatus.value)
|
||||||
if(bindStatus.value==2){
|
if(bindStatus.value==2){
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if(bindStatus.value==4){
|
if(bindStatus.value==4){
|
||||||
if (userStore.isLogin) {
|
if (userStore.isLogin) {
|
||||||
@@ -165,7 +164,7 @@ let refreshBindStatus = async ()=>{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clearInterval(timer);
|
if (timer) clearInterval(timer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="v-bg">
|
<view class="v-bg">
|
||||||
<view class="v-title">发现新版本</view>
|
<view class="v-title">发现新版本</view>
|
||||||
<uni-icons custom-prefix="iconfont" color="#28B6FF" type="icon-phonefilled" size="40"></uni-icons>
|
<uni-icons custom-prefix="iconfont" color="#28B6FF" type="icon-phonefilled" size="40"></uni-icons>
|
||||||
<view class="v-version">最新版本 Version 8.1.2</view>
|
<view class="v-version">最新版本 Version {{ newVersion }}</view>
|
||||||
<view class="v-update">立刻更新吗?</view>
|
<view class="v-update">立刻更新吗?</view>
|
||||||
<view class="version-btn" @click="handleDown">更 新</view>
|
<view class="version-btn" @click="handleDown">更 新</view>
|
||||||
<view class="version-sub" @click="handleClose" v-if="btnVisible">暂不处理</view>
|
<view class="version-sub" @click="handleClose" v-if="btnVisible">暂不处理</view>
|
||||||
@@ -88,9 +88,11 @@ let getOSVesion = async()=>{
|
|||||||
appVersion.value = param.verNumber;
|
appVersion.value = param.verNumber;
|
||||||
// console.log("appVersion=>",appVersion)
|
// console.log("appVersion=>",appVersion)
|
||||||
versionData.value = param;
|
versionData.value = param;
|
||||||
|
console.log("versionCheck=>param=>",param)
|
||||||
let data = await versionCheck(param);
|
let data = await versionCheck(param);
|
||||||
|
console.log("versionCheck=>",data)
|
||||||
newVersion.value = data.verNumber;
|
newVersion.value = data.verNumber;
|
||||||
|
downloadURL.value = data.downloadUrl;
|
||||||
|
|
||||||
// isForceUpdate 是否强制更新 1-是 2-否
|
// isForceUpdate 是否强制更新 1-是 2-否
|
||||||
let isForceUpdate = data.isForceUpdate;
|
let isForceUpdate = data.isForceUpdate;
|
||||||
@@ -106,28 +108,6 @@ let getOSVesion = async()=>{
|
|||||||
}else{
|
}else{
|
||||||
versionVisible.value=true;
|
versionVisible.value=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 版本状态 0-最新版本 1-有新版本,但现有版本可用 2-现有版本不可用,需要下载新版本
|
|
||||||
// if(data.status == 1 || data.status == 2){
|
|
||||||
// versionVisible.value = true;
|
|
||||||
// downloadURL.value = data.downloadURL;
|
|
||||||
// // 可用版本列表
|
|
||||||
// let availableVersionsList = data.availableVersionsList;
|
|
||||||
// // let versionList = availableVersionsList.split(",");
|
|
||||||
// if(availableVersionsList.indexOf(appVersion.value)>-1){
|
|
||||||
|
|
||||||
// }else{
|
|
||||||
// btnVisible.value = false;
|
|
||||||
// }
|
|
||||||
// // }else{
|
|
||||||
// if(userStore.isLogin){
|
|
||||||
// // _this.getUserInfo();
|
|
||||||
// }else{
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url: '/pages/home/home',
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询设备ID
|
// 查询设备ID
|
||||||
|
|||||||
Reference in New Issue
Block a user