|
|
@ -2,7 +2,7 @@ |
|
|
|
// 导入 |
|
|
|
import { ref, computed, onMounted, watch, nextTick, onUnmounted, h } from "vue"; |
|
|
|
import { setHeight } from "../utils/setHeight"; |
|
|
|
import { getUserCountAPI } from "../api/AIxiaocaishen"; |
|
|
|
import { getUserCountAPI, showExchangeAPI } from "../api/AIxiaocaishen"; |
|
|
|
import { ElMessage } from "element-plus"; |
|
|
|
import AIchat from "./AIchat.vue"; |
|
|
|
import AIfind from "./AIfind.vue"; |
|
|
@ -348,17 +348,6 @@ const showFeedback = () => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
// 点击剩余次数会弹出的弹窗 |
|
|
|
// 新增一个 ref 来控制弹窗的显示与隐藏 |
|
|
|
const dialogVisible = ref(false); |
|
|
|
// 获取次数 |
|
|
|
const showCount = () => { |
|
|
|
console.log("显示剩余次数"); |
|
|
|
// 显示弹窗 |
|
|
|
dialogVisible.value = true; |
|
|
|
console.log("dialogVisible 的值:", dialogVisible.value); // 添加日志确认 |
|
|
|
}; |
|
|
|
|
|
|
|
// 保证发送消息时,滚动屏在底部 |
|
|
|
|
|
|
|
const tabContentAIchat = ref(null); |
|
|
@ -909,7 +898,10 @@ const userInfo = ref({ |
|
|
|
jwcode: "90042088", |
|
|
|
img: " https://d31zlh4on95l9h.cloudfront.net/images/403ef762dd2f335df3b0c9e3fe488375.png", |
|
|
|
}); |
|
|
|
const changeRule = ref("1金币=1Token"); |
|
|
|
const changeRule = ref({ |
|
|
|
gold:1, |
|
|
|
token:1, |
|
|
|
}); |
|
|
|
const changeLevelList = ref([ |
|
|
|
{ position: 10, calculatedPosition: 10 }, |
|
|
|
{ position: 20, calculatedPosition: 20 }, |
|
|
@ -922,12 +914,30 @@ const changeLevelList = ref([ |
|
|
|
const activeLevel = ref( |
|
|
|
changeLevelList.value[0] || { position: 10, calculatedPosition: 10 } |
|
|
|
); |
|
|
|
const gold = ref(100); |
|
|
|
|
|
|
|
const gold = ref(90); |
|
|
|
// 点击剩余次数会弹出的弹窗 |
|
|
|
// 新增一个 ref 来控制弹窗的显示与隐藏 |
|
|
|
const dialogVisible = ref(false); |
|
|
|
const rechargeDialogVisible = ref(false); |
|
|
|
const confirmDialogVisible = ref(false); |
|
|
|
const changeSuccessDialogVisible = ref(false); |
|
|
|
|
|
|
|
// 获取次数 |
|
|
|
const showCount = async () => { |
|
|
|
try { |
|
|
|
const res = await showExchangeAPI(); |
|
|
|
changeLevelList.value = res.data; |
|
|
|
activeLevel.value = changeLevelList.value[0]; |
|
|
|
changeRule.value.token=res.data[0].ratio; |
|
|
|
|
|
|
|
// 显示弹窗 |
|
|
|
dialogVisible.value = true; |
|
|
|
console.log("dialogVisible 的值:", dialogVisible.value); // 添加日志确认 |
|
|
|
} catch (e) { |
|
|
|
console.error("获取兑换列表出错", e); |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
const chooseLevel = (item) => { |
|
|
|
activeLevel.value = item; |
|
|
|
}; |
|
|
@ -1317,7 +1327,8 @@ onUnmounted(() => { |
|
|
|
<div class="changeJwcode">精网号:{{ userInfo.jwcode }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="changeRule">兑换规则:{{ changeRule }}</div> |
|
|
|
<div class="changeRule">兑换规则:{{ changeRule.gold }}金币={{ changeRule.token }}Token</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="changeLevel"> |
|
|
|
<div class="changeLevelTitle">兑换Token</div> |
|
|
@ -1669,9 +1680,8 @@ body { |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.backToHomeBtn:hover{ |
|
|
|
.backToHomeBtn:hover { |
|
|
|
transform: scale(1.05); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.backImg { |
|
|
|