diff --git a/common/http.interceptor.js b/common/http.interceptor.js index d3b08ad..c8fddde 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,8 +19,8 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - // baseUrl: 'http://192.168.2.81:3302', - baseUrl: 'https://kang.chuangtewl.com/prod-api', + baseUrl: 'http://192.168.2.106:3302', + // baseUrl: 'https://kang.chuangtewl.com/prod-api', loadingText: '努力加载中~', loadingTime: 800, // 设置自定义头部content-type diff --git a/page_user/deviceedit.vue b/page_user/deviceedit.vue index 7dca2f7..e40c05c 100644 --- a/page_user/deviceedit.vue +++ b/page_user/deviceedit.vue @@ -218,7 +218,12 @@ this.$u.get(`/app/device/${this.id}`).then(res =>{ if(res.code == 200){ 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 } }) diff --git a/pages/index/index.vue b/pages/index/index.vue index 4bd4cd6..22175fa 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -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({ url: '/pages/login/login?ids=' + 2 }) - } else if (res.cancel) { - } } })