|
|
@ -342,10 +342,21 @@ const hasShownTokenRule = ref({ |
|
|
|
const closeTokenRuleDialog = () => { |
|
|
|
tokenRuleDialogVisible.value = false; |
|
|
|
}; |
|
|
|
// 打开Token规则提示框 |
|
|
|
const openTokenRuleDialog = () => { |
|
|
|
tokenRuleDialogVisible.value = true; |
|
|
|
}; |
|
|
|
|
|
|
|
// 添加全局点击事件监听器,使任何点击动作都能关闭提示框 |
|
|
|
// 定义处理函数,以便正确移除事件监听器 |
|
|
|
const handleGlobalClick = () => { |
|
|
|
const handleGlobalClick = (event) => { |
|
|
|
// 检查点击事件是否来自"兑换规则"按钮 |
|
|
|
const changeRuleElement = document.querySelector('.changeRule'); |
|
|
|
if (changeRuleElement && (changeRuleElement === event.target || changeRuleElement.contains(event.target))) { |
|
|
|
// 如果点击的是"兑换规则"按钮,不关闭提示框 |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (tokenRuleDialogVisible.value) { |
|
|
|
tokenRuleDialogVisible.value = false; |
|
|
|
} |
|
|
@ -1137,9 +1148,9 @@ const goChange = async () => { |
|
|
|
confirmDialogVisible.value = false; |
|
|
|
dialogVisible.value = false; |
|
|
|
changeSuccessDialogVisible.value = true; |
|
|
|
setTimeout(() => { |
|
|
|
changeSuccessDialogVisible.value = false; |
|
|
|
}, 2000); |
|
|
|
// setTimeout(() => { |
|
|
|
// changeSuccessDialogVisible.value = false; |
|
|
|
// }, 2000); |
|
|
|
|
|
|
|
// 刷新次数 |
|
|
|
await chatStore.getUserCount(); |
|
|
@ -1293,7 +1304,7 @@ onUnmounted(() => { |
|
|
|
</div> |
|
|
|
<div class="backToHomeBtn" @click="backToHome()"> |
|
|
|
<img |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png" |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png" |
|
|
|
alt="返回首页" |
|
|
|
class="backImg" |
|
|
|
/> |
|
|
@ -1342,7 +1353,7 @@ onUnmounted(() => { |
|
|
|
</div> |
|
|
|
<div class="pc-backToHomeBtn" @click="backToHome()"> |
|
|
|
<img |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png" |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png" |
|
|
|
alt="返回首页" |
|
|
|
class="pc-backImg" |
|
|
|
/> |
|
|
@ -1487,7 +1498,7 @@ onUnmounted(() => { |
|
|
|
<!-- logo --> |
|
|
|
<div class="homepage-logo"> |
|
|
|
<img |
|
|
|
:src="back" |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/4c91fce359a1c184772857594c38e3b4.png" |
|
|
|
alt="返回按钮" |
|
|
|
class="backToHomeImg" |
|
|
|
@click="feedbackBack" |
|
|
@ -1506,7 +1517,7 @@ onUnmounted(() => { |
|
|
|
</div> |
|
|
|
<div class="backToHomeBtn" @click="backToHome()"> |
|
|
|
<img |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9cbc5b2eb2327bd04d015c19d8c3f1f9.png" |
|
|
|
src="https://d31zlh4on95l9h.cloudfront.net/images/9272c00f21a2724c3a76e375949ee1de.png" |
|
|
|
alt="返回首页" |
|
|
|
class="backImg" |
|
|
|
/> |
|
|
@ -1551,6 +1562,7 @@ onUnmounted(() => { |
|
|
|
</div> |
|
|
|
<div class="changeRule"> |
|
|
|
兑换规则:{{ changeRule.gold }}金币={{ changeRule.token }}Token |
|
|
|
<div @click="openTokenRuleDialog">点击查看详情</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="changeLevel"> |
|
|
@ -1610,7 +1622,9 @@ onUnmounted(() => { |
|
|
|
兑换Token |
|
|
|
<div class="changeRule"> |
|
|
|
(兑换规则:{{ changeRule.gold }}金币={{ changeRule.token }}Token) |
|
|
|
<div @click="openTokenRuleDialog">点击查看详情</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="changeLevelContent"> |
|
|
@ -1671,7 +1685,7 @@ onUnmounted(() => { |
|
|
|
v-model="confirmDialogVisible" |
|
|
|
:width="isMobile ? '60%' : '30%'" |
|
|
|
:show-close="false" |
|
|
|
:align-center="isMobile" |
|
|
|
align-center="true" |
|
|
|
> |
|
|
|
<div class="confirmDialogTitle">兑换</div> |
|
|
|
<div class="confirmDialogContent"> |
|
|
@ -1692,12 +1706,19 @@ onUnmounted(() => { |
|
|
|
:width="isMobile ? '60%' : '30%'" |
|
|
|
:show-close="false" |
|
|
|
class="changeSuccessDialog" |
|
|
|
:align-center="isMobile" |
|
|
|
align-center |
|
|
|
center |
|
|
|
> |
|
|
|
<div class="changeSuccessDialogTitle">兑换成功</div> |
|
|
|
<div class="changeSuccessDialogTitle"> |
|
|
|
<img v-if="!isMobile" src="https://d31zlh4on95l9h.cloudfront.net/images/84edd341b2ddec464fc4475254f7a309.png" style="scale: 0.7;" alt="token图标"> |
|
|
|
兑换成功 |
|
|
|
</div> |
|
|
|
<div class="changeSuccessDialogContent"> |
|
|
|
尊敬的用户,恭喜您成功兑换:{{ activeLevel.calculatedPosition }} Token |
|
|
|
</div> |
|
|
|
<div class="changeSuccessDialogFooter"> |
|
|
|
<button class="confirmButton" @click="changeSuccessDialogVisible = false">确定</button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- Token规则提示框 --> |
|
|
@ -2029,6 +2050,7 @@ body { |
|
|
|
position: absolute; |
|
|
|
right: 20px; |
|
|
|
display: flex; |
|
|
|
gap: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.pc-countBtn { |
|
|
@ -2345,6 +2367,7 @@ body { |
|
|
|
|
|
|
|
.changeRule { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
background-color: #f8f8f8; |
|
|
|
border-radius: 5px; |
|
|
|
text-align: center; |
|
|
@ -2354,6 +2377,14 @@ body { |
|
|
|
white-space: nowrap; |
|
|
|
padding: 5px 20px; |
|
|
|
min-width: 40%; |
|
|
|
transition: all 0.3s ease; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.changeRule:hover { |
|
|
|
background-color: #e8f0ff; |
|
|
|
box-shadow: 0 2px 8px rgba(78, 134, 254, 0.2); |
|
|
|
transform: translateY(-2px); |
|
|
|
} |
|
|
|
|
|
|
|
.changeLevel { |
|
|
@ -2544,7 +2575,17 @@ body { |
|
|
|
.changeSuccessDialogTitle { |
|
|
|
font-size: 1.7rem; |
|
|
|
font-weight: bold; |
|
|
|
color: #de93a3; |
|
|
|
color: #7849DE; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
letter-spacing: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.changeSuccessDialogTitle image{ |
|
|
|
font-size: 1.7rem; |
|
|
|
font-weight: bold; |
|
|
|
color: #7849DE; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
@ -2553,6 +2594,7 @@ body { |
|
|
|
|
|
|
|
.changeSuccessDialogContent { |
|
|
|
padding: 20px; |
|
|
|
color: white; |
|
|
|
font-size: 1.2rem; |
|
|
|
font-weight: bold; |
|
|
|
text-align: center; |
|
|
@ -2701,7 +2743,7 @@ body { |
|
|
|
} |
|
|
|
|
|
|
|
.backImg { |
|
|
|
width: 40px; |
|
|
|
width: 35px; |
|
|
|
height: auto; |
|
|
|
} |
|
|
|
|
|
|
@ -2741,6 +2783,7 @@ body { |
|
|
|
.changeLevelTitle { |
|
|
|
align-items: center; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
.changeRule { |
|
|
|
margin-left: 10px; |
|
|
@ -2836,6 +2879,29 @@ body { |
|
|
|
|
|
|
|
<style> |
|
|
|
.changeSuccessDialog { |
|
|
|
background: linear-gradient(180deg, #a2dffe, #b59be1); |
|
|
|
background: linear-gradient(180deg, #80D3F8, #8080FF); |
|
|
|
} |
|
|
|
|
|
|
|
.changeSuccessDialogFooter { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
margin-top: 20px; |
|
|
|
} |
|
|
|
|
|
|
|
.confirmButton { |
|
|
|
background: #8A52DF; |
|
|
|
color: white; |
|
|
|
border: none; |
|
|
|
border-radius: 5px; |
|
|
|
padding: 8px 30px; |
|
|
|
font-size: 16px; |
|
|
|
cursor: pointer; |
|
|
|
transition: all 0.3s ease; |
|
|
|
} |
|
|
|
|
|
|
|
.confirmButton:hover { |
|
|
|
background: #3a75e6; |
|
|
|
transform: translateY(-2px); |
|
|
|
box-shadow: 0 2px 8px rgba(78, 134, 254, 0.3); |
|
|
|
} |
|
|
|
</style> |