From c96782e80074dea0e6d1e6cc0a7ec1b677b2655a Mon Sep 17 00:00:00 2001
From: "3321822538@qq.com" <3321822538@qq.com>
Date: Mon, 16 Dec 2024 16:50:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
page_fenbao/zhuce.vue | 5 +++--
page_user/wifijoint/index.vue | 11 ++++------
pages/shouye/index.vue | 38 ++++++++++++++---------------------
3 files changed, 22 insertions(+), 32 deletions(-)
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()
}