feat: 艳姐对外展示
This commit is contained in:
@@ -90,6 +90,9 @@
|
|||||||
// import { saveUserInfo } from './api';
|
// import { saveUserInfo } from './api';
|
||||||
import {saveUserInfo} from '@/sheep/api/user'
|
import {saveUserInfo} from '@/sheep/api/user'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
|
import ReportApi from '@/sheep/api/report';
|
||||||
|
|
||||||
|
const { getToken } = ReportApi;
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
// token: null,
|
// token: null,
|
||||||
@@ -103,7 +106,15 @@
|
|||||||
|
|
||||||
const token = ref('');
|
const token = ref('');
|
||||||
|
|
||||||
onLoad((e) => {
|
onLoad(async (e) => {
|
||||||
|
|
||||||
|
if (!e.token) {
|
||||||
|
const res = await getToken();
|
||||||
|
window.location.href =
|
||||||
|
window.location.href.replace(/\?.*$/g, '') + '?token=' + res.data.accessToken;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
token.value = e.token;
|
token.value = e.token;
|
||||||
uni.setStorageSync('token', e.token);
|
uni.setStorageSync('token', e.token);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import sheep from '@/sheep';
|
|||||||
|
|
||||||
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair', 'hair'];
|
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair', 'hair'];
|
||||||
|
|
||||||
|
const isOpened = window.location.href.includes('open=1');
|
||||||
|
console.log('isOpened: ', isOpened);
|
||||||
|
|
||||||
export const pattern = [
|
export const pattern = [
|
||||||
{ value: 'body', label: '胸' },
|
{ value: 'body', label: '胸' },
|
||||||
{ value: 'waist', label: '腰' },
|
{ value: 'waist', label: '腰' },
|
||||||
@@ -27,7 +30,7 @@ const fittingRoom = defineStore({
|
|||||||
modelList: [], // 模特列表
|
modelList: [], // 模特列表
|
||||||
currentModel: {},
|
currentModel: {},
|
||||||
type: false, // true: 我的衣橱, false: 衣服库
|
type: false, // true: 我的衣橱, false: 衣服库
|
||||||
tab: 6, // 对应下面tabs的序号
|
tab: isOpened ? 6: 0, // 对应下面tabs的序号
|
||||||
tabs: ['全部', '上衣', '下装', '连衣裙', '外套', '套装', '发型'],
|
tabs: ['全部', '上衣', '下装', '连衣裙', '外套', '套装', '发型'],
|
||||||
tabsMap: _tabsMap,
|
tabsMap: _tabsMap,
|
||||||
disableTabs: [6], // 不允许上传图的tab索引
|
disableTabs: [6], // 不允许上传图的tab索引
|
||||||
|
|||||||
Reference in New Issue
Block a user