feat: 给艳姐增加外部链接
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<v-tabs
|
||||
v-model="fittingRoom.tab"
|
||||
:lineScale="0.2"
|
||||
:tabs="fittingRoom.tabs"
|
||||
:tabs="tabs"
|
||||
activeColor="#fff"
|
||||
bgColor="#000000"
|
||||
color="#fff"
|
||||
@@ -41,6 +41,16 @@
|
||||
|
||||
const fittingRoom = sheep.$store('fittingRoom');
|
||||
|
||||
const isOpened = window.location.href.includes('open=1')
|
||||
console.log('isOpened: ', isOpened);
|
||||
|
||||
const tabs = isOpened ? fittingRoom.tabs.slice(-1):fittingRoom.tabs
|
||||
|
||||
|
||||
|
||||
console.log('fittingRoom.tab: ', fittingRoom.tab);
|
||||
console.log('fittingRoom.tabs: ', fittingRoom.tabs);
|
||||
|
||||
function changeTab(index) {
|
||||
console.log('当前选中的项:' + index);
|
||||
fittingRoom.changeTab(index);
|
||||
|
||||
@@ -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