feat: 给艳姐增加外部链接

This commit is contained in:
kenny
2025-11-05 11:11:58 +08:00
parent d18c097f54
commit fb2e1794ca
7 changed files with 57 additions and 15 deletions
+11 -1
View File
@@ -55,6 +55,9 @@
import STabs from './components/STabs.vue';
import SGridClothes from './components/s-grid-clothes.vue';
import Clothespic from './components/Clothespic.vue'; // 隐藏原生tabBar
import ReportApi from '@/sheep/api/report';
const { getToken } = ReportApi;
const fittingRoomStore = sheep.$store('fittingRoom');
let timer = null;
@@ -102,7 +105,14 @@
// const template = computed(() => sheep.$store('app').template?.home);
onLoad((options) => {
onLoad(async (options) => {
if(!options?.token) {
const href = window.location.href
const res = await getToken();
window.location.href = `${href}?token=${res.data.accessToken}&open=1`
return
}
uni.setStorageSync('token', options?.token ?? 'a2ae4e11fb8f4393aafcce7de467d2e2');
console.log('🚀 ~ URL上的token ~ options?.token: ', options?.token);
fittingRoomStore.getCategory();