feat: 艳姐对外展示

This commit is contained in:
kenny
2025-11-05 19:34:22 +08:00
parent fb2e1794ca
commit bc74352cd5
2 changed files with 16 additions and 2 deletions
+12 -1
View File
@@ -90,6 +90,9 @@
// import { saveUserInfo } from './api';
import {saveUserInfo} from '@/sheep/api/user'
import { onLoad } from '@dcloudio/uni-app';
import ReportApi from '@/sheep/api/report';
const { getToken } = ReportApi;
const form = ref({
// token: null,
@@ -103,7 +106,15 @@
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;
uni.setStorageSync('token', e.token);
});
+4 -1
View File
@@ -5,6 +5,9 @@ import sheep from '@/sheep';
const _tabsMap = [undefined, 'topCloth', 'bottomCloth', 'dress', 'suit', 'hair', 'hair'];
const isOpened = window.location.href.includes('open=1');
console.log('isOpened: ', isOpened);
export const pattern = [
{ value: 'body', label: '胸' },
{ value: 'waist', label: '腰' },
@@ -27,7 +30,7 @@ const fittingRoom = defineStore({
modelList: [], // 模特列表
currentModel: {},
type: false, // true: 我的衣橱, false: 衣服库
tab: 6, // 对应下面tabs的序号
tab: isOpened ? 6: 0, // 对应下面tabs的序号
tabs: ['全部', '上衣', '下装', '连衣裙', '外套', '套装', '发型'],
tabsMap: _tabsMap,
disableTabs: [6], // 不允许上传图的tab索引