Jelajahi Sumber

feat: 添加星闪豹子包系统商店并更新开发环境配置

- 添加 '@/subPack-xsb/store-xsb/sys' 到模块映射中
- 将开发环境配置切换到线上测试地址
- 在首页异步导入星闪豹子包系统商店并使用其门店信息
- 修复首页导航列表布局并添加骨架屏加载效果
- 移除系统商店中的调试日志
- 调整订单页面按钮间距样式
- 为星闪豹地址选择页面添加地址管理跳转功能
- 优化星闪豹系统商店权限错误处理信息

BREAKING CHANGE: 开发环境配置已更改,订单按钮样式已调整
zhangtao 5 hari lalu
induk
melakukan
cbe13eb743

+ 1 - 0
async-import.d.ts

@@ -7,6 +7,7 @@ export {}
 interface ModuleMap {
   '@/subPack-xsb/utils/order-data': typeof import('@/subPack-xsb/utils/order-data')
   '@/subPack-xsb/utils/confirm-order': typeof import('@/subPack-xsb/utils/confirm-order')
+  '@/subPack-xsb/store-xsb/sys': typeof import('@/subPack-xsb/store-xsb/sys')
   [path: string]: any
 }
 

+ 2 - 2
src/config/index.ts

@@ -2,13 +2,13 @@ const mapEnvVersion = {
   /**
    * 开发版
    */
-  develop: 'http://192.168.1.166:8080', // 张
+  // develop: 'http://192.168.1.166:8080', // 张
   // develop: 'http://192.168.1.101:8080',
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
   // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://47.109.84.152:8081',
-  // develop: 'https://smqjh.api.zswlgz.com',
+  develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */

+ 51 - 19
src/pages/index/index.vue

@@ -21,8 +21,9 @@ const { statusBarHeight, MenuButtonHeight, opcity, isOnlineAudit } = storeToRefs
 const { name } = storeToRefs(addressStore)
 const { userInfo } = storeToRefs(useUserStore())
 const { getTotalNum } = storeToRefs(useSmqjhCartStore())
-const { data: goodsList, isLastPage, page, reload, error, loading, refresh } = usePagination((pageNum, pageSize) =>
-  Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: 2, channelId: userInfo.value.channelId || 1 } }), {
+const xsbStore = ref<typeof import('@/subPack-xsb/store-xsb/sys')>()
+const { data: goodsList, isLastPage, page, reload, error, refresh } = usePagination((pageNum, pageSize) =>
+  Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: xsbStore.value?.useSysXsbStore().SelectShopInfo.shopId || 2, channelId: userInfo.value.channelId || 1 } }), {
   data: resp => resp.data?.list,
   initialData: [],
   initialPage: 1,
@@ -34,17 +35,26 @@ const { data: goodsList, isLastPage, page, reload, error, loading, refresh } = u
 const state = computed(() => {
   return error.value ? 'error' : !isLastPage.value ? 'loading' : 'finished'
 })
-onShow(() => {
+const loading = ref(true)
+
+onShow(async () => {
   useSysStore().getAudit()
   useSmqjhCartStore().getCartList('XSB')
   useTabbar().setTabbarItem('smqjh-cart', getTotalNum.value)
+  xsbStore.value = await AsyncImport('@/subPack-xsb/store-xsb/sys')
   refresh()
 })
+onMounted(() => {
+  setTimeout(() => {
+    loading.value = false
+  }, 1000)
+})
 onReachBottom(() => {
   if (!isLastPage.value) {
     page.value++
   }
 })
+
 const navList = computed(() => {
   const list = [
     { icon: `${StaticUrl}/xsb.png`, title: '星闪豹', name: 'xsb-homeTabbar', show: true },
@@ -124,27 +134,49 @@ function handleGo() {
       </view>
     </view>
     <view class="px24rpx -mt260rpx">
-      <view class="grid grid-cols-4 mt24rpx gap12rpx rounded-16rpx bg-white py24rpx">
-        <template v-for="item in navList" :key="item.icon">
-          <view
-            v-if="item.show" class="flex flex-col items-center justify-center"
-            @click="handleClick(String(item.name))"
-          >
-            <view class="relative h120rpx w120rpx">
-              <image :src="item.icon" class="h120rpx w120rpx" />
+      <view class="mt24rpx rounded-16rpx bg-white py24rpx" :class="[loading ? 'px24rpx' : '']">
+        <wd-skeleton
+          :loading="loading"
+          theme="image" :row-col="[
+            [
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+            ],
+            [
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+              { width: '120rpx', height: '120rpx' },
+            ],
+
+          ]"
+        >
+          <view class="grid grid-cols-4 gap12rpx">
+            <template v-for="item in navList" :key="item.icon">
               <view
-                v-if="item.title != '星闪豹'"
-                class="linebg absolute left-0 top-0 h-full w-full flex items-center justify-center rounded-32rpx text-24rpx text-white font-semibold"
+                v-if="item.show" class="flex flex-col items-center justify-center"
+                @click="handleClick(String(item.name))"
               >
-                敬请期待
+                <view class="relative h120rpx w120rpx">
+                  <image :src="item.icon" class="h120rpx w120rpx" />
+                  <view
+                    v-if="item.title != '星闪豹'"
+                    class="linebg absolute left-0 top-0 h-full w-full flex items-center justify-center rounded-32rpx text-24rpx text-white font-semibold"
+                  >
+                    敬请期待
+                  </view>
+                </view>
+                <view class="text-24rpx">
+                  {{ item.title }}
+                </view>
               </view>
-            </view>
-            <view class="text-24rpx">
-              {{ item.title }}
-            </view>
+            </template>
           </view>
-        </template>
+        </wd-skeleton>
       </view>
+
       <view class="mt20rpx w-full flex items-center justify-between" @click="handleGo">
         <image :src="`${StaticUrl}/smqjh-fl.png`" class="h346rpx w344rpx flex-shrink-0" />
         <view class="flex flex-1 flex-col items-end justify-center">

+ 0 - 1
src/store/sys.ts

@@ -63,7 +63,6 @@ export const useSysStore = defineStore('system', {
     async getAudit() {
       const res = await Apis.sys.dictPage({ data: { typeCode: 'sys_applet' } })
       this.isOnlineAudit = res.data?.list[0].value === '0'
-      console.log(res.data?.list[0].value === '0')
     },
   },
 })

+ 4 - 4
src/subPack-smqjh/order/index.vue

@@ -186,12 +186,12 @@ function handleAfterSale(item: Api.xsbOrderList) {
         </view>
         <view class="my24rpx flex items-center justify-end">
           <template v-if="item.hbOrderStatus === subPackOrder?.OrderStatus.PaddingPay">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleCancel(item)">
                 取消订单
               </wd-button>
             </view>
-            <view class="ml20rpx">
+            <view class="mr20rpx">
               <wd-button size="small" plain type="error" @click.stop="handlePay(item.orderNumber as string)">
                 付款
               </wd-button>
@@ -210,14 +210,14 @@ function handleAfterSale(item: Api.xsbOrderList) {
             </view> -->
           </template>
           <template v-if="item.hbOrderStatus === subPackOrder?.OrderStatus.OrderArrived">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleSubmitOrder(item)">
                 确认收货
               </wd-button>
             </view>
           </template>
           <template v-if="[subPackOrder?.OrderStatus.OrderCompleted, subPackOrder?.OrderStatus.OrderWaitDelivery, subPackOrder?.OrderStatus.OrderAccepted].includes(item.hbOrderStatus) ">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleAfterSale(item)">
                 申请售后
               </wd-button>

+ 4 - 4
src/subPack-xsb/order/index.vue

@@ -170,12 +170,12 @@ function handleAfterSale(item: Api.xsbOrderList) {
         </view>
         <view class="mt24rpx flex items-center justify-end">
           <template v-if="item.hbOrderStatus === OrderStatus.PaddingPay">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleCancel(item)">
                 取消订单
               </wd-button>
             </view>
-            <view class="ml20rpx">
+            <view class="mr20rpx">
               <wd-button size="small" plain type="error" @click.stop="handlePay(item.orderNumber as string)">
                 付款
               </wd-button>
@@ -194,14 +194,14 @@ function handleAfterSale(item: Api.xsbOrderList) {
             </view> -->
           </template>
           <template v-if="item.hbOrderStatus === OrderStatus.OrderArrived">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleSubmitOrder(item)">
                 确认收货
               </wd-button>
             </view>
           </template>
           <template v-if="[OrderStatus.OrderCompleted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(item.hbOrderStatus) ">
-            <view>
+            <view class="mr20rpx">
               <wd-button size="small" plain type="info" @click.stop="handleAfterSale(item)">
                 申请售后
               </wd-button>

+ 3 - 1
src/subPack-xsb/selectAddress/index.vue

@@ -57,7 +57,9 @@ async function handelChange(e: { value: number }) {
           <view class="text-#AAAAAA">
             我的收获地址
           </view>
-          <view>管理</view>
+          <view @click="router.push({ name: 'common-addressList' })">
+            管理
+          </view>
         </view>
         <view class="radio mt24rpx">
           <wd-radio-group v-model="selectAddressId" shape="dot" size="large" @change="handelChange">

+ 1 - 1
src/subPack-xsb/store-xsb/sys.ts

@@ -63,7 +63,7 @@ export const useSysXsbStore = defineStore('system-xsb', {
             // 所有门店都没有权限
             this.allShopHasPermission = true
             this.SelectShopInfo = { shopId: 0 }
-            reject(res)
+            reject(new Error('所有门店都没有权限'))
           }
           else {
             this.allShopHasPermission = false