同步首页分类栏ui

This commit is contained in:
2026-05-19 17:45:27 +08:00
parent 00a859c551
commit b5ab00ab12
13 changed files with 2956 additions and 266 deletions

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -0,0 +1,461 @@
{
"pages": [
{
"path": "pages/main/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path": "pages/user/boot",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/user/login",
"style": {
"navigationBarTitleText": "用户登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/user/register",
"style": {
"navigationBarTitleText": "注册"
}
},
{
"path": "pages/user/forgot-password",
"style": {
"navigationBarTitleText": "忘记密码"
}
},
{
"path": "pages/user/terms",
"style": {
"navigationBarTitleText": "用户协议与隐私政策"
}
},
{
"path": "pages/user/center",
"style": {
"navigationBarTitleText": "用户中心"
}
},
{
"path": "pages/user/profile",
"style": {
"navigationBarTitleText": "个人资料"
}
},
{
"path": "pages/user/change-password",
"style": {
"navigationBarTitleText": "修改密码"
}
},
{
"path": "pages/user/bind-phone",
"style": {
"navigationBarTitleText": "绑定手机"
}
},
{
"path": "pages/user/bind-email",
"style": {
"navigationBarTitleText": "绑定邮箱"
}
},
{
"path": "pages/main/messages",
"style": {
"navigationBarTitleText": "消息",
"enablePullDownRefresh": true
}
},
{
"path": "pages/main/cart",
"style": {
"navigationBarTitleText": "购物车",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/profile",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle": "custom"
}
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
}
],
"subPackages": [
{
"root": "pages/mall/consumer",
"pages": [
{
"path": "settings",
"style": {
"navigationBarTitleText": "设置"
}
},
{
"path": "edit-profile",
"style": {
"navigationBarTitleText": "编辑资料"
}
},
{
"path": "wallet",
"style": {
"navigationBarTitleText": "我的钱包"
}
},
{
"path": "withdraw",
"style": {
"navigationBarTitleText": "余额提现"
}
},
{
"path": "search",
"style": {
"navigationBarTitleText": "搜索",
"navigationStyle": "custom"
}
},
{
"path": "product-detail",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "channel-detail",
"style": {
"navigationBarTitleText": "频道详情",
"navigationStyle": "custom"
}
},
{
"path": "shop-detail",
"style": {
"navigationBarTitleText": "店铺详情"
}
},
{
"path": "coupons",
"style": {
"navigationBarTitleText": "我的优惠券"
}
},
{
"path": "favorites",
"style": {
"navigationBarTitleText": "我的收藏"
}
},
{
"path": "footprint",
"style": {
"navigationBarTitleText": "我的足迹"
}
},
{
"path": "address",
"style": {
"navigationBarTitleText": "地址"
}
},
{
"path": "address-list",
"style": {
"navigationBarTitleText": "收货地址"
}
},
{
"path": "address-edit",
"style": {
"navigationBarTitleText": "编辑地址"
}
},
{
"path": "checkout",
"style": {
"navigationBarTitleText": "确认订单"
}
},
{
"path": "payment",
"style": {
"navigationBarTitleText": "收银台"
}
},
{
"path": "payment-success",
"style": {
"navigationBarTitleText": "支付成功",
"navigationStyle": "custom"
}
},
{
"path": "orders",
"style": {
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{
"path": "order-detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{
"path": "logistics",
"style": {
"navigationBarTitleText": "物流详情"
}
},
{
"path": "review",
"style": {
"navigationBarTitleText": "评价晒单"
}
},
{
"path": "refund",
"style": {
"navigationBarTitleText": "退款/售后"
}
},
{
"path": "apply-refund",
"style": {
"navigationBarTitleText": "申请售后"
}
},
{
"path": "refund-review",
"style": {
"navigationBarTitleText": "服务评价"
}
},
{
"path": "chat",
"style": {
"navigationBarTitleText": "客服聊天",
"navigationStyle": "custom"
}
},
{
"path": "chat_new",
"style": {
"navigationBarTitleText": "客服聊天(新版)"
}
},
{
"path": "subscription/plan-list",
"style": {
"navigationBarTitleText": "软件订阅"
}
},
{
"path": "subscription/plan-detail",
"style": {
"navigationBarTitleText": "订阅详情"
}
},
{
"path": "subscription/subscribe-checkout",
"style": {
"navigationBarTitleText": "确认订阅"
}
},
{
"path": "subscription/my-subscriptions",
"style": {
"navigationBarTitleText": "我的订阅"
}
},
{
"path": "subscription/followed-shops",
"style": {
"navigationBarTitleText": "关注店铺"
}
},
{
"path": "points/index",
"style": {
"navigationBarTitleText": "积分管理"
}
},
{
"path": "points/signin",
"style": {
"navigationBarTitleText": "签到"
}
},
{
"path": "points/exchange",
"style": {
"navigationBarTitleText": "积分兑换"
}
},
{
"path": "points/exchange-records",
"style": {
"navigationBarTitleText": "兑换记录"
}
},
{
"path": "red-packets/index",
"style": {
"navigationBarTitleText": "我的红包"
}
},
{
"path": "bank-cards/index",
"style": {
"navigationBarTitleText": "银行卡管理"
}
},
{
"path": "bank-cards/add",
"style": {
"navigationBarTitleText": "添加银行卡"
}
},
{
"path": "home-service/index",
"style": {
"navigationBarTitleText": "居家上门服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/apply",
"style": {
"navigationBarTitleText": "提交服务申请",
"navigationStyle": "custom"
}
},
{
"path": "home-service/service-detail",
"style": {
"navigationBarTitleText": "预约服务",
"navigationStyle": "custom"
}
},
{
"path": "home-service/order-detail",
"style": {
"navigationBarTitleText": "服务单详情",
"navigationStyle": "custom"
}
},
{
"path": "home-service/feedback",
"style": {
"navigationBarTitleText": "验收反馈",
"navigationStyle": "custom"
}
},
{
"path": "bank-cards/verify",
"style": {
"navigationBarTitleText": "银行卡验证"
}
},
{
"path": "balance/index",
"style": {
"navigationBarTitleText": "余额"
}
},
{
"path": "my-reviews",
"style": {
"navigationBarTitleText": "我的评价"
}
},
{
"path": "message-detail",
"style": {
"navigationBarTitleText": "消息详情"
}
},
{
"path": "member/index",
"style": {
"navigationBarTitleText": "会员中心"
}
},
{
"path": "product-reviews",
"style": {
"navigationBarTitleText": "商品评价"
}
}
]
}
],
"tabBar": {
"color": "#999999",
"selectedColor": "#ff5000",
"backgroundColor": "#ffffff",
"borderStyle": "black",
"list": [
{
"pagePath": "pages/main/index",
"text": "首页",
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png"
},
{
"pagePath": "pages/main/messages",
"text": "消息",
"iconPath": "static/tabbar/message.png",
"selectedIconPath": "static/tabbar/message.png"
},
{
"pagePath": "pages/main/cart",
"text": "购物车",
"iconPath": "static/tabbar/cart.png",
"selectedIconPath": "static/tabbar/cart.png"
},
{
"pagePath": "pages/main/profile",
"text": "我的",
"iconPath": "static/tabbar/user.png",
"selectedIconPath": "static/tabbar/user.png"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "mall",
"navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8"
},
"condition": {
"current": 0,
"list": [
{
"name": "consumer端",
"path": "pages/main/index",
"query": "role=consumer"
}
]
}
}

View File

@@ -6,7 +6,7 @@
:key="item.key" :key="item.key"
class="jd2-module-item" class="jd2-module-item"
:class="isServiceModule ? 'jd2-module-item-service' : ''" :class="isServiceModule ? 'jd2-module-item-service' : ''"
@click="emit('changeModule', item.key)" @click="emit('change-module', item.key)"
> >
<text :class="['jd2-module-text', activeModule == item.key ? 'jd2-module-text-active' : '', isServiceModule ? 'jd2-module-text-service' : '']">{{ item.label }}</text> <text :class="['jd2-module-text', activeModule == item.key ? 'jd2-module-text-active' : '', isServiceModule ? 'jd2-module-text-service' : '']">{{ item.label }}</text>
<view v-if="activeModule == item.key" :class="['jd2-module-line', isServiceModule ? 'jd2-module-line-service' : '']"></view> <view v-if="activeModule == item.key" :class="['jd2-module-line', isServiceModule ? 'jd2-module-line-service' : '']"></view>
@@ -34,18 +34,6 @@
</view> </view>
</view> </view>
<scroll-view v-if="showCategoryBar" class="jd2-category-scroll" direction="horizontal" :show-scrollbar="false">
<view class="jd2-category-row">
<view
v-for="item in categories"
:key="item.id"
class="jd2-category-item"
@click="emit('changeCategory', item.id)"
>
<text :class="['jd2-category-text', activeCategory == item.id ? 'jd2-category-text-active' : '']">{{ item.name }}</text>
</view>
</view>
</scroll-view>
</view> </view>
</template> </template>
@@ -86,20 +74,11 @@ const props = defineProps({
placeholder: { placeholder: {
type: String, type: String,
default: '' default: ''
},
categories: {
type: Array<TopCategoryItem>,
default: [] as Array<TopCategoryItem>
},
activeCategory: {
type: String,
default: ''
} }
}) })
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'changeModule', moduleKey: string): void (e: 'change-module', moduleKey: string): void
(e: 'changeCategory', categoryId: string): void
(e: 'update:searchKeyword', keyword: string): void (e: 'update:searchKeyword', keyword: string): void
(e: 'search', keyword: string): void (e: 'search', keyword: string): void
(e: 'focusSearch'): void (e: 'focusSearch'): void
@@ -108,7 +87,6 @@ const emit = defineEmits<{
const headerStyle = computed((): string => `padding-top:${props.statusBarHeight}px;`) const headerStyle = computed((): string => `padding-top:${props.statusBarHeight}px;`)
const capsuleStyle = computed((): string => props.capsuleRight > 0 ? `padding-right:${props.capsuleRight}px;` : '') const capsuleStyle = computed((): string => props.capsuleRight > 0 ? `padding-right:${props.capsuleRight}px;` : '')
const isServiceModule = computed((): boolean => props.activeModule == 'service') const isServiceModule = computed((): boolean => props.activeModule == 'service')
const showCategoryBar = computed((): boolean => props.activeModule != 'service')
function handleInput(event: UniInputInputEvent | UniInputConfirmEvent) { function handleInput(event: UniInputInputEvent | UniInputConfirmEvent) {
emit('update:searchKeyword', event.detail.value) emit('update:searchKeyword', event.detail.value)
@@ -128,6 +106,7 @@ function handleSearch() {
background: #ffffff; background: #ffffff;
padding-bottom: 10rpx; padding-bottom: 10rpx;
box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.05); box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.05);
position: relative;
} }
.jd2-header-service { .jd2-header-service {
@@ -260,34 +239,4 @@ function handleSearch() {
color: #ffffff; color: #ffffff;
} }
.jd2-category-scroll {
height: 56rpx;
white-space: nowrap;
margin-top: 12rpx;
padding-left: 16rpx;
padding-right: 16rpx;
box-sizing: border-box;
}
.jd2-category-row {
flex-direction: row;
align-items: center;
height: 56rpx;
}
.jd2-category-item {
margin-right: 32rpx;
height: 56rpx;
justify-content: center;
}
.jd2-category-text {
font-size: 28rpx;
color: #444444;
}
.jd2-category-text-active {
color: #ff2d2f;
font-weight: 700;
}
</style> </style>

View File

@@ -69,13 +69,6 @@
"navigationBarTitleText": "绑定邮箱" "navigationBarTitleText": "绑定邮箱"
} }
}, },
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/main/messages", "path": "pages/main/messages",
"style": { "style": {
@@ -96,6 +89,13 @@
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
} }
], ],
"subPackages": [ "subPackages": [
@@ -422,12 +422,6 @@
"iconPath": "static/tabbar/home.png", "iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png" "selectedIconPath": "static/tabbar/home-active.png"
}, },
{
"pagePath": "pages/main/category",
"text": "分类",
"iconPath": "static/tabbar/category.png",
"selectedIconPath": "static/tabbar/category.png"
},
{ {
"pagePath": "pages/main/messages", "pagePath": "pages/main/messages",
"text": "消息", "text": "消息",

View File

@@ -1903,12 +1903,6 @@
"iconPath": "static/tabbar/home.png", "iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png" "selectedIconPath": "static/tabbar/home-active.png"
}, },
{
"pagePath": "pages/main/category",
"text": "分类",
"iconPath": "static/tabbar/category.png",
"selectedIconPath": "static/tabbar/category.png"
},
{ {
"pagePath": "pages/main/messages", "pagePath": "pages/main/messages",
"text": "消息", "text": "消息",

View File

@@ -69,13 +69,6 @@
"navigationBarTitleText": "绑定邮箱" "navigationBarTitleText": "绑定邮箱"
} }
}, },
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
},
{ {
"path": "pages/main/messages", "path": "pages/main/messages",
"style": { "style": {
@@ -96,6 +89,13 @@
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/main/category",
"style": {
"navigationBarTitleText": "分类",
"navigationStyle": "custom"
}
} }
], ],
"subPackages": [ "subPackages": [
@@ -422,12 +422,6 @@
"iconPath": "static/tabbar/home.png", "iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/home-active.png" "selectedIconPath": "static/tabbar/home-active.png"
}, },
{
"pagePath": "pages/main/category",
"text": "分类",
"iconPath": "static/tabbar/category.png",
"selectedIconPath": "static/tabbar/category.png"
},
{ {
"pagePath": "pages/main/messages", "pagePath": "pages/main/messages",
"text": "消息", "text": "消息",

View File

@@ -9,17 +9,41 @@
:active-module="activeTopModule" :active-module="activeTopModule"
:search-keyword="searchKeyword" :search-keyword="searchKeyword"
:placeholder="headerSearchPlaceholder" :placeholder="headerSearchPlaceholder"
:categories="headerCategories" @change-module="handleTopModuleChange"
:active-category="activeCategory"
@changeModule="handleTopModuleChange"
@update:searchKeyword="handleSearchKeywordUpdate" @update:searchKeyword="handleSearchKeywordUpdate"
@search="handleHeaderSearch" @search="handleHeaderSearch"
@changeCategory="handleHeaderCategoryChange"
@focusSearch="handleSearchFocus" @focusSearch="handleSearchFocus"
></JdLikeHomeHeader> ></JdLikeHomeHeader>
<view v-if="activeTopModule == 'home'" class="category-wrapper">
<view :class="['category-bar-wrap', { 'category-bar-wrap-hidden': showCategoryPanel }]">
<scroll-view
class="category-scroll"
direction="horizontal"
:show-scrollbar="false"
:scroll-with-animation="true"
:scroll-into-view="categoryScrollIntoView"
>
<view
v-for="(item, index) in categoryList"
:key="buildListItemKey('top-category', item.id, index)"
:id="'cat-' + item.id"
:class="['category-item', { 'category-item-active': currentCategory === item.id }]"
@tap="handleCategoryTabClick(item)"
>
<text :class="['category-item-text', { 'category-item-text-active': currentCategory === item.id, 'category-item-text-accent': shouldHighlightCategory(item.name) && currentCategory !== item.id }]">{{ getCategoryTabDisplayName(item.name) }}</text>
<view v-if="currentCategory === item.id" class="category-active-line"></view>
</view>
</scroll-view>
<view class="category-expand-btn" @tap="toggleCategoryPanel">
<text class="category-expand-icon">{{ showCategoryPanel ? '∧' : '' }}</text>
</view>
</view>
</view>
</view> </view>
<view class="jd-header-placeholder" :style="{ height: headerPlaceholderHeight + 'px' }"></view> <view class="jd-header-placeholder" :style="{ height: (activeTopModule == 'home' ? headerPlaceholderHeight : navbarTotalHeight) + 'px' }"></view>
<scroll-view <scroll-view
direction="vertical" direction="vertical"
@@ -54,6 +78,36 @@
<view class="safe-area" :style="{ height: bottomSafeArea + 88 + 'px' }"></view> <view class="safe-area" :style="{ height: bottomSafeArea + 88 + 'px' }"></view>
</scroll-view> </scroll-view>
<view
v-if="activeTopModule == 'home' && showCategoryPanel"
class="category-panel-mask"
:style="{ top: navbarTotalHeight + 'px' }"
@tap="toggleCategoryPanel"
></view>
<view
v-if="activeTopModule == 'home' && showCategoryPanel"
class="category-panel"
:style="{ top: (navbarTotalHeight - 5) + 'px' }"
>
<view class="category-panel-header">
<text class="category-panel-title">全部分类</text>
<view class="category-panel-close-btn" @tap="toggleCategoryPanel">
<text class="category-panel-close-text">收起</text>
<text class="category-panel-close-arrow">∧</text>
</view>
</view>
<view class="category-panel-grid">
<view
v-for="(item, index) in categoryList"
:key="buildListItemKey('panel-category', item.id, index)"
:class="['category-panel-item', { 'category-panel-item-active': currentCategory === item.id }]"
@tap="selectCategoryFromPanel(item)"
>
<text :class="['category-panel-item-text', { 'category-panel-item-text-active': currentCategory === item.id }]">{{ item.name }}</text>
</view>
</view>
</view>
</view> </view>
</template> </template>
@@ -105,7 +159,6 @@ const headerPlaceholderHeight = ref(128)
const headerStyle = ref('') const headerStyle = ref('')
const searchRowStyle = ref('') const searchRowStyle = ref('')
const activeTopModule = ref('home') const activeTopModule = ref('home')
const activeCategory = ref('recommend')
const searchKeyword = ref('') const searchKeyword = ref('')
type HeaderModuleItem = { type HeaderModuleItem = {
@@ -118,10 +171,6 @@ const topModules: Array<HeaderModuleItem> = [
{ key: 'service', label: '服务' } { key: 'service', label: '服务' }
] ]
const headerCategories = computed((): Array<CategoryItem> => {
return categoryList.value
})
const headerSearchPlaceholder = computed((): string => { const headerSearchPlaceholder = computed((): string => {
if (activeTopModule.value == 'service') { if (activeTopModule.value == 'service') {
return '居家护理 / 康复照护 / 血压计 / 助餐服务' return '居家护理 / 康复照护 / 血压计 / 助餐服务'
@@ -293,21 +342,7 @@ function handleHeaderSearch(keyword: string) {
function handleTopModuleChange(moduleKey: string) { function handleTopModuleChange(moduleKey: string) {
activeTopModule.value = moduleKey activeTopModule.value = moduleKey
if (moduleKey == 'home') { showCategoryPanel.value = false
activeCategory.value = currentCategory.value
} else {
activeCategory.value = 'all'
}
}
function handleHeaderCategoryChange(categoryId: string) {
activeCategory.value = categoryId
if (activeTopModule.value == 'home') {
const matchedItem = categoryList.value.find((item: CategoryItem): boolean => item.id == categoryId)
if (matchedItem != null) {
handleCategoryTabClick(matchedItem)
}
}
} }
function handleMainScrollToLower() { function handleMainScrollToLower() {
@@ -363,6 +398,9 @@ const handleKeywordChange = (e: any) => {
} }
const toggleCategoryPanel = (): void => { const toggleCategoryPanel = (): void => {
if (activeTopModule.value != 'home') {
return
}
showCategoryPanel.value = !showCategoryPanel.value showCategoryPanel.value = !showCategoryPanel.value
} }
@@ -442,29 +480,7 @@ function buildSimpleChannelCoverImages(startIndex: number): string[] {
} }
function buildSimpleCategoryChannels(categoryId: string): SimpleCategoryChannel[] { function buildSimpleCategoryChannels(categoryId: string): SimpleCategoryChannel[] {
if (categoryId === 'recommend') { return []
return []
}
return [
{
id: 'rank',
title: '排行榜',
subtitle: '每日更新',
routeType: 'rank',
icon: '榜',
coverImages: buildSimpleChannelCoverImages(0),
categoryId
},
{
id: 'quality',
title: '品质优选',
subtitle: '精选好货',
routeType: 'quality',
icon: '选',
coverImages: buildSimpleChannelCoverImages(2),
categoryId
}
]
} }
function applyChannelDisplay(categoryId: string): void { function applyChannelDisplay(categoryId: string): void {
@@ -771,25 +787,14 @@ const onParentCategoryClick = async (category: Category): Promise<void> => {
// 如果没有二级分类,直接跳转到分类页 // 如果没有二级分类,直接跳转到分类页
if (subCategories.value.length == 0) { if (subCategories.value.length == 0) {
console.log('[onParentCategoryClick] 没有二级分类,直接跳转到分类页') console.log('[onParentCategoryClick] 没有二级分类,切换首页分类商品流')
uni.setStorageSync('selectedCategory', category.id) void refreshHomeCategory({ id: category.id, name: category.name })
uni.switchTab({
url: '/pages/main/category'
})
} }
} }
// 点击二级分类 // 点击二级分类
const onSubCategoryClick = (category: Category): void => { const onSubCategoryClick = (category: Category): void => {
// 跳转到分类页面 void refreshHomeCategory({ id: category.id, name: category.name })
uni.setStorageSync('selectedCategory', category.id)
const timestamp = Date.now()
const randomParam = Math.random().toString(36).substring(2, 8)
const url = `/pages/main/category?categoryId=${category.id}&name=${encodeURIComponent(category.name)}&timestamp=${timestamp}&random=${randomParam}`
uni.switchTab({
url: '/pages/main/category'
})
} }
// 获取品牌数据 // 获取品牌数据
@@ -876,6 +881,31 @@ function getCategoryLabelById(categoryId: string): string {
return '精选' return '精选'
} }
async function consumeSelectedCategoryFromStorage(): Promise<boolean> {
if (activeTopModule.value != 'home' || categoryList.value.length == 0) {
return false
}
const savedCategoryId = uni.getStorageSync('selectedCategory')
if (savedCategoryId == null) {
return false
}
const nextCategoryId = String(savedCategoryId)
if (nextCategoryId === '') {
return false
}
uni.removeStorageSync('selectedCategory')
const matchedItem = categoryList.value.find((item: CategoryItem): boolean => item.id == nextCategoryId)
if (matchedItem != null) {
await refreshHomeCategory(matchedItem)
return true
}
await refreshHomeCategory({
id: nextCategoryId,
name: getCategoryLabelById(nextCategoryId)
})
return true
}
function formatChannelPrice(price: number): string { function formatChannelPrice(price: number): string {
const rounded = Math.round(price) const rounded = Math.round(price)
if (Math.abs(price - rounded) < 0.001) { if (Math.abs(price - rounded) < 0.001) {
@@ -1033,104 +1063,65 @@ async function loadCategoryGoods(categoryId: string): Promise<void> {
} }
} }
// 分类标签栏交互 async function refreshHomeCategory(item: CategoryItem): Promise<void> {
function handleCategoryTabClick(item: CategoryItem): void {
currentCategory.value = item.id currentCategory.value = item.id
currentFeedCategoryId.value = item.id
currentPage.value = 1
hotProducts.value = []
hasMore.value = true
selectedSubCategoryId.value = ''
showCategoryPanel.value = false
categoryScrollIntoView.value = 'cat-' + item.id categoryScrollIntoView.value = 'cat-' + item.id
void (async (): Promise<void> => { failedProductImageIds.value = []
currentFeedCategoryId.value = item.id loading.value = true
currentPage.value = 1
hasMore.value = true if (item.id === 'recommend') {
selectedSubCategoryId.value = '' subCategories.value = []
if (item.id === 'recommend') {
subCategories.value = []
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
applyChannelDisplay(item.id)
try {
const result = await supabaseService.getSmartRecommendations(1, defaultLoadLimit)
failedProductImageIds.value = []
setHotProducts(result.data)
hasMore.value = result.hasmore
} catch (error) {
console.error('加载热销商品失败:', error)
hotProducts.value = []
hasMore.value = false
}
return
}
try {
const subData = await supabaseService.getSubCategories(item.id)
subCategories.value = subData
} catch (error) {
console.error('加载子分类数据失败:', error)
subCategories.value = []
}
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id) secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
applyChannelDisplay(item.id) applyChannelDisplay(item.id)
try { try {
loading.value = true const result = await supabaseService.getSmartRecommendations(1, defaultLoadLimit)
const result = await supabaseService.getProductsByCategory(item.id, 1, defaultLoadLimit)
failedProductImageIds.value = []
setHotProducts(result.data) setHotProducts(result.data)
hasMore.value = result.hasmore hasMore.value = result.hasmore
} catch (error) { } catch (error) {
console.error('分类商品加载失败', error) console.error('加载推荐商品失败:', error)
hotProducts.value = [] hotProducts.value = []
hasMore.value = false hasMore.value = false
} finally { } finally {
loading.value = false loading.value = false
} }
})() return
}
try {
const subData = await supabaseService.getSubCategories(item.id)
subCategories.value = subData
} catch (error) {
console.error('加载子分类数据失败:', error)
subCategories.value = []
}
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
applyChannelDisplay(item.id)
try {
const result = await supabaseService.getProductsByCategory(item.id, 1, defaultLoadLimit)
setHotProducts(result.data)
hasMore.value = result.hasmore
} catch (error) {
console.error('分类商品加载失败', error)
hotProducts.value = []
hasMore.value = false
} finally {
loading.value = false
}
}
// 分类标签栏交互
function handleCategoryTabClick(item: CategoryItem): void {
void refreshHomeCategory(item)
} }
function selectCategoryFromPanel(item: CategoryItem): void { function selectCategoryFromPanel(item: CategoryItem): void {
currentCategory.value = item.id void refreshHomeCategory(item)
showCategoryPanel.value = false
categoryScrollIntoView.value = 'cat-' + item.id
void (async (): Promise<void> => {
currentFeedCategoryId.value = item.id
currentPage.value = 1
hasMore.value = true
selectedSubCategoryId.value = ''
if (item.id === 'recommend') {
subCategories.value = []
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
applyChannelDisplay(item.id)
try {
const result = await supabaseService.getSmartRecommendations(1, defaultLoadLimit)
failedProductImageIds.value = []
setHotProducts(result.data)
hasMore.value = result.hasmore
} catch (error) {
console.error('加载热销商品失败:', error)
hotProducts.value = []
hasMore.value = false
}
return
}
try {
const subData = await supabaseService.getSubCategories(item.id)
subCategories.value = subData
} catch (error) {
console.error('加载子分类数据失败:', error)
subCategories.value = []
}
secondaryCategoryDisplay.value = buildSecondaryCategoryDisplay(item.id)
applyChannelDisplay(item.id)
try {
loading.value = true
const result = await supabaseService.getProductsByCategory(item.id, 1, defaultLoadLimit)
failedProductImageIds.value = []
setHotProducts(result.data)
hasMore.value = result.hasmore
} catch (error) {
console.error('分类商品加载失败', error)
hotProducts.value = []
hasMore.value = false
} finally {
loading.value = false
}
})()
} }
const loadRecommendedProducts = async (limit: number): Promise<void> => { const loadRecommendedProducts = async (limit: number): Promise<void> => {
@@ -1170,6 +1161,10 @@ const initData = async () => {
await loadCategories() await loadCategories()
await loadBrands() await loadBrands()
await loadHotKeywords() await loadHotKeywords()
if (await consumeSelectedCategoryFromStorage()) {
await loadRecommendedProducts(defaultLoadLimit)
return
}
await loadCategoryGoods(currentCategory.value) await loadCategoryGoods(currentCategory.value)
await loadRecommendedProducts(defaultLoadLimit) await loadRecommendedProducts(defaultLoadLimit)
} }
@@ -1233,7 +1228,6 @@ const initPage = () => {
statusBarHeight.value = systemInfo.statusBarHeight != null ? systemInfo.statusBarHeight : 20 statusBarHeight.value = systemInfo.statusBarHeight != null ? systemInfo.statusBarHeight : 20
const searchContentHeight = Math.round(68 * systemInfo.screenWidth / 750) const searchContentHeight = Math.round(68 * systemInfo.screenWidth / 750)
const searchTopGap = Math.round(14 * systemInfo.screenWidth / 750) const searchTopGap = Math.round(14 * systemInfo.screenWidth / 750)
const categoryTopGap = Math.round(12 * systemInfo.screenWidth / 750)
const headerBottomPadding = Math.round(10 * systemInfo.screenWidth / 750) const headerBottomPadding = Math.round(10 * systemInfo.screenWidth / 750)
const moduleRowHeight = Math.round(62 * systemInfo.screenWidth / 750) const moduleRowHeight = Math.round(62 * systemInfo.screenWidth / 750)
const categoryRowHeight = Math.round(56 * systemInfo.screenWidth / 750) const categoryRowHeight = Math.round(56 * systemInfo.screenWidth / 750)
@@ -1251,24 +1245,23 @@ const initPage = () => {
if (menuInfo != null && menuInfo.top > 0) { if (menuInfo != null && menuInfo.top > 0) {
const navHeight = (menuInfo.top - statusBarHeight.value) * 2 + menuInfo.height const navHeight = (menuInfo.top - statusBarHeight.value) * 2 + menuInfo.height
navBarHeight.value = navHeight navBarHeight.value = navHeight
// 计算右边距避让
const rightReserve = systemInfo.screenWidth - menuInfo.left + 8 const rightReserve = systemInfo.screenWidth - menuInfo.left + 8
navBarRight.value = rightReserve navBarRight.value = rightReserve
const searchRowTotalH = statusBarHeight.value + Math.max(navHeight, moduleRowHeight) + searchTopGap + searchContentHeight + categoryTopGap + categoryRowHeight + headerBottomPadding const searchRowTotalH = statusBarHeight.value + Math.max(navHeight, moduleRowHeight) + searchTopGap + searchContentHeight + headerBottomPadding
searchRowStyle.value = `padding-top:${statusBarHeight.value}px;height:${searchRowTotalH}px;padding-right:${rightReserve}px;` searchRowStyle.value = `padding-right:${rightReserve}px;`
navbarTotalHeight.value = searchRowTotalH navbarTotalHeight.value = searchRowTotalH
} else { } else {
navBarHeight.value = 44 navBarHeight.value = 44
navBarRight.value = 0 navBarRight.value = 0
const searchRowTotalH = statusBarHeight.value + Math.max(44, moduleRowHeight) + searchTopGap + searchContentHeight + categoryTopGap + categoryRowHeight + headerBottomPadding const searchRowTotalH = statusBarHeight.value + Math.max(44, moduleRowHeight) + searchTopGap + searchContentHeight + headerBottomPadding
searchRowStyle.value = `padding-top:${statusBarHeight.value}px;height:${searchRowTotalH}px;` searchRowStyle.value = ``
navbarTotalHeight.value = searchRowTotalH navbarTotalHeight.value = searchRowTotalH
} }
headerStyle.value = `` headerStyle.value = ``
categoryBarHeightPx.value = categoryRowHeight categoryBarHeightPx.value = categoryRowHeight
headerPlaceholderHeight.value = navbarTotalHeight.value headerPlaceholderHeight.value = navbarTotalHeight.value + categoryBarHeightPx.value
const safeBottom = systemInfo.safeArea != null ? systemInfo.screenHeight - systemInfo.safeArea.bottom : 20 const safeBottom = systemInfo.safeArea != null ? systemInfo.screenHeight - systemInfo.safeArea.bottom : 20
bottomSafeArea.value = safeBottom > 0 ? safeBottom : 20 bottomSafeArea.value = safeBottom > 0 ? safeBottom : 20
@@ -1288,6 +1281,9 @@ onShow(() => {
console.log('=== index页面onShow被调用 ===') console.log('=== index页面onShow被调用 ===')
console.log('主页重新显示,重置页面状态') console.log('主页重新显示,重置页面状态')
startPlaceholderScroll() startPlaceholderScroll()
if (categoryList.value.length > 0) {
void consumeSelectedCategoryFromStorage()
}
// 重置导航栏显示状态 // 重置导航栏显示状态
showNavbar.value = true showNavbar.value = true
@@ -1297,9 +1293,8 @@ onShow(() => {
// 注意这里不能直接操作scroll-view的滚动位置 // 注意这里不能直接操作scroll-view的滚动位置
// 但可以重置一些页面状态 // 但可以重置一些页面状态
// 注意:这里不再清除selectedCategory // 兼容旧分类桥接页:如果首页是从旧入口返回的,前面已经同步读取并清理 selectedCategory
// 让分类页面在成功读取后自行清除 // 这里不再额外处理,避免重复触发分类刷新
// 这样可以确保分类页面能正确读取到传递的数据
// 每次页面显示时尝试更新用户资料 // 每次页面显示时尝试更新用户资料
if (!isFirstShow.value) { if (!isFirstShow.value) {
@@ -1384,24 +1379,18 @@ const switchCategory = (category: any) => {
const categoryName = catObj.getString('name') ?? '' const categoryName = catObj.getString('name') ?? ''
console.log('分类ID:', categoryId, '分类名称:', categoryName) console.log('分类ID:', categoryId, '分类名称:', categoryName)
if (categoryId === '') {
// 使用Storage传递参数确保switchTab后能被读取 return
uni.setStorageSync('selectedCategory', categoryId) }
const matchedItem = categoryList.value.find((item: CategoryItem): boolean => item.id == categoryId)
// 生成唯一的时间戳和随机参数,确保每次跳转都是新的页面 if (matchedItem != null) {
const timestamp = Date.now() void refreshHomeCategory(matchedItem)
const randomParam = Math.random().toString(36).substring(2, 8) return
}
// 构建带参数的URL直接通过URL传递分类信息 void refreshHomeCategory({
const url = `/pages/main/category?categoryId=${categoryId}&name=${encodeURIComponent(categoryName)}&timestamp=${timestamp}&random=${randomParam}` id: categoryId,
name: categoryName !== '' ? categoryName : getCategoryLabelById(categoryId)
uni.switchTab({ })
url: '/pages/main/category',
success: () => {
// 通过 Storage 传递参数已在上面设置
console.log('跳转分类页面成功categoryId:', categoryId)
}
})
} }
const switchBrand = (brand: Brand) => { const switchBrand = (brand: Brand) => {
@@ -1968,7 +1957,7 @@ const navigateToReminders = () => uni.navigateTo({ url: '/pages/user/reminders'
color: #999999; color: #999999;
line-height: 22rpx; line-height: 22rpx;
height: 22rpx; height: 22rpx;
transform: translateY(-5rpx); transform: translateY(-10rpx);
} }
.category-panel-mask { .category-panel-mask {
@@ -2001,7 +1990,7 @@ const navigateToReminders = () => uni.navigateTo({ url: '/pages/user/reminders'
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
height: 72rpx; height: 64rpx;
padding: 0 0 0 20rpx; padding: 0 0 0 20rpx;
box-sizing: border-box; box-sizing: border-box;
border-bottom-width: 1rpx; border-bottom-width: 1rpx;
@@ -2015,11 +2004,12 @@ const navigateToReminders = () => uni.navigateTo({ url: '/pages/user/reminders'
font-weight: 700; font-weight: 700;
color: #2f2f2f; color: #2f2f2f;
line-height: 1; line-height: 1;
transform: translateY(-6rpx);
} }
.category-panel-close-btn { .category-panel-close-btn {
min-width: 96rpx; min-width: 96rpx;
height: 72rpx; height: 64rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@@ -2036,6 +2026,7 @@ const navigateToReminders = () => uni.navigateTo({ url: '/pages/user/reminders'
color: #666666; color: #666666;
font-weight: 600; font-weight: 600;
line-height: 1; line-height: 1;
transform: translateY(-6rpx);
} }
.category-panel-close-arrow { .category-panel-close-arrow {
@@ -2043,6 +2034,7 @@ const navigateToReminders = () => uni.navigateTo({ url: '/pages/user/reminders'
color: #666666; color: #666666;
margin-left: 6rpx; margin-left: 6rpx;
line-height: 1; line-height: 1;
transform: translateY(-6rpx);
} }
.category-panel-grid { .category-panel-grid {

View File

@@ -5,9 +5,11 @@
<script> <script>
export default { export default {
onLoad(options) { onLoad(options) {
const qs = options ? Object.keys(options).map(k => `${k}=${encodeURIComponent(options[k])}`).join('&') : ''; const categoryId = options && options.categoryId ? String(options.categoryId) : '';
const url = '/pages/main/category' + (qs ? `?${qs}` : ''); if (categoryId !== '') {
uni.navigateTo({ url }); uni.setStorageSync('selectedCategory', categoryId);
}
uni.switchTab({ url: '/pages/main/index' });
} }
} }
</script> </script>

View File

@@ -58,7 +58,6 @@ const targetConfigs = {
orderedTopLevelPaths: [ orderedTopLevelPaths: [
"pages/main/index", "pages/main/index",
...consumerUserPages, ...consumerUserPages,
"pages/main/category",
"pages/main/messages", "pages/main/messages",
"pages/main/cart", "pages/main/cart",
"pages/main/profile", "pages/main/profile",