Parcourir la source

提交客服代码

wangming il y a 1 mois
Parent
commit
052465c7cc
1 fichiers modifiés avec 16 ajouts et 2 suppressions
  1. 16 2
      src/pages/home/home.vue

+ 16 - 2
src/pages/home/home.vue

@@ -182,8 +182,8 @@ export default {
             selectY: 0,
             screenWidth: 0,
             screenHeight: 0,
-            btnWidth: 0,
-            btnHeight: 0,
+            btnWidth: 80,
+            btnHeight: 80,
             margin: 0, // 边距
             windowWidth: 0,
             dragTimer: null,
@@ -349,6 +349,20 @@ export default {
         },
     },
     onLoad() {
+        // const sys = uni.getSystemInfoSync();
+        // this.windowWidth = sys.windowWidth;
+        // this.windowHeight = sys.windowHeight;
+
+        // // 初始化位置:右下角
+        // this.pos.x = this.windowWidth - this.btnWidth - this.margin;
+        // this.pos.y = this.windowHeight - this.btnHeight - this.margin;
+
+        // // 如果之前存储过位置,用存储覆盖
+        // const savedX = uni.getStorageSync("posLocationX");
+        // const savedY = uni.getStorageSync("posLocationY");
+        // if (savedX !== "" && savedX !== undefined) this.pos.x = savedX;
+        // if (savedY !== "" && savedY !== undefined) this.pos.y = savedY;
+
         if (
             !uni.getStorageSync("posLocationX") ||
             !uni.getStorageSync("posLocationY")