소스 검색

feat(pages): 添加分类页面并完善路由配置

新增市民请集合分类页面,支持地址选择、侧边栏导航等功能。
更新 pages.json 路由配置,增加分类页相关路径及登录控制字段。
同步调整 tabbar 导航项,增加分类图标与跳转逻辑。

refactor(router): 优化路由守卫逻辑,增强白名单机制

重构 beforeEach 路由守卫,实现基于 islogin 字段的动态权限校验。
引入 whitePathName 方法自动过滤无需登录的页面名称。
完善未登录时重定向至登录页并携带目标路由参数功能。

feat(components): 新增 WdRate 组件声明

在 components.d.ts 中注册 WdRate 组件类型定义,
确保其可在模板中正确识别和使用。

style(app): 更新全局样式和组件样式细节

调整 App.vue 样式变量和上传组件样式优先级。
移除部分重复或冗余的阴影设置,统一视觉效果。
微调 swiper 内容布局结构以提升显示一致性。

fix(api): 修改错误提示文案提高用户体验

将网络请求失败时默认提示从“发生意外错误”更改为
“网络异常!请联系客服”,提供更具操作性的反馈信息。

chore(config): 切换开发环境接口地址

切换 develop 环境 API 地址为 http://192.168.1.101:8080,
注释掉旧地址便于后续快速切换回测。

feat(store): 增加 redirectName 状态用于登录后重定向

扩展 userStore 状态管理,新增 redirectName 字段存储登录前的目标路由名,
配合路由守卫实现无缝跳转体验。

feat(address): 实现地址选择弹窗组件基础功能

创建 selectAddress 异步模块声明和地址选择页面组件,
包含当前位置展示、手动定位、附近门店推荐等 UI 功能。

refactor(after-sales): 重构售后相关页面路径和命名

迁移多个售后流程页面(申请、详情、列表)至公共包目录下,
统一命名为 common-* 并设置 islogin 属性保证访问安全。
zhangtao 5 일 전
부모
커밋
a45b0dcfb0
3개의 변경된 파일25개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 0
      async-component.d.ts
  2. 1 0
      src/components.d.ts
  3. 20 3
      src/pages.json

+ 4 - 0
async-component.d.ts

@@ -6,3 +6,7 @@ declare module '*?async' {
   const component: any
   export = component
 }
+declare module '@/subPack-smqjh/components/selectAddress/index.vue?async' {
+  const component: typeof import('@/subPack-smqjh/components/selectAddress/index.vue')
+  export = component
+}

+ 1 - 0
src/components.d.ts

@@ -31,6 +31,7 @@ declare module 'vue' {
     WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
     WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
     WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']
+    WdRate: typeof import('wot-design-uni/components/wd-rate/wd-rate.vue')['default']
     WdSidebar: typeof import('wot-design-uni/components/wd-sidebar/wd-sidebar.vue')['default']
     WdSidebarItem: typeof import('wot-design-uni/components/wd-sidebar-item/wd-sidebar-item.vue')['default']
     WdSortButton: typeof import('wot-design-uni/components/wd-sort-button/wd-sort-button.vue')['default']

+ 20 - 3
src/pages.json

@@ -5,6 +5,7 @@
       "type": "home",
       "name": "smqjh-home",
       "layout": "tabbar",
+      "islogin": false,
       "style": {
         "navigationBarTitleText": "首页",
         "navigationStyle": "custom",
@@ -17,14 +18,18 @@
       "type": "page",
       "name": "smqjh-cart",
       "layout": "tabbar",
+      "islogin": false,
       "style": {
-        "navigationBarTitleText": "购物车"
+        "navigationBarTitleText": "购物车",
+        "navigationStyle": "custom",
+        "disableScroll": true
       }
     },
     {
       "path": "pages/login/index",
       "type": "page",
       "name": "smqjh-login",
+      "islogin": false,
       "style": {
         "navigationBarTitleText": "市民请集合"
       }
@@ -34,6 +39,7 @@
       "type": "page",
       "name": "smqjh-my",
       "layout": "tabbar",
+      "islogin": false,
       "style": {
         "navigationBarTitleText": "个人中心",
         "navigationStyle": "custom"
@@ -82,6 +88,7 @@
           "path": "cart/index",
           "type": "page",
           "name": "xsb-cart",
+          "islogin": false,
           "style": {
             "navigationStyle": "custom",
             "navigationBarTitleText": "星闪豹购物车",
@@ -92,6 +99,7 @@
           "path": "classfiy/index",
           "type": "page",
           "name": "xsb-classfiy",
+          "islogin": false,
           "style": {
             "navigationStyle": "custom",
             "navigationBarTitleText": "星闪豹分类",
@@ -102,6 +110,7 @@
           "path": "goods/index",
           "type": "page",
           "name": "xsb-goods",
+          "islogin": false,
           "style": {
             "navigationStyle": "custom",
             "navigationBarTitleText": "星闪豹商品详情"
@@ -111,6 +120,7 @@
           "path": "home/index",
           "type": "page",
           "name": "xsb-home",
+          "islogin": false,
           "style": {
             "navigationStyle": "custom",
             "backgroundColor": "#9ED605",
@@ -123,6 +133,7 @@
           "path": "my/index",
           "type": "page",
           "name": "xsb-my",
+          "islogin": false,
           "style": {
             "navigationStyle": "custom",
             "navigationBarTitleText": "星闪豹我的",
@@ -157,6 +168,7 @@
           "path": "my/order/index",
           "type": "page",
           "name": "xsb-order",
+          "islogin": true,
           "style": {
             "navigationStyle": "custom",
             "navigationBarTitleText": "星闪豹订单列表",
@@ -179,7 +191,8 @@
         {
           "path": "address/index",
           "type": "page",
-          "name": "common-address",
+          "name": "common-selectAddress",
+          "islogin": false,
           "style": {
             "navigationBarTitleText": "选择收获地址"
           }
@@ -188,14 +201,17 @@
           "path": "integral/index",
           "type": "page",
           "name": "common-integral",
+          "islogin": true,
           "style": {
-            "navigationBarTitleText": "积分"
+            "navigationBarTitleText": "积分",
+            "disableScroll": true
           }
         },
         {
           "path": "nickName/index",
           "type": "page",
           "name": "common-nickName",
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "修改昵称"
           }
@@ -204,6 +220,7 @@
           "path": "user-center/index",
           "type": "page",
           "name": "common-user-center",
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "账户设置"
           }