|
|
@ -237,8 +237,8 @@ watch( |
|
|
|
|
|
|
|
const sendMessage = async () => { |
|
|
|
if ( |
|
|
|
localStorage.getItem("aiGodToken") == null || |
|
|
|
localStorage.getItem("aiGodToken") == "" |
|
|
|
localStorage.getItem("localToken") == null || |
|
|
|
localStorage.getItem("localToken") == "" |
|
|
|
) { |
|
|
|
ElMessage.error("请先登录"); |
|
|
|
return; |
|
|
@ -637,7 +637,7 @@ watch( |
|
|
|
if (historyRecordRef.value && historyRecordRef.value.getHistoryList) { |
|
|
|
const result = historyRecordRef.value.getHistoryList({ |
|
|
|
model: activeTab.value == "AIchat" ? 1 : 2, |
|
|
|
token: localStorage.getItem("aiGodToken"), |
|
|
|
token: localStorage.getItem("localToken"), |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -680,18 +680,18 @@ const fnGetToken = () => { |
|
|
|
if (!ress.data.platform) { |
|
|
|
// 非App环境通过URL参数获取 |
|
|
|
localStorage.setItem( |
|
|
|
"aiGodToken", |
|
|
|
"localToken", |
|
|
|
decodeURIComponent(String(getQueryVariable("token"))) |
|
|
|
); |
|
|
|
// localStorage.setItem('aiGodToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w") |
|
|
|
// localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w") |
|
|
|
} else { |
|
|
|
// App环境通过桥接获取 |
|
|
|
useAppBridge().packageFun( |
|
|
|
"JWgetStorage", |
|
|
|
(response) => { |
|
|
|
const res = JSON.parse(response); // 解析返回的结果 |
|
|
|
localStorage.setItem("aiGodToken", res.data); |
|
|
|
// localStorage.setItem('aiGodToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w") |
|
|
|
localStorage.setItem("localToken", res.data); |
|
|
|
// localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w") |
|
|
|
}, |
|
|
|
5, |
|
|
|
{ |
|
|
@ -768,7 +768,7 @@ const throttledHeightListener = _.throttle(heightListener, 500, { |
|
|
|
// const url = encodeURI("http://39.101.133.168:8857/aixiaocaishen/homePage"); |
|
|
|
// console.log(url, "url"); |
|
|
|
// const platform = isMobile ? 2 : 1; |
|
|
|
// const token = encodeURIComponent(localStorage.getItem("aiGodToken")); |
|
|
|
// const token = encodeURIComponent(localStorage.getItem("localToken")); |
|
|
|
// console.log(token, "token"); |
|
|
|
// const rechargeUrl = |
|
|
|
// "http://39.101.133.168:8919/payment/recharge/index?" + |
|
|
@ -893,7 +893,7 @@ const throttledJudgeDevice = _.throttle(judgeDevice, 300, { |
|
|
|
const expandHistory = () => { |
|
|
|
// if (activeTab.value == "AIchat" || activeTab.value == "AiEmotion") { |
|
|
|
// historyRecordRef.value.getHistoryList({ |
|
|
|
// token: localStorage.getItem("aiGodToken"), |
|
|
|
// token: localStorage.getItem("localToken"), |
|
|
|
// model: activeTab.value == "AIchat" ? 1 : 2, |
|
|
|
// }); |
|
|
|
// } |
|
|
@ -937,7 +937,7 @@ const backToHome = () => { |
|
|
|
} else { |
|
|
|
window.parent.location.href = |
|
|
|
"https://web.homilychart.com/product/hljw/homepage?token=" + |
|
|
|
encodeURIComponent(localStorage.getItem("aiGodToken")); |
|
|
|
encodeURIComponent(localStorage.getItem("localToken")); |
|
|
|
} |
|
|
|
// window.parent.location.href = window.parent.document.referrer |
|
|
|
} |
|
|
@ -1000,7 +1000,7 @@ const showCount = async () => { |
|
|
|
const [res, res2] = await Promise.all([ |
|
|
|
showExchangeAPI(), |
|
|
|
getGoldCoinAPI({ |
|
|
|
token: String(localStorage.getItem("aiGodToken")), |
|
|
|
token: String(localStorage.getItem("localToken")), |
|
|
|
}), |
|
|
|
]); |
|
|
|
changeLevelList.value = res.data; |
|
|
@ -1058,13 +1058,13 @@ const goRecharge = () => { |
|
|
|
if (env == "development" || env == "test") { |
|
|
|
window.parent.location.href = |
|
|
|
"http://121.89.234.155:8807/user/myGold?token=" + |
|
|
|
encodeURIComponent(localStorage.getItem("aiGodToken")) + |
|
|
|
encodeURIComponent(localStorage.getItem("localToken")) + |
|
|
|
"&where=xiaocaishen&successUrl=https://hwjb.homilychart.com/aixiaocaishen/homePage"; |
|
|
|
// "&where=xiaocaishen&successUrl=http://192.168.1.5:3000/aixiaocaishen/homePage"; |
|
|
|
} else { |
|
|
|
window.parent.location.href = |
|
|
|
"https://web.homilychart.com/user/myGold?token=" + |
|
|
|
encodeURIComponent(localStorage.getItem("aiGodToken")) + |
|
|
|
encodeURIComponent(localStorage.getItem("localToken")) + |
|
|
|
"&where=xiaocaishen&successUrl=https://mp.homilychart.com/aixiaocaishen/homePage"; |
|
|
|
} |
|
|
|
// window.parent.location.href = window.parent.document.referrer |
|
|
@ -1074,7 +1074,7 @@ const goRecharge = () => { |
|
|
|
const goChange = async () => { |
|
|
|
try { |
|
|
|
await exchangeAPI({ |
|
|
|
token: String(localStorage.getItem("aiGodToken")), |
|
|
|
token: String(localStorage.getItem("localToken")), |
|
|
|
num: activeLevel.value.position, |
|
|
|
}); |
|
|
|
|
|
|
@ -1130,7 +1130,7 @@ onMounted(async () => { |
|
|
|
// 处理支付成功消息 |
|
|
|
const [res1, res2] = await Promise.all([ |
|
|
|
godExchangeAPI({ state: 1 }), |
|
|
|
getGoldCoinAPI({ token: String(localStorage.getItem("aiGodToken")) }), |
|
|
|
getGoldCoinAPI({ token: String(localStorage.getItem("localToken")) }), |
|
|
|
]); |
|
|
|
gold.value = res2.data.total; |
|
|
|
rechargeDialogVisible.value = false; |
|
|
|