update: pages内页面分包
This commit is contained in:
parent
8b64b99c1d
commit
482a95a678
|
@ -48,7 +48,7 @@ onMounted(() => {
|
|||
});
|
||||
const handleMsg = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/message/index", // 要跳转到的页面路径
|
||||
url: "/pagesLogin/message/index", // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -29,7 +29,7 @@ onMounted(() => {
|
|||
});
|
||||
const handleMsg = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/message/index", // 要跳转到的页面路径
|
||||
url: "/pagesLogin/message/index", // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
//pages数组中第一项表示应用启动页,参考:https://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": [
|
||||
|
|
|
@ -42,7 +42,7 @@ const list = [
|
|||
];
|
||||
const start = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/index", // 要跳转到的页面路径
|
||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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 |
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue