|
@@ -1,68 +1,78 @@
|
|
<template>
|
|
<template>
|
|
- <view class="home-land-container">
|
|
|
|
- <!-- 第三层:背景 -->
|
|
|
|
- <view class="background-layer"></view>
|
|
|
|
-
|
|
|
|
- <!-- 第二层:地图 -->
|
|
|
|
|
|
+ <view class="home-land-container">
|
|
|
|
+ <!-- 第三层:背景 -->
|
|
|
|
+ <view class="background-layer"></view>
|
|
|
|
+
|
|
|
|
+ <!-- 第二层:地图 -->
|
|
<view class="map-layer" id="mapLayer" :style="{ transform: `translateX(${translateX}px)` }" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @mousedown="onmousedown" @mousemove="onmousemove" @mouseup="onmouseup">
|
|
<view class="map-layer" id="mapLayer" :style="{ transform: `translateX(${translateX}px)` }" @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @mousedown="onmousedown" @mousemove="onmousemove" @mouseup="onmouseup">
|
|
<image class="island-image" src="/static/island/island.png" mode="widthFix" style="width:1536rpx; bottom: 0rpx;left: 0rpx; position: absolute;"></image>
|
|
<image class="island-image" src="/static/island/island.png" mode="widthFix" style="width:1536rpx; bottom: 0rpx;left: 0rpx; position: absolute;"></image>
|
|
- <view style="position: absolute;width: 670rpx;left: 340rpx; bottom:320rpx;align-items: center;">
|
|
|
|
|
|
+ <view style="position: absolute;width: 670rpx;left: 340rpx; bottom:320rpx;align-items: center;">
|
|
<image class="house-image" src="/static/island/building/home1.png" mode="widthFix" style="width:670rpx; position: static;" @click="onHouseClick" :animation="houseAnimationData"> </image>
|
|
<image class="house-image" src="/static/island/building/home1.png" mode="widthFix" style="width:670rpx; position: static;" @click="onHouseClick" :animation="houseAnimationData"> </image>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
- <view style="position: absolute;width: 300rpx;left:280rpx; bottom:200rpx;align-items: center;">
|
|
|
|
|
|
+ <view style="position: absolute;width: 300rpx;left:280rpx; bottom:200rpx;align-items: center;">
|
|
<image class="table-image" src="/static/island/building/workTable.png" mode="widthFix" style="width:670rpx; position: static;" @click="onTableClick" :animation="tableAnimationData"> </image>
|
|
<image class="table-image" src="/static/island/building/workTable.png" mode="widthFix" style="width:670rpx; position: static;" @click="onTableClick" :animation="tableAnimationData"> </image>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
- <view style="position: absolute;width:200rpx;left:660rpx; bottom:260rpx;align-items: center;">
|
|
|
|
|
|
+ <view style="position: absolute;width:200rpx;left:660rpx; bottom:260rpx;align-items: center;">
|
|
<image class="mailBox-image" src="/static/island/building/mailBox.png" mode="widthFix" style="width:670rpx; position: static;" > </image>
|
|
<image class="mailBox-image" src="/static/island/building/mailBox.png" mode="widthFix" style="width:670rpx; position: static;" > </image>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
- <view style="position: absolute;width:200rpx;left:1000rpx; bottom:450rpx;align-items: center;">
|
|
|
|
|
|
+ <view style="position: absolute;width:200rpx;left:1000rpx; bottom:450rpx;align-items: center;">
|
|
<image class="taskBoard-image" src="/static/island/building/taskBoard.png" mode="widthFix" style="width:670rpx; position: static;" @click="showTask" :animation="taskAnimationData"> </image>
|
|
<image class="taskBoard-image" src="/static/island/building/taskBoard.png" mode="widthFix" style="width:670rpx; position: static;" @click="showTask" :animation="taskAnimationData"> </image>
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 引导箭头 -->
|
|
|
|
|
|
+ <!-- 引导箭头 -->
|
|
<view class="guide-arrow" v-if="showGuideArrow" :style="{ left: guideArrowPosition.x + 'rpx', bottom: guideArrowPosition.y + 'rpx', transform: `rotate(${guideArrowPosition.r}deg)` }">
|
|
<view class="guide-arrow" v-if="showGuideArrow" :style="{ left: guideArrowPosition.x + 'rpx', bottom: guideArrowPosition.y + 'rpx', transform: `rotate(${guideArrowPosition.r}deg)` }">
|
|
- <image src="/static/island/arrow.png" mode="aspectFit"></image>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <image src="/static/island/arrow.png" mode="aspectFit"></image>
|
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 主岛箭头 -->
|
|
|
|
|
|
+ <!-- 主岛箭头 -->
|
|
<view class="main-arrow" @click="goToMainLand" :animation="mainArrowAnimation" :style="{ opacity: mainArrowVisible ? 1 : 0 }">
|
|
<view class="main-arrow" @click="goToMainLand" :animation="mainArrowAnimation" :style="{ opacity: mainArrowVisible ? 1 : 0 }">
|
|
- <!-- <image src="/static/island/main_arrow.png" mode="widthFix" style="width: 100rpx;"></image> -->
|
|
|
|
|
|
+ <!-- <image src="/static/island/main_arrow.png" mode="widthFix" style="width: 100rpx;"></image> -->
|
|
<view class="arrow" ></view>
|
|
<view class="arrow" ></view>
|
|
- <text class="main-text">主岛</text>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <!-- 第一层:UI -->
|
|
|
|
- <view class="ui-layer">
|
|
|
|
- <view class="ui-content">
|
|
|
|
- <!-- 添加货币计数器 -->
|
|
|
|
- <view class="currency-display" >
|
|
|
|
- <view class="currency-item">
|
|
|
|
- <image src="/static/island/UI/wd_icon_coin.png" mode="widthFix" class="currency-icon"></image>
|
|
|
|
- <text class="currency-value">{{userInfo.num_gmd}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="currency-item">
|
|
|
|
- <image src="/static/island/UI/wd_icon_xingyuan.png" mode="widthFix" class="currency-icon"></image>
|
|
|
|
- <text class="currency-value">{{userInfo.num_gmg}}</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="ui-buttons">
|
|
|
|
- <image src="/static/island/icon_backpack.png" mode="widthFix" style="width:100rpx" @click="showInventory"></image>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <!-- 对话框组件 -->
|
|
|
|
- <backpack-dialog :visible.sync="inventoryVisible" @close="onInventoryClose"></backpack-dialog>
|
|
|
|
- <character-dialog :visible.sync="characterVisible" @close="onCharacterClose"></character-dialog>
|
|
|
|
- <shop-dialog :visible.sync="shopVisible" @close="onShopClose" @buy="onShopBuy"></shop-dialog>
|
|
|
|
- <task-dialog class="task-dialog" :visible.sync="taskVisible" @close="onTaskClose" type="main"></task-dialog>
|
|
|
|
-
|
|
|
|
- <!-- 引导对话组件 -->
|
|
|
|
|
|
+ <text class="main-text">主岛</text>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <!-- 第一层:UI -->
|
|
|
|
+ <!-- <view class="ui-layer"> -->
|
|
|
|
+ <view class="ui-content">
|
|
|
|
+ <view class="status-bar"></view>
|
|
|
|
+ <view class="customHead">
|
|
|
|
+ <!-- 添加返回按钮 -->
|
|
|
|
+ <view class="back-button" @click="goBack()">
|
|
|
|
+ <image src="/static/island/UI/back_button.png" mode="widthFix" style="width:100rpx"></image>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- 添加货币计数器 -->
|
|
|
|
+ <view class="currency-display">
|
|
|
|
+ <view class="currency-item">
|
|
|
|
+ <image src="/static/island/UI/wd_icon_coin.png" mode="widthFix" class="currency-icon">
|
|
|
|
+ </image>
|
|
|
|
+ <text class="currency-value">{{ userInfo.num_gmd }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="currency-item">
|
|
|
|
+ <image src="/static/island/UI/wd_icon_xingyuan.png" mode="widthFix" class="currency-icon">
|
|
|
|
+ </image>
|
|
|
|
+ <text class="currency-value">{{ userInfo.num_gmg }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="ui-buttons">
|
|
|
|
+ <image src="/static/island/icon_backpack.png" mode="widthFix" style="width:100rpx"
|
|
|
|
+ @click="showInventory"></image>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <!-- </view> -->
|
|
|
|
+
|
|
|
|
+ <!-- 对话框组件 -->
|
|
|
|
+ <backpack-dialog :visible.sync="inventoryVisible" @close="onInventoryClose"></backpack-dialog>
|
|
|
|
+ <character-dialog :visible.sync="characterVisible" @close="onCharacterClose"></character-dialog>
|
|
|
|
+ <shop-dialog :visible.sync="shopVisible" @close="onShopClose" @buy="onShopBuy"></shop-dialog>
|
|
|
|
+ <task-dialog class="task-dialog" :visible.sync="taskVisible" @close="onTaskClose" type="main"></task-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 引导对话组件 -->
|
|
<talk-guide
|
|
<talk-guide
|
|
v-if="showTalkGuide"
|
|
v-if="showTalkGuide"
|
|
:guide-data="currentTalkData"
|
|
:guide-data="currentTalkData"
|
|
@@ -71,12 +81,12 @@
|
|
@talk-complete="onTalkComplete"
|
|
@talk-complete="onTalkComplete"
|
|
></talk-guide>
|
|
></talk-guide>
|
|
|
|
|
|
- <!-- 制造台对话框组件 -->
|
|
|
|
- <crafting-dialog :visible.sync="craftingVisible" @close="craftingVisible = false"></crafting-dialog>
|
|
|
|
|
|
+ <!-- 制造台对话框组件 -->
|
|
|
|
+ <crafting-dialog :visible.sync="craftingVisible" @close="craftingVisible = false"></crafting-dialog>
|
|
|
|
|
|
- <!-- 引导管理器 -->
|
|
|
|
- <guide-manager ref="guideManager"></guide-manager>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <!-- 引导管理器 -->
|
|
|
|
+ <guide-manager ref="guideManager"></guide-manager>
|
|
|
|
+ </view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@@ -106,7 +116,7 @@ export default {
|
|
startX: 0,
|
|
startX: 0,
|
|
currentX: 0,
|
|
currentX: 0,
|
|
isDragging : false,
|
|
isDragging : false,
|
|
-
|
|
|
|
|
|
+
|
|
// 获取屏幕宽度和背景宽度
|
|
// 获取屏幕宽度和背景宽度
|
|
screenWidth: 0,
|
|
screenWidth: 0,
|
|
backgroundWidth: 0,
|
|
backgroundWidth: 0,
|
|
@@ -180,7 +190,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
this.getUserMoney();
|
|
this.getUserMoney();
|
|
-
|
|
|
|
|
|
+
|
|
// 启动定时器,每2秒更新一次铃钱
|
|
// 启动定时器,每2秒更新一次铃钱
|
|
this.moneyTimer = setInterval(() => {
|
|
this.moneyTimer = setInterval(() => {
|
|
this.getUserMoney();
|
|
this.getUserMoney();
|
|
@@ -219,22 +229,22 @@ export default {
|
|
// 获取岛屿图片的宽度和高度
|
|
// 获取岛屿图片的宽度和高度
|
|
this.backgroundWidth = data.width;
|
|
this.backgroundWidth = data.width;
|
|
this.islandHeight = data.height;
|
|
this.islandHeight = data.height;
|
|
-
|
|
|
|
|
|
+
|
|
// 计算最大可移动距离
|
|
// 计算最大可移动距离
|
|
this.maxTranslate = this.backgroundWidth - this.screenWidth;
|
|
this.maxTranslate = this.backgroundWidth - this.screenWidth;
|
|
-
|
|
|
|
|
|
+
|
|
// 初始位置居中
|
|
// 初始位置居中
|
|
// this.translateX = -this.maxTranslate / 2;
|
|
// this.translateX = -this.maxTranslate / 2;
|
|
// this.translateX = 0;
|
|
// this.translateX = 0;
|
|
-
|
|
|
|
|
|
+
|
|
// 打印调试信息
|
|
// 打印调试信息
|
|
// console.log('屏幕宽度:', this.screenWidth);
|
|
// console.log('屏幕宽度:', this.screenWidth);
|
|
// console.log('背景宽度:', this.backgroundWidth);
|
|
// console.log('背景宽度:', this.backgroundWidth);
|
|
// console.log('岛屿高度:', this.islandHeight);
|
|
// console.log('岛屿高度:', this.islandHeight);
|
|
// console.log('最大可移动距离:',this.maxTranslate);
|
|
// console.log('最大可移动距离:',this.maxTranslate);
|
|
-
|
|
|
|
|
|
+
|
|
// console.log('岛屿data:', data);
|
|
// console.log('岛屿data:', data);
|
|
-
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
console.error('未能获取岛屿图片的尺寸');
|
|
console.error('未能获取岛屿图片的尺寸');
|
|
}
|
|
}
|
|
@@ -244,22 +254,22 @@ export default {
|
|
touchStart(e) {
|
|
touchStart(e) {
|
|
this.startX = e.touches[0].clientX;
|
|
this.startX = e.touches[0].clientX;
|
|
this.currentX = this.translateX;
|
|
this.currentX = this.translateX;
|
|
- console.log('this.startX =',this.startX);
|
|
|
|
- console.log('this.currentX =',this.currentX);
|
|
|
|
|
|
+ console.log('this.startX =', this.startX);
|
|
|
|
+ console.log('this.currentX =', this.currentX);
|
|
},
|
|
},
|
|
// 触摸移动
|
|
// 触摸移动
|
|
touchMove(e) {
|
|
touchMove(e) {
|
|
console.log('----------- touchMove');
|
|
console.log('----------- touchMove');
|
|
const moveX = e.touches[0].clientX - this.startX;
|
|
const moveX = e.touches[0].clientX - this.startX;
|
|
let newTranslateX = this.currentX + moveX;
|
|
let newTranslateX = this.currentX + moveX;
|
|
-
|
|
|
|
|
|
+
|
|
// 限制移动范围,不让背景两侧露出
|
|
// 限制移动范围,不让背景两侧露出
|
|
if (newTranslateX > 0) {
|
|
if (newTranslateX > 0) {
|
|
newTranslateX = 0;
|
|
newTranslateX = 0;
|
|
} else if (newTranslateX < -this.maxTranslate) {
|
|
} else if (newTranslateX < -this.maxTranslate) {
|
|
newTranslateX = -this.maxTranslate;
|
|
newTranslateX = -this.maxTranslate;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.translateX = newTranslateX;
|
|
this.translateX = newTranslateX;
|
|
console.log('moveX =',moveX);
|
|
console.log('moveX =',moveX);
|
|
console.log('this.translateX =',this.translateX);
|
|
console.log('this.translateX =',this.translateX);
|
|
@@ -270,7 +280,7 @@ export default {
|
|
this.currentX = this.translateX;
|
|
this.currentX = this.translateX;
|
|
console.log('this.currentX =',this.currentX);
|
|
console.log('this.currentX =',this.currentX);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onmousedown(e) {
|
|
onmousedown(e) {
|
|
console.log('----------- onmousedown');
|
|
console.log('----------- onmousedown');
|
|
console.log('----------- e',e);
|
|
console.log('----------- e',e);
|
|
@@ -279,26 +289,26 @@ export default {
|
|
this.currentX = this.translateX;
|
|
this.currentX = this.translateX;
|
|
mapLayer.style.cursor = 'grabbing';
|
|
mapLayer.style.cursor = 'grabbing';
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onmousemove(e) {
|
|
onmousemove(e) {
|
|
if(this.isDragging){
|
|
if(this.isDragging){
|
|
console.log('----------- onmousemove');
|
|
console.log('----------- onmousemove');
|
|
const moveX = e.clientX - this.startX;
|
|
const moveX = e.clientX - this.startX;
|
|
let newTranslateX = this.currentX + moveX;
|
|
let newTranslateX = this.currentX + moveX;
|
|
-
|
|
|
|
|
|
+
|
|
//限制移动范围,不让背景两侧露出
|
|
//限制移动范围,不让背景两侧露出
|
|
if (newTranslateX > 0) {
|
|
if (newTranslateX > 0) {
|
|
newTranslateX = 0;
|
|
newTranslateX = 0;
|
|
} else if (newTranslateX < -this.maxTranslate) {
|
|
} else if (newTranslateX < -this.maxTranslate) {
|
|
newTranslateX = -this.maxTranslate;
|
|
newTranslateX = -this.maxTranslate;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.translateX = newTranslateX;
|
|
this.translateX = newTranslateX;
|
|
console.log('moveX =',moveX);
|
|
console.log('moveX =',moveX);
|
|
console.log('this.translateX =',this.translateX);
|
|
console.log('this.translateX =',this.translateX);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onmouseup(e) {
|
|
onmouseup(e) {
|
|
console.log('----------- onmouseup');
|
|
console.log('----------- onmouseup');
|
|
this.isDragging = false;
|
|
this.isDragging = false;
|
|
@@ -309,10 +319,10 @@ export default {
|
|
if(this.houseAnimating) return;
|
|
if(this.houseAnimating) return;
|
|
// 处理点击事件
|
|
// 处理点击事件
|
|
console.log('House clicked!');
|
|
console.log('House clicked!');
|
|
-
|
|
|
|
|
|
+
|
|
// 播放房子的点击动画
|
|
// 播放房子的点击动画
|
|
this.playAnimation('house');
|
|
this.playAnimation('house');
|
|
-
|
|
|
|
|
|
+
|
|
// uni.showToast({
|
|
// uni.showToast({
|
|
// title: 'House clicked!',
|
|
// title: 'House clicked!',
|
|
// icon: 'none'
|
|
// icon: 'none'
|
|
@@ -322,10 +332,10 @@ export default {
|
|
onTableClick(event) {
|
|
onTableClick(event) {
|
|
if(this.tableAnimating) return;
|
|
if(this.tableAnimating) return;
|
|
console.log('Table clicked!');
|
|
console.log('Table clicked!');
|
|
-
|
|
|
|
|
|
+
|
|
// 播放大厅的点击动画
|
|
// 播放大厅的点击动画
|
|
this.playAnimation('table');
|
|
this.playAnimation('table');
|
|
-
|
|
|
|
|
|
+
|
|
// 显示制造台界面
|
|
// 显示制造台界面
|
|
this.craftingVisible = true;
|
|
this.craftingVisible = true;
|
|
|
|
|
|
@@ -336,10 +346,10 @@ export default {
|
|
if(this.taskAnimating) return;
|
|
if(this.taskAnimating) return;
|
|
// 处理点击事件
|
|
// 处理点击事件
|
|
console.log('Task clicked!');
|
|
console.log('Task clicked!');
|
|
-
|
|
|
|
|
|
+
|
|
// 播放大厅的点击动画
|
|
// 播放大厅的点击动画
|
|
this.playAnimation('task');
|
|
this.playAnimation('task');
|
|
-
|
|
|
|
|
|
+
|
|
// uni.showToast({
|
|
// uni.showToast({
|
|
// title: 'task clicked!',
|
|
// title: 'task clicked!',
|
|
// icon: 'none'
|
|
// icon: 'none'
|
|
@@ -348,7 +358,7 @@ export default {
|
|
|
|
|
|
playAnimation(type) {
|
|
playAnimation(type) {
|
|
let self = this;
|
|
let self = this;
|
|
-
|
|
|
|
|
|
+
|
|
// 根据类型设置对应的动画状态
|
|
// 根据类型设置对应的动画状态
|
|
if (type === 'house') {
|
|
if (type === 'house') {
|
|
this.houseAnimating = true;
|
|
this.houseAnimating = true;
|
|
@@ -366,9 +376,9 @@ export default {
|
|
|
|
|
|
// 定义果冻动画序列
|
|
// 定义果冻动画序列
|
|
animation.scale(0.95).step({ duration: 100 })
|
|
animation.scale(0.95).step({ duration: 100 })
|
|
- .scale(1.05).step({ duration: 100 })
|
|
|
|
- .scale(0.98).step({ duration: 100 })
|
|
|
|
- .scale(1).step({ duration: 100 });
|
|
|
|
|
|
+ .scale(1.05).step({ duration: 100 })
|
|
|
|
+ .scale(0.98).step({ duration: 100 })
|
|
|
|
+ .scale(1).step({ duration: 100 });
|
|
|
|
|
|
// 根据类型应用动画到对应的元素
|
|
// 根据类型应用动画到对应的元素
|
|
if (type === 'house') {
|
|
if (type === 'house') {
|
|
@@ -509,7 +519,7 @@ export default {
|
|
// 调用引导管理器的下一步
|
|
// 调用引导管理器的下一步
|
|
console.log('----------- onTalkComplete');
|
|
console.log('----------- onTalkComplete');
|
|
this.$refs.guideManager && this.$refs.guideManager.nextStep();
|
|
this.$refs.guideManager && this.$refs.guideManager.nextStep();
|
|
-
|
|
|
|
|
|
+
|
|
// 获取新的对话数据
|
|
// 获取新的对话数据
|
|
const newTalkData = this.$refs.guideManager.getCurrentTalkData();
|
|
const newTalkData = this.$refs.guideManager.getCurrentTalkData();
|
|
console.log('----------- onTalkComplete newTalkData:', newTalkData);
|
|
console.log('----------- onTalkComplete newTalkData:', newTalkData);
|
|
@@ -536,7 +546,7 @@ export default {
|
|
if (this.$refs.guideManager) {
|
|
if (this.$refs.guideManager) {
|
|
const arrowPosition = this.$refs.guideManager.getCurrentArrowPosition();
|
|
const arrowPosition = this.$refs.guideManager.getCurrentArrowPosition();
|
|
console.log('----------- checkAndShowGuideArrow arrowPosition:', arrowPosition);
|
|
console.log('----------- checkAndShowGuideArrow arrowPosition:', arrowPosition);
|
|
-
|
|
|
|
|
|
+
|
|
if (arrowPosition) {
|
|
if (arrowPosition) {
|
|
// 显示引导箭头
|
|
// 显示引导箭头
|
|
this.showGuideArrow = true;
|
|
this.showGuideArrow = true;
|
|
@@ -546,7 +556,7 @@ export default {
|
|
y: arrowPosition.y,
|
|
y: arrowPosition.y,
|
|
r: arrowPosition.r || 0
|
|
r: arrowPosition.r || 0
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+
|
|
console.log('----------- guideArrowPosition:', this.guideArrowPosition);
|
|
console.log('----------- guideArrowPosition:', this.guideArrowPosition);
|
|
console.log('----------- showGuideArrow:', this.showGuideArrow);
|
|
console.log('----------- showGuideArrow:', this.showGuideArrow);
|
|
} else {
|
|
} else {
|
|
@@ -554,7 +564,12 @@ export default {
|
|
this.showGuideArrow = false;
|
|
this.showGuideArrow = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ goBack() {
|
|
|
|
+ uni.navigateBack({
|
|
|
|
+ delta: 1
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
this.mainArrowAnimating = false;
|
|
this.mainArrowAnimating = false;
|
|
@@ -565,121 +580,123 @@ export default {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@import './homeLand.scss';
|
|
@import './homeLand.scss';
|
|
-.ui-layer {
|
|
|
|
- position: fixed;
|
|
|
|
- top: 0;
|
|
|
|
- left: 0;
|
|
|
|
- right: 0;
|
|
|
|
- bottom: 0;
|
|
|
|
- pointer-events: none;
|
|
|
|
- z-index: 100;
|
|
|
|
-
|
|
|
|
- .ui-content {
|
|
|
|
- position: absolute;
|
|
|
|
- top: 20rpx;
|
|
|
|
- right: 20rpx;
|
|
|
|
- pointer-events: auto;
|
|
|
|
- z-index: 101;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .ui-buttons {
|
|
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- gap: 20rpx;
|
|
|
|
-
|
|
|
|
- .ui-button {
|
|
|
|
- background: rgba(255, 255, 255, 0.9);
|
|
|
|
- border: none;
|
|
|
|
- padding: 16rpx 32rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- font-size: 28rpx;
|
|
|
|
- color: #333;
|
|
|
|
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
|
|
- min-width: 120rpx;
|
|
|
|
-
|
|
|
|
- &:active {
|
|
|
|
- opacity: 0.8;
|
|
|
|
- transform: scale(0.95);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+// .ui-layer {
|
|
|
|
+// position: fixed;
|
|
|
|
+// top: 0;
|
|
|
|
+// left: 0;
|
|
|
|
+// right: 0;
|
|
|
|
+// bottom: 0;
|
|
|
|
+// pointer-events: none;
|
|
|
|
+// z-index: 100;
|
|
|
|
+
|
|
|
|
+ .ui-content {
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ width: 100%;
|
|
|
|
+ pointer-events: auto;
|
|
|
|
+ z-index: 101;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .ui-buttons {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ gap: 20rpx;
|
|
|
|
+
|
|
|
|
+ .ui-button {
|
|
|
|
+ background: rgba(255, 255, 255, 0.9);
|
|
|
|
+ border: none;
|
|
|
|
+ padding: 16rpx 32rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ font-size: 28rpx;
|
|
|
|
+ color: #333;
|
|
|
|
+ box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
|
|
+ min-width: 120rpx;
|
|
|
|
+
|
|
|
|
+ &:active {
|
|
|
|
+ opacity: 0.8;
|
|
|
|
+ transform: scale(0.95);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+// }
|
|
|
|
|
|
.map-layer {
|
|
.map-layer {
|
|
- position: relative;
|
|
|
|
- z-index: 1;
|
|
|
|
- cursor: grab;
|
|
|
|
-
|
|
|
|
- &:active {
|
|
|
|
- cursor: grabbing;
|
|
|
|
- }
|
|
|
|
|
|
+ position: relative;
|
|
|
|
+ z-index: 1;
|
|
|
|
+ cursor: grab;
|
|
|
|
+
|
|
|
|
+ &:active {
|
|
|
|
+ cursor: grabbing;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.guide-arrow {
|
|
.guide-arrow {
|
|
- position: absolute;
|
|
|
|
- z-index: 10;
|
|
|
|
- width: 100rpx;
|
|
|
|
- height: 100rpx;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: center;
|
|
|
|
- align-items: center;
|
|
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 10;
|
|
|
|
+ width: 100rpx;
|
|
|
|
+ height: 100rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
pointer-events: none; /* 防止箭头阻挡点击事件 */
|
|
pointer-events: none; /* 防止箭头阻挡点击事件 */
|
|
-
|
|
|
|
- image {
|
|
|
|
- width: 100rpx;
|
|
|
|
- height: 100rpx;
|
|
|
|
|
|
+
|
|
|
|
+ image {
|
|
|
|
+ width: 100rpx;
|
|
|
|
+ height: 100rpx;
|
|
animation: pulse 1.5s infinite; /* 添加脉冲动画 */
|
|
animation: pulse 1.5s infinite; /* 添加脉冲动画 */
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@keyframes pulse {
|
|
@keyframes pulse {
|
|
- 0% {
|
|
|
|
- transform: scale(1);
|
|
|
|
- opacity: 1;
|
|
|
|
- }
|
|
|
|
- 50% {
|
|
|
|
- transform: scale(1.2);
|
|
|
|
- opacity: 0.8;
|
|
|
|
- }
|
|
|
|
- 100% {
|
|
|
|
- transform: scale(1);
|
|
|
|
- opacity: 1;
|
|
|
|
- }
|
|
|
|
|
|
+ 0% {
|
|
|
|
+ transform: scale(1);
|
|
|
|
+ opacity: 1;
|
|
|
|
+ }
|
|
|
|
+ 50% {
|
|
|
|
+ transform: scale(1.2);
|
|
|
|
+ opacity: 0.8;
|
|
|
|
+ }
|
|
|
|
+ 100% {
|
|
|
|
+ transform: scale(1);
|
|
|
|
+ opacity: 1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.main-arrow {
|
|
.main-arrow {
|
|
-// background: rgba(255, 255, 255, 0.9);
|
|
|
|
- position: absolute;
|
|
|
|
- height: 190rpx;
|
|
|
|
- right: 50rpx;
|
|
|
|
|
|
+ // background: rgba(255, 255, 255, 0.9);
|
|
|
|
+ position: absolute;
|
|
|
|
+ height: 190rpx;
|
|
|
|
+ right: 50rpx;
|
|
bottom: 20rpx; // 改为 bottom 定位
|
|
bottom: 20rpx; // 改为 bottom 定位
|
|
- display: flex;
|
|
|
|
- flex-direction: column;
|
|
|
|
- align-items: center;
|
|
|
|
- cursor: pointer;
|
|
|
|
- z-index: 10;
|
|
|
|
- transition: opacity 0.5s ease-in-out;
|
|
|
|
-
|
|
|
|
- .arrow {
|
|
|
|
- content: '';
|
|
|
|
- display: block;
|
|
|
|
- width: 60rpx;
|
|
|
|
- height: 60rpx;
|
|
|
|
- background: url('/static/island/arrow.png') no-repeat center center;
|
|
|
|
- background-size: contain;
|
|
|
|
- transform: rotate(270deg);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .main-text {
|
|
|
|
- color: #ffffff;
|
|
|
|
- font-size: 32rpx;
|
|
|
|
- text-shadow: 2rpx 2rpx 4rpx rgba(0, 0, 0, 0.5);
|
|
|
|
- margin-top: 10rpx;
|
|
|
|
- }
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ z-index: 10;
|
|
|
|
+ transition: opacity 0.5s ease-in-out;
|
|
|
|
+
|
|
|
|
+ .arrow {
|
|
|
|
+ content: '';
|
|
|
|
+ display: block;
|
|
|
|
+ width: 60rpx;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ background: url('/static/island/arrow.png') no-repeat center center;
|
|
|
|
+ background-size: contain;
|
|
|
|
+ transform: rotate(270deg);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .main-text {
|
|
|
|
+ color: #ffffff;
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ text-shadow: 2rpx 2rpx 4rpx rgba(0, 0, 0, 0.5);
|
|
|
|
+ margin-top: 10rpx;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.task-dialog{
|
|
.task-dialog{
|
|
::v-deep.dialog-content{
|
|
::v-deep.dialog-content{
|
|
- background: transparent !important;
|
|
|
|
- }
|
|
|
|
|
|
+ background: transparent !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|