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 = () => { const handleMsg = () => {
uni.navigateTo({ uni.navigateTo({
url: "/pages/message/index", // url: "/pagesLogin/message/index", //
}); });
}; };
</script> </script>

View File

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

View File

@ -49,7 +49,7 @@ const tabMenuList = reactive([
[ [
"pagesStatistics/index", "pagesStatistics/index",
"pagesHome/index", "pagesHome/index",
"pages/profile/index", "pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 0 ].indexOf(pages[pages.length - 1].route) === 0
) { ) {
return; return;
@ -68,7 +68,7 @@ const tabMenuList = reactive([
[ [
"pagesStatistics/index", "pagesStatistics/index",
"pagesHome/index", "pagesHome/index",
"pages/profile/index", "pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 1 ].indexOf(pages[pages.length - 1].route) === 1
) { ) {
return; return;
@ -87,13 +87,13 @@ const tabMenuList = reactive([
[ [
"pagesStatistics/index", "pagesStatistics/index",
"pagesHome/index", "pagesHome/index",
"pages/profile/index", "pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route) === 2 ].indexOf(pages[pages.length - 1].route) === 2
) { ) {
return; return;
} }
uni.redirectTo({ uni.redirectTo({
url: "/pages/profile/index", // url: "/pagesLogin/profile/index", //
}); });
}, },
}, },
@ -106,14 +106,14 @@ onLoad(() => {
currentIndex.value = [ currentIndex.value = [
"pagesStatistics/index", "pagesStatistics/index",
"pagesHome/index", "pagesHome/index",
"pages/profile/index", "pagesLogin/profile/index",
].indexOf(pages[pages.length - 1].route); ].indexOf(pages[pages.length - 1].route);
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tabBar { .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; height: 140rpx;
background-size: cover; background-size: cover;
position: fixed; position: fixed;

View File

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

View File

@ -18,57 +18,6 @@
"navigationStyle": "custom", // "navigationStyle": "custom", //
"navigationBarTitleText": "工作台" "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 //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", // "root": "pagesHome",
// "pages": [ // "pages": [

View File

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

View File

@ -58,13 +58,13 @@
<template #suffix> <template #suffix>
<image <image
v-if="!item.isShowPwd" 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" class="custom-icon"
@click="item.isShowPwd = true" @click="item.isShowPwd = true"
></image> ></image>
<image <image
v-else 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" class="custom-icon"
@click="item.isShowPwd = false" @click="item.isShowPwd = false"
></image> ></image>

View File

@ -40,13 +40,13 @@
<template #suffix> <template #suffix>
<image <image
v-if="!isShowPwd" 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" class="custom-icon"
@click="isShowPwd = true" @click="isShowPwd = true"
></image> ></image>
<image <image
v-else 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" class="custom-icon"
@click="isShowPwd = false" @click="isShowPwd = false"
></image> ></image>
@ -166,7 +166,7 @@ const submit = () => {
}; };
const handleForgetPwd = () => { const handleForgetPwd = () => {
uni.navigateTo({ uni.navigateTo({
url: "/pages/login/forgetPwd", // url: "/pagesLogin/login/forgetPwd", //
}); });
}; };
</script> </script>

View File

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