feat: 给艳姐增加外部链接
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user