|
@@ -68,7 +68,6 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-const airkiss = requirePlugin("airkiss");
|
|
|
export default {
|
|
|
name: "my",
|
|
|
data() {
|
|
@@ -183,83 +182,34 @@ export default {
|
|
|
clientId: this.clientId,
|
|
|
userId: uni.getStorageSync("userId"),
|
|
|
devName: this.devName,
|
|
|
- height: 0,
|
|
|
- wifiName: this.wifiName,
|
|
|
- wifiPassword: this.wifiPassword,
|
|
|
- northAngle: 0,
|
|
|
mountPlain:
|
|
|
this.mountPlain == "" ? "mountPlain" : this.mountPlain,
|
|
|
installPosition: this.installPosition,
|
|
|
- xxStart: 0,
|
|
|
- xxEnd: 0,
|
|
|
- yyStart: 0,
|
|
|
- yyEnd: 0,
|
|
|
- zzStart: 0,
|
|
|
- zzEnd: 0,
|
|
|
- // statusLight: this.statusLight,
|
|
|
};
|
|
|
-
|
|
|
- if (this.editFlag) {
|
|
|
- this.$http
|
|
|
- .post("wap/device/updateDevice", deviceBandingParams, {
|
|
|
- header: {
|
|
|
- "Content-Type": "application/json;charset=UTF-8",
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: "绑定成功",
|
|
|
- icon: "success",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- uni.setStorageSync("devId", res.data.data.devId);
|
|
|
- uni.reLaunch({
|
|
|
- url:
|
|
|
- "/pagesA/roomSetting/roomSetting?devId=" +
|
|
|
- res.data.data.devId +
|
|
|
- "&clientId=" +
|
|
|
- res.data.data.clientId,
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: "none",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$http
|
|
|
- .post("wap/device/deviceBinding", deviceBandingParams, {
|
|
|
- header: {
|
|
|
- "Content-Type": "application/json;charset=UTF-8",
|
|
|
- },
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: "绑定成功",
|
|
|
- icon: "success",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- uni.setStorageSync("devId", res.data.data.devId);
|
|
|
- uni.reLaunch({
|
|
|
- url:
|
|
|
- "/pagesA/roomSetting/roomSetting?devId=" +
|
|
|
- res.data.data.devId +
|
|
|
- "&clientId=" +
|
|
|
- res.data.data.clientId,
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.data.message,
|
|
|
- icon: "none",
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$http
|
|
|
+ .post("wap/device/deviceBinding", deviceBandingParams, {
|
|
|
+ header: {
|
|
|
+ "Content-Type": "application/json;charset=UTF-8",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "绑定成功",
|
|
|
+ icon: "success",
|
|
|
+ duration: 1500,
|
|
|
+ });
|
|
|
+ uni.reLaunch({
|
|
|
+ url: "/pages/home/home",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: "none",
|
|
|
+ duration: 1500,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
setDevInfo(devInfo) {
|
|
|
this.clientId = devInfo.clientId;
|
|
@@ -313,9 +263,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- onUnload(options) {
|
|
|
- airkiss.stopAirkiss();
|
|
|
- },
|
|
|
+ onUnload(options) {},
|
|
|
onShow() {},
|
|
|
};
|
|
|
</script>
|