Просмотр исходного кода

Merge branch '加气优惠1.2二期_cl'

chenlei 1 год назад
Родитель
Сommit
a275f2e583

+ 4 - 4
.eslintrc-auto-import.json

@@ -12,6 +12,7 @@
     "Ref": true,
     "VNode": true,
     "WritableComputedRef": true,
+    "aop": true,
     "ay": true,
     "computed": true,
     "config": true,
@@ -21,6 +22,7 @@
     "defineComponent": true,
     "effectScope": true,
     "enums": true,
+    "func": true,
     "getCurrentInstance": true,
     "getCurrentScope": true,
     "h": true,
@@ -30,6 +32,7 @@
     "isReadonly": true,
     "isRef": true,
     "markRaw": true,
+    "mock": true,
     "nextTick": true,
     "onActivated": true,
     "onAddToFavorites": true,
@@ -91,9 +94,6 @@
     "watchEffect": true,
     "watchPostEffect": true,
     "watchSyncEffect": true,
-    "webapi": true,
-    "func": true,
-    "aop": true,
-    "mock": true
+    "webapi": true
   }
 }

+ 9 - 0
README.md

@@ -29,6 +29,13 @@
 
 执行 `pnpm uvm`
 
+如果出现:\config\interFaces\strategy.ts SyntaxError: Unexpected identifier 'as'
+很有可能是未找到 as 后面的类型导致的,更新一下接口配置信息:
+
+```
+pnpm gif
+```
+
 ## 📦 运行(支持热更新)
 
 - web平台: `pnpm dev:h5`, 然后打开 [http://localhost:9000/](http://localhost:9000/)。
@@ -81,3 +88,5 @@
 - 31.公共请求框架兼容axios请求,为了与mock插件适配,调试方便。√
 - 32.vite.config.js中对scss注入$uni_platform全局变量,用于在scss文件中判断运行环境。√
 - 33.uno.config.js 通过编写classNamePreContainer插件, 拦截\_\_uno.css文件,将样式名称增加.container 前缀,提高样式权重。√
+- 34.页面方法公共初始化,增加被拦截方法的前置通知功能,可轻松实现例如无身份弹窗引导的功能。
+- 35.页面方法公共初始化,自动为methods对象增加hander属性(点击执行的方法),类型与methods一致,在前置通知中可获取方法的触发类型(是被点击执行的方法)。

+ 26 - 38
src/App.vue

@@ -1,10 +1,9 @@
 <script setup lang="ts">
 onLaunch(async () => {
   // #ifdef MP
-
-  store.common.data.mockScenes = ''
-  // 容器中心需要等待的等待放行器
-  store.common.data._releaser = func.releaser()
+  // store.common.data.mockScenes = ''
+  // // 容器中心需要等待的等待放行器
+  // store.common.data._releaser = func.releaser()
   // const accountInfo = uni.getAccountInfoSync()
   // // 体验版-假数据方便通过审核
   // if (accountInfo?.miniProgram?.envVersion === 'trial') {
@@ -15,41 +14,30 @@ onLaunch(async () => {
   // } else {
   //   store.common.data.mockScenes = ''
   // }
-
   // #endif
-  await webapi.strategy
-    .get_by_Name<null, SystemConfig对象>({
-      // 加气量上限
-      name: 'gas_limit',
-    })
-    .then((res) => {
-      if (res?.value && Number(res.value)) {
-        store.common.data.preferWeight = Number(res.value)
-      }
-    })
-  await webapi.strategy
-    .get_by_Name<null, SystemConfig对象>({
-      // 三个开关轮换用
-      // name: 'fake_switch',
-      // name: 'examine_switch',
-      name: 'examine_switch1',
-    })
-    .then((res) => {
-      // 开关打开时 设置场景值
-      if (res.value === '1') {
-        store.user.initUserInfo(
-          mock.request[config.common.mockScenes.examine][config.webapi.user.token.name].data,
-        )
-        store.common.data.mockScenes = config.common.mockScenes.examine
-      } else {
-        store.common.data.mockScenes = ''
-      }
-    })
-    .catch(() => {
-      store.common.data.mockScenes = ''
-    })
-  store.common.data._releaser.s()
-  store.common.data._releaser = null
+  // await webapi.strategy
+  //   .get_by_Name<null, SystemConfig对象>({
+  //     // 三个开关轮换用
+  //     name: 'fake_switch',
+  //     // name: 'examine_switch',
+  //     // name: 'examine_switch1',
+  //   })
+  //   .then((res) => {
+  //     // 开关打开时 设置场景值
+  //     if (res.value === '1') {
+  //       store.user.initUserInfo(
+  //         mock.request[config.common.mockScenes.examine][config.webapi.user.token.name].data,
+  //       )
+  //       store.common.data.mockScenes = config.common.mockScenes.examine
+  //     } else {
+  //       store.common.data.mockScenes = ''
+  //     }
+  //   })
+  //   .catch(() => {
+  //     store.common.data.mockScenes = ''
+  //   })
+  // store.common.data._releaser.s()
+  // store.common.data._releaser = null
 })
 onShow((options) => {
   // ay.staticData.args.options = options

+ 3 - 1
src/components/business/station/index.vue

@@ -1,6 +1,6 @@
 <!-- eslint-disable no-irregular-whitespace -->
 <template>
-  <div class="chunk p-spacd2">
+  <div class="chunk p-spacd2" :class="{ 'm-b-0': props.isLast }">
     <div class="center justify-between items-stretch mb-spacd2" @click="methods.goDetail('1')">
       <div class="mr-spac">
         <image
@@ -71,9 +71,11 @@ type PropTypes = {
   /** 类型 1:列表页面,2:待支付页面 */
   type: '1' | '2'
   stationInfo: GasstationVO对象
+  isLast: boolean
 }
 const props = withDefaults(defineProps<PropTypes>(), {
   type: '1',
+  isLast: false,
 })
 const methods = {
   goDetail(type) {

+ 1 - 1
src/components/container/index.vue

@@ -22,7 +22,7 @@
     </div>
     <div class="pt-spac" v-if="props.showSpac" />
     <!-- 小程序内只能用v-if移除组件,如果用v-show条件false时,整个页面不显示。。 -->
-    <ay-pull v-if="store.curPage.pageConfig?.isPager">
+    <ay-pull v-if="store.curPage.pageConfig?.isPager" :showSpac="props.showSpac">
       <slot />
     </ay-pull>
     <slot v-else />

+ 3 - 1
src/components/numer/index.vue

@@ -10,7 +10,7 @@
     <template v-else>
       <div class="mr-spacd4" v-if="props.pre">{{ props.pre }}</div>
       <div v-if="func.isnull(props.value)">
-        {{ func.convert.nullView(props.value) }}
+        {{ props.nullView ? func.convert.nullView(props.value) : props.value }}
       </div>
       <div class="mr-spacd4" v-else>
         <div class="font-bold b-fz" v-if="numer.integer">{{ numer.integer }}</div>
@@ -26,12 +26,14 @@ const props = withDefaults(
   defineProps<{
     isSimple?: boolean
     value?: number | string
+    nullView?: boolean
     pre?: string
     unit?: string
     valueClass: string[]
   }>(),
   {
     value: '',
+    nullView: true,
     unit: '',
   },
 )

+ 64 - 28
src/components/pull/index.vue

@@ -1,46 +1,74 @@
 <template>
-  <div>
-    <!-- #ifdef MP || APP-PLUS -->
+  <!-- 
+        采用非固定方式,将会影响内容插槽内的吸顶效果,最终还是使用固定方式
+        :fixed="false"
+      :use-page-scroll="true" 
+      -->
+  <z-paging
+    ref="paging"
+    refresher-only
+    :show-scrollbar="false"
+    @onRefresh="methods.onRefresh(false)"
+    @scrolltolower="methods.onRefresh(true)"
+    :paging-style="{ top: topHeightPX }"
+  >
+    <!-- 采用重写(.zp-paging-container-content)样式实现主插槽左右间距。
+  不使用一下插槽的方式实现左右间距,是因为会给主插槽增加left、right,故而会遮挡本能漏出主插槽的特殊元素,例如首页吸顶时 附近加气站左右的填充线。 -->
+    <!-- 左侧间距 -->
+    <!-- <template #left>
+      <div class="pr-spac"></div>
+    </template> -->
+    <!-- 右侧间距 -->
+    <!-- <template #right>
+      <div class="pr-spac"></div>
+    </template> -->
+
+    <!-- 顶部间距,不放到slot="top"插槽内是因为,向上滑动时,页面只会被头部遮挡,体验更舒服 -->
+    <div class="pt-spac" v-if="props.showSpac" />
+    <!-- 内容插槽-定义 -->
     <slot />
-    <!-- #endif -->
-    <!-- #ifdef H5 -->
-    <van-list @load="methods.onLoad">
-      <slot />
-    </van-list>
-    <!-- #endif -->
-    <!-- <z-paging
-      ref="paging"
-      refresher-only
-      @onRefresh="methods.onRefresh"
-      :paging-style="{ top: '98px' }"
-    >
-      <slot />
-    </z-paging> -->
-    <!-- <uni-load-more :status="status" :content-text="contentText" /> -->
-    <div class="center s-fz">
+    <!-- 加载状态 失败重试 -->
+    <div class="center s-fz mb-spac">
       <uni-load-more :status="status" :content-text="contentText" />
       <ay-refresh
-        v-if="store.curPage.pagerInfo.error"
+        v-show="store.curPage.pagerInfo.error"
         :loading="store.curPage.pagerInfo.loading"
         text="重试"
         @refresh="store.curPage.pagerMethods.refresh({ isAdd: store.curPage.pagerInfo.isAdd })"
       ></ay-refresh>
     </div>
-  </div>
+  </z-paging>
+  <!-- <uni-load-more :status="status" :content-text="contentText" /> -->
 </template>
 <script lang="ts" setup>
 const paging = ref()
 defineOptions({
   name: 'pull',
 })
-const props = defineProps<{ pagingStyle?: object }>()
-const methods: AyContainerPullMethods = {
-  // onRefresh() {
-  //   console.log(arguments)
-  //   paging.value.complete()
-  // },
+const topHeightPX = computed(() => config.common.safeAreaTopHeight + 'px')
+
+const props = defineProps<{ showSpac: boolean }>()
+const methods = {
+  onRefresh(isAdd) {
+    store.curPage.pagerMethods.refresh({ isAdd })
+  },
 }
-// 小程序环境内,多次创建本组件时data不会被清理,computed始终监听是第一页本组件的data,造成后续列表页面无uni-load-more状态的问题,改为将在store内computed
+
+onMounted(() => {
+  store.curPage.pageConfig.zpager = paging
+  watch(
+    () => store.curPage.pagerInfo.loading,
+    (nv) => {
+      if (nv === false) {
+        paging.value.complete()
+      }
+    },
+  )
+})
+// onMounted(() => {
+//   store.curPage.pagerMethods.setCurZPagingRef(paging)
+// })
+// 小程序环境内,多次创建本组件时data不会被清理,computed始终监听第一页本组件的data,造成后续列表页面无uni-load-more状态的问题,改为在store内computed
 const status = computed(() => store.curPage.loadMoreStatus)
 const contentText = computed(() => store.curPage.loadMoreContentText)
 // const data: PagerInfo = store.curPage.pageConfig.pagerInfo
@@ -79,4 +107,12 @@ const contentText = computed(() => store.curPage.loadMoreContentText)
 // })
 // methods = store.curPage.pagerMethods
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss">
+// .z-paging-content {
+//   right: $p-spac;
+//   left: $p-spac;
+// }
+// .zp-paging-main ::-webkit-scrollbar {
+//   display: none; /* 对于Webkit浏览器 */
+// }
+</style>

+ 6 - 1
src/pages.json

@@ -53,10 +53,15 @@
       "path": "pages/order/index",
       "type": "page",
       "style": {
-        "enablePullDownRefresh": true
+        "enablePullDownRefresh": false,
+        "navigationStyle": "custom"
       }
     },
     {
+      "path": "pages/order/indexcopy",
+      "type": "page"
+    },
+    {
       "path": "pages/order/orderDetail",
       "type": "page",
       "style": {

+ 1 - 2
src/pages/account/index.vue

@@ -8,10 +8,9 @@
       <div class="flex items-baseline mb-spacd2">
         <ay-numer
           :value="data.accountInfo.showBalance"
+          :nullView="!store.user.isLogined"
           :unit="data.accountInfo.unit"
-          v-if="data.accountInfo.showBalance"
         />
-        <div v-else>{{ data.accountInfo.unit }}</div>
         <span v-if="data.accountInfo.showDet">
           (直销 {{ data.accountInfo.carrierDirectBalance }} | 经销
           {{ data.accountInfo.carrierBalance }})

+ 120 - 50
src/pages/index/index.vue

@@ -1,15 +1,16 @@
 <template>
-  <ay-container v-show="store.user.isLogined">
-    <div class="chunk">
+  <ay-container>
+    <span class="i-to-top" v-if="data.station.stickyed" @click="methods.goTop" />
+    <div class="chunk p-b-0">
       <div class="center justify-between top">
         <div class="center" @click="methods.goPerson">
           <image class="personal" :src="store.user.userInfo.head_url" mode="scaleToFill" />
-          <div>
+          <div :class="{ 'p-color': !store.user.isLogined }">
             <div>{{ store.user.userInfo.user_name }}</div>
             <div class="mobile">{{ store.user.userInfo.mobileDes }}</div>
           </div>
         </div>
-        <div class="text-center" @click="methods.scanCode">
+        <div class="text-center" @click="methods.handler.scanCode">
           <image src="@img/icons/scan_icon.png" mode="scaleToFill" class="scan mt-spacd4" />
           <div class="p-color s-fz mt-spacd2">扫一扫</div>
         </div>
@@ -33,33 +34,31 @@
               class="image"
               mode="aspectFit"
               v-if="data.hasnopayfordriver || data.qrcode.expire"
-              @click="methods.getQrcode"
+              @click="methods.handler.getQrcode"
             />
             <image :src="data.qrcode.img" class="image" mode="aspectFit" v-else />
           </div>
         </ay-flowLine>
       </div>
-      <div class="center qrcode-text">
-        <template v-if="!data.firstUnload">
-          <template v-if="data.hasnopayfordriver">存在未支付完成订单</template>
-          <template v-else-if="data.qrcode.expire">
-            二维码已失效
-            <ay-refresh
-              :iconSize="36"
-              :loading="store.webapi.strategy.get_user_qrcode.ing"
-              @refresh="methods.getQrcode"
-            ></ay-refresh>
-          </template>
-          <template v-else>
-            有效时间:
-            <ay-countdown :seconds="data.qrcode.seconds" @ender="data.qrcode.expire = true" />
-          </template>
+      <div class="center qrcode-text mb-spac" v-if="!data.firstUnload">
+        <template v-if="data.hasnopayfordriver">存在未支付完成订单</template>
+        <template v-else-if="data.qrcode.expire">
+          二维码已失效
+          <ay-refresh
+            :iconSize="36"
+            :loading="store.webapi.strategy.get_user_qrcode.ing"
+            @refresh="methods.getQrcode"
+          ></ay-refresh>
+        </template>
+        <template v-else>
+          有效时间:
+          <ay-countdown :seconds="data.qrcode.seconds" @ender="data.qrcode.expire = true" />
         </template>
       </div>
     </div>
     <div class="flex">
       <ay-flowLine class="flex-1 mr-spac" :loading="store.webapi.strategy.get_driver_balance.ing">
-        <div class="chunk m0 h-100% s-fz money-bg" @click="methods.goAccount">
+        <div class="chunk m0 h-100% s-fz money-bg" @click="methods.handler.goAccount">
           <div class="mb-spacd4">
             可用余额
             <div class="inline yellow-color ss-fz ml-spacd4" v-if="data.accountInfo.flag === 0">
@@ -68,17 +67,17 @@
           </div>
           <ay-numer
             :value="data.accountInfo.showBalance"
+            :nullView="!store.user.isLogined"
             :unit="data.accountInfo.unit"
-            v-if="data.accountInfo.showBalance"
           />
-          <div v-else>{{ data.accountInfo.unit }}</div>
         </div>
       </ay-flowLine>
       <ay-flowLine class="flex-1" :loading="store.webapi.strategy.get_truck_info.ing">
-        <div class="chunk m0 h-100% s-fz cars" @click="methods.truckManage">
+        <div class="chunk m0 h-100% s-fz cars" @click="methods.handler.truckManage">
           <div>
             <div class="mb-spacd4" v-show="showcm">车辆管理</div>
-            <div v-show="store.webapi.strategy.get_truck_info.firstSuccess">
+            <div v-if="!store.user.isLogined">{{ config.common.nullView[0] }}</div>
+            <div v-else v-show="store.webapi.strategy.get_truck_info.firstSuccess">
               <div class="p-color mt-spac" v-if="data.truckInfo.length === 0">添加车辆</div>
               <div v-else>
                 <span class="font-bold b-fz">{{ data.truckInfo.length }}</span>
@@ -94,20 +93,20 @@
         class="text-center menu"
         v-for="(m, i) in data.menus"
         :key="i"
-        @click="methods.goPage(m)"
+        @click="methods.handler.goPage(m)"
       >
         <img class="icon" :src="m.icon" />
         <div>{{ m.name }}</div>
       </div>
     </div>
     <div class="chuck list-app">
-      <ay-sticky :top="topHeightPX" relativeTo="#stations" targetSelector="#stationTop">
-        <div
-          class="center justify-between sticky"
-          id="stationTop"
-          :class="{ stickyed: data.station.stickyed }"
-          @click="methods.hiddenDoora"
-        >
+      <ay-sticky
+        :top="0"
+        relativeTo="#stations"
+        targetSelector="#stationTop"
+        @stickChange="methods.stickChange"
+      >
+        <div class="center justify-between sticky" id="stationTop" @click="methods.hiddenDoora">
           <div class="title" @click.stop="methods.hiddenDoorb">附近加气站</div>
           <div v-if="data.userLocation" @click="methods.drawerOpen">
             {{ data.station.curCity }}
@@ -122,6 +121,7 @@
         <ayb-station
           v-for="(la, i) in data.station.listApp"
           :key="i"
+          :isLast="i === data.station.listApp.length - 1"
           :stationInfo="la"
         ></ayb-station>
         <!-- <div v-if="store.webapi.strategy.list_mini.fail" class="center">
@@ -136,7 +136,7 @@
       </div>
       <div
         class="center p-color"
-        v-show="!data.firstUnload && !data.userLocation"
+        v-if="!data.userLocation"
         @click="methods.getListApp({ activation: true })"
       >
         查看附近加气站
@@ -163,7 +163,7 @@
         </div>
       </uni-popup-dialog>
     </uni-popup>
-
+    <!-- 城市列表抽屉 -->
     <ay-drawer
       ref="drawer"
       mode="right"
@@ -209,6 +209,15 @@ const staticData = {
   indexedListWatcher: null,
   /** 页面滚动距离 */
   scrollTop: 0,
+  /** 需要登录的方法名 */
+  IdentityMethods: [
+    'goPerson',
+    'scanCode',
+    'getQrcode',
+    'goAccount',
+    'truckManage',
+    'goPage',
+  ] as (keyof typeof methods)[],
 }
 
 const data = ay.initData({
@@ -268,6 +277,7 @@ const topHeight = computed(() => config.common.safeAreaTopHeight)
 const topHeightPX = computed(() => `${topHeight.value}px`)
 const showcm = computed(() => {
   return (
+    !store.user.isLogined ||
     !store.webapi.strategy.get_truck_info.firstSuccess ||
     (store.webapi.strategy.get_truck_info.firstSuccess && data.truckInfo.length)
   )
@@ -292,6 +302,17 @@ const methods = ay.initMethods(
         data.hiddenDoor.push(0)
       }
     },
+    goTop() {
+      // 避免闪烁
+      data.station.stickyed = false
+      store.curPage.pageConfig.zpager.scrollToTop()
+      // uni.pageScrollTo({
+      //   scrollTop: 0,
+      // })
+    },
+    stickChange(e: any) {
+      data.station.stickyed = e.stickyed
+    },
     phone(num) {
       uni.makePhoneCall({
         phoneNumber: num,
@@ -458,6 +479,13 @@ const methods = ay.initMethods(
           if (nopayfordriver.settleStatus === 1) {
             // 跳未支付
             ay.goPage(config.pages.order_prePay, { params: { orderId: nopayfordriver.orderId } })
+          } else {
+            const curSettleStatus = config.common.settleStatus.find(
+              (f) => f.value === String(nopayfordriver.settleStatus),
+            )
+            if (curSettleStatus) {
+              func.native.showToast(`存在${curSettleStatus.label}订单!`)
+            }
           }
         }
         if (type === 2) {
@@ -489,6 +517,9 @@ const methods = ay.initMethods(
         return false
       }
     },
+    scanCode1() {
+      console.log('scanCode1')
+    },
     async scanCode() {
       if (await methods.checkNopayfordriver(2)) {
         return
@@ -635,23 +666,54 @@ const methods = ay.initMethods(
   {
     scanCode: { showLoading: true },
   },
+  {
+    ba(methodName, isHandler) {
+      if (!isHandler) {
+        return
+      }
+      // 需要登录的功能
+      if (staticData.IdentityMethods.includes(methodName)) {
+        // 未登录
+        if (!store.user.isLogined) {
+          if (methodName === 'goPerson') {
+            return true
+          } else {
+            func.native
+              .showModal({
+                title: '请先登录账号',
+                confirmText: '同意',
+                cancelText: '再看看',
+                showCancel: true,
+              })
+              .then((res) => {
+                if (res.confirm) {
+                  ay.goLogin()
+                }
+              })
+            return false
+          }
+        }
+      }
+    },
+  },
 )
 ay.entrance(
   async (args) => {
-    // staticData.entranceArgs = args
-    const init = async () => {
+    /** 首次、下拉更新的内容-需要身份 */
+    const refreshNeedIdentity = async () => {
+      if (!store.user.isLogined) return
       webapi.strategy.get_driver_balance({}).then((res) => {
         data.accountInfo = {
           ...res,
           ...aop.request.AR.getAccountInfo(res),
         }
       })
-
       data.hasnopayfordriver = await methods.checkNopayfordriver()
       methods.getTruckInfo()
     }
-    if (args.loadType === enums.LoadType.onLoad) {
-      // data.title = store.curPage?.pageConfig?.title
+
+    /** 页面初始化获取的内容 */
+    const firstLoad = async () => {
       // #ifdef MP
       // 用户是否授权了获取地理位置
       await uni
@@ -664,11 +726,16 @@ ay.entrance(
         .catch()
 
       // #endif
-      methods.initWS()
       methods.getCityList()
       data.station.curCity = uni.getStorageSync(staticData.cctkn) || staticData.defCity
       methods.getListApp({ cras: args.cras })
-      await init()
+      if (!store.user.isLogined) {
+        // data.hasnopayfordriver = false
+        // data.firstUnload = false
+        return
+      }
+      methods.initWS()
+      await refreshNeedIdentity()
       // 无未支付订单
       if (!data.hasnopayfordriver) {
         await methods.getQrcode()
@@ -676,22 +743,25 @@ ay.entrance(
       data.firstUnload = false
       // 小程序环境:时机过早会inputDialog.value为null
       // h5环境:当页面data内的值改变时,弹框会消失
-      // 所先放这里吧
+      // 所先放这里吧
       methods.getInvite()
     }
+    if (args.loadType === enums.LoadType.onLoad) {
+      firstLoad()
+    }
 
     if (args.loadType === enums.LoadType.refresh) {
       methods.getListApp({ cras: args.cras })
-      // if (!args.cras.isAdd) {
-      //   init()
-      // }
-    }
-    if (args.loadType === enums.LoadType.onShow) {
-      init()
+      if (!args.cras.isAdd) {
+        refreshNeedIdentity()
+      }
     }
+    // if (args.loadType === enums.LoadType.onShow) {
+    //   init()
+    // }
   },
   {
-    addLoadTypes: [enums.LoadType.onShow],
+    // addLoadTypes: [enums.LoadType.onShow],
   },
 )
 

+ 1 - 6
src/pages/login/index.vue

@@ -2,12 +2,7 @@
   <ay-container :pageTopStyle="{ background: '#fff' }" cusClass="flex flex-col">
     <!-- <ay-container :cusStyle="{ 'padding-top': config.common.SystemInfo.safeArea.top + 'px' }">
     <div class="absolute center font-bold $bs-fz page-title">登录</div> -->
-    <div
-      class="flex-col center justify-between login-con"
-      :style="{
-        height: config.common.SystemInfo.windowHeight - config.common.safeAreaTopHeight + 'px',
-      }"
-    >
+    <div class="flex-col center justify-between login-con">
       <div class="center info">
         <image class="logo" src="/static/logo.png" mode="scaleToFill" />
         <span class="desc">优质加气 大象帮你</span>

+ 16 - 12
src/pages/order/index.vue

@@ -46,6 +46,7 @@
     <div id="orderList">
       <div
         class="chunk childs-fcjb-mbd2"
+        :class="{ 'm-b-0': i === data.orderList.length - 1 }"
         v-for="(o, i) in data.orderList"
         :key="i"
         @click="methods.goDetail(o)"
@@ -67,11 +68,12 @@
         </div>
       </div>
     </div>
-    <uni-drawer
+    <ay-drawer
       ref="drawer"
       mode="right"
       :maskClick="true"
       :width="config.common.SystemInfo.windowWidth"
+      :top="topHeightPX"
       @change="methods.drawerChange"
     >
       <div class="m-spac">
@@ -125,29 +127,34 @@
             </div>
           </div>
         </div>
-        <div class="btns">
+        <div class="btns" v-if="data.filterOpen">
           <button @click="methods.clearFilters">清除</button>
           <button type="primary" @click="methods.saveFilters">确定</button>
         </div>
       </div>
-    </uni-drawer>
+    </ay-drawer>
   </ay-container>
 </template>
 
 <script lang="ts" setup>
 const staticData = {
-  // 缓存筛选条件key名
+  /** 缓存筛选条件key名 */
   fcn: 'filterCheckeds',
-  // 全部选项的value值
+  /** 全部选项的value值 */
   nullValue: '-1',
   payTypeGroups: [
     { label: '支付方式', type: 0, hasStatus: ['-1', '10'] },
     { label: '个人支付', type: 1, hasStatus: ['3'] },
     { label: '所属物流', type: 1, hasStatus: ['0', '1', '2'] },
   ],
+  endDate: func.getDate(Date.now()),
 }
 const drawer = ref()
+const topHeight = computed(() => config.common.safeAreaTopHeight)
+const topHeightPX = computed(() => `${topHeight.value}px`)
+
 const data = ay.initData({
+  filterOpen: false,
   /** 确定选中条件数量 */
   checkCount: 0,
   filters: [
@@ -167,7 +174,7 @@ const data = ay.initData({
       items: func.convert.getCheckItem(config.common.tradeType),
     },
   ] as any[],
-  range: [],
+  range: [staticData.endDate.add(-30, 'day'), staticData.endDate],
   orderList: [] as 订单详情[],
   tags: [
     {
@@ -232,9 +239,6 @@ const checkCount = computed(() =>
     .reduce((a, b) => a + b, 0),
 )
 const methods = {
-  stickChange(e) {
-    console.log(e)
-  },
   goDetail(od) {
     ay.goPage(config.pages.order_orderDetail, { params: od })
   },
@@ -267,12 +271,12 @@ const methods = {
     }
   },
   drawerChange(args) {
+    data.filterOpen = args
     // 打开抽屉初始化条件选择状态
     if (args) {
       methods.initFiltersCheck()
     } else {
       // 关闭抽屉计算选中数量
-
       methods.setCheckCount()
     }
   },
@@ -352,8 +356,8 @@ const methods = {
 ay.entrance((args) => {
   if (args.loadType === enums.LoadType.onLoad) {
     // 初始化日期范围
-    const endDate = func.getDate(Date.now())
-    data.range = [endDate.add(-30, 'day'), endDate]
+    // const endDate = func.getDate(Date.now())
+    // data.range = [endDate.add(-30, 'day'), endDate]
 
     methods.setCheckCount()
   }

+ 402 - 0
src/pages/order/indexcopy.vue

@@ -0,0 +1,402 @@
+<template>
+  <ay-container :showSpac="false">
+    <ay-sticky relativeTo="#orderList" targetSelector="#top">
+      <div class="center pt-spac pb-spac" id="top">
+        <uni-datetime-picker
+          v-model="data.range"
+          type="daterange"
+          :clearIcon="false"
+          @change="methods.changeDate"
+        />
+        <button
+          type="primary"
+          plain="true"
+          size="mini"
+          class="ml-spac"
+          @click="methods.showFilters"
+        >
+          筛选{{ data.checkCount ? ` · ${data.checkCount}` : '' }}
+        </button>
+        <!-- <uni-badge type="primary" :text="data.checkCount" absolute="rightTop" :offset="[-3, 3]">
+          <uni-icons
+            class="ml-spacd2"
+            type="settings"
+            color=""
+            size="24"
+            @click="methods.showFilters"
+          />
+        </uni-badge> -->
+      </div>
+    </ay-sticky>
+    <div class="center justify-between s-fz tags">
+      <div
+        class="text-center chunk tag"
+        v-for="(t, i) in data.tags"
+        :key="i"
+        :class="{ odd: i % 2 === 0 }"
+      >
+        <div>{{ t.title }}</div>
+        <div>{{ t.unit }}</div>
+        <div class="font-bold p-fz">
+          {{ func.convert.nullView(t.value, 1) }}
+          <!-- <ay-numer :value="func.convert.nullView(t.value, 1)" /> -->
+        </div>
+      </div>
+    </div>
+    <div id="orderList">
+      <div
+        class="chunk childs-fcjb-mbd2"
+        :class="{ 'm-b-0': i === data.orderList.length - 1 }"
+        v-for="(o, i) in data.orderList"
+        :key="i"
+        @click="methods.goDetail(o)"
+      >
+        <div>
+          <div class="font-bold p-fz">{{ o.nickName }}</div>
+          <div>{{ func.convert.getOrderStatusStr(o.settleStatus) }}</div>
+        </div>
+        <div>
+          <div>加气量(公斤)</div>
+          <div>{{ o.gasQty }}</div>
+        </div>
+        <div>
+          <div>小计(元)</div>
+          <div class="font-bold bs-fz">{{ o.allAmount }}</div>
+        </div>
+        <div>
+          <div class="gray-color">{{ func.getDate(o.createDate).format() }}</div>
+        </div>
+      </div>
+    </div>
+    <ay-drawer
+      ref="drawer"
+      mode="right"
+      :maskClick="true"
+      :width="config.common.SystemInfo.windowWidth"
+      :top="topHeightPX"
+      @change="methods.drawerChange"
+    >
+      <div class="m-spac">
+        <div class="center b-fz mb-spac">
+          <div class="font-bold">
+            <span>筛选</span>
+            <span v-if="checkCount">
+              <span>·</span>
+              <span class="p-color">{{ checkCount }}</span>
+            </span>
+          </div>
+
+          <uni-icons
+            type="closeempty"
+            color=""
+            size="24"
+            class="abs-right"
+            @click="methods.closeFilters"
+          />
+        </div>
+        <div>
+          <div>
+            <div v-for="(f, i) in filtersView" :key="i" :class="{ 'nmt-spac': f.type === 1 }">
+              <div
+                class="section"
+                :class="{
+                  'font-bold': !f.type,
+                  'ml-spacd2': f.type === 1,
+                  's-fz': f.type === 1,
+                }"
+              >
+                {{ f.label }}
+              </div>
+
+              <div class="center justify-between flex-wrap s-fz">
+                <div
+                  class="center whitespace-nowrap p-spacd2 chunk f-item"
+                  :class="{
+                    'checked-full': item.checked,
+                    isall: item.value === staticData.nullValue,
+                  }"
+                  v-for="(item, ii) in f.items"
+                  :key="ii"
+                  @click="methods.filterCheck(f, item)"
+                >
+                  <!-- <div class="tag-rb" v-if="item.isPerson">个人支付</div> -->
+                  {{ item.label }}
+                </div>
+                <div class="f-item" v-if="f.items.length % 3 === 2"></div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="btns">
+          <button @click="methods.clearFilters">清除</button>
+          <button type="primary" @click="methods.saveFilters">确定</button>
+        </div>
+      </div>
+    </ay-drawer>
+  </ay-container>
+</template>
+
+<script lang="ts" setup>
+const staticData = {
+  /** 缓存筛选条件key名 */
+  fcn: 'filterCheckeds',
+  /** 全部选项的value值 */
+  nullValue: '-1',
+  payTypeGroups: [
+    { label: '支付方式', type: 0, hasStatus: ['-1', '10'] },
+    { label: '个人支付', type: 1, hasStatus: ['3'] },
+    { label: '所属物流', type: 1, hasStatus: ['0', '1', '2'] },
+  ],
+}
+const drawer = ref()
+const topHeight = computed(() => config.common.safeAreaTopHeight)
+const topHeightPX = computed(() => `${topHeight.value}px`)
+
+const data = ay.initData({
+  /** 确定选中条件数量 */
+  checkCount: 0,
+  filters: [
+    {
+      label: '结算状态',
+      value: 'settleStatus',
+      items: func.convert.getCheckItem(config.common.settleStatus),
+    },
+    {
+      label: '支付方式',
+      value: 'payType',
+      items: func.convert.getCheckItem(config.common.payTypes),
+    },
+    {
+      label: '交易模式',
+      value: 'tradeTypes',
+      items: func.convert.getCheckItem(config.common.tradeType),
+    },
+  ] as any[],
+  range: [],
+  orderList: [] as 订单详情[],
+  tags: [
+    {
+      field: 'allValue',
+      title: '加气总额',
+      unit: '(元)',
+      value: '',
+    },
+    {
+      field: 'allQty',
+      title: '加气总量',
+      unit: '(公斤)',
+      value: '',
+    },
+    {
+      field: 'count',
+      title: '订单总数',
+      unit: '(笔)',
+      value: '',
+    },
+    {
+      field: 'allPrefer',
+      title: '优惠总额',
+      unit: '(元)',
+      value: '',
+    },
+  ],
+})
+const filtersView = computed(() => {
+  const rv = [...data.filters]
+  const payTypeIndex = rv.findIndex((f) => f.value === 'payType')
+  const payTypeItem = rv[payTypeIndex]
+  const groups = staticData.payTypeGroups.map((m) => {
+    return {
+      label: m.label,
+      type: m.type,
+      items: payTypeItem.items.filter((f) => m.hasStatus.includes(f.value)),
+      target: payTypeItem,
+    }
+  })
+
+  rv.splice(payTypeIndex, 1, ...groups)
+  return rv
+})
+/** 选中的条件 */
+const filterCheckeds = computed(() => {
+  const fcs: Record<string, string[]> = {}
+  data.filters.forEach((f) => {
+    const curItems = f.items
+      .filter((ff) => ff.checked && ff.value !== staticData.nullValue)
+      .map((m) => m.value)
+    if (curItems.length) {
+      fcs[f.value] = curItems
+    }
+  })
+  return fcs
+})
+/** 临时选中条件数量 */
+const checkCount = computed(() =>
+  Object.values(filterCheckeds.value)
+    .map((m) => m.length + (m.includes(staticData.nullValue) ? -1 : 0))
+    .reduce((a, b) => a + b, 0),
+)
+const methods = {
+  goDetail(od) {
+    ay.goPage(config.pages.order_orderDetail, { params: od })
+  },
+  /** 从缓存 初始化查询条件选中状态 */
+  getStoreFilterCheckeds() {
+    return uni.getStorageSync(staticData.fcn) || {}
+  },
+  /** 从缓存 初始化查询条件选中状态 */
+  initFiltersCheck() {
+    const filterCheckeds: any = methods.getStoreFilterCheckeds()
+    if (Object.keys(filterCheckeds).length) {
+      data.filters.forEach((f) => {
+        if (filterCheckeds[f.value]) {
+          f.items.forEach((ff) => {
+            ff.checked = filterCheckeds[f.value]?.includes(ff.value)
+          })
+        } else {
+          f.items[0].checked = true
+        }
+      })
+    }
+  },
+  /** 计算条件选中数量 */
+  setCheckCount() {
+    const filterCheckeds = methods.getStoreFilterCheckeds()
+    if (filterCheckeds) {
+      data.checkCount = Object.values<string[]>(filterCheckeds)
+        .map((m) => m.length + (m.includes(staticData.nullValue) ? -1 : 0))
+        .reduce((a, b) => a + b, 0)
+    }
+  },
+  drawerChange(args) {
+    // 打开抽屉初始化条件选择状态
+    if (args) {
+      methods.initFiltersCheck()
+    } else {
+      // 关闭抽屉计算选中数量
+
+      methods.setCheckCount()
+    }
+  },
+  saveFilters() {
+    // 有选中的条件
+    if (Object.keys(filterCheckeds.value).length) {
+      uni.setStorageSync(staticData.fcn, filterCheckeds.value)
+    } else {
+      uni.removeStorageSync(staticData.fcn)
+    }
+    methods.closeFilters()
+    methods.getOrderList()
+  },
+  clearFilters() {
+    data.filters.forEach((f) => {
+      f.items.forEach((ff) => {
+        ff.checked = false
+        if (ff.value === staticData.nullValue) {
+          ff.checked = true
+        }
+      })
+    })
+  },
+  filterCheck(fg, item) {
+    // 点击全部
+    const realfg = fg.target ? fg.target : fg
+    if (item.value === staticData.nullValue) {
+      realfg.items.forEach((f) => (f.checked = false))
+      item.checked = true
+    } else {
+      item.checked = !item.checked
+
+      realfg.items[0].checked = false
+    }
+  },
+  getOrderList(cras = store.curPage.getDefAyContainerRefreshArgs()) {
+    const paramFilters: Record<string, string> = {}
+    const storeFilterCheckeds = methods.getStoreFilterCheckeds()
+    Object.keys(storeFilterCheckeds).forEach(
+      (f) => (paramFilters[f] = storeFilterCheckeds[f].toString()),
+    )
+    webapi.strategy
+      .get_order_list<{ param: { gasstationId?: string } }>(
+        {
+          page: cras.page,
+          size: cras.size,
+          param: {
+            startCreateDate: data.range[0] + ' 00:00:00',
+            endCreateDate: data.range[1] + ' 23:59:59',
+            ...paramFilters,
+          },
+        },
+        { showLoading: !cras.isAdd },
+      )
+      .then((res) => {
+        data.tags.forEach((f) => {
+          f.value = res[f.field]
+        })
+        if (cras.isAdd) {
+          data.orderList.push(...res.page.records)
+        } else {
+          data.orderList = res.page.records
+        }
+      })
+  },
+  changeDate(e) {
+    methods.getOrderList()
+  },
+  showFilters() {
+    drawer.value.open()
+  },
+  closeFilters() {
+    drawer.value.close()
+  },
+}
+
+ay.entrance((args) => {
+  if (args.loadType === enums.LoadType.onLoad) {
+    // 初始化日期范围
+    const endDate = func.getDate(Date.now())
+    const startDate = endDate.add(-30, 'day')
+    data.range = [
+      func.getDate(startDate).format(enums.FormatType.YMD),
+      func.getDate(endDate).format(enums.FormatType.YMD),
+    ]
+
+    methods.setCheckCount()
+  }
+  methods.getOrderList(args.cras)
+})
+</script>
+
+<style lang="scss" scoped>
+.abs-right {
+  position: absolute;
+  right: $p-spac;
+}
+.f-item {
+  box-sizing: border-box;
+  width: 31%;
+  &.isall {
+    background: #fff;
+  }
+  &.checked {
+    color: $p-color;
+  }
+}
+.tags {
+  > .tag {
+    min-width: 20%;
+    max-width: 25%;
+    padding: $p-spacd2 0;
+    background-color: #d5f8e9;
+  }
+  .odd {
+    background-color: #d5e9fa;
+  }
+  // > div:nth-child(odd) {
+  //   background-color: #d5e9fa;
+  // }
+  // > div:nth-child(even) {
+  //   background-color: #d5f8e9;
+  // }
+}
+</style>

+ 11 - 0
src/style/icon.scss

@@ -0,0 +1,11 @@
+.i-material-symbols-vertical-align-top-rounded {
+    --un-icon: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M5 5q-.425 0-.712-.288T4 4t.288-.712T5 3h14q.425 0 .713.288T20 4t-.288.713T19 5zm7 16q-.425 0-.712-.288T11 20v-9.2l-1.9 1.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l3.6-3.6q.15-.15.325-.212T12 7.425t.375.063t.325.212l3.6 3.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275L13 10.8V20q0 .425-.287.713T12 21'/%3E%3C/svg%3E");
+    -webkit-mask: var(--un-icon) no-repeat;
+    mask: var(--un-icon) no-repeat;
+    -webkit-mask-size: 100% 100%;
+    mask-size: 100% 100%;
+    background-color: currentColor;
+    color: inherit;
+    width: 1.2em;
+    height: 1.2em;
+}

+ 31 - 0
src/style/index.scss

@@ -502,4 +502,35 @@ page {
 
 .uni-popup {
   z-index: 999 !important;
+}
+
+// 修改zpaging最内层容器样式
+.zp-paging-container-content {
+  padding: 0 $p-spac;
+}
+
+.i-to-top {
+  position: fixed;
+  right: $p-spac;
+  bottom: calc($p-spac * 4);
+  z-index: 1;
+  display: inline-block;
+  padding: calc($p-spac / 1.5);
+  font-size: 0;
+  background-color: $bg-color;
+  border: 2rpx solid $p-color;
+  border-radius: 50%;
+
+  &::after {
+    display: inline-block;
+    width: calc($p-fz * 2);
+    height: calc($p-fz * 2);
+    content: '';
+    background-color: $p-color;
+    -webkit-mask: var(--un-icon) no-repeat;
+    mask: var(--un-icon) no-repeat;
+    -webkit-mask-size: 100% 100%;
+    mask-size: 100% 100%;
+    --un-icon: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' d='M2 2.5h12M7.979 13.906V4.957m4.13 3.889L7.98 4.715l-4.131 4.13'/%3E%3C/svg%3E");
+  }
 }

+ 0 - 2
src/types/auto-import.d.ts

@@ -83,9 +83,7 @@ declare global {
   const useAttrs: typeof import('vue')['useAttrs']
   const useCssModule: typeof import('vue')['useCssModule']
   const useCssVars: typeof import('vue')['useCssVars']
-  const useRequest: typeof import('../hooks/useRequest')['default']
   const useSlots: typeof import('vue')['useSlots']
-  const useUpload: typeof import('../hooks/useUpload')['default']
   const watch: typeof import('vue')['watch']
   const watchEffect: typeof import('vue')['watchEffect']
   const watchPostEffect: typeof import('vue')['watchPostEffect']

+ 3 - 1
src/types/page.d.ts

@@ -12,7 +12,7 @@ interface ayPage {
   readonly identity?: boolean
   /** 是分页页面 */
   readonly isPager: boolean
-  /** 页面配置,对应 小程序.json */
+  /** 页面配置,对应 小程序.json 。特别注意:修改后需要重启项目才会生效!!! */
   readonly style?: CopyGlobalStyle // @uni-helper/vite-plugin-uni-pages.GlobalStyle
   /** 分页数据 */
   readonly pagerInfo?: PagerInfo
@@ -31,6 +31,8 @@ interface ayPage {
   onceBackReloadArgs?: AyContainerEntryArgs
   /** 当前页面的数据加载完毕接收函数 */
   curCallBack?(args: AyContainerRefreshArgs): void
+
+  zpager:
 }
 /** 分页组件数据 */
 interface PagerInfo {

+ 8 - 0
src/types/schemas/settle.d.ts

@@ -339,6 +339,14 @@ interface DownLoadParam {
   /** 组织id */
   orgId?: number
 }
+interface DriverRankVO {
+  /** 司机信息 */
+  driverName?: string
+  /** 累计加气量 */
+  gasQty?: number
+  /** 排名 */
+  rank?: number
+}
 interface ExcelExportParam {
   /** undefined */
   datas?: AnyObject

+ 43 - 3
src/types/schemas/strategy.d.ts

@@ -319,6 +319,16 @@ interface CarrierRebateVO {
   /** 更新日期时间 */
   updateDate?: string
 }
+interface CarrierRebatesQryParam {
+  /** 物流公司id,必传 */
+  carrierOrgId?: number
+  /** 加气站名称 */
+  gasstationName?: string
+  /** undefined */
+  listPrice?: number
+  /** undefined */
+  platformPrice?: number
+}
 interface CarrierRebate对象 {
   /** 物流公司id */
   carrierOrgId?: string
@@ -755,7 +765,7 @@ interface FlagStationMonitorVO {
   /** 加气站简称 */
   nickName?: string
   /** 交接班时间点 */
-  time?: LocalTime
+  time?: string
 }
 interface FreightConfigLog对象 {
   /** 计算运费 */
@@ -4923,6 +4933,28 @@ interface 气瓶检测的加气站 {
   /** 预约订单 */
   gctOrder?: GctOrder对象
 }
+interface 物流管理端专享优惠VO实体类 {
+  /** 物流专享 */
+  carrierRebate?: number
+  /** 优惠差价(元/公斤) */
+  diff?: number
+  /** 满减公斤 */
+  fullQty?: number
+  /** 加气站名称 */
+  gasstationName?: string
+  /** 优惠内容 */
+  note?: string
+  /** 结算特价 */
+  price?: number
+  /** 优惠类型:1-大象线上 2-线下优惠 3-叠加 */
+  rebateType?: number
+  /** 满减优惠 */
+  reduceRebate?: number
+  /** 车辆经营类型:0=自营车辆 1=其他[挂靠车辆] 2=全部 */
+  truckType?: number
+  /** 类型:0-大象线上 1-线下优惠 */
+  type?: number
+}
 interface 盘盈亏数据VO {
   /** 账存量 */
   accountQty?: number
@@ -5292,7 +5324,7 @@ interface 站的气价监控物流特价VO实体类 {
   rebateType?: number
   /** 满减优惠 */
   reduceRebate?: number
-  /** 类型:0-大象线上 1-线下优惠 */
+  /** 销售方式:0-大象线上 1-加注机线下 */
   type?: number
 }
 interface 组合支付分页查询参数 {
@@ -5446,8 +5478,10 @@ interface 订单列表返回实体类 {
   allQty?: number
   /** 加气总量(吨) */
   allQtyTon?: number
-  /** 站实时清分总额(元) */
+  /** 站结算清分总额(元) */
   allSplit?: number
+  /** 站标准清分总额(元) */
+  allStandardSplit?: number
   /** 加气总额(元) */
   allValue?: number
   /** 加气总额(万元) */
@@ -5464,6 +5498,8 @@ interface 订单列表返回实体类 {
   gwaySpecial?: number
   /** 分页信息 */
   page?: IPage<订单详情>
+  /** 站优惠总额(元) */
+  stationPrefer?: number
 }
 interface 订单导出参数 {
   /** 导出列的字段 */
@@ -5752,6 +5788,10 @@ interface 通用id参数 {
   /** 通用id参数 */
   id?: string
 }
+interface 通用字符串单参数_参数类 {
+  /** 城市 */
+  city?: string
+}
 interface 预警提醒 物流公司信息 {
   /** 物流公司id */
   orgId?: number

+ 7 - 0
src/utils/config/index.ts

@@ -9,6 +9,13 @@ const common = {
     /** 提交审核假数据 */
     examine: ' examine',
   },
+  /** 空值显示 */
+  get nullView() {
+    return {
+      0: '--',
+      1: '0',
+    }
+  },
   /** 骨架屏默认 */
   skeletons: [
     ...Array(20).fill({

+ 6 - 6
src/utils/config/interFaces/index.ts

@@ -1,11 +1,11 @@
 import websocket from './websocket'
 import message from './message'
+import allinpay from './allinpay'
 import account from './account'
 import tms from './tms'
-import user from './user'
 import settle from './settle'
 import pay from './pay'
-import allinpay from './allinpay'
+import user from './user'
 import strategy from './strategy'
 
 export default {
@@ -13,18 +13,18 @@ export default {
   websocket,
   /** 消息中心 */
   message,
+  /** 通联支付 */
+  allinpay,
   /** 账户中心 */
   account,
   /** 运力中心 */
   tms,
-  /** 用户中心 */
-  user,
   /** 结算中心 */
   settle,
   /** 支付中心 */
   pay,
-  /** 通联支付 */
-  allinpay,
+  /** 用户中心 */
+  user,
   /** 运营策略中心 */
   strategy,
 }

+ 14 - 9
src/utils/config/interFaces/pay.ts

@@ -1,49 +1,49 @@
 export default {
   /** 按日查询毛利估算(元) */
   profit_day: {
-    realUrl: '/pay/data/profit_day',
+    realUrl: '/pay/data/profit_day' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<长城毛利返回的实体类日统计>,
   },
   /** 按月查询毛利估算(元) */
   profit_month: {
-    realUrl: '/pay/data/profit_month',
+    realUrl: '/pay/data/profit_month' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<长城毛利返回的实体类日统计>,
   },
   /** 按日查询优惠金额(元) */
   rebate_amount_day: {
-    realUrl: '/pay/data/rebate_amount_day',
+    realUrl: '/pay/data/rebate_amount_day' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<优惠金额_元_返回的实体类日统计>,
   },
   /** 按月查询优惠金额(元) */
   rebate_amount_month: {
-    realUrl: '/pay/data/rebate_amount_month',
+    realUrl: '/pay/data/rebate_amount_month' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<优惠金额_元_返回的实体类月统计>,
   },
   /** 按日查询优惠平均差价(元/公斤) */
   rebate_price_day: {
-    realUrl: '/pay/data/rebate_price_day',
+    realUrl: '/pay/data/rebate_price_day' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<优惠平均差价返回的实体类月统计日统计>,
   },
   /** 按月查询优惠平均差价(元/公斤) */
   rebate_price_month: {
-    realUrl: '/pay/data/rebate_price_month',
+    realUrl: '/pay/data/rebate_price_month' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<优惠平均差价返回的实体类月统计日统计>,
   },
   /** 按日查询销量优惠分布(公斤) */
   rebate_qty_day: {
-    realUrl: '/pay/data/rebate_qty_day',
+    realUrl: '/pay/data/rebate_qty_day' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<销量优惠分布返回的实体类日统计>,
   },
   /** 按月查询销量优惠分布(公斤) */
   rebate_qty_month: {
-    realUrl: '/pay/data/rebate_qty_month',
+    realUrl: '/pay/data/rebate_qty_month' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as Array<销量优惠分布返回的实体类日统计>,
   },
@@ -87,7 +87,6 @@ export default {
   export: {
     realUrl: '/pay/gas_order/export',
     reqType: {} as ExcelExportParam,
-
   },
   /** 查找gas_order */
   find: {
@@ -257,6 +256,12 @@ export default {
     reqType: {} as 通用id参数,
     resType: {} as Array<GctOrderAttach对象>,
   },
+  /** 修改加气订单价格信息 */
+  ch_order_createdate: {
+    realUrl: '/pay/handle/ch_order_createdate' as const,
+    reqType: {} as GasOrder对象,
+    resType: {} as any,
+  },
   /** 请求绑定银行卡 */
   bind_bankCard: {
     realUrl: '/pay/member/bind_bankCard',

+ 6 - 0
src/utils/config/interFaces/settle.ts

@@ -683,6 +683,12 @@ export default {
 
     resType: {} as any,
   },
+  /** 获取某个时间段驾驶员加气排名 */
+  driver_rank: {
+    realUrl: '/settle/statistics/driver_rank' as const,
+
+    resType: {} as DriverRankVO,
+  },
   /** 查询加气站库存数据汇总(多天数据) */
   find_Gasstation_stock_sum: {
     realUrl: '/settle/statistics/find_Gasstation_stock_sum',

+ 107 - 72
src/utils/config/interFaces/strategy.ts

@@ -446,6 +446,12 @@ export default {
     reqType: {} as FlagStationDateParam,
     resType: {} as FlagStationMonitorVO,
   },
+  /** 物流管理端资金管理-专享优惠,物流id必传 */
+  get_carrier_rebates: {
+    realUrl: '/strategy/flag/price/get_carrier_rebates' as const,
+    reqType: {} as IPageParams<CarrierRebatesQryParam>,
+    resType: {} as 物流管理端专享优惠VO实体类,
+  },
   /** 查询站的作战地图当日数据,只传站id即可 */
   get_gasdata: {
     realUrl: '/strategy/flag/price/get_gasdata',
@@ -538,7 +544,7 @@ export default {
   },
   /** 查询站的历史概况汇总信息(运营销量监控) */
   get_overview_gway: {
-    realUrl: '/strategy/flag_station_info/get_overview_gway',
+    realUrl: '/strategy/flag_station_info/get_overview_gway' as const,
     reqType: {} as 加气站运营管理查询实体类,
     resType: {} as 站当日概况信息实体类,
   },
@@ -1034,6 +1040,12 @@ export default {
     reqType: {} as GwayGaspriceLog对象,
     resType: {} as any,
   },
+  /** 根据创建订单日期重新计算gasOrder价格 */
+  recalculate: {
+    realUrl: '/strategy/handle/recalculate' as const,
+    reqType: {} as GasOrder对象,
+    resType: {} as GasOrder对象,
+  },
   /** 设置出港价 */
   set_harbour_price: {
     realUrl: '/strategy/harbour_price/set_harbour_price',
@@ -1267,13 +1279,13 @@ export default {
   },
   /** 优惠叠加配置 */
   adjust: {
-    realUrl: '/strategy/man/carrier_config/adjust',
+    realUrl: '/strategy/man/carrier_config/adjust' as const,
     reqType: {} as CarrierRebateVO,
     resType: {} as any,
   },
   /** 物流优惠参与配置查询 */
   list_30: {
-    realUrl: '/strategy/man/carrier_config/list',
+    realUrl: '/strategy/man/carrier_config/list' as const,
     reqType: {} as IPageParams<CarrierRebateVO>,
     resType: {} as CarrierRebateVO,
   },
@@ -1285,7 +1297,7 @@ export default {
   },
   /** 调价物流线上特价 */
   adjust_1: {
-    realUrl: '/strategy/man/carrier_rebate/adjust',
+    realUrl: '/strategy/man/carrier_rebate/adjust' as const,
     reqType: {} as MManPriceCarrierRebateAdjust对象,
     resType: {} as any,
   },
@@ -1321,7 +1333,7 @@ export default {
   },
   /** 获取物流线上特价列表 */
   list_31: {
-    realUrl: '/strategy/man/carrier_rebate/list',
+    realUrl: '/strategy/man/carrier_rebate/list' as const,
     reqType: {} as IPageParams<ManPriceCarrierRebate对象>,
     resType: {} as ManPriceCarrierRebateVO对象,
   },
@@ -1351,7 +1363,7 @@ export default {
   },
   /** 获取加气站清分列表 */
   list_32: {
-    realUrl: '/strategy/man/profit/list',
+    realUrl: '/strategy/man/profit/list' as const,
     reqType: {} as IPageParams<GasstationDateParam>,
     resType: {} as 站收益结算规则信息表实体VO类,
   },
@@ -1363,13 +1375,13 @@ export default {
   },
   /** 调价加气订单满减 */
   adjust_2: {
-    realUrl: '/strategy/man/reduce_rebate/adjust',
+    realUrl: '/strategy/man/reduce_rebate/adjust' as const,
     reqType: {} as ManPriceReduceRebateAdjust对象,
     resType: {} as any,
   },
   /** 获取加气订单满减列表 */
   list_33: {
-    realUrl: '/strategy/man/reduce_rebate/list',
+    realUrl: '/strategy/man/reduce_rebate/list' as const,
     reqType: {} as IPageParams<ManPriceReduceRebate对象>,
     resType: {} as ManPriceReduceRebateVO对象,
   },
@@ -1405,7 +1417,7 @@ export default {
   },
   /** 调价中石化零售价 */
   adjust_3: {
-    realUrl: '/strategy/man/snp/adjust',
+    realUrl: '/strategy/man/snp/adjust' as const,
     reqType: {} as ManPriceSnpAdjust对象,
     resType: {} as any,
   },
@@ -1417,7 +1429,7 @@ export default {
   },
   /** 根据时间范围获取中石化零售价 */
   find_date_range: {
-    realUrl: '/strategy/man/snp/find_date_range',
+    realUrl: '/strategy/man/snp/find_date_range' as const,
     reqType: {} as 优惠运营分析查询参数实体类,
     resType: {} as any,
   },
@@ -1429,7 +1441,7 @@ export default {
   },
   /** 获取中石化限价列表 */
   list_34: {
-    realUrl: '/strategy/man/snp/list',
+    realUrl: '/strategy/man/snp/list' as const,
     reqType: {} as IPageParams<manPriceSnp对象>,
     resType: {} as manPriceSnp对象,
   },
@@ -1471,7 +1483,7 @@ export default {
   },
   /** 调价长城奥扬标准价 */
   adjust_4: {
-    realUrl: '/strategy/man/standard/adjust',
+    realUrl: '/strategy/man/standard/adjust' as const,
     reqType: {} as manPriceStandard对象,
     resType: {} as any,
   },
@@ -1501,7 +1513,7 @@ export default {
   },
   /** 获取长城奥扬标准价列表 */
   list_35: {
-    realUrl: '/strategy/man/standard/list',
+    realUrl: '/strategy/man/standard/list' as const,
     reqType: {} as IPageParams<manPriceStandard对象>,
     resType: {} as ManPriceStandardVO对象,
   },
@@ -1549,7 +1561,7 @@ export default {
   },
   /** 获取newstation列表 */
   list_36: {
-    realUrl: '/strategy/newstation/list',
+    realUrl: '/strategy/newstation/list' as const,
     reqType: {} as IPageParams<Newstation对象>,
     resType: {} as any,
   },
@@ -1579,7 +1591,7 @@ export default {
   },
   /** 获取platform_price列表 */
   list_37: {
-    realUrl: '/strategy/platform_price/list',
+    realUrl: '/strategy/platform_price/list' as const,
     reqType: {} as IPageParams<PlatformPrice对象>,
     resType: {} as IPage<PlatformPrice对象>,
   },
@@ -1591,7 +1603,7 @@ export default {
   },
   /** 获取platform_price_log列表 */
   list_38: {
-    realUrl: '/strategy/platform_price_log/list',
+    realUrl: '/strategy/platform_price_log/list' as const,
     reqType: {} as IPageParams<PlatformPriceLog对象>,
     resType: {} as IPage<PlatformPriceLog对象>,
   },
@@ -1627,7 +1639,7 @@ export default {
   },
   /** 获取平台挂牌价列表 */
   list_39: {
-    realUrl: '/strategy/price_config/list',
+    realUrl: '/strategy/price_config/list' as const,
     reqType: {} as IPageParams<PriceConfig对象>,
     resType: {} as any,
   },
@@ -1639,13 +1651,13 @@ export default {
   },
   /** 获取price_config_gway 当前价列表 */
   list_40: {
-    realUrl: '/strategy/price_config_gway/list',
+    realUrl: '/strategy/price_config_gway/list' as const,
     reqType: {} as IPageParams<PriceConfigGway对象>,
     resType: {} as any,
   },
   /** 获取调价记录列表 */
   list_41: {
-    realUrl: '/strategy/price_config_gway_log/list',
+    realUrl: '/strategy/price_config_gway_log/list' as const,
     reqType: {} as IPageParams<组合支付分页查询参数>,
     resType: {} as any,
   },
@@ -1663,7 +1675,7 @@ export default {
   },
   /** 获取调价管理列表 */
   list_42: {
-    realUrl: '/strategy/price_config_gway_plan/list',
+    realUrl: '/strategy/price_config_gway_plan/list' as const,
     reqType: {} as IPageParams<PriceConfigGwayPlan对象>,
     resType: {} as any,
   },
@@ -1687,7 +1699,7 @@ export default {
   },
   /** 获取price_config_log列表 */
   list_43: {
-    realUrl: '/strategy/price_config_log/list',
+    realUrl: '/strategy/price_config_log/list' as const,
     reqType: {} as IPageParams<PriceConfigLog对象>,
     resType: {} as any,
   },
@@ -1729,7 +1741,7 @@ export default {
   },
   /** 获取加气站售卖价列表 */
   list_44: {
-    realUrl: '/strategy/price_config_market/list',
+    realUrl: '/strategy/price_config_market/list' as const,
     reqType: {} as IPageParams<PriceConfigMarket对象>,
     resType: {} as any,
   },
@@ -1765,7 +1777,7 @@ export default {
   },
   /** 获取标准差价列表 */
   list_45: {
-    realUrl: '/strategy/price_config_market_diff/list',
+    realUrl: '/strategy/price_config_market_diff/list' as const,
     reqType: {} as IPageParams<PriceConfigMarketDiff对象>,
     resType: {} as any,
   },
@@ -1795,7 +1807,7 @@ export default {
   },
   /** 获取非标差价列表 */
   list_46: {
-    realUrl: '/strategy/price_config_market_undiff/list',
+    realUrl: '/strategy/price_config_market_undiff/list' as const,
     reqType: {} as IPageParams<PriceConfigMarketDiffUnstd对象>,
     resType: {} as any,
   },
@@ -1831,7 +1843,7 @@ export default {
   },
   /** 获取中石化调价记录列表 */
   list_47: {
-    realUrl: '/strategy/price_config_snp_log/list',
+    realUrl: '/strategy/price_config_snp_log/list' as const,
     reqType: {} as IPageParams<组合支付分页查询参数>,
     resType: {} as any,
   },
@@ -1843,7 +1855,7 @@ export default {
   },
   /** 获取调价管理列表 */
   list_48: {
-    realUrl: '/strategy/price_config_snp_plan/list',
+    realUrl: '/strategy/price_config_snp_plan/list' as const,
     reqType: {} as IPageParams<PriceConfigSnpPlan对象>,
     resType: {} as any,
   },
@@ -1867,7 +1879,7 @@ export default {
   },
   /** 获取profit_quota_log列表 */
   list_49: {
-    realUrl: '/strategy/profit_quota_log/list',
+    realUrl: '/strategy/profit_quota_log/list' as const,
     reqType: {} as IPageParams<ProfitQuotaLogParam>,
     resType: {} as any,
   },
@@ -1987,7 +1999,7 @@ export default {
   },
   /** 获取计划列表(运营端) */
   list_50: {
-    realUrl: '/strategy/purchase/list',
+    realUrl: '/strategy/purchase/list' as const,
     reqType: {} as IPageParams<PurchasePageParam>,
     resType: {} as any,
   },
@@ -2059,7 +2071,7 @@ export default {
   },
   /** 获取计划提报限制详列表 */
   list_51: {
-    realUrl: '/strategy/purchase_limit_config/list',
+    realUrl: '/strategy/purchase_limit_config/list' as const,
     reqType: {} as PurchaseLimitConfig对象,
     resType: {} as any,
   },
@@ -2077,7 +2089,7 @@ export default {
   },
   /** 获取计划提报限制详细配置分页列表 */
   list_52: {
-    realUrl: '/strategy/purchase_limit_config_log/list',
+    realUrl: '/strategy/purchase_limit_config_log/list' as const,
     reqType: {} as IPageParams<PurchaseLimitConfigLog对象>,
     resType: {} as any,
   },
@@ -2095,7 +2107,7 @@ export default {
   },
   /** 获取订单变更记录 */
   list_53: {
-    realUrl: '/strategy/purchase_operate/list',
+    realUrl: '/strategy/purchase_operate/list' as const,
     reqType: {} as IPageParams<PurchaseOperate对象>,
     resType: {} as any,
   },
@@ -2125,7 +2137,7 @@ export default {
   },
   /** 获取返利优惠列表 */
   list_54: {
-    realUrl: '/strategy/rebate_config/list',
+    realUrl: '/strategy/rebate_config/list' as const,
     reqType: {} as IPageParams<RebateConfig对象>,
     resType: {} as any,
   },
@@ -2137,13 +2149,13 @@ export default {
   },
   /** 获取返利优惠变更记录列表 */
   list_55: {
-    realUrl: '/strategy/rebate_log/list',
+    realUrl: '/strategy/rebate_log/list' as const,
     reqType: {} as IPageParams<RebateLog对象>,
     resType: {} as any,
   },
   /** 返利优惠变更记录详细日志 */
   list_56: {
-    realUrl: '/strategy/rebate_log_detail/list',
+    realUrl: '/strategy/rebate_log_detail/list' as const,
     reqType: {} as IPageParams<RebateLogDetail对象>,
     resType: {} as any,
   },
@@ -2154,11 +2166,10 @@ export default {
       /** key */
       key?: string
     },
-
   },
   /** 获取申请变更记录列表 */
   list_57: {
-    realUrl: '/strategy/release_detail/list',
+    realUrl: '/strategy/release_detail/list' as const,
     reqType: {} as IPageParams<ReleaseDetail对象>,
     resType: {} as any,
   },
@@ -2188,7 +2199,7 @@ export default {
   },
   /** 获取发布申请列表 */
   list_58: {
-    realUrl: '/strategy/release_manage/list',
+    realUrl: '/strategy/release_manage/list' as const,
     reqType: {} as IPageParams<ReleaseManage对象>,
     resType: {} as any,
   },
@@ -2204,15 +2215,39 @@ export default {
     reqType: {} as ReleaseManage对象,
     resType: {} as any,
   },
+  /** 新增站信息 */
+  add_33: {
+    realUrl: '/strategy/station_map/add' as const,
+    reqType: {} as StationMap对象,
+    resType: {} as boolean,
+  },
+  /** 删除站信息 */
+  delete_6: {
+    realUrl: '/strategy/station_map/delete' as const,
+    reqType: {} as StationMap对象,
+    resType: {} as boolean,
+  },
+  /** 获取城市的经纬度范围 */
+  get_city_region: {
+    realUrl: '/strategy/station_map/get_city_region' as const,
+    reqType: {} as 通用字符串单参数_参数类,
+    resType: {} as Array<string>,
+  },
   /** 按条件获取站信息列表 */
   list_59: {
-    realUrl: '/strategy/station_map/list',
+    realUrl: '/strategy/station_map/list' as const,
     reqType: {} as StationMap对象,
     resType: {} as Array<StationMap对象>,
   },
+  /** 更改站信息 */
+  update_25: {
+    realUrl: '/strategy/station_map/update' as const,
+    reqType: {} as StationMap对象,
+    resType: {} as boolean,
+  },
   /** 添加库存变动日志 */
-  add_33: {
-    realUrl: '/strategy/stock_log/add',
+  add_34: {
+    realUrl: '/strategy/stock_log/add' as const,
     reqType: {} as StockLog对象,
     resType: {} as any,
   },
@@ -2278,7 +2313,7 @@ export default {
   },
   /** 获取库存变动日志列表 */
   list_60: {
-    realUrl: '/strategy/stock_log/list',
+    realUrl: '/strategy/stock_log/list' as const,
     reqType: {} as IPageParams<StockLog对象>,
     resType: {} as any,
   },
@@ -2325,32 +2360,32 @@ export default {
     resType: {} as any,
   },
   /** 添加system_config_log */
-  add_34: {
-    realUrl: '/strategy/system_config_log/add',
+  add_35: {
+    realUrl: '/strategy/system_config_log/add' as const,
     reqType: {} as SystemConfigLog对象,
     resType: {} as any,
   },
   /** 获取system_config_log列表 */
   list_61: {
-    realUrl: '/strategy/system_config_log/list',
+    realUrl: '/strategy/system_config_log/list' as const,
     reqType: {} as IPageParams<SystemConfigLog对象>,
     resType: {} as any,
   },
   /** 修改system_config_log */
-  update_25: {
-    realUrl: '/strategy/system_config_log/update',
+  update_26: {
+    realUrl: '/strategy/system_config_log/update' as const,
     reqType: {} as SystemConfigLog对象,
     resType: {} as any,
   },
   /** 添加tag */
-  add_35: {
-    realUrl: '/strategy/tag/add',
+  add_36: {
+    realUrl: '/strategy/tag/add' as const,
     reqType: {} as Tag对象,
     resType: {} as any,
   },
   /** 删除tag */
-  delete_6: {
-    realUrl: '/strategy/tag/delete',
+  delete_7: {
+    realUrl: '/strategy/tag/delete' as const,
     reqType: {} as Tag对象,
     resType: {} as boolean,
   },
@@ -2362,13 +2397,13 @@ export default {
   },
   /** 获取tag列表 */
   list_62: {
-    realUrl: '/strategy/tag/list',
+    realUrl: '/strategy/tag/list' as const,
     reqType: {} as Tag对象,
     resType: {} as any,
   },
   /** 修改tag */
-  update_26: {
-    realUrl: '/strategy/tag/update',
+  update_27: {
+    realUrl: '/strategy/tag/update' as const,
     reqType: {} as Tag对象,
     resType: {} as any,
   },
@@ -2434,7 +2469,7 @@ export default {
   },
   /** pushStationStatus */
   push_station_status: {
-    realUrl: '/strategy/third_party/push_station_status',
+    realUrl: '/strategy/third_party/push_station_status' as const,
     reqType: {} as 三方对接_关停或者重启站推送_参数实体类,
     resType: {} as any,
   },
@@ -2463,8 +2498,8 @@ export default {
     resType: {} as CarrierVO,
   },
   /** 新增卡车 */
-  add_36: {
-    realUrl: '/strategy/truck/add',
+  add_37: {
+    realUrl: '/strategy/truck/add' as const,
     reqType: {} as Truck对象,
     resType: {} as any,
   },
@@ -2737,7 +2772,7 @@ export default {
   },
   /** 卡车列表 */
   list_63: {
-    realUrl: '/strategy/truck/list',
+    realUrl: '/strategy/truck/list' as const,
     reqType: {} as IPageParams<Truck对象>,
     resType: {} as AnyObject,
   },
@@ -2850,8 +2885,8 @@ export default {
     resType: {} as string,
   },
   /** 添加truck_com_contract */
-  add_37: {
-    realUrl: '/strategy/truck_com_contract/add',
+  add_38: {
+    realUrl: '/strategy/truck_com_contract/add' as const,
     reqType: {} as TruckComContract对象,
     resType: {} as any,
   },
@@ -2863,19 +2898,19 @@ export default {
   },
   /** 获取truck_com_contract列表 */
   list_64: {
-    realUrl: '/strategy/truck_com_contract/list',
+    realUrl: '/strategy/truck_com_contract/list' as const,
     reqType: {} as IPageParams<TruckComContract对象>,
     resType: {} as any,
   },
   /** 修改truck_com_contract */
-  update_27: {
-    realUrl: '/strategy/truck_com_contract/update',
+  update_28: {
+    realUrl: '/strategy/truck_com_contract/update' as const,
     reqType: {} as TruckComContract对象,
     resType: {} as any,
   },
   /** 新增卡车-司机分配 */
-  add_38: {
-    realUrl: '/strategy/truck_driver/add',
+  add_39: {
+    realUrl: '/strategy/truck_driver/add' as const,
     reqType: {} as TruckDriver对象,
     resType: {} as any,
   },
@@ -2928,8 +2963,8 @@ export default {
     resType: {} as any,
   },
   /** 添加truck_driver_log */
-  add_39: {
-    realUrl: '/strategy/truck_driver_log/add',
+  add_40: {
+    realUrl: '/strategy/truck_driver_log/add' as const,
     reqType: {} as TruckDriverLog对象,
     resType: {} as any,
   },
@@ -2959,25 +2994,25 @@ export default {
   },
   /** 获取truck_driver_log列表 */
   list_65: {
-    realUrl: '/strategy/truck_driver_log/list',
+    realUrl: '/strategy/truck_driver_log/list' as const,
     reqType: {} as IPageParams<TruckDriverLog对象>,
     resType: {} as any,
   },
   /** 修改truck_driver_log */
-  update_28: {
-    realUrl: '/strategy/truck_driver_log/update',
+  update_29: {
+    realUrl: '/strategy/truck_driver_log/update' as const,
     reqType: {} as TruckDriverLog对象,
     resType: {} as any,
   },
   /** add 卡车变更日志 */
-  add_40: {
-    realUrl: '/strategy/truck_log/add',
+  add_41: {
+    realUrl: '/strategy/truck_log/add' as const,
     reqType: {} as TruckLog对象,
     resType: {} as any,
   },
   /** 获取truck_log列表 */
   list_66: {
-    realUrl: '/strategy/truck_log/list',
+    realUrl: '/strategy/truck_log/list' as const,
     reqType: {} as IPageParams<TruckLog对象>,
     resType: {} as any,
   },

+ 11 - 3
src/utils/config/pages.ts

@@ -20,7 +20,7 @@ export default {
     _url: '/pages/index/index',
     _type: 'page',
     title: '大象加气 · 驾驶员端',
-    identity: true,
+    identity: false,
     isPager: true,
     style: {
       enablePullDownRefresh: false,
@@ -62,7 +62,8 @@ export default {
     identity: true,
     isPager: true,
     style: {
-      enablePullDownRefresh: true
+      enablePullDownRefresh: false,
+      navigationStyle: 'custom'
     }
   } as ayPage,
   order_orderDetail: {
@@ -131,7 +132,7 @@ export default {
     _url: '/pages/station/detail',
     _type: 'page',
     title: '加气站详情',
-    identity: true,
+    identity: false,
     isPager: false
   } as ayPage,
   cards_index: {
@@ -147,5 +148,12 @@ export default {
     title: '购车优惠卡',
     identity: true,
     isPager: false
+  } as ayPage,
+  order_indexcopy: {
+    _url: '/pages/order/indexcopy',
+    _type: 'page',
+    title: 'order_indexcopy',
+    identity: true,
+    isPager: false
   } as ayPage
 }

+ 51 - 18
src/utils/container/index.ts

@@ -14,7 +14,10 @@ const staticData = {
   args: {} as AyContainerEntryArgs,
   goPageExt: {} as goPageExt,
 }
-type ExtType<T> = Record<keyof T, { showLoading?: boolean }>
+type DecorateMethods<T> = T & {
+  /** 点击执行的方法 */
+  handler: T
+}
 export default {
   staticData,
   initData<T extends object>(data: T) {
@@ -28,24 +31,41 @@ export default {
   },
   /** 初始化对象内的方法,自动为对象内所有方法增加防重提功能(同步方法、异步方法执行中再次触发不执行) */
 
-  initMethods<T>(methods: T, ext?: Record<string, { showLoading?: boolean }>): T {
-    const rv = {}
+  initMethods<T extends AnyObject>(
+    methods: T,
+    extEach?: Record<string, { showLoading?: boolean; ba?: () => void }>,
+    ext?: {
+      /**
+       * 前置通知,返回false时不执行目标方法
+       * @param methodName:方法名
+       */ ba?: (methodName: keyof T, isHandler: boolean) => boolean | void
+    },
+  ): DecorateMethods<T> {
+    /** 正在执行中的方法 */
     const executings = {}
+    /** 是被点击执行的方法 */
+    const handlering = {}
+    const rv = {} as DecorateMethods<T>
     for (const [k, v] of Object.entries(methods)) {
       if (typeof v === 'function') {
         rv[k] = new Proxy(v, {
           apply(target, arg, argArray) {
             if (executings[k] === true) return
             executings[k] = true
-            const rv = v(...argArray)
+            const bar = ext?.ba(k, handlering[k])
+            if (bar === false) {
+              executings[k] = false
+              return
+            }
+            const rv = target(...argArray)
             // 异步方法
             if (rv?.finally) {
-              if (ext[k]?.showLoading) {
+              if (extEach[k]?.showLoading) {
                 uni.showLoading({ title: config.common.RequestExtDef.loadingText })
               }
               rv.finally(() => {
                 executings[k] = false
-                if (ext[k]?.showLoading) {
+                if (extEach[k]?.showLoading) {
                   // 在调用hideLoading与hideToast时配置参数noConflict: true取消混用特性,解决hideLoading隐藏showToast提示的问题。
                   uni.hideLoading({ noConflict: true })
                 }
@@ -58,7 +78,20 @@ export default {
         })
       }
     }
-    return rv as T
+    rv.handler = new Proxy(
+      {},
+      {
+        get(target, p) {
+          return (...args) => {
+            console.log('handler')
+            handlering[p] = true
+            Promise.resolve().then(() => (handlering[p] = false))
+            return rv[p](...args)
+          }
+        },
+      },
+    ) as T
+    return rv
   },
   /** 获取资源完整地址 */
   getResourceUrl(url) {
@@ -185,17 +218,17 @@ export default {
           callBack(args)
         }
         // 在onload中 初始化原生方法时,之前的代码不能有await,否则小程序环境'重新进入小程序' 无法触发
-        onReachBottom(() => {
-          store.curPage.pagerMethods.refresh({ isAdd: true })
-        })
-        onPullDownRefresh(() => {
-          store.curPage.pagerMethods.refresh({ isAdd: false })
-        })
-      } else {
-        onPullDownRefresh(() => {
-          args.loadType = enums.LoadType.refresh
-          callBack(args)
-        })
+        // onReachBottom(() => {
+        //   store.curPage.pagerMethods.refresh({ isAdd: true })
+        // })
+        // onPullDownRefresh(() => {
+        //   store.curPage.pagerMethods.refresh({ isAdd: false })
+        // })
+        // } else {
+        //   onPullDownRefresh(() => {
+        //     args.loadType = enums.LoadType.refresh
+        //     callBack(args)
+        //   })
       }
       // if (options) {
       //   args.options = options

+ 1 - 7
src/utils/func/convert.ts

@@ -1,9 +1,3 @@
-const maps = {
-  nullView: {
-    0: '--',
-    1: '0',
-  },
-}
 const convert = {
   transformFromBaiduToGCJ(latitude, longitude) {
     const xPi = (3.14159265358979323846264338327950288 * 3000.0) / 180.0
@@ -21,7 +15,7 @@ const convert = {
     return mobile && mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
   },
   nullView(data, type = 0) {
-    const rv = !data && data !== 0 ? maps.nullView[type] : data
+    const rv = !data && data !== 0 ? config.common.nullView[type] : data
     return rv
   },
   getOrderStatusStr(settleStatus) {

+ 1 - 1
src/utils/store/common.ts

@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
 
 export default defineStore('common', () => {
   const data = reactive({
-    debug: false,
+    debug: true,
     /** 加气量上限 */
     preferWeight: 1000,
     /** 客服电话 */

+ 5 - 2
src/utils/store/curPage.ts

@@ -41,16 +41,19 @@ const pagerMethods = {
     if (pagerInfo.value.loaded) pagerMethods.refresh({ isAdd: true })
   },
   // #endif
-  loaded(args) {
+  async loaded(args) {
     // 取消加载效果
     if (args?.reqState === enums.ReqState.cancel) {
+      // 避免取消太快,响应式感知不到loading变化
+      await func.awaiter(500)
       pagerInfo.value.loading = false
       return
     }
     // #ifdef H5
     pagerInfo.value.loaded = true
     // #endif
-    uni.stopPullDownRefresh()
+    // uni.stopPullDownRefresh()
+    // pageConfig.value.zPagingRef.complete()
     pagerInfo.value.loading = false
     if (!args) return
     if (args.pages) {

+ 3 - 1
src/utils/store/user.ts

@@ -16,6 +16,8 @@ interface TUser extends Token认证用户实体 {
 const service = 'miniprogram'
 const initState = {
   Identifier: Base64.encode(service + ':org:user:role'),
+  head_url: defHead,
+  user_name: '登录/注册',
 }
 
 const useUserStore = defineStore(
@@ -55,7 +57,7 @@ const useUserStore = defineStore(
     }
     const clearUserInfo = (type = 0) => {
       userInfo.value = { ...initState }
-      ay.goLogin(type)
+      ay.goHome()
     }
 
     const Authorization = computed(() => {

+ 3 - 2
uno.config.ts

@@ -60,10 +60,10 @@ function classNamePreContainer(): SourceCodeTransformer {
     enforce: 'pre', // enforce before other transformers
     idFilter(id) {
       // __uno.css
-      return id.includes('__uno.css')
+      return id.includes('__uno.css') || id.includes('app.wxss')
     },
     async transform(code, id, { uno }) {
-      code.replace(/(\.(?:(?!container).+))\{/g, '.container $1{')
+      code.replace(/(\.(?:(?!container).+))\{/g, '.container$1,.container $1{')
     },
   }
 }
@@ -92,6 +92,7 @@ export default defineConfig({
    * @see https://github.com/unocss/unocss#shortcuts
    */
   shortcuts: [['center', 'flex justify-center items-center']],
+  // 仅h5有效, 编译、打包小程序不会触发
   transformers: [
     classNamePreContainer(),
     optimization(),

+ 2 - 1
vite.config.ts

@@ -17,7 +17,7 @@ import AutoImport from 'unplugin-auto-import/vite'
 import { visualizer } from 'rollup-plugin-visualizer'
 import ViteRestart from 'vite-plugin-restart'
 
-import { slimMPPlugin, generatePageConfig } from './vitePlugin'
+import { slimMPPlugin, UnoCssMPPlugin, generatePageConfig } from './vitePlugin'
 
 // https://vitejs.dev/config/
 export default ({ command, mode }) => {
@@ -56,6 +56,7 @@ export default ({ command, mode }) => {
     },
     plugins: [
       slimMPPlugin(),
+      UnoCssMPPlugin(),
       UniPages({
         exclude: ['**/components/**/**.*'],
         homePage: 'pages/index/index',

+ 34 - 1
vitePlugin.ts

@@ -263,6 +263,39 @@ const convert = {
     }
   },
 }
+/** 对 uno.config.ts 功能的补充 */
+function UnoCssMPPlugin(): Plugin {
+  return {
+    name: 'UnoCssMPPlugin',
+    /** 拦截app.wxss写入时修改 uno中的样式名称增加.container 前缀,提高样式权重 */
+    writeBundle(options, bundle) {
+      for (const filename in bundle) {
+        if (filename.includes('app.wxss')) {
+          const chunk = bundle[filename]
+          if (chunk.type === 'asset') {
+            const tempFilePath = `${options.dir}/${filename}`
+            const code = chunk.source as string
+            const allCss = code.split('/* stylelint-disable comment-empty-line-before */')
+            if (allCss.length === 2) {
+              let unoCss = allCss[0]
+              unoCss = unoCss
+                .replaceAll('}', '}\n')
+                .replace(/(\.(?:(?!container).+))\{/g, '.container$1,.container $1{')
+              files.write(tempFilePath, unoCss + allCss[1])
+            }
+
+            // bundle[filename] = {
+            //   fileName: 'app.wxss',
+            //   needsCodeReference: false,
+            //   source: '6666',
+            //   type: 'asset',
+            // }
+          }
+        }
+      }
+    },
+  }
+}
 /** 小程序瘦身插件 */
 function slimMPPlugin(): Plugin {
   if (config.env.UNI_PLATFORM === 'h5') {
@@ -386,4 +419,4 @@ function generatePageConfig(ctx: PageContext) {
     })
   }
 }
-export { slimMPPlugin, generatePageConfig }
+export { slimMPPlugin, UnoCssMPPlugin, generatePageConfig }