This commit is contained in:
3321822538@qq.com 2024-10-18 18:03:52 +08:00
parent 0888b7e412
commit 4ad464a51c
3 changed files with 18 additions and 5 deletions

View File

@ -19,8 +19,8 @@ const install = (Vue, vm) => {
// }, // },
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://192.168.2.81:3302', baseUrl: 'http://192.168.2.106:3302',
baseUrl: 'https://kang.chuangtewl.com/prod-api', // baseUrl: 'https://kang.chuangtewl.com/prod-api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type

View File

@ -218,7 +218,12 @@
this.$u.get(`/app/device/${this.id}`).then(res =>{ this.$u.get(`/app/device/${this.id}`).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.obj = res.data this.obj = res.data
this.imgflag = res.data.isUsing // this.imgflag = res.data.isUsing
if(res.data.powerStatus == 1){
this.imgflag = true
}else{
this.imgflag = false
}
this.qrResult = res.data.mac this.qrResult = res.data.mac
} }
}) })

View File

@ -262,6 +262,16 @@
}) })
} }
}) })
}else if(res.code == 401){
uni.navigateTo({
url: '/pages/login/login?ids=' + 2
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 1500
})
} }
}) })
}, },
@ -315,8 +325,6 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/login?ids=' + 2 url: '/pages/login/login?ids=' + 2
}) })
} else if (res.cancel) {
} }
} }
}) })