|
|
@@ -5,6 +5,8 @@ import baseResourceUrl from "@/utils/https";
|
|
|
import axios from 'axios'
|
|
|
import { Base64 } from "js-base64"
|
|
|
import encodeStr from "@/utils/pass"
|
|
|
+// import { Toast } from 'vant';
|
|
|
+
|
|
|
|
|
|
// 为 window 添加属性ts类型
|
|
|
// gei window 增加函数,让子页面去触发
|
|
|
@@ -154,17 +156,17 @@ const goHotCamarer = (hot: any) => {
|
|
|
localStorage.setItem('currentUnit', JSON.stringify(currentHotsUnit.value))
|
|
|
pointInfo.value = ''
|
|
|
// isShowExperienceGame.value = true
|
|
|
+ isShowHosList.value = false
|
|
|
setTimeout(() => {
|
|
|
const iframe = document.getElementById('sceneiframe') as HTMLIFrameElement
|
|
|
//@ts-ignore
|
|
|
iframe.contentWindow.initCamera(hot.sid)
|
|
|
-
|
|
|
currentHot.value = hot
|
|
|
console.log(currentHot.value)
|
|
|
-
|
|
|
- clostHotListFu()
|
|
|
+ //@ts-ignore
|
|
|
+ iframe.contentWindow.closeHotListIcon()
|
|
|
isShowFigure.value = true
|
|
|
- }, 1500)
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
|
|
|
const clostHotListFu = () => {
|
|
|
@@ -233,6 +235,29 @@ const checkLoginStatus = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const Toast = (text: string) => {
|
|
|
+ let toastDom:HTMLElement = document.createElement('div')
|
|
|
+ toastDom.innerText = text
|
|
|
+ toastDom.style.padding = '5px 15px'
|
|
|
+ toastDom.style.display = 'flex'
|
|
|
+ toastDom.style.justifyItems = 'center'
|
|
|
+ toastDom.style.alignItems = 'center'
|
|
|
+ toastDom.style.position = 'fixed'
|
|
|
+ toastDom.style.left = '50%'
|
|
|
+ toastDom.style.top = '5%'
|
|
|
+ toastDom.style.transform = 'translateX(-50%)'
|
|
|
+ toastDom.style.background = '#fff'
|
|
|
+ toastDom.style.zIndex = '99'
|
|
|
+ toastDom.style.borderRadius = '50px'
|
|
|
+ toastDom.style.boxShadow='0px 4px 16px 0px rgba(0, 0, 0, 0.5)'
|
|
|
+ toastDom.style.fontSize = '15px'
|
|
|
+ document.body.appendChild(toastDom);
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ document.body.removeChild(toastDom);
|
|
|
+ }, 2000)
|
|
|
+}
|
|
|
+
|
|
|
// 内嵌小游戏界面打开
|
|
|
const openGame = (index: any) => {
|
|
|
router.push({
|
|
|
@@ -285,9 +310,11 @@ const isPassChange = ref(false)
|
|
|
|
|
|
const changePassword = () => {
|
|
|
if (oldPass.value == '' || newPass.value == '' || affirmPass.value == '') {
|
|
|
- alert('密码不能为空')
|
|
|
+ Toast('密码不能为空');
|
|
|
+ // alert('密码不能为空')
|
|
|
} else if (newPass.value != affirmPass.value) {
|
|
|
- alert('两次密码不一致')
|
|
|
+ // alert('两次密码不一致')
|
|
|
+ Toast('两次密码不一致')
|
|
|
} else {
|
|
|
console.log(oldPass.value, newPass.value, affirmPass.value)
|
|
|
const pwdNewEncrypted = encodeStr(Base64.encode(newPass.value))
|
|
|
@@ -304,6 +331,7 @@ const changePassword = () => {
|
|
|
}
|
|
|
}).then(() => {
|
|
|
alert('修改成功,请重新进行登录')
|
|
|
+ // Toast)
|
|
|
logout()
|
|
|
isLogin.value = false
|
|
|
isPassChange.value = false
|
|
|
@@ -330,9 +358,13 @@ const changeThemeFu = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const changeXuLeiReady = ref(true)
|
|
|
+
|
|
|
// 当自主变换主题时候,帧数也对应发生改变
|
|
|
watch(() => store.customThemeId, () => {
|
|
|
console.log('主题发生改变')
|
|
|
+ isReady.value = false
|
|
|
+ changeXuLeiReady.value = false
|
|
|
const newTheme = store.dataAll.sceneList.find((item: any) => {
|
|
|
return item.id == store.customThemeId
|
|
|
})
|
|
|
@@ -340,6 +372,15 @@ watch(() => store.customThemeId, () => {
|
|
|
animalZhenShuNumber.value = newTheme.xuliezhen[animalStat.value].zhenShu
|
|
|
duration.value = newTheme.xuliezhen[animalStat.value].duration
|
|
|
}
|
|
|
+ // alert(animalZhenShuNumber.value)
|
|
|
+ // alert(duration.value)
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ isReady.value = true
|
|
|
+ changeXuLeiReady.value = true
|
|
|
+ }, 200)
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -604,7 +645,7 @@ const changePassFu = () => {
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 形象切换序列帧 -->
|
|
|
- <div class="xuliezhen-greeting changing"
|
|
|
+ <div class="xuliezhen-greeting changing" v-show="changeXuLeiReady"
|
|
|
:style="{ backgroundImage: `url(${baseResourceUrl}/animation/${store.customThemeId != null ? store.customThemeId : currentUnit.id}/greeting.png)`, backgroundSize: 'cover' }">
|
|
|
</div>
|
|
|
<div></div>
|