添加分享房间链接和对战结束返回房间
This commit is contained in:
@@ -18,7 +18,18 @@ const totalPoints = ref(0);
|
||||
const rank = ref(0);
|
||||
|
||||
function exit() {
|
||||
uni.navigateBack();
|
||||
const battleInfo = uni.getStorageSync("last-battle");
|
||||
if (battleInfo && battleInfo.roomId) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/battle-room?roomNumber=${battleInfo.roomId}`,
|
||||
});
|
||||
} else if (data.value.roomId) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/battle-room?roomNumber=${data.value.roomId}`,
|
||||
});
|
||||
} else {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(async (options) => {
|
||||
@@ -310,7 +321,7 @@ const checkBowData = () => {
|
||||
</text>
|
||||
<view class="op-btn">
|
||||
<view @click="checkBowData">查看成绩</view>
|
||||
<view @click="exit">退出</view>
|
||||
<view @click="exit">返回</view>
|
||||
</view>
|
||||
<UserUpgrade />
|
||||
</view>
|
||||
@@ -420,6 +431,7 @@ const checkBowData = () => {
|
||||
border-radius: 20px;
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
}
|
||||
.op-btn > view:last-child {
|
||||
color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user