diff --git a/page_fenbao/zhuce.vue b/page_fenbao/zhuce.vue index 1291702..5018d9d 100644 --- a/page_fenbao/zhuce.vue +++ b/page_fenbao/zhuce.vue @@ -32,7 +32,7 @@ 选择 - 控制 + 控制 @@ -352,8 +352,9 @@ }) }, btnkongzhi(e){ + console.log(e); uni.reLaunch({ - url:'/page_user/wifijoint/index?mac=' + e.name.substring(5) + url:'/page_user/wifijoint/index?sn=' + e }) }, parseCustomData(data) { diff --git a/page_user/wifijoint/index.vue b/page_user/wifijoint/index.vue index 78db1a3..d133a8e 100644 --- a/page_user/wifijoint/index.vue +++ b/page_user/wifijoint/index.vue @@ -14,9 +14,9 @@ - + placeholder-class="my-placeholder"/> + MAC号:{{obj.mac == undefined ? '--' : obj.mac}} @@ -84,10 +84,7 @@ if (options.sn) { this.storeId = options.sn this.getsn() - } else if (options.mac) { - this.storeIds = options.mac - this.getsn() - } + } }, // 分享到好友(会话) onShareAppMessage: function() { diff --git a/pages/shouye/index.vue b/pages/shouye/index.vue index b9097e6..650713b 100644 --- a/pages/shouye/index.vue +++ b/pages/shouye/index.vue @@ -177,6 +177,7 @@ }; }, onLoad(option) { + // this.getuserinfo() if (option.id) { let id = option.id let that = this @@ -193,34 +194,25 @@ } }) } else if (res.data == 1) { - console.log(1); - if(that.phonenumber == ''){ - that.huoqutelflag = true - that.xuanzeflag = false - console.log(11); - }else{ - console.log(12); - that.xuanzeflag = false - uni.showModal({ - title: '提示', - content: '该设备未绑定,你需进行绑定吗?', - success: function(res) { - if (res.confirm) { - that.$u.put("/app/device/bind", data).then(res => { + uni.showModal({ + title: '提示', + content: '该设备未绑定,你需进行绑定吗?', + success: function(res) { + if (res.confirm) { + that.$u.put("/app/device/bind", data).then(res => { + if (res.code == 200) { + that.$u.get(`/app/device/${id}/bySn`).then((res) => { if (res.code == 200) { - that.$u.get(`/app/device/${id}/bySn`).then((res) => { - if (res.code == 200) { - uni.navigateTo({ - url: '/page_components/bindsz?id=' + res.data.deviceId - }) - } + uni.navigateTo({ + url: '/page_components/bindsz?id=' + res.data.deviceId }) } }) } - } - }) + }) + } } + }) } else if (res.data == 0) { uni.showModal({ title: '提示', @@ -847,13 +839,13 @@ getuserinfo() { this.$u.get("/app/user/userInfo").then((res) => { if (res.code == 200) { + this.phonenumber = res.data.phonenumber this.type = res.data.type this.isStaff = res.data.isStaff this.isMch = res.data.isMch uni.setStorageSync('userType', res.data) this.userType = res.data.userType this.deviceCount = res.data.deviceCount - this.phonenumber = res.data.phonenumber } else { this.jmlogin() }