fix: bug修改

This commit is contained in:
kenny
2025-11-14 10:31:07 +08:00
parent bc74352cd5
commit b7928cdda0
5 changed files with 67 additions and 20 deletions
@@ -16,11 +16,13 @@
</template>
<script setup>
import sheep from '@/sheep';
import {watch} from 'vue'
const fittingRoomStore = sheep.$store('fittingRoom');
function tryItOn() {
fittingRoomStore.tryOn();
}
</script>
<style lang="scss" scoped>
.clothes-box {
+18 -5
View File
@@ -55,9 +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';
import ReportApi from '@/sheep/api/report';
const { getToken } = ReportApi;
const { getToken } = ReportApi;
const fittingRoomStore = sheep.$store('fittingRoom');
let timer = null;
@@ -106,10 +106,23 @@
// const template = computed(() => sheep.$store('app').template?.home);
onLoad(async (options) => {
if(!options?.token) {
const href = window.location.href
const queryObj = Object.assign({}, options);
if (options.token) {
// queryObj.open = queryObj.open || 0;
if(!queryObj.open) {
queryObj.open = 0;
const queryStr= Object.entries(queryObj).map(([k,v]) => `${k}=${v}`).join('&')
window.location.href = `${window.location.href.replace(/\?.*$/g, '')}?${queryStr}`
return
}
} else {
const res = await getToken();
window.location.href = `${href}?token=${res.data.accessToken}&open=1`
queryObj.open = queryObj.open || 1;
queryObj.token = res.data.accessToken;
const queryStr= Object.entries(queryObj).map(([k,v]) => `${k}=${v}`).join('&')
window.location.href = `${window.location.href.replace(/\?.*$/g, '')}?${queryStr}`
return
}