Browse Source

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

新增 `pages/classfiy/index.vue` 分类页面,配置对应路由与 tabBar 项。同时更新了相关页面的路由命名及跳转逻辑,确保模块间跳转正确。

- 在 `pages.config.ts` 和 `pages.json` 中注册新页面路径
- 更新 `useTabbar.ts` 添加分类页签图标及状态管理
- 调整多个子包中页面的命名空间为 common 前缀以统一维护
- 修改购物车、首页等页面中的地址选择跳转逻辑
- 登录后重定向功能优化,支持记录目标页面
- 样式调整:去除部分重复样式定义,增强组件复用性

此外还包含以下变更:

- 修复上传组件样式问题
- 统一错误提示语为“网络异常!请联系客服”
- 弹窗组件新增 footer 显示控制属性
- 地址选择页面重构并迁移至公共模块
- 订单详情页按钮布局优化
- 配置开发环境代理地址恢复为本地 IP 测试地址
zhangtao 5 days ago
parent
commit
123be9221c

+ 2 - 0
pages.config.ts

@@ -36,6 +36,8 @@ export default defineUniPages({
     borderStyle: '@tabBorderStyle',
     list: [{
       pagePath: 'pages/index/index',
+    }, {
+      pagePath: 'pages/classfiy/index',
     }, {
       pagePath: 'pages/cart/index',
     }, {

+ 31 - 19
src/App.vue

@@ -8,7 +8,19 @@ onLaunch(() => { })
   min-height: calc(100vh - var(--window-top));
   box-sizing: border-box;
   background: #f6f6f6;
-  --them-color: #9ED605
+  --them-color: #9ED605;
+
+  .upload {
+    .wd-upload__preview {
+      width: 120rpx !important;
+      height: 120rpx !important;
+    }
+
+    .wd-upload__status-content {
+      overflow: hidden !important;
+      border-radius: 32rpx !important;
+    }
+  }
 }
 
 .wot-theme-dark.page-wraper {
@@ -56,7 +68,6 @@ onLaunch(() => { })
 
     .custom-tab {
       border-radius: 28rpx 28rpx 0 0;
-      box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09);
     }
 
     .notice-bar {
@@ -82,25 +93,26 @@ onLaunch(() => { })
       }
 
     }
-     .swiper .wd-swiper__item {
-        height: 142rpx;
-        flex-direction: column;
-        align-items: center;
-        justify-content: center;
-
-        image {
-          height: 72rpx !important;
-          width: 72rpx !important;
-        }
 
-        text {
-          position: unset !important;
-          color: #222222 !important;
-          font-size: 24rpx !important;
-          text-align: center;
-          margin-top: 12rpx;
-        }
+    .swiper .wd-swiper__item {
+      height: 142rpx;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+
+      image {
+        height: 72rpx !important;
+        width: 72rpx !important;
+      }
+
+      text {
+        position: unset !important;
+        color: #222222 !important;
+        font-size: 24rpx !important;
+        text-align: center;
+        margin-top: 12rpx;
       }
+    }
   }
 
 }

+ 1 - 1
src/api/core/handlers.ts

@@ -91,7 +91,7 @@ export function handleAlovaError(error: any, method: Method) {
     globalToast.error(error.message || '请求失败')
   }
   else {
-    globalToast.error('发生意外错误')
+    globalToast.error('网络异常!请联系客服')
   }
 
   throw error

+ 3 - 1
src/components/Zpopup.vue

@@ -1,8 +1,10 @@
 <script setup lang="ts">
 withDefaults(defineProps<{
   bg?: string
+  showfooter?: boolean
 }>(), {
   bg: '#f6f6f6',
+  showfooter: true,
 })
 const show = defineModel({ default: false })
 </script>
@@ -12,7 +14,7 @@ const show = defineModel({ default: false })
     <view :style="{ background: bg }">
       <slot />
       <view class="h150rpx" />
-      <view class="ios footer fixed bottom-0 left-0 box-border w-full rounded-t-32rpx bg-white px24rpx pt20rpx">
+      <view v-if="showfooter" class="ios footer fixed bottom-0 left-0 box-border w-full rounded-t-32rpx bg-white px24rpx pt20rpx">
         <slot name="footer" />
       </view>
     </view>

+ 3 - 0
src/composables/useTabbar.ts

@@ -2,6 +2,8 @@ import icon3 from '@/static/tab/cart1.png'
 import icon4 from '@/static/tab/cart2.png'
 import icon5 from '@/static/tab/my1.png'
 import icon6 from '@/static/tab/my2.png'
+import class1 from '@/static/tab/class-tab0.png'
+import class2 from '@/static/tab/class-tab1.png'
 
 export interface TabbarItem {
   name: string
@@ -14,6 +16,7 @@ export interface TabbarItem {
 
 const tabbarItems = ref<TabbarItem[]>([
   { name: 'smqjh-home', value: null, active: true, title: '首页', icon1: '', icon2: '' },
+  { name: 'smqjh-classfiy', value: null, active: false, title: '分类', icon1: class1, icon2: class2 },
   { name: 'smqjh-cart', value: null, active: false, title: '购物车', icon1: icon3, icon2: icon4 },
   { name: 'smqjh-my', value: null, active: false, title: '我的', icon1: icon5, icon2: icon6 },
 ])

+ 2 - 2
src/config/index.ts

@@ -11,8 +11,8 @@ const mapEnvVersion = {
   /**
    * 开发版
    */
-  // develop: 'http://192.168.1.101:8080',
-  develop: 'http://192.168.0.157:8080',
+  develop: 'http://192.168.1.101:8080',
+  // develop: 'http://192.168.0.157:8080',
   /**
    * 体验版
    */

+ 2 - 2
src/layouts/tabbar.vue

@@ -46,7 +46,8 @@ export default {
   <view class="page-tab">
     <wd-tabbar
       :model-value="activeTabbar.name" safe-area-inset-bottom placeholder fixed :bordered="false"
-      custom-class="custom-tab" @change="handleTabbarChange"
+      custom-class="custom-tab" :custom-style="`box-shadow:${activeTabbar.name == 'smqjh-cart' ? '' : ' 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09)'}`"
+      @change="handleTabbarChange"
     >
       <wd-tabbar-item
         v-for="(item, index) in tabbarList" :key="index" :name="item.name"
@@ -75,7 +76,6 @@ export default {
   :deep() {
     .custom-tab {
       border-radius: 28rpx 28rpx 0 0;
-     box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.09);
     }
   }
 }

+ 85 - 29
src/pages.json

@@ -25,6 +25,18 @@
         "disableScroll": true
       }
     },
+    {
+      "path": "pages/classfiy/index",
+      "type": "page",
+      "name": "smqjh-classfiy",
+      "layout": "tabbar",
+      "islogin": false,
+      "style": {
+        "navigationBarTitleText": "市民请集合分类",
+        "navigationStyle": "custom",
+        "disableScroll": true
+      }
+    },
     {
       "path": "pages/login/index",
       "type": "page",
@@ -72,6 +84,9 @@
       {
         "pagePath": "pages/index/index"
       },
+      {
+        "pagePath": "pages/classfiy/index"
+      },
       {
         "pagePath": "pages/cart/index"
       },
@@ -141,79 +156,105 @@
           }
         },
         {
-          "path": "my/afterSales/index",
+          "path": "my/order/index",
+          "type": "page",
+          "name": "xsb-order",
+          "islogin": true,
+          "style": {
+            "navigationStyle": "custom",
+            "navigationBarTitleText": "星闪豹订单列表",
+            "disableScroll": true
+          }
+        }
+      ]
+    },
+    {
+      "root": "subPack-common",
+      "pages": [
+        {
+          "path": "address/index",
+          "type": "page",
+          "name": "common-selectAddress",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "选择收获地址"
+          }
+        },
+        {
+          "path": "afterSales/index",
           "type": "page",
-          "name": "xsb-afterSales",
+          "name": "common-afterSales",
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "申请售后"
           }
         },
         {
-          "path": "my/afterSalesDetail/index",
+          "path": "afterSalesDetail/index",
           "type": "page",
-          "name": "xsb-afterSalesDetail",
+          "name": "common-afterSalesDetail",
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "售后详情"
           }
         },
         {
-          "path": "my/afterSalesList/index",
+          "path": "afterSalesList/index",
           "type": "page",
-          "name": "xsb-afterSalesList",
+          "name": "common-afterSalesList",
+          "islogin": true,
           "style": {
             "navigationBarTitleText": "售后列表"
           }
         },
         {
-          "path": "my/order/index",
+          "path": "integral/index",
           "type": "page",
-          "name": "xsb-order",
+          "name": "common-integral",
           "islogin": true,
           "style": {
-            "navigationStyle": "custom",
-            "navigationBarTitleText": "星闪豹订单列表",
+            "navigationBarTitleText": "积分",
             "disableScroll": true
           }
         },
         {
-          "path": "my/orderDetaile/index",
+          "path": "nickName/index",
           "type": "page",
-          "name": "xsb-orderDetaile",
+          "name": "common-nickName",
+          "islogin": true,
           "style": {
-            "navigationBarTitleText": "订单详情"
+            "navigationBarTitleText": "修改昵称"
           }
-        }
-      ]
-    },
-    {
-      "root": "subPack-common",
-      "pages": [
+        },
         {
-          "path": "address/index",
+          "path": "orderDetaile/index",
           "type": "page",
-          "name": "common-selectAddress",
-          "islogin": false,
+          "name": "common-orderDetaile",
+          "islogin": true,
           "style": {
-            "navigationBarTitleText": "选择收获地址"
+            "navigationBarTitleText": "订单详情"
           }
         },
         {
-          "path": "integral/index",
+          "path": "revalue/index",
           "type": "page",
-          "name": "common-integral",
+          "name": "common-revalue",
           "islogin": true,
           "style": {
-            "navigationBarTitleText": "积分",
+            "navigationBarTitleText": "写评价",
+            "navigationStyle": "custom",
             "disableScroll": true
           }
         },
         {
-          "path": "nickName/index",
+          "path": "revalueSuccess/index",
           "type": "page",
-          "name": "common-nickName",
+          "name": "common-revalue-success",
           "islogin": true,
           "style": {
-            "navigationBarTitleText": "修改昵称"
+            "navigationBarTitleText": "评价成功",
+            "navigationStyle": "custom",
+            "disableScroll": true
           }
         },
         {
@@ -226,6 +267,21 @@
           }
         }
       ]
+    },
+    {
+      "root": "subPack-smqjh",
+      "pages": [
+        {
+          "path": "goodsList/index",
+          "type": "page",
+          "name": "smqjh-goodsList",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "商品列表",
+            "navigationStyle": "custom"
+          }
+        }
+      ]
     }
   ]
 }

+ 171 - 33
src/pages/cart/index.vue

@@ -1,50 +1,188 @@
 <script setup lang="ts">
 import { StaticUrl } from '@/config'
 
+import selectAddressTemplate from '@/subPack-smqjh/components/selectAddress/index.vue?async'
+
 definePage({
   name: 'smqjh-cart',
   layout: 'tabbar',
+  islogin: false,
   style: {
     navigationBarTitleText: '购物车',
+    navigationStyle: 'custom',
+    disableScroll: true,
   },
-
-})
-onMounted(() => {
-  setNavBack()
-})
-onShow(() => {
-  console.log('触发')
-  nextTick(() => {
-    setNavBack()
-  })
 })
-function setNavBack() {
-  uni.setNavigationBarColor({
-    backgroundColor: '#9ED605',
-    frontColor: '#ffffff',
-    fail: (e) => {
-      console.log('fail', e)
-    },
-    success: (e) => {
-      console.log('success', e)
-    },
-  })
-}
+const { name } = storeToRefs(useAddressStore())
+const isAll = ref(false)
+const selectCatrt = ref()
+const tab = ref(0)
+const selectAddress = ref(false)
+const navList = ref([
+  { title: '全部', id: 1 },
+  { title: '星闪豹', id: 2 },
+  { title: '电影演出', id: 3 },
+  { title: '视频权益', id: 4 },
+  { title: '大牌点餐', id: 5 },
+  { title: '加油', id: 6 },
+  { title: '酒店民宿', id: 7 },
+  { title: '代驾', id: 8 },
+])
 </script>
 
 <template>
-  <view class="box-border w-full flex items-center justify-center">
-    <view class="mt220rpx flex flex-col items-center">
-      <image
-        :src="`${StaticUrl}/cart.png`"
-        class="h110rpx w110rpx"
-      />
-      <view class="mb20rpx mt20rpx text-24rpx">
-        你还没有添加商品哦~
+  <view class="pages">
+    <wd-navbar
+      title="" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
+      safe-area-inset-top fixed
+    >
+      <template #left>
+        <view class="ml10rpx flex items-center" @click.stop="selectAddress = true">
+          <view class="mr20rpx text-36rpx font-semibold">
+            购物车
+          </view>
+          <image :src="`${StaticUrl}/location-green.png`" class="h33.8rpx w29rpx" />
+          <view class="ml10rpx max-w-280rpx truncate text-32rpx text-#222 font-semibold">
+            {{ name }}
+          </view>
+        </view>
+      </template>
+    </wd-navbar>
+    <view class="xsb-linear h406rpx" />
+    <view class="-mt220rpx">
+      <view class="flex items-center justify-between pb16rpx">
+        <view class="w85%">
+          <wd-tabs v-model="tab">
+            <block v-for="tabs in navList" :key="tabs.id">
+              <wd-tab :title="tabs.title" />
+            </block>
+          </wd-tabs>
+        </view>
+        <view class="guanli h80rpx w104rpx flex flex-shrink-0 items-center justify-center text-28rpx font-semibold">
+          管理
+        </view>
+      </view>
+      <scroll-view scroll-y class="content box-border">
+        <view class="px24rpx">
+          <view v-for="store in 5" :key="store" class="mb24rpx rounded-16rpx bg-white px24rpx pb18rpx pt28rpx">
+            <wd-checkbox v-model="isAll" size="large">
+              <view class="text-28rpx font-semibold">
+                市民请集合官方旗舰店
+              </view>
+            </wd-checkbox>
+            <view class="mt20rpx h2rpx w-full bg-#F0F0F0" />
+            <wd-checkbox-group v-model="selectCatrt" size="large">
+              <view v-for="items in 10" :key="items" class="mt20rpx flex items-center">
+                <view class="mr20rpx h32rpx w32rpx">
+                  <wd-checkbox model-value="jingmai" />
+                </view>
+                <view class="flex flex-1">
+                  <image :src="`${StaticUrl}/shu.png`" class="h200rpx w200rpx flex-shrink-0" />
+                  <view class="ml20rpx flex-1">
+                    <view class="text-left text-32rpx font-semibold">
+                      <view v-for="i in 2" :key="i" class="mr5px inline-block">
+                        <wd-tag>
+                          惊喜回馈
+                        </wd-tag>
+                      </view>
+                      秋季应季水果纯甜
+                      柿子
+                    </view>
+                    <view class="mt14rpx text-24rpx text-#AAAAAA">
+                      规格:5kg,盒
+                    </view>
+                    <view class="mt14rpx flex items-center justify-between">
+                      <view class="text-36rpx text-#FF4A39 font-semibold">
+                        ¥13.95
+                      </view>
+                      <!-- <wd-input-number v-model="tabs.id" /> -->
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </wd-checkbox-group>
+          </view>
+        </view>
+        <view class="h150rpx" />
+
+        <view v-if="false" class="box-border w-full flex items-center justify-center">
+          <view class="mt220rpx flex flex-col items-center">
+            <image :src="`${StaticUrl}/cart.png`" class="h110rpx w110rpx" />
+            <view class="mb20rpx mt20rpx text-24rpx">
+              你还没有添加商品哦~
+            </view>
+            <wd-button plain>
+              去逛逛
+            </wd-button>
+          </view>
+        </view>
+      </scroll-view>
+    </view>
+    <view
+      class="fixedShadow fixed bottom-80rpx left-0 z-99 box-border w-full flex items-center justify-between rounded-t-16rpx bg-white px24rpx pb60rpx pt10rpx"
+    >
+      <view class="ios w-full flex items-center justify-between">
+        <view class="flex items-center">
+          <image :src="`${StaticUrl}/cart-lanzi.png`" class="h100rpx w100rpx" />
+          <view class="ml16rpx flex items-center">
+            <wd-checkbox v-model="isAll" size="large">
+              全选
+            </wd-checkbox>
+            <view class="ml10rpx text-24rpx text-#FF4A39">
+              删除
+            </view>
+          </view>
+        </view>
+        <view class="flex items-center">
+          <view class="flex items-center font-semibold">
+            <view class="text-22rpx text-#222">
+              总计:
+            </view>
+            <view class="flex items-baseline text-24rpx text-#FF4A39">
+              ¥
+              <text class="text-36rpx">
+                8.9
+              </text>
+            </view>
+          </view>
+          <view class="ml20rpx w160rpx">
+            <wd-button block size="large">
+              结算
+            </wd-button>
+          </view>
+        </view>
       </view>
-      <wd-button plain>
-        去逛逛
-      </wd-button>
     </view>
+    <selectAddressTemplate v-model="selectAddress" />
   </view>
 </template>
+
+<style scoped lang="scss">
+.content {
+  height: calc(100vh - var(--window-top) - 380rpx);
+  height: calc(100vh - var(--window-top) - constant(safe-area-inset-bottom) - 380rpx);
+  height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom) - 380rpx);
+}
+
+.fixedShadow {
+  box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.05);
+}
+
+.pages {
+  :deep() {
+    .wd-tabs {
+      background: none !important;
+    }
+
+    .wd-tabs__nav {
+      background: none !important;
+    }
+    .wd-tabs__nav-item-text{
+      font-size: 28rpx  !important;
+    }
+  }
+  .guanli{
+    box-shadow: -10rpx 0rpx 12rpx 2rpx rgba(0,0,0,0.07);
+  }
+}
+</style>

+ 116 - 0
src/pages/classfiy/index.vue

@@ -0,0 +1,116 @@
+<script setup lang="ts">
+import router from '@/router'
+import { StaticUrl } from '@/config'
+
+definePage({
+  name: 'smqjh-classfiy',
+  layout: 'tabbar',
+  islogin: false,
+  style: {
+    navigationBarTitleText: '市民请集合分类',
+    navigationStyle: 'custom',
+    disableScroll: true,
+  },
+})
+const { name } = storeToRefs(useAddressStore())
+
+const active = ref<number>(1)
+
+const subCategories = Array.from({ length: 24 }).fill({ title: '标题文字', label: '这是描述这是描述' }, 0, 24)
+const categories = ref([
+  {
+    label: '分类一',
+    title: '标题一',
+    items: subCategories,
+  },
+  {
+    label: '分类二',
+    title: '标题二',
+    items: subCategories,
+  },
+  {
+    label: '分类三',
+    title: '标题三',
+    items: subCategories.slice(0, 18),
+  },
+  {
+    label: '分类四',
+    title: '标题四',
+    items: subCategories.slice(0, 21),
+  },
+  {
+    label: '分类五',
+    title: '标题五',
+    items: subCategories,
+  },
+  {
+    label: '分类六',
+    title: '标题六',
+    items: subCategories.slice(0, 18),
+  },
+  {
+    label: '分类七',
+    title: '标题七',
+    items: subCategories,
+  },
+])
+</script>
+
+<template>
+  <view class="pages">
+    <wd-navbar
+      title="" custom-style="background-color:transparent !important" :bordered="false" :z-index="99" safe-area-inset-top fixed
+    >
+      <template #left>
+        <view class="ml10rpx flex items-center" @click.stop="router.push({ name: 'common-selectAddress' })">
+          <image :src="`${StaticUrl}/location-green.png`" class="h33.8rpx w29rpx" />
+          <view class="ml10rpx max-w-280rpx truncate text-32rpx text-#222 font-semibold">
+            {{ name }}
+          </view>
+        </view>
+      </template>
+    </wd-navbar>
+    <view class="h176rpx bg-#F4FFD1" />
+    <view class="wraper">
+      <wd-sidebar v-model="active">
+        <wd-sidebar-item v-for="(item, index) in categories" :key="index" :value="index" :label="item.label" />
+      </wd-sidebar>
+      <view class="content p20rpx">
+        <image
+          :src="`${StaticUrl}/class.png`"
+          class="h144rpx w-full"
+        />
+        <view class="mt24rpx">
+          <view class="text-28rpx font-semibold">
+            外卖外送
+          </view>
+        </view>
+        <view class="grid grid-cols-4 mt24rpx gap-24rpx">
+          <view v-for="item in 20" :key="item" class="flex flex-col items-center" @click="router.push({ name: 'smqjh-goodsList' })">
+            <image
+              :src="`${StaticUrl}/smqjh-class-all.png`"
+              class="h108rpx w108rpx"
+            />
+            <view class="mt16rpx text-24rpx text-#222">
+              全部
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<style scoped lang="scss">
+.wraper {
+  display: flex;
+  height: calc(100vh - var(--window-top) - 280rpx);
+  height: calc(100vh - var(--window-top) - constant(safe-area-inset-bottom) - 280rpx);
+  height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom) - 280rpx);
+}
+
+.content {
+  flex: 1;
+  background: #fff;
+}
+</style>

+ 3 - 2
src/pages/index/index.vue

@@ -5,6 +5,7 @@ import router from '@/router'
 definePage({
   name: 'smqjh-home',
   layout: 'tabbar',
+  islogin: false,
   style: {
     navigationBarTitleText: '首页',
     navigationStyle: 'custom',
@@ -55,8 +56,8 @@ function handleClick(name: string) {
     </wd-navbar>
     <view class="header-linear h320rpx px24rpx" :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }">
       <view class="box-border flex items-center">
-        <view class="flex items-center" @click="addressStore.getMapAddress">
-          <image :src="`${VITE_OSS_BASE_URL}2025/11/9b914bd06e584af09c7e9055b9bfeaf9.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
+        <view class="flex items-center" @click="router.push({ name: 'common-selectAddress' })">
+          <image :src="`${StaticUrl}/location-black.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
           <view class="ml18rpx max-w-180rpx truncate text-32rpx">
             {{ name }}
           </view>

+ 3 - 2
src/pages/login/index.vue

@@ -4,11 +4,12 @@ import router from '@/router'
 
 definePage({
   name: 'smqjh-login',
+  islogin: false,
   style: {
     navigationBarTitleText: '市民请集合',
   },
 })
-const { token } = storeToRefs(useUserStore())
+const { token, redirectName } = storeToRefs(useUserStore())
 const { data, send } = useRequest((code, phoneCode) => Apis.sys.auth({ params: {
   grant_type: 'wechat',
   code,
@@ -25,7 +26,7 @@ async function handleGetPhone(e: UniHelper.ButtonOnGetphonenumberDetail) {
       token.value = data.value.data.access_token
       useGlobalToast().show({ msg: '登录成功' })
       setTimeout(() => {
-        router.back()
+        router.replace({ name: redirectName.value })
       }, 2000)
     },
   })

+ 3 - 2
src/pages/my/index.vue

@@ -5,6 +5,7 @@ import router from '@/router'
 definePage({
   name: 'smqjh-my',
   layout: 'tabbar',
+  islogin: false,
   style: {
     navigationBarTitleText: '个人中心',
     navigationStyle: 'custom',
@@ -15,7 +16,7 @@ const tabList = ref([
   { title: '待支付', icon: `${StaticUrl}/1.png` },
   { title: '待收货', icon: `${StaticUrl}/2.png` },
   { title: '已完成', icon: `${StaticUrl}/6.png` },
-  { title: '退款售后', icon: `${StaticUrl}/3.png` },
+  { title: '退款售后', icon: `${StaticUrl}/3.png`, name: 'common-afterSalesList' },
 ])
 </script>
 
@@ -65,7 +66,7 @@ const tabList = ref([
     <view class="item-cell mt20rpx">
       <wd-card custom-class="card">
         <wd-cell-group custom-class="cell-group">
-          <wd-cell title="收货地址" custom-title-class="cell-title" clickable is-link>
+          <wd-cell title="收货地址" custom-title-class="cell-title" clickable is-link @click="router.push({ name: 'common-address' })">
             <template #icon>
               <image :src="`${StaticUrl}/4.png`" class="h50rpx w50rpx" />
             </template>

+ 23 - 27
src/router/index.ts

@@ -21,38 +21,43 @@ function generateRoutes() {
 const router = createRouter({
   routes: generateRoutes(),
 })
-router.beforeEach((to, from, next) => {
-  console.log('🚀 beforeEach 守卫触发:', { to, from })
-
-  // 演示:基本的导航日志记录
-  if (to.path && from.path) {
-    console.log(`📍 导航: ${from.path} → ${to.path}`)
-  }
 
-  // 演示:对受保护页面的简单拦截
-  if (to.name === 'demo-protected') {
+/**
+ * 过滤出所有需要登录的name 返回不需要登录的name
+ *
+ */
+function whitePathName() {
+  return generateRoutes().filter(it => !it.islogin).map(it => it.name)
+}
+router.beforeEach((to, from, next) => {
+  console.log('🚀 beforeEach 守卫触发:', { to, from }, '')
+  const { token, redirectName } = storeToRefs(useUserStore())
+  if (!whitePathName().includes(to.name) && !token.value) {
     const { confirm: showConfirm } = useGlobalMessage()
-    console.log('🛡️ 检测到访问受保护页面')
-
+    redirectName.value = String(to.name)
     return new Promise<void>((resolve, reject) => {
       showConfirm({
-        title: '守卫拦截演示',
-        msg: '这是一个受保护的页面,需要确认后才能访问',
-        confirmButtonText: '允许访问',
+        title: '警告',
+        msg: '检测到当前状态未登录,是否登录',
+        confirmButtonText: '登录',
         cancelButtonText: '取消',
         success() {
-          console.log('✅ 用户确认访问,允许导航')
-          next()
-          resolve()
+          // console.log('✅ 用户确认访问,允许导航')
+          router.push({ name: 'smqjh-login' })
+          // resolve()
         },
         fail() {
-          console.log('❌ 用户取消访问,阻止导航')
+          // console.log('❌ 用户取消访问,阻止导航')
           next(false)
           reject(new Error('用户取消访问'))
         },
       })
     })
   }
+  // 演示:基本的导航日志记录
+  if (to.path && from.path) {
+    console.log(`📍 导航: ${from.path} → ${to.path}`)
+  }
 
   // 继续导航
   next()
@@ -65,15 +70,6 @@ router.afterEach((to, from) => {
   if (to.path) {
     console.log(`📄 页面切换完成: ${to.path}`)
   }
-
-  // 演示:针对 afterEach 演示页面的简单提示
-  if (to.name === 'demo-aftereach') {
-    const { show: showToast } = useGlobalToast()
-    console.log('📊 进入 afterEach 演示页面')
-    setTimeout(() => {
-      showToast('afterEach 钩子已触发!')
-    }, 500)
-  }
 })
 
 export default router

+ 5 - 0
src/store/user.ts

@@ -2,10 +2,15 @@ import { defineStore } from 'pinia'
 
 interface userStroe {
   token: string
+  /**
+   * 重定向路由名称
+   */
+  redirectName: string
 }
 export const useUserStore = defineStore('user', {
   state: (): userStroe => ({
     token: '',
+    redirectName: '',
   }),
   actions: {
 

+ 79 - 4
src/subPack-common/address/index.vue

@@ -1,16 +1,91 @@
 <script setup lang="ts">
+import { StaticUrl } from '@/config/index'
+
 definePage({
-  name: 'common-address',
+  name: 'common-selectAddress',
+  islogin: false,
   style: {
     navigationBarTitleText: '选择收获地址',
   },
 })
+const { name } = storeToRefs(useAddressStore())
+const selectAddressId = ref()
 </script>
 
 <template>
-  <div />
+  <view class="pages">
+    <view class="sticky left-0 top-0 z-99 bg-white px24rpx py28rpx">
+      <view class="text-24rpx text-#AAAAAA">
+        当前定位
+      </view>
+      <view class="mt20rpx flex items-center justify-between">
+        <view class="flex items-center">
+          <image :src="`${StaticUrl}/location-black.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
+          <view class="ml18rpx max-w-380rpx truncate text-32rpx">
+            {{ name }}
+          </view>
+        </view>
+        <view class="flex items-center text-24rpx text-#1A8DFF" @click="useAddressStore().getMapAddress">
+          <image :src="`${StaticUrl}/dinwei.png`" class="mr14rpx h40rpx w40rpx flex-shrink-0" />
+          重新定位
+        </view>
+      </view>
+    </view>
+    <view class="px24rpx py20rpx">
+      <view class="rounded-16rpx bg-white px24rpx py28rpx">
+        <view class="flex items-center justify-between text-24rpx">
+          <view class="text-#AAAAAA">
+            我的收获地址
+          </view>
+          <view>管理</view>
+        </view>
+        <view class="radio mt24rpx">
+          <wd-radio-group v-model="selectAddressId" shape="dot" size="large">
+            <view v-for="item, idx in 5" :key="item" class="mb24rpx">
+              <wd-radio :value="item">
+                <view class="flex-1">
+                  <view class="text-28rpx font-semibold">
+                    富力中心A7座 34
+                  </view>
+                  <view class="mt16rpx text-24rpx text-#AAAAAA">
+                    用户12345 15285654972
+                  </view>
+                </view>
+              </wd-radio>
+              <view v-if="idx < 4" class="mt20rpx h2rpx w-full bg-#F0F0F0" />
+            </view>
+          </wd-radio-group>
+        </view>
+      </view>
+      <view class="mt20rpx rounded-16rpx bg-white px24rpx py28rpx">
+        <view class="text-24rpx text-#AAAAAA">
+          附近的门店
+        </view>
+        <view class="mt24rpx text-28rpx font-semibold">
+          海马购超市(红街店)
+        </view>
+        <view class="mt16rpx text-24rpx text-#AAAAAA">
+          以为您选择距离最近的可配送店
+        </view>
+      </view>
+      <view class="mt20rpx rounded-16rpx bg-white px24rpx py28rpx">
+        <view v-for="item, idx in 5" :key="item" class="mb24rpx text-28rpx font-semibold">
+          海马购超市(红街店)
+          <view v-if="idx < 4" class="mt20rpx h2rpx w-full bg-#F0F0F0" />
+        </view>
+      </view>
+    </view>
+  </view>
 </template>
 
-<style scoped>
-
+<style scoped lang="scss">
+.pages {
+  :deep() {
+    .radio {
+      .wd-radio {
+        text-align: left !important;
+      }
+    }
+  }
+}
 </style>

+ 3 - 11
src/subPack-xsb/my/afterSales/index.vue → src/subPack-common/afterSales/index.vue

@@ -3,7 +3,8 @@ import { StaticUrl } from '@/config'
 import router from '@/router'
 
 definePage({
-  name: 'xsb-afterSales',
+  name: 'common-afterSales',
+  islogin: true,
   style: {
     navigationBarTitleText: '申请售后',
   },
@@ -211,16 +212,7 @@ function handleSelectReson() {
         background: #F6F6F6 !important;
       }
     }
-    .upload {
-      .wd-upload__preview{
-        width: 120rpx !important;
-        height: 120rpx !important;
-      }
-      .wd-upload__status-content{
-        overflow: hidden !important;
-        border-radius: 32rpx !important;
-      }
-    }
+
   }
 }
 </style>

+ 10 - 7
src/subPack-xsb/my/afterSalesDetail/index.vue → src/subPack-common/afterSalesDetail/index.vue

@@ -2,7 +2,8 @@
 import { StaticUrl } from '@/config'
 
 definePage({
-  name: 'xsb-afterSalesDetail',
+  name: 'common-afterSalesDetail',
+  islogin: true,
   style: {
     navigationBarTitleText: '售后详情',
 
@@ -345,14 +346,14 @@ const dayId = ref(1)
           </view>
 
           <view class="flex-1">
-            <scroll-view scroll-y class="mt24rpx box-border h400rpx pl50rpx">
-              <view v-for="item in 10" :key="item" class="mb28rpx box-border h60rpx w-full flex items-center" :class="[TimeId == item ? 'text-[var(--them-color)]' : 'text-#222']" @click="TimeId = item">
+            <scroll-view scroll-y class="mt24rpx box-border h400rpx">
+              <view v-for="item in 10" :key="item" class="mb28rpx box-border h60rpx w-full flex items-center justify-end" :class="[TimeId == item ? 'text-[var(--them-color)]' : 'text-#222']" @click="TimeId = item">
                 <view>12:00-14:00(8.7元配送费)</view>
                 <view class="ml20rpx h32rpx w32rpx">
                   <image
                     v-if="TimeId == item"
                     :src="`${StaticUrl}/checked.png`"
-                    class="ml20rpx h32rpx w32rpx"
+                    class="h32rpx w32rpx"
                   />
                 </view>
               </view>
@@ -362,9 +363,11 @@ const dayId = ref(1)
         </view>
       </view>
       <template #footer>
-        <wd-button block>
-          确定
-        </wd-button>
+        <view class="pb20rpx">
+          <wd-button block>
+            确定
+          </wd-button>
+        </view>
       </template>
     </Zpopup>
   </view>

+ 3 - 2
src/subPack-xsb/my/afterSalesList/index.vue → src/subPack-common/afterSalesList/index.vue

@@ -3,7 +3,8 @@ import { StaticUrl } from '@/config'
 import router from '@/router'
 
 definePage({
-  name: 'xsb-afterSalesList',
+  name: 'common-afterSalesList',
+  islogin: true,
   style: {
     navigationBarTitleText: '售后列表',
   },
@@ -13,7 +14,7 @@ definePage({
 <template>
   <view class="page-xsb py24rpx">
     <wd-card v-for="item in 10" :key="item">
-      <view class="py24rpx" @click="router.push({ name: 'xsb-afterSalesDetail' })">
+      <view class="py24rpx" @click="router.push({ name: 'common-afterSalesDetail' })">
         <view class="flex items-center justify-between">
           <view class="text-28rpx text-#AAAAAA">
             售后编号:2048602564

+ 1 - 0
src/subPack-common/integral/index.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 definePage({
   name: 'common-integral',
+  islogin: true,
   style: {
     navigationBarTitleText: '积分',
     disableScroll: true,

+ 1 - 0
src/subPack-common/nickName/index.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 definePage({
   name: 'common-nickName',
+  islogin: true,
   style: {
     navigationBarTitleText: '修改昵称',
   },

+ 10 - 6
src/subPack-xsb/my/orderDetaile/index.vue → src/subPack-common/orderDetaile/index.vue

@@ -3,7 +3,8 @@ import { StaticUrl } from '@/config'
 import router from '@/router'
 
 definePage({
-  name: 'xsb-orderDetaile',
+  name: 'common-orderDetaile',
+  islogin: true,
   style: {
     navigationBarTitleText: '订单详情',
   },
@@ -27,14 +28,14 @@ function handleCollapse() {
           <view class="mt20rpx text-28rpx text-#AAAAAA">
             现在支付:预计10:40-10:55送达
           </view>
-          <view class="mt20rpx flex items-center">
+          <view class="btn mt20rpx flex items-center justify-between">
             <view class="info-btn mr20rpx w226rpx">
-              <wd-button type="info" block>
+              <wd-button type="info">
                 取消订单1
               </wd-button>
             </view>
-            <view class="flex-1">
-              <wd-button block>
+            <view class="ml20rpx flex-1">
+              <wd-button>
                 立即支付¥119
               </wd-button>
             </view>
@@ -80,7 +81,7 @@ function handleCollapse() {
               申请售后
             </view>
           </view>
-          <view class="flex flex-col items-center">
+          <view class="flex flex-col items-center" @click="router.push({ name: 'common-revalue' })">
             <image
               :src="`${StaticUrl}/orderDetaile-pj.png`"
               class="h40rpx w40rpx"
@@ -252,6 +253,9 @@ function handleCollapse() {
       background: #fff !important;
       color: #aaa !important;
     }
+    .btn .wd-button{
+      width: 100% !important;
+    }
   }
 }
 </style>

+ 129 - 0
src/subPack-common/revalue/index.vue

@@ -0,0 +1,129 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+import router from '@/router'
+
+definePage({
+  name: 'common-revalue',
+  islogin: true,
+  style: {
+    navigationBarTitleText: '写评价',
+    navigationStyle: 'custom',
+    disableScroll: true,
+  },
+})
+const fileList = ref([])
+const goodsRate = ref(0)
+const deliveryRate = ref(0)
+const distributionRate = ref(0)
+const deliveryman = ref(0)
+const revalueText = ref()
+function handleSubmit() {
+  router.replace({ name: 'common-revalue-success' })
+}
+</script>
+
+<template>
+  <view class="pages">
+    <wd-navbar
+      title="写评价" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
+      safe-area-inset-top left-arrow fixed @click-left="router.back()"
+    />
+    <view class="header-line h406rpx" />
+    <view class="px24rpx -mt230rpx">
+      <view class="rounded-32rpx bg-white p24rpx">
+        <view class="rounded-32rpx bg-#F6F6F6 p24rpx">
+          <view class="flex">
+            <view class="mr20rpx">
+              <image :src="`${StaticUrl}/revalue.png`" class="h40rpx w40rpx flex-shrink-0" />
+            </view>
+            <view class="flex-auto">
+              <wd-textarea
+                v-model="revalueText" placeholder="可以从设施新旧、服务态度、使用感受等角度评价哦~" :maxlength="150"
+                show-word-limit
+              />
+            </view>
+          </view>
+          <view class="upload mt20rpx">
+            <Zupload v-model:value="fileList" :limit="8" />
+          </view>
+        </view>
+        <view class="mt24rpx flex items-center justify-between">
+          <wd-checkbox>
+            <view class="text-28rpx">
+              匿名评价
+            </view>
+          </wd-checkbox>
+          <view class="text-28rpx text-#AAAAAA">
+            隐藏头像和昵称
+          </view>
+        </view>
+      </view>
+      <view class="mt20rpx rounded-32rpx bg-white p24rpx">
+        <view class="mb24rpx flex items-center">
+          <view class="mr-20rpx w142rpx text-28rpx text-#222">
+            商品评价
+          </view>
+          <wd-rate v-model="goodsRate" />
+          <view class="ml12rpx text-28rpx text-#FDD143 font-semibold">
+            {{ goodsRate }}.0
+          </view>
+        </view>
+        <view class="mb24rpx flex items-center">
+          <view class="mr-20rpx w142rpx text-28rpx text-#222">
+            配送打包
+          </view>
+          <wd-rate v-model="deliveryRate" />
+          <view class="ml12rpx text-28rpx text-#FDD143 font-semibold">
+            {{ deliveryRate }}.0
+          </view>
+        </view>
+        <view class="mb24rpx flex items-center">
+          <view class="mr-20rpx w142rpx text-28rpx text-#222">
+            送货速度
+          </view>
+          <wd-rate v-model="distributionRate" />
+          <view class="ml12rpx text-28rpx text-#FDD143 font-semibold">
+            {{ distributionRate }}.0
+          </view>
+        </view>
+        <view class="mb24rpx flex items-center">
+          <view class="mr-20rpx w142rpx text-28rpx text-#222">
+            配送员服务
+          </view>
+          <wd-rate v-model="deliveryman" />
+          <view class="ml12rpx text-28rpx text-#FDD143 font-semibold">
+            {{ deliveryman }}.0
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="fixed bottom-80rpx left-0 box-border w-full px24rpx">
+      <wd-button block size="large" @click="handleSubmit">
+        发布
+      </wd-button>
+    </view>
+  </view>
+</template>
+
+<style scoped lang="scss">
+.pages {
+  .header-line {
+    background: linear-gradient(179deg, rgba(190, 255, 13, 0.4) 0%, rgba(220, 255, 125, 0.2) 49%, rgba(158, 214, 5, 0) 100%);
+  }
+
+  :deep() {
+    .wd-textarea {
+      background: none !important;
+      padding: 0 !important;
+    }
+
+    .wd-textarea__value {
+      background: none !important;
+    }
+
+    .wd-textarea__count {
+      background: none !important;
+    }
+  }
+}
+</style>

+ 73 - 0
src/subPack-common/revalueSuccess/index.vue

@@ -0,0 +1,73 @@
+<script setup lang="ts">
+import router from '@/router'
+import { StaticUrl } from '@/config'
+
+definePage({
+  name: 'common-revalue-success',
+  islogin: true,
+  style: {
+    navigationBarTitleText: '评价成功',
+    navigationStyle: 'custom',
+    disableScroll: true,
+  },
+})
+function handleBackIndex() {
+  const xsbIndex = 'subPack-xsb/home/index'
+  const pages = getCurrentPages()
+  const targetPageIndex = pages.findIndex(page => page.route === xsbIndex)
+
+  if (targetPageIndex !== -1) {
+    const delta = pages.length - targetPageIndex - 1
+    router.back({ delta, animationType: 'fade-out' })
+  }
+  else {
+    // 如果未找到目标页面,则跳转到首页
+    router.back({ delta: pages.length, animationType: 'fade-out' })
+  }
+}
+</script>
+
+<template>
+  <view class="pages">
+    <wd-navbar
+      title="评价成功" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
+
+      safe-area-inset-top left-arrow fixed
+      @click-left="router.back()"
+    />
+    <view class="header-line h406rpx" />
+    <view class="-mt200rpx">
+      <view class="flex flex-col items-center">
+        <image
+          :src="`${StaticUrl}/revalue-success.png`"
+          class="h200rpx w200rpx"
+        />
+        <view class="mt20rpx text-32rpx font-semibold">
+          评价成功
+        </view>
+        <view class="mt20rpx text-24rpx text-#AAAAAA">
+          感谢你的评价,你为用户选择提供了真实的参考意见
+        </view>
+        <view class="mt60rpx flex items-center">
+          <wd-button type="info" block size="large">
+            <text class="text-32rpx font-semibold">
+              查看评价
+            </text>
+          </wd-button>
+          <view class="mx20rpx" />
+          <wd-button block size="large" @click="handleBackIndex">
+            <text class="text-32rpx font-semibold">
+              返回首页
+            </text>
+          </wd-button>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<style scoped>
+.header-line{
+  background: linear-gradient( 179deg, rgba(190,255,13,0.4) 0%, rgba(220,255,125,0.2) 49%, rgba(158,214,5,0) 100%);
+}
+</style>

+ 1 - 0
src/subPack-common/user-center/index.vue

@@ -4,6 +4,7 @@ import router from '@/router'
 
 definePage({
   name: 'common-user-center',
+  islogin: true,
   style: {
     navigationBarTitleText: '账户设置',
   },

+ 51 - 0
src/subPack-smqjh/components/selectAddress/index.vue

@@ -0,0 +1,51 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+
+const selectAddress = defineModel({ default: false })
+</script>
+
+<template>
+  <Zpopup v-model="selectAddress" :showfooter="false">
+    <view class="px24rpx py28rpx">
+      <view class="pb20rpx text-center text-32rpx font-semibold">
+        选择地址
+      </view>
+      <scroll-view scroll-y class="h800rpx">
+        <view v-for="item in 10" :key="item" class="mb24rpx flex rounded-16rpx bg-white px24rpx py28rpx">
+          <image :src="`${StaticUrl}/checked.png`" class="h32rpx w32rpx flex-shrink-0" />
+          <view class="ml20rpx flex-1">
+            <view class="flex items-center justify-between">
+              <view class="line-clamp-1 text-32rpx font-semibold">
+                杨先生 18456252489
+              </view>
+              <view class="text-24rpx">
+                编辑
+              </view>
+            </view>
+            <view class="line-clamp-2 mt20rpx text-24rpx text-#AAAAAA">
+              贵州省贵阳市  观山湖区  富力中心A7座  3410
+            </view>
+            <view class="mt20rpx">
+              <wd-checkbox>
+                <view class="text-24rpx text-#AAAAAA">
+                  设为默认地址
+                </view>
+              </wd-checkbox>
+            </view>
+          </view>
+        </view>
+      </scroll-view>
+      <view class="ios fixed bottom-0 left-0 box-border w-full px24rpx">
+        <view class="pb20rpx">
+          <wd-button block size="large">
+            新增收货地址
+          </wd-button>
+        </view>
+      </view>
+    </view>
+  </Zpopup>
+</template>
+
+<style scoped>
+
+</style>

+ 133 - 0
src/subPack-smqjh/goodsList/index.vue

@@ -0,0 +1,133 @@
+<script setup lang="ts">
+import { StaticUrl } from '@/config'
+import router from '@/router'
+import selectAddressTemplate from '@/subPack-smqjh/components/selectAddress/index.vue?async'
+
+definePage({
+  name: 'smqjh-goodsList',
+  islogin: false,
+  style: {
+    navigationBarTitleText: '商品列表',
+    navigationStyle: 'custom',
+  },
+})
+const { name } = storeToRefs(useAddressStore())
+const selectAddress = ref(false)
+const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
+
+const classfiylist = ref([
+  { title: '全部', icon: `${StaticUrl}/smqjh-class-all.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+  { title: '蔬菜豆品', icon: `${StaticUrl}/shu.png` },
+])
+const topNavActive = ref(0)
+const sortList = [
+  { title: '距离优先', id: 1 },
+  { title: '销量', id: 2 },
+  { title: '价格', id: 3 },
+]
+const sortActive = ref(1)
+function handleTopNavChange(idx: number) {
+  topNavActive.value = idx
+}
+function handleSortList(id: number) {
+  sortActive.value = id
+}
+</script>
+
+<template>
+  <view class="pages pb20rpx">
+    <wd-navbar
+      title="" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
+      safe-area-inset-top fixed
+    >
+      <template #left>
+        <view class="h-full flex items-center">
+          <wd-icon name="arrow-left" size="22px" @click="router.back()" />
+          <view class="ml10rpx flex items-center" @click.stop="selectAddress = true">
+            <image :src="`${StaticUrl}/location-green.png`" class="h33.8rpx w29rpx" />
+            <view class="ml10rpx max-w-280rpx truncate text-32rpx text-#222 font-semibold">
+              {{ name }}
+            </view>
+          </view>
+        </view>
+      </template>
+    </wd-navbar>
+    <view class="sticky left-0 top-0 z-9 box-border h400rpx bg-#F4FFD1 py20rpx" :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }">
+      <scroll-view scroll-x class="scrollx w-full flex-shrink-0 whitespace-nowrap pl24rpx">
+        <view class="flex items-end pb10rpx">
+          <view v-for="item, idx in classfiylist" :key="idx" class="mr24rpx flex flex-col items-center justify-center" @click="handleTopNavChange(idx)">
+            <image
+              :src="item.icon"
+              :class="[topNavActive == idx ? 'overflow-hidden border-solid border-[var(--them-color)] border-2rpx rounded-26rpx h84rpx w-84rpx' : 'h72rpx w-72rpx']"
+            />
+            <view class="mt16rpx text-22rpx" :class="[topNavActive == idx ? 'bg-[var(--them-color)] rounded-18rpx px-8rpx py2rpx text-white text-24rpx' : '']">
+              {{ item.title }}
+            </view>
+          </view>
+        </view>
+      </scroll-view>
+      <view class="box-border w-full flex items-center bg-white p24rpx">
+        <view v-for="item in sortList" :key="item.id" :class="[sortActive == item.id ? 'bg-[var(--them-color)] text-white' : 'bg-#F6F6F6 text-#222']" class="mr32rpx rounded-24rpx px16rpx py6rpx text-24rpx" @click="handleSortList(item.id)">
+          {{ item.title }}
+        </view>
+      </view>
+    </view>
+    <view v-for="item in 10" :key="item" class="mb20rpx box-border w-full flex justify-between bg-white p24rpx">
+      <image
+        :src="`${StaticUrl}/shu.png`"
+        class="h160rpx w160rpx flex-shrink-0 rounded-32rpx"
+      />
+      <view class="ml20rpx box-border flex-1">
+        <view class="flex items-center justify-between">
+          <view class="text-32rpx font-semibold">
+            花林兰州拉面(观山湖店)
+          </view>
+          <view class="text-24rpx text-#AAAAAA">
+            月售104
+          </view>
+        </view>
+        <view class="mt20rpx text-24rpx text-#AAAAAA">
+          起送¥20  配送¥4
+        </view>
+        <view class="mt20rpx flex items-center justify-between">
+          <view class="flex items-center text-#FFB639">
+            <wd-icon name="star-on" size="22px" />
+            <view class="ml8rpx text-32rpx font-semibold">
+              4.4分
+            </view>
+          </view>
+          <view class="text-24rpx">
+            15分钟 330m
+          </view>
+        </view>
+        <scroll-view scroll-x class="mt24rpx w-528rpx whitespace-nowrap">
+          <view class="flex items-center">
+            <view v-for="items in 10" :key="items" class="mr20rpx">
+              <image
+                :src="`${StaticUrl}/shu.png`"
+                class="h132rpx w132rpx flex-shrink-0 rounded-32rpx"
+              />
+              <view class="mt16rpx max-w-132rpx truncate">
+                番茄鸡蛋4545
+              </view>
+            </view>
+          </view>
+        </scroll-view>
+      </view>
+    </view>
+    <selectAddressTemplate v-model="selectAddress" />
+  </view>
+</template>
+
+<style scoped>
+
+</style>

+ 94 - 11
src/subPack-xsb/cart/index.vue

@@ -4,29 +4,72 @@ import xsbTabbar from '@/subPack-xsb/components/xsbTabbar/index.vue'
 
 definePage({
   name: 'xsb-cart',
+  islogin: false,
   style: {
     navigationStyle: 'custom',
     navigationBarTitleText: '星闪豹购物车',
     disableScroll: true,
   },
 })
+const isAll = ref(false)
+const selectCatrt = ref()
 </script>
 
 <template>
   <view class="page-xsb">
     <wd-navbar
-      title="" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
+      title="购物车" custom-style="background-color:transparent !important" :bordered="false" :z-index="99"
       safe-area-inset-top fixed
     />
     <view class="xsb-linear h406rpx" />
     <view class="-mt220rpx">
-      <view class="flex items-center justify-between px20rpx text-36rpx font-semibold">
-        <view>购物车</view>
-        <view>管理</view>
-      </view>
-      <view class="content">
-        <scroll-view scroll-y>
-          <view class="box-border w-full flex items-center justify-center">
+      <view class="content px24rpx">
+        <scroll-view scroll-y class="content">
+          <view class="rounded-16rpx bg-white px24rpx pb18rpx pt28rpx">
+            <wd-checkbox v-model="isAll" size="large">
+              <view class="text-28rpx font-semibold">
+                市民请集合官方旗舰店
+              </view>
+            </wd-checkbox>
+            <view class="mt20rpx h2rpx w-full bg-#F0F0F0" />
+            <wd-checkbox-group v-model="selectCatrt" size="large">
+              <view
+                v-for="item in 10" :key="item" class="mt20rpx flex items-center"
+              >
+                <view class="mr20rpx h32rpx w32rpx">
+                  <wd-checkbox model-value="jingmai" />
+                </view>
+                <view class="flex flex-1">
+                  <image
+                    :src="`${StaticUrl}/shu.png`"
+                    class="h206rpx w200rpx flex-shrink-0"
+                  />
+                  <view class="ml20rpx">
+                    <view class="text-left text-28rpx font-semibold">
+                      <view v-for="i in 2" :key="i" class="mr5px inline-block">
+                        <wd-tag type="danger">
+                          惊喜回馈
+                        </wd-tag>
+                      </view>
+                      秋季应季水果纯甜
+                      柿子
+                    </view>
+                    <view class="mt14tpx text-24rpx text-#AAAAAA">
+                      规格:5kg,盒
+                    </view>
+                    <view class="mt14rpx flex items-center justify-between">
+                      <view class="text-36rpx text-#FF4A39 font-semibold">
+                        ¥13.95
+                      </view>
+                      <wd-input-number />
+                    </view>
+                  </view>
+                </view>
+              </view>
+            </wd-checkbox-group>
+          </view>
+
+          <view v-if="false" class="box-border w-full flex items-center justify-center">
             <view class="mt220rpx flex flex-col items-center">
               <image :src="`${StaticUrl}/cart.png`" class="h110rpx w110rpx" />
               <view class="mb20rpx mt20rpx text-24rpx">
@@ -37,17 +80,57 @@ definePage({
               </wd-button>
             </view>
           </view>
+          <view class="h100rpx" />
         </scroll-view>
       </view>
     </view>
+    <view class="fixedShadow fixed bottom-80rpx left-0 z-99 box-border w-full flex items-center justify-between rounded-t-16rpx bg-white px24rpx pb60rpx pt10rpx">
+      <view class="ios w-full flex items-center justify-between">
+        <view class="flex items-center">
+          <image
+            :src="`${StaticUrl}/cart-lanzi.png`"
+            class="h100rpx w100rpx"
+          />
+          <view class="ml16rpx flex items-center">
+            <wd-checkbox v-model="isAll" size="large">
+              全选
+            </wd-checkbox>
+            <view class="ml10rpx text-24rpx text-#FF4A39">
+              删除
+            </view>
+          </view>
+        </view>
+        <view class="flex items-center">
+          <view class="flex items-center font-semibold">
+            <view class="text-22rpx text-#222">
+              总计:
+            </view>
+            <view class="flex items-baseline text-24rpx text-#FF4A39">
+              ¥
+              <text class="text-36rpx">
+                8.9
+              </text>
+            </view>
+          </view>
+          <view class="ml20rpx w160rpx">
+            <wd-button block size="large">
+              结算
+            </wd-button>
+          </view>
+        </view>
+      </view>
+    </view>
     <xsbTabbar />
   </view>
 </template>
 
 <style scoped lang="scss">
 .content {
-  height: calc(100vh - var(--window-top) - 340rpx);
-  height: calc(100vh - var(--window-top) - constant(safe-area-inset-bottom) - 340rpx);
-  height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom) - 340rpx);
+  height: calc(100vh - var(--window-top) - 420rpx);
+  height: calc(100vh - var(--window-top) - constant(safe-area-inset-bottom) - 420rpx);
+  height: calc(100vh - var(--window-top) - env(safe-area-inset-bottom) - 420rpx);
+}
+.fixedShadow{
+    box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0,0,0,0.05);
 }
 </style>

+ 1 - 0
src/subPack-xsb/classfiy/index.vue

@@ -20,6 +20,7 @@ const sortClassBtn = ref(1)
 const show = ref(false)
 definePage({
   name: 'xsb-classfiy',
+  islogin: false,
   style: {
     navigationStyle: 'custom',
     navigationBarTitleText: '星闪豹分类',

+ 2 - 2
src/subPack-xsb/components/xsbTabbar/index.vue

@@ -7,7 +7,6 @@ const route = useRoute()
 const { ScrollDown } = storeToRefs(useSysXsbStore())
 
 const { activeTabbar, getTabbarItemValue, setTabbarItemActive, tabbarList } = useXsbTabbar()
-
 function handleTabbarChange({ value }: { value: string }) {
   setTabbarItemActive(value)
   router.push({ name: value })
@@ -34,7 +33,8 @@ function handleClick() {
 <template>
   <wd-tabbar
     :model-value="activeTabbar.name" safe-area-inset-bottom placeholder fixed :bordered="false"
-    custom-class="custom-tab" @change="handleTabbarChange"
+    custom-class="custom-tab" :custom-style="`box-shadow:${activeTabbar.name == 'xsb-cart' ? '' : ' 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.09)'}`"
+    @change="handleTabbarChange"
   >
     <wd-tabbar-item
       v-for="(item, index) in tabbarList" :key="index" :name="item.name"

+ 3 - 2
src/subPack-xsb/goods/index.vue

@@ -5,6 +5,7 @@ import router from '@/router'
 const { statusBarHeight, MenuButtonHeight } = useSysStore()
 definePage({
   name: 'xsb-goods',
+  islogin: false,
   style: {
     navigationStyle: 'custom',
     navigationBarTitleText: '星闪豹商品详情',
@@ -245,7 +246,7 @@ function handleGoCurren(id: number) {
     <view class="h180rpx" />
     <view class="ios shadow-fixed fixed bottom-0 left-0 w-full rounded-t-32rpx bg-white">
       <view class="flex items-center justify-between px24rpx py20rpx">
-        <view class="mr36rpx">
+        <view class="mr36rpx" @click="router.replace({ name: 'xsb-home' })">
           <image
             :src="`${StaticUrl}/goods-home.png`"
             class="h44rpx w44rpx"
@@ -274,7 +275,7 @@ function handleGoCurren(id: number) {
         </view>
         <view class="flex items-center">
           <view class="w220rpx">
-            <wd-button hairline plain block>
+            <wd-button plain hairline block>
               加入购物车
             </wd-button>
           </view>

+ 5 - 6
src/subPack-xsb/home/index.vue

@@ -6,6 +6,7 @@ import xsbTabbar from '@/subPack-xsb/components/xsbTabbar/index.vue'
 const { ScrollDown } = storeToRefs(useSysXsbStore())
 definePage({
   name: 'xsb-home',
+  islogin: false,
   style: {
     navigationStyle: 'custom',
     backgroundColor: '#9ED605',
@@ -15,6 +16,7 @@ definePage({
   },
 })
 const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
+const { name } = storeToRefs(useAddressStore())
 const current = ref(0)
 const swiperList = ref([
   'https://wot-ui.cn/assets/redpanda.jpg',
@@ -59,9 +61,6 @@ const textArray = ref([
   '这是第三条消息',
 ])
 
-function handleLoaction() {
-  console.log('定位')
-}
 function handleChangeNav(idx: number) {
   navActive.value = idx
 }
@@ -88,10 +87,10 @@ function handleCommonName(name: string) {
       <template #left>
         <view class="h-full flex items-center">
           <wd-icon name="arrow-left" size="22px" color="#fff" />
-          <view class="ml10rpx flex items-center" @click.stop="handleLoaction">
+          <view class="ml10rpx flex items-center" @click.stop="router.push({ name: 'common-selectAddress' })">
             <image :src="`${StaticUrl}/location.png`" class="h33.8rpx w29rpx" />
-            <view class="ml10rpx text-32rpx text-white">
-              富力中心
+            <view class="ml10rpx max-w-280rpx truncate text-32rpx text-white">
+              {{ name }}
             </view>
           </view>
         </view>

+ 3 - 2
src/subPack-xsb/my/index.vue

@@ -5,6 +5,7 @@ import xsbTabbar from '@/subPack-xsb/components/xsbTabbar/index.vue'
 
 definePage({
   name: 'xsb-my',
+  islogin: false,
   style: {
     navigationStyle: 'custom',
     navigationBarTitleText: '星闪豹我的',
@@ -15,7 +16,7 @@ const tabList = ref([
   { title: '待支付', icon: `${StaticUrl}/1.png`, name: 'xsb-order' },
   { title: '待收货', icon: `${StaticUrl}/2.png`, name: 'xsb-order' },
   { title: '已完成', icon: `${StaticUrl}/6.png`, name: 'xsb-order' },
-  { title: '退款售后', icon: `${StaticUrl}/3.png`, name: 'xsb-afterSalesList' },
+  { title: '退款售后', icon: `${StaticUrl}/3.png`, name: 'common-afterSalesList' },
 ])
 </script>
 
@@ -65,7 +66,7 @@ const tabList = ref([
     <view class="item-cell mt20rpx">
       <wd-card custom-class="card">
         <wd-cell-group custom-class="cell-group">
-          <wd-cell title="收货地址" custom-title-class="cell-title" clickable is-link>
+          <wd-cell title="收货地址" custom-title-class="cell-title" clickable is-link @click="router.push({ name: 'common-address' })">
             <template #icon>
               <image :src="`${StaticUrl}/4.png`" class="h50rpx w50rpx" />
             </template>

+ 6 - 1
src/subPack-xsb/my/order/index.vue

@@ -6,6 +6,7 @@ import router from '@/router'
 
 definePage({
   name: 'xsb-order',
+  islogin: true,
   style: {
     navigationStyle: 'custom',
     navigationBarTitleText: '星闪豹订单列表',
@@ -29,6 +30,10 @@ function handleChangeTypeNav(value: number) {
 function handleChangeStatus(value: number) {
   orderStatusActive.value = value
 }
+function handleClick() {
+  console.log(12)
+  router.push({ name: 'common-orderDetaile' })
+}
 </script>
 
 <template>
@@ -64,7 +69,7 @@ function handleChangeStatus(value: number) {
     </view>
     <view :style="{ height: `calc(100vh - ${(statusBarHeight + MenuButtonHeight) * 2}rpx - ${navHeight * 2}rpx)` }">
       <scroll-view scroll-y class="h-full pt24rpx">
-        <view v-for="item in 20" :key="item" @click="router.push({ name: 'xsb-orderDetaile' })">
+        <view v-for="item in 20" :key="item" @click="handleClick">
           <wd-card>
             <template #title>
               <view class="flex items-center justify-between">

+ 10 - 6
src/uni-pages.d.ts

@@ -6,6 +6,7 @@
 type _LocationUrl =
   "/pages/index/index" |
   "/pages/cart/index" |
+  "/pages/classfiy/index" |
   "/pages/login/index" |
   "/pages/my/index" |
   "/subPack-xsb/cart/index" |
@@ -13,15 +14,18 @@ type _LocationUrl =
   "/subPack-xsb/goods/index" |
   "/subPack-xsb/home/index" |
   "/subPack-xsb/my/index" |
-  "/subPack-xsb/my/afterSales/index" |
-  "/subPack-xsb/my/afterSalesDetail/index" |
-  "/subPack-xsb/my/afterSalesList/index" |
   "/subPack-xsb/my/order/index" |
-  "/subPack-xsb/my/orderDetaile/index" |
   "/subPack-common/address/index" |
+  "/subPack-common/afterSales/index" |
+  "/subPack-common/afterSalesDetail/index" |
+  "/subPack-common/afterSalesList/index" |
   "/subPack-common/integral/index" |
   "/subPack-common/nickName/index" |
-  "/subPack-common/user-center/index";
+  "/subPack-common/orderDetaile/index" |
+  "/subPack-common/revalue/index" |
+  "/subPack-common/revalueSuccess/index" |
+  "/subPack-common/user-center/index" |
+  "/subPack-smqjh/goodsList/index";
 
 interface NavigateToOptions {
   url: _LocationUrl;
@@ -29,7 +33,7 @@ interface NavigateToOptions {
 interface RedirectToOptions extends NavigateToOptions {}
 
 interface SwitchTabOptions {
-  url: "/pages/index/index" | "/pages/cart/index" | "/pages/my/index"
+  url: "/pages/index/index" | "/pages/classfiy/index" | "/pages/cart/index" | "/pages/my/index"
 }
 
 type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;

+ 1 - 0
vite.config.ts

@@ -26,6 +26,7 @@ export default async () => {
         subPackages: [
           'src/subPack-xsb',
           'src/subPack-common',
+          'src/subPack-smqjh',
         ],
         /**
          * 排除的页面,相对于 dir 和 subPackages