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