.
This commit is contained in:
+10
-3
@@ -24,14 +24,21 @@
|
||||
const tokenCheckTimer = ref(null);
|
||||
const token = ref('');
|
||||
const webviewRef = ref();
|
||||
const webviewUrl = ref(
|
||||
`https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}`,
|
||||
);
|
||||
const webviewUrl = ref('');
|
||||
|
||||
onShow(async () => {
|
||||
if (!sheep.$store('user').isLogin) {
|
||||
uni.redirectTo({ url: '/pages/login/index' });
|
||||
}
|
||||
const tryOnId = uni.getStorageSync('tryOnId');
|
||||
const modelId = uni.getStorageSync('modelId');
|
||||
if (tryOnId && modelId) {
|
||||
webviewUrl.value = `https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}&id=${tryOnId}&modelId=${modelId}`;
|
||||
uni.setStorageSync('tryOnId', '');
|
||||
uni.setStorageSync('modelId', '');
|
||||
} else {
|
||||
webviewUrl.value = `https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}&t=${Date.now()}`;
|
||||
}
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
Reference in New Issue
Block a user