This commit is contained in:
杨鹏
2025-09-28 17:36:37 +08:00
parent aed85c92df
commit c4d508bb4f
6 changed files with 39 additions and 19 deletions
+1 -1
View File
@@ -52,7 +52,7 @@
} }
}); });
const url = ref('https://www.baidu.com'); const url = ref('https://fitting-room.huimeimeta.com/pages/report/index');
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
-2
View File
@@ -130,8 +130,6 @@
onLoad(async (params) => { onLoad(async (params) => {
await getCategoryList(); await getCategoryList();
getList(); getList();
// await CategoryApi.getCategoryTree();
}); });
const categoryState = reactive({ const categoryState = reactive({
+34 -4
View File
@@ -1,9 +1,39 @@
<template> <template>
<s-layout title="试衣间" tabbar="/pages/index/room" navbar="custom" :bgStyle="{ color: '#fff' }"> <view>
试衣间 <s-layout title="试衣间" navbar="custom" tabbar="" :bgStyle="{ color: '#fff' }">
</s-layout> <web-view :src="url">
<cover-view-tabbar activeUrl="/pages/index/room" />
</web-view>
</s-layout>
</view>
</template> </template>
<script setup></script> <script setup>
import { computed, ref } from 'vue';
import { onLoad, onUnload, onPageScroll, onPullDownRefresh, onShow } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import $share from '@/sheep/platform/share';
import CoverViewTabbar from '@/pages/index/components/cover-view-tabbar.vue';
import { getAccessToken } from '@/sheep/request';
// 隐藏原生tabBar
uni.hideTabBar({
fail: () => {},
});
onShow(async () => {
if (!sheep.$store('user').isLogin) {
uni.redirectTo({ url: '/pages/login/index' });
}
});
onLoad(() => {});
onUnload(() => {});
const url = ref(
`https://fitting-room.huimeimeta.com/pages/fittingRoom/index?token=${getAccessToken()}`,
);
</script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>
+1 -9
View File
@@ -22,15 +22,7 @@ const CategoryApi = {
url: '/product/category/tree', url: '/product/category/tree',
method: 'GET', method: 'GET',
}); });
}, }
// 测试
test: (data) => {
return request({
url: '/cloth/list',
method: 'POST',
data,
});
},
}; };
export default CategoryApi; export default CategoryApi;
+2 -2
View File
@@ -75,7 +75,7 @@ http.interceptors.request.use(
// 自定义处理【auth 授权】:必须登录的接口,则跳出 AuthModal 登录弹窗 // 自定义处理【auth 授权】:必须登录的接口,则跳出 AuthModal 登录弹窗
if (config.custom.auth && !$store('user').isLogin) { if (config.custom.auth && !$store('user').isLogin) {
// showAuthModal(); // showAuthModal();
sheep.$router.go('/pages/login/index', {}, { redirect: true }); uni.redirectTo({ url: "/pages/login/index" });
return Promise.reject(); return Promise.reject();
} }
@@ -282,7 +282,7 @@ const refreshToken = async (config) => {
const handleAuthorized = () => { const handleAuthorized = () => {
const userStore = $store('user'); const userStore = $store('user');
userStore.logout(true); userStore.logout(true);
sheep.$router.go('/pages/login/index', {}, { redirect: true }); uni.redirectTo({ url: "/pages/login/index" });
// 登录超时 // 登录超时
return Promise.reject({ return Promise.reject({
code: 401, code: 401,
+1 -1
View File
@@ -60,7 +60,7 @@ const _go = (
// 页面登录拦截 // 页面登录拦截
if (nextRoute.meta?.auth && !$store('user').isLogin) { if (nextRoute.meta?.auth && !$store('user').isLogin) {
// showAuthModal(); // showAuthModal();
sheep.$router.go('/pages/login/index', {}, { redirect: true }); uni.redirectTo({ url: "/pages/login/index" });
return; return;
} }