update: pages内页面分包

This commit is contained in:
admin 2024-04-11 14:06:04 +08:00
parent 8b64b99c1d
commit 482a95a678
20 changed files with 63 additions and 72 deletions

View File

@ -48,7 +48,7 @@ onMounted(() => {
});
const handleMsg = () => {
uni.navigateTo({
url: "/pages/message/index", //
url: "/pagesLogin/message/index", //
});
};
</script>

View File

@ -29,7 +29,7 @@ onMounted(() => {
});
const handleMsg = () => {
uni.navigateTo({
url: "/pages/message/index", //
url: "/pagesLogin/message/index", //
});
};
</script>

View File

@ -49,7 +49,7 @@ const tabMenuList = reactive([
[
"pagesStatistics/index",
"pagesHome/index",
"pages/profile/index",
"pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 0
) {
return;
@ -68,7 +68,7 @@ const tabMenuList = reactive([
[
"pagesStatistics/index",
"pagesHome/index",
"pages/profile/index",
"pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 1
) {
return;
@ -87,13 +87,13 @@ const tabMenuList = reactive([
[
"pagesStatistics/index",
"pagesHome/index",
"pages/profile/index",
"pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 2
) {
return;
}
uni.redirectTo({
url: "/pages/profile/index", //
url: "/pagesLogin/profile/index", //
});
},
},
@ -106,14 +106,14 @@ onLoad(() => {
currentIndex.value = [
"pagesStatistics/index",
"pagesHome/index",
"pages/profile/index",
"pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route);
});
</script>
<style lang="scss" scoped>
.tabBar {
background: url("/static/img/TabMenu/bg.png");
background: url("https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/TabMenu/bg.png");
height: 140rpx;
background-size: cover;
position: fixed;

View File

@ -59,7 +59,7 @@
/* */
"mp-weixin": {
"appid": "wx9251d74fe0e87028",
"logoPath": "static/logo.png",
"logoPath": "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
"setting": {
"urlCheck": false
},

View File

@ -18,57 +18,6 @@
"navigationStyle": "custom", //
"navigationBarTitleText": "工作台"
}
},
{
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "登陆"
}
},
{
"path": "pages/index/shipmentSettlement",
"style": {
"navigationBarTitleText": "出货结算"
}
},
{
"path": "pages/index/settlement",
"style": {
"navigationBarTitleText": "待结算"
}
},
{
"path": "pages/login/forgetPwd",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/message/index",
"style": {
"navigationBarTitleText": "消息中心"
}
},
{
"path": "pages/profile/index",
"style": {
"navigationBarTitleText": "个人中心"
}
},
{
"path": "pages/profile/baseinfo",
"style": {
"navigationBarTitleText": "基础信息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/profile/modifyPwd",
"style": {
"navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#FFFFFF"
}
}
//pageshttps://uniapp.dcloud.io/collocation/pages
],
@ -84,6 +33,49 @@
}
]
},
{
"root": "pagesLogin",
"pages": [
{
"path": "login/index",
"style": {
"navigationBarTitleText": "登陆"
}
},
{
"path": "login/forgetPwd",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "message/index",
"style": {
"navigationBarTitleText": "消息中心"
}
},
{
"path": "profile/index",
"style": {
"navigationBarTitleText": "个人中心"
}
},
{
"path": "profile/baseinfo",
"style": {
"navigationBarTitleText": "基础信息",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "profile/modifyPwd",
"style": {
"navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#FFFFFF"
}
}
]
}
// {
// "root": "pagesHome",
// "pages": [

View File

@ -42,7 +42,7 @@ const list = [
];
const start = () => {
uni.navigateTo({
url: "/pages/login/index", //
url: "/pagesLogin/login/index", //
});
};
</script>

View File

@ -58,13 +58,13 @@
<template #suffix>
<image
v-if="!item.isShowPwd"
:src="`/static/img/login/hide.png`"
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
class="custom-icon"
@click="item.isShowPwd = true"
></image>
<image
v-else
:src="`/static/img/login/show.png`"
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/show.png`"
class="custom-icon"
@click="item.isShowPwd = false"
></image>

View File

@ -40,13 +40,13 @@
<template #suffix>
<image
v-if="!isShowPwd"
:src="`/static/img/login/hide.png`"
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/hide.png`"
class="custom-icon"
@click="isShowPwd = true"
></image>
<image
v-else
:src="`/static/img/login/show.png`"
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/login/show.png`"
class="custom-icon"
@click="isShowPwd = false"
></image>
@ -166,7 +166,7 @@ const submit = () => {
};
const handleForgetPwd = () => {
uni.navigateTo({
url: "/pages/login/forgetPwd", //
url: "/pagesLogin/login/forgetPwd", //
});
};
</script>

View File

@ -50,12 +50,12 @@ const list = reactive([
{
name: "基本信息",
icon: "baseinfo.png",
path: "/pages/profile/baseinfo",
path: "/pagesLogin/profile/baseinfo",
},
{
name: "修改密码",
icon: "modifyPwd.png",
path: "/pages/profile/modifyPwd",
path: "/pagesLogin/profile/modifyPwd",
},
{
name: "退出登录",
@ -67,12 +67,12 @@ const list = reactive([
const hanldeClick = (item: any) => {
if (item.name === "退出登录") {
uni.navigateTo({
url: "/pages/login/index", //
url: "/pagesLogin/login/index", //
});
ProfileApi.logOut().then((res: any) => {
if (res.code === 200) {
uni.navigateTo({
url: "/pages/login/index", //
url: "/pagesLogin/login/index", //
});
}
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -103,7 +103,7 @@ export const http = <T>(options: UniApp.RequestOptions) => {
});
store.clearProfile();
uni.navigateTo({
url: "/pages/login/index",
url: "/pagesLogin/login/index",
});
return;
}else if ((res1 as any).code === 10001) {