|
@@ -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")
|