|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
- <view class="tips">请输入您的设备UUID:</view>
|
|
|
|
|
|
+ <view class="tips">请输入您的设备MAC地址:</view>
|
|
<!-- 搜索框 -->
|
|
<!-- 搜索框 -->
|
|
<view class="search_container">
|
|
<view class="search_container">
|
|
<input
|
|
<input
|
|
@@ -14,14 +14,14 @@
|
|
<button class="search_btn" type="submit" @click="getSubmit">绑定</button>
|
|
<button class="search_btn" type="submit" @click="getSubmit">绑定</button>
|
|
</view>
|
|
</view>
|
|
<view class="explain">
|
|
<view class="explain">
|
|
- UUID获取途径:设备页-当前连接设备-右上角箭头标展开详情-点击关于本机-单机UUID复制
|
|
|
|
- <br />(绑定验证成功文字提示:“绑定成功”并跳转下个页面,绑定验证UUID不正确提示文字“UUID不正确,请确认后重新输入,绑定成功后该页面不再展示”)
|
|
|
|
- <br />每个UUID限一个远程操作账号绑定,即只存在一个当前绑定远程操作账号,最新绑定的为当前绑定账号,其他账号自动失效,以此类推。</view
|
|
|
|
|
|
+ MAC地址获取途径:设备页-当前连接设备-右上角箭头标展开详情-点击关于本机-单机MAC地址复制
|
|
|
|
+ <br />(绑定验证成功文字提示:“绑定成功”并跳转下个页面,绑定验证MAC地址不正确提示文字“MAC地址不正确,请确认后重新输入,绑定成功后该页面不再展示”)
|
|
|
|
+ <br />每个MAC地址限一个远程操作账号绑定,即只存在一个当前绑定远程操作账号,最新绑定的为当前绑定账号,其他账号自动失效,以此类推。</view
|
|
>
|
|
>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
- <script>
|
|
|
|
|
|
+
|
|
|
|
+<script>
|
|
import { deviceBind, deviceBindInfo, getUserInfo } from "@/api/public.js";
|
|
import { deviceBind, deviceBindInfo, getUserInfo } from "@/api/public.js";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -29,7 +29,6 @@ export default {
|
|
code: "",
|
|
code: "",
|
|
state: "",
|
|
state: "",
|
|
openId: "",
|
|
openId: "",
|
|
- isBind: false,
|
|
|
|
inputValue: "",
|
|
inputValue: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -45,7 +44,7 @@ export default {
|
|
code: this.code,
|
|
code: this.code,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- this.openId = res.data.openId;
|
|
|
|
|
|
+ this.openId = res.data.openid;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -54,7 +53,7 @@ export default {
|
|
getSubmit() {
|
|
getSubmit() {
|
|
if (this.inputValue.trim().length === 0) {
|
|
if (this.inputValue.trim().length === 0) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: "UUID不能为空",
|
|
|
|
|
|
+ title: "MAC地址不能为空",
|
|
icon: "none",
|
|
icon: "none",
|
|
mask: true,
|
|
mask: true,
|
|
duration: 2000,
|
|
duration: 2000,
|
|
@@ -67,15 +66,15 @@ export default {
|
|
openId: this.openId,
|
|
openId: this.openId,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
- this.isBind = res.data.isBind;
|
|
|
|
|
|
+ var isBind = res.data.isBind;
|
|
///已经绑定
|
|
///已经绑定
|
|
- if (this.isBind) {
|
|
|
|
|
|
+ if (isBind) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
|
|
url: `/pages/public/remote?state=${this.state}&openId=${this.openId}`,
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
deviceBind({
|
|
deviceBind({
|
|
- deviceMac: this.uuid,
|
|
|
|
|
|
+ deviceMac: this.inputValue,
|
|
state: this.state,
|
|
state: this.state,
|
|
openId: this.openId,
|
|
openId: this.openId,
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
@@ -99,8 +98,8 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
-
|
|
|
|
- <style lang="scss" scoped>
|
|
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
.tips {
|
|
.tips {
|
|
margin-top: 40%;
|
|
margin-top: 40%;
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
@@ -117,6 +116,7 @@ export default {
|
|
.search_public {
|
|
.search_public {
|
|
background: #ededed;
|
|
background: #ededed;
|
|
height: 80rpx;
|
|
height: 80rpx;
|
|
|
|
+ line-height: 80rpx;
|
|
margin-left: 20rpx;
|
|
margin-left: 20rpx;
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
border-radius: 50rpx;
|
|
border-radius: 50rpx;
|
|
@@ -127,12 +127,14 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
.search_btn {
|
|
.search_btn {
|
|
- // height: 80rpx;
|
|
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ line-height: 80rpx;
|
|
|
|
+ margin-top: 20rpx;
|
|
width: 200rpx;
|
|
width: 200rpx;
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
text-align: center;
|
|
- font-size: 28rpx;
|
|
|
|
|
|
+ font-size: 30rpx;
|
|
border-radius: 50rpx;
|
|
border-radius: 50rpx;
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
}
|