Browse Source

修改分享页bug

wangming 2 months ago
parent
commit
2bc8be6fe8

+ 9 - 2
src/pagesA/deviceDetail/deviceDetail.vue

@@ -330,8 +330,15 @@ export default {
                     if (res.data.data) {
                         this.devInfo = res.data.data;
                         this.devType = this.devInfo.devType;
-                        this.width = this.devInfo.width * 100;
-                        this.length = this.devInfo.length * 100;
+
+                        this.width =
+                            Math.abs(
+                                this.devInfo.yyEnd - this.devInfo.yyStart
+                            ) * 100;
+                        this.length =
+                            Math.abs(
+                                this.devInfo.xxEnd - this.devInfo.xxStart
+                            ) * 100;
                         this.xOffset =
                             (this.devInfo.xxStart + this.devInfo.xxEnd) * 50;
                         this.yOffset =

+ 9 - 2
src/pagesA/roomSetting/roomSetting.vue

@@ -646,8 +646,15 @@ export default {
                 .then((res) => {
                     if (res.data.data) {
                         this.devInfo = res.data.data;
-                        this.width = this.devInfo.width * 100;
-                        this.length = this.devInfo.length * 100;
+                        this.width =
+                            Math.abs(
+                                this.devInfo.yyEnd - this.devInfo.yyStart
+                            ) * 100;
+                        this.length =
+                            Math.abs(
+                                this.devInfo.xxEnd - this.devInfo.xxStart
+                            ) * 100;
+
                         this.xOffset =
                             (this.devInfo.xxStart + this.devInfo.xxEnd) * 50;
                         this.yOffset =

+ 1 - 0
src/pagesA/sharePages/sharePages.vue

@@ -152,6 +152,7 @@ export default {
         this.devInfo = JSON.parse(options.devInfo);
         this.sharePhone = options.phone;
     },
+    onShareAppMessage() {},
 };
 </script>
 <style lang="less" scoped>