Procházet zdrojové kódy

Merge branch '加气支付极速版_cl' of chenlei/mobile into master

chenlei před 1 rokem
rodič
revize
33774c1fa6

+ 1 - 1
README.md

@@ -76,7 +76,7 @@ pnpm gif
 - 19.全局sass变量自动引入,全局sass变量、样式表定义。√
 - 20.公共请求框架,根据swagger导入接口信息支持增量导入。√
 - 21.页面方法公共初始化,对页面方法进行集中拦截、公共管控,已支持自动为对象内所有方法增加防重提功能(同步方法、异步方法执行中再次触发不执行)。√
-- 22.微信小程序环境支持websocket-stomp协议,收银员扫描驾驶员二维码创建订单后,驾驶员端自动跳转待支付页面。√
+- 22.微信小程序环境支持websocket-stomp协议,加气员扫描驾驶员二维码创建订单后,驾驶员端自动跳转待支付页面。√
 - 23.构建项目时自动化上传体验版至小程序后台。√
 - 24.构建项目时可区分开发、测试、生成环境,编写对应的命令。√
 - 25.在页面跳转时支持页面预初始化。√

+ 77 - 0
scancode.html

@@ -0,0 +1,77 @@
+<html>
+
+<head>
+    <style>
+        body {
+            width: 300px;
+            margin: 0;
+            font-family: SimSun;
+        }
+
+        .item {
+            padding: 12px;
+            margin-bottom: 12px;
+            font-size: 14px;
+            border: 1px solid #ccc;
+            border-radius: 6px;
+        }
+
+        .desc {
+            margin-top: 4px;
+            font-size: 12px;
+            color: #7F7F7F;
+        }
+
+        .name {
+            height: 22px;
+        }
+
+        .img {
+            width: 40px;
+            height: 40px;
+            margin-right: 12px;
+        }
+
+        .cashier {
+            display: inline-block;
+            /* width: 260px; */
+        }
+
+        .text-center {
+            text-align: center;
+        }
+
+        .qrcode {
+            margin-top: 12px;
+            text-align: center;
+            border-top: 1px solid #ccc;
+        }
+
+        .qrcode img {
+            width: 180px;
+            height: 180px;
+            margin-top: 12px;
+            border-radius: 4px;
+
+        }
+    </style>
+</head>
+
+<body>
+    <div class="item">
+        <div>奥扬桃林站</div>
+        <div class="desc">XX省XX市XX区XXXXX路XX号XXXXXX</div>
+    </div>
+    <div class="item">
+        <img src="" class="img" />
+        <div class="cashier">
+            <div class="name">郭麒麟 [ 工号:AYTL009 ]</div>
+            <div class="desc">199****0123</div>
+        </div>
+        <div class="qrcode">
+            <img src="" />
+        </div>
+    </div>
+</body>
+
+</html>

+ 2 - 1
scripts/getInterFace.js

@@ -161,6 +161,7 @@ const convert = {
     const urlNameMap = {}
     const getUrlName = (url) => {
       url = url.replace(/.+\//, '')
+      url = url.replace('-', '_')
 
       if (urlNameMap.hasOwnProperty(url)) {
         urlNameMap[url]++
@@ -217,7 +218,7 @@ const convert = {
         const resTypeSchema = convert.definitions(curPostInfo.responses[200].schema.$ref)
         resTypeStr = `    resType: {} as ${resTypeSchema},`
       }
-      urlsStr += `\n  /** ${curPostInfo.summary || curPostInfo.summary} */\n  ${urlName}: {\n    realUrl: '${k}',${isUploadStr}\n${reqTypeStr}\n${resTypeStr}\n  },`
+      urlsStr += `\n  /** ${curPostInfo.summary} */\n  ${urlName}: {\n    realUrl: '${k}',${isUploadStr}\n${reqTypeStr}\n${resTypeStr}\n  },`
       // urlsStr += `\n  /** ${curPostInfo.summary || curPostInfo.summary} */\n  ${urlName}: {\n    realUrl: '${k}' as const,${isUploadStr}\n${reqTypeStr}\n${resTypeStr}\n  },`
     }
     files.write(

+ 2 - 2
src/components/business/station/index.vue

@@ -39,10 +39,10 @@
       </div>
       <div>
         <!-- <div class="s-fz distance">{{ props.stationInfo.distance }} km</div> -->
-        <div class="p-color s-fz detail" v-if="props.type === '2'" @click="methods.goDetail('2')">
+        <!-- <div class="p-color s-fz detail" v-if="props.type === '2'" @click="methods.goDetail('2')">
           详情
           <uni-icons type="right" color="" size="12" />
-        </div>
+        </div> -->
         <div
           class="center s-fz location p-color"
           :class="{ 'gray-color': !props.stationInfo.longitude }"

+ 36 - 18
src/components/container/index.vue

@@ -8,16 +8,21 @@
       :style="{ height: props.topHeight, ...props.pageTopStyle }"
       v-if="data.isCustom"
     >
-      <div class="center page-title" :class="{ 'justify-start': data.titleAlginStart }">
-        <uni-icons
-          class="mr-spacd4"
-          v-if="data.showBackIcon"
-          type="left"
-          color=""
-          size="24"
-          @click="ay.navigateBack()"
-        />
-        <div class="font-bold bs-fz">{{ title }}</div>
+      <div class="center page-title">
+        <template v-if="!props.hideIcon && data.showIcon">
+          <uni-icons
+            class="mr-spacd4"
+            v-if="data.showBackIcon"
+            type="left"
+            color=""
+            size="24"
+            @click="ay.navigateBack()"
+          />
+          <uni-icons class="mr-spacd4" v-else type="home" color="" size="24" @click="ay.goHome()" />
+        </template>
+        <div class="font-bold bs-fz flex-1" :class="{ 'text-center': props.titleAlginCenter }">
+          {{ title }}
+        </div>
       </div>
     </div>
     <div class="pt-spac" v-if="props.showSpac" />
@@ -29,6 +34,8 @@
   </div>
 </template>
 <script lang="ts" setup>
+import { PullRefresh } from 'vant'
+
 defineOptions({
   name: 'container',
 })
@@ -38,21 +45,26 @@ const props = withDefaults(
     cusStyle?: AnyObject
     pageTopStyle?: AnyObject
     title?: string
+    titleAlginCenter?: boolean
     topHeight: string
     showSpac: boolean
+    hideIcon: boolean
   }>(),
   {
+    titleAlginCenter: false,
     showSpac: true,
     topHeight: `${config.common.safeAreaTopHeight}px`,
+    hideIcon: false,
   },
 )
 /** 采用局部数据 代替全局存储数据,防止页面跳转时显示下个页面的标题等信息 */
 const data = reactive({
   title: '',
   showBackIcon: false,
-  titleAlginStart: true,
+  showIcon: false,
   isCustom: false,
 })
+
 const title = computed(() => props.title || data.title)
 const cusStyle = computed(() => {
   const rv = {}
@@ -65,15 +77,21 @@ const cusStyle = computed(() => {
   }
 })
 onMounted(() => {
-  data.title = store.curPage.pageConfig.title
-  data.showBackIcon = ![config.pages.index_index._url, config.pages.login_index._url].includes(
-    store.curPage.pageConfig._url,
-  )
-  data.titleAlginStart = store.curPage.pageConfig._url !== config.pages.login_index._url
-  data.isCustom = store.curPage.pageConfig.style?.navigationStyle === 'custom'
+  // 这些属性放到onMounted内,代替视图模板直接使用store的值,是为了避免页面跳转时,上一页面显示下一页面的内容
+  methods.refresh()
 })
 
-const methods = {}
+const methods = {
+  refresh() {
+    data.title = store.curPage.pageConfig.title
+    data.showIcon = config.pages.index_index._url !== store.curPage.pageConfig._url
+    const cps = getCurrentPages()
+    data.showBackIcon = cps.length > 1
+
+    data.isCustom = store.curPage.pageConfig.style?.navigationStyle === 'custom'
+  },
+}
+defineExpose(methods)
 </script>
 <style lang="scss" scoped>
 .container {

+ 21 - 11
src/components/fieldGroups/index.vue

@@ -3,18 +3,28 @@
     <div v-if="fg.title" :class="fg.class">{{ fg.title }}</div>
     <div class="chunk2" v-else>
       <template v-for="(f, i) in fg.fields" :key="i">
-        <div v-if="!f.show || f.show(props.targetData)">
-          <span>{{ f.title }}</span>
-          <div class="center items-end" :class="f.keyClass">
-            <span class="mr-spacd4" v-if="f.preInfo">{{ f.preInfo }}</span>
-            <!-- 小程序环境 标签内if不能为function,需要转成boolean类型 -->
-            <span v-if="!!f.view">
-              {{ methods.view(f) }}
-            </span>
-            <span v-else>{{ func.convert.nullView(props.targetData[f.key]) }}</span>
-            <span class="ml-spacd4" v-if="f.unit">{{ f.unit }}</span>
+        <template v-if="!f.show || f.show(props.targetData)">
+          <!-- #ifdef MP -->
+          <slot :name="f.slot" :data="props.targetData" :field="f" v-if="f.slot" />
+          <!-- #endif  -->
+          <!-- #ifdef H5 -->
+          <div v-if="f.slot">
+            <slot :name="f.slot" :data="props.targetData" :field="f" />
           </div>
-        </div>
+          <!-- #endif  -->
+          <div v-else>
+            <span>{{ f.title }}</span>
+            <div class="center items-end" :class="f.keyClass">
+              <span class="mr-spacd4" v-if="f.preInfo">{{ f.preInfo }}</span>
+              <!-- 小程序环境 标签内if不能为function,需要转成boolean类型 -->
+              <span v-if="!!f.view">
+                {{ methods.view(f) }}
+              </span>
+              <span v-else>{{ func.convert.nullView(props.targetData[f.key]) }}</span>
+              <span class="ml-spacd4" v-if="f.unit">{{ f.unit }}</span>
+            </div>
+          </div>
+        </template>
       </template>
     </div>
   </template>

+ 2 - 2
src/components/numer/index.vue

@@ -1,14 +1,14 @@
 <template>
   <div>
     <template v-if="props.isSimple">
-      <div v-if="props.pre">{{ props.pre }}</div>
+      <div v-if="props.pre" class="mr-spacd4">{{ props.pre }}</div>
       <div class="font-bold mr-spacd4" :class="props.valueClass">
         {{ func.convert.nullView(props.value) }}
       </div>
       <div v-if="props.unit">{{ props.unit }}</div>
     </template>
     <template v-else>
-      <div class="mr-spacd4" v-if="props.pre">{{ props.pre }}</div>
+      <div v-if="props.pre" class="mr-spacd4">{{ props.pre }}</div>
       <div v-if="func.isnull(props.value)">
         {{ props.nullView ? func.convert.nullView(props.value) : props.value }}
       </div>

+ 52 - 0
src/components/tabs/index.vue

@@ -0,0 +1,52 @@
+<template>
+  <div class="tabs">
+    <div class="center justify-start tabs-titles">
+      <div
+        class="tabs-title font-bold"
+        :class="{ active: props.modelValue === tab.value }"
+        v-for="(tab, i) in props.tabs"
+        :key="i"
+        @click="emits('update:modelValue', tab.value)"
+      >
+        {{ tab.title }}
+      </div>
+    </div>
+    <div class="tabs-contents">
+      <div v-for="(tab, i) in props.tabs" :key="i" v-show="props.modelValue === tab.value">
+        <slot :name="'tab' + tab.value" />
+      </div>
+    </div>
+  </div>
+</template>
+<script lang="ts" setup>
+defineOptions({
+  name: 'tabs',
+})
+const data = reactive({
+  items: '',
+})
+const props = defineProps<{ modelValue: number; tabs: { value: number; title: string }[] }>()
+const emits = defineEmits(['update:modelValue'])
+onMounted(() => {})
+const methods = {}
+</script>
+<style lang="scss" scoped>
+.tabs-title {
+  padding: $p-spacd2;
+  font-size: $s-fz;
+  border: 1rpx solid $border-color;
+  border-top-left-radius: $p-spacd2;
+  border-top-right-radius: $p-spacd2;
+  &.active {
+    color: $p-color;
+    border-bottom-color: $bg-color;
+  }
+}
+.tabs-contents {
+  padding: $p-spac;
+  margin-top: -1rpx;
+  border: 1rpx solid $border-color;
+  border-radius: $p-spacd2;
+  border-top-left-radius: 0;
+}
+</style>

+ 4 - 1
src/pages.json

@@ -51,7 +51,10 @@
     },
     {
       "path": "pages/order/createOrder",
-      "type": "page"
+      "type": "page",
+      "style": {
+        "navigationStyle": "custom"
+      }
     },
     {
       "path": "pages/order/index",

+ 52 - 44
src/pages/index/index.vue

@@ -12,7 +12,7 @@
         </div>
         <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 class="p-color s-fz mt-spacd2">扫码加气</div>
         </div>
         <!-- <uni-icons
           type="scan"
@@ -22,7 +22,7 @@
           @click="methods.scanCode"
         ></uni-icons> -->
       </div>
-      <div class="center">
+      <div class="center" v-if="false">
         <ay-flowLine
           class="mt-spac mb-spac"
           :lineWidth="4"
@@ -40,7 +40,7 @@
           </div>
         </ay-flowLine>
       </div>
-      <div class="center qrcode-text mb-spac" v-if="!data.firstUnload">
+      <div class="center qrcode-text mb-spac" v-if="false && !data.firstUnload">
         <template v-if="data.hasnopayfordriver">存在未支付完成订单</template>
         <template v-else-if="data.qrcode.expire">
           二维码已失效
@@ -255,7 +255,7 @@ const data = ay.initData({
     {
       id: 0,
       icon: perpay,
-      name: '支付订单',
+      name: '支付订单',
     },
     {
       id: 1,
@@ -478,28 +478,28 @@ const methods = ay.initMethods(
         '/user/' + store.user.userInfo.user_id + '/msg',
         {},
         // 发送文本
-        JSON.stringify({ content: '1212' }),
+        JSON.stringify({ content: 'spm' }),
       )
     },
     /** 检查未支付
-     * type 0:仅检查 1:点击支付订单 2:点击扫码
+     * type 0:仅检查 1:点击支付订单 2:点击扫码
      * */
     async checkNopayfordriver(type: 0 | 1 | 2 = 0) {
       const nopayfordriver = await webapi.pay.find_unpayfordriver()
       // 存在 未支付(待支付、支付中、支付异常)
       if (nopayfordriver) {
         if (type === 1) {
-          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 (nopayfordriver.settleStatus === 1) {
+          // 跳未支付
+          ay.goPage(config.pages.order_orderDetail, { 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) {
           func.native
@@ -511,7 +511,7 @@ const methods = ay.initMethods(
             .then((res) => {
               if (res.confirm) {
                 if (nopayfordriver.settleStatus === 1) {
-                  ay.goPage(config.pages.order_prePay, {
+                  ay.goPage(config.pages.order_orderDetail, {
                     params: { orderId: nopayfordriver.orderId },
                   })
                 } else {
@@ -525,20 +525,28 @@ const methods = ay.initMethods(
         return true
       } else {
         if (type === 1) {
-          func.native.showToast('暂无支付订单!')
+          func.native.showToast('暂无支付订单!')
         }
         return false
       }
     },
-    scanCode1() {
-      console.log('scanCode1')
-    },
     async scanCode() {
       if (await methods.checkNopayfordriver(2)) {
         return
       }
 
-      const ret: { gasstationId?: string; cashierId?: string } = await func.native.scan()
+      const ret = await func.native.scan()
+      if (ret.scanType === 'QR_CODE') {
+        methods.qrCode(ret.query)
+      }
+      if (ret.scanType === 'WX_CODE') {
+        methods.wxCode(ret.query)
+      }
+    },
+    async wxCode(ret) {
+      ay.goPage(config.pages.order_createOrder, { params: ret })
+    },
+    async qrCode(ret) {
       if (!(ret.gasstationId && ret.cashierId)) {
         func.native.showToast('二维码无效')
         return
@@ -552,14 +560,14 @@ const methods = ay.initMethods(
         })
         if (
           ((price.qrcode === 0 || price.qrcode === 1) && ret.gasstationId !== ret.cashierId) || // 设置的加气站收款码
-          (price.qrcode === 2 && ret.gasstationId === ret.cashierId) // 设置的收银
+          (price.qrcode === 2 && ret.gasstationId === ret.cashierId) // 设置的加气
         ) {
           func.native.showModal({
             title: '温馨提示',
             content:
               price.qrcode === 2
-                ? '加气站收款码已禁用,请选择收银员收款码扫码。'
-                : '收银员收款码已禁用,请选择加气站收款码扫码。',
+                ? '加气站收款码已禁用,请选择加气员收款码扫码。'
+                : '加气员收款码已禁用,请选择加气站收款码扫码。',
           })
         } else {
           const gasJudge = await webapi.strategy.driver_gas_judge({
@@ -579,7 +587,7 @@ const methods = ay.initMethods(
       } else {
         func.native.showModal({
           title: '温馨提示',
-          content: '当前收银员所属企业和二维码对应的企业不一致,请联系加气站管理员。',
+          content: '当前加气员所属企业和二维码对应的企业不一致,请联系加气站管理员。',
         })
       }
     },
@@ -587,7 +595,7 @@ const methods = ay.initMethods(
     agree() {
       webapi.user.agree({ id: data.invite.driverWhiteList.id }).then((res) => {
         if (res) {
-          func.native.showToast('加入成功,请重新登录').then(() => {})
+          func.native.showToast('加入成功').then(() => {})
           inputDialog.value.close()
         }
       })
@@ -605,9 +613,13 @@ const methods = ay.initMethods(
     getInvite() {
       webapi.user
         .find_by_driver_mobile({ driverMobile: store.user.userInfo.mobile })
-        .then((res) => {
+        .then(async (res) => {
           if (res.driverWhiteList && res.org) {
             data.invite = res
+            // 小程序环境:时机过早会inputDialog.value为null
+            // h5环境:当页面data内的值改变时,弹框会消失
+            // 所以等待1秒
+            await func.awaiter()
             inputDialog.value.open()
           }
         })
@@ -721,8 +733,9 @@ ay.entrance(
           ...aop.request.AR.getAccountInfo(res),
         }
       })
-      data.hasnopayfordriver = await methods.checkNopayfordriver()
+      // data.hasnopayfordriver = await methods.checkNopayfordriver()
       methods.getTruckInfo()
+      methods.getInvite()
     }
 
     /** 页面初始化获取的内容 */
@@ -759,34 +772,29 @@ ay.entrance(
         // data.firstUnload = false
         return
       }
-      methods.initWS()
+      // methods.initWS()
       await refreshNeedIdentity()
       // 无未支付订单
-      if (!data.hasnopayfordriver) {
-        await methods.getQrcode()
-      }
+      // if (!data.hasnopayfordriver) {
+      //   await methods.getQrcode()
+      // }
       data.firstUnload = false
-      // 小程序环境:时机过早会inputDialog.value为null
-      // h5环境:当页面data内的值改变时,弹框会消失
-      // 所以先放这里吧
-      methods.getInvite()
     }
     if (args.loadType === enums.LoadType.onLoad) {
       firstLoad()
     }
-
+    if (args.loadType === enums.LoadType.onShow) {
+      refreshNeedIdentity()
+    }
     if (args.loadType === enums.LoadType.refresh) {
       methods.getListApp({ cras: args.cras })
       if (!args.cras.isAdd) {
         refreshNeedIdentity()
       }
     }
-    // if (args.loadType === enums.LoadType.onShow) {
-    //   init()
-    // }
   },
   {
-    // addLoadTypes: [enums.LoadType.onShow],
+    addLoadTypes: [enums.LoadType.onShow],
   },
 )
 
@@ -801,7 +809,7 @@ onPageScroll((res) => {
 }
 .top {
   padding-bottom: $p-spac;
-  border-bottom: 1px dashed;
+  // border-bottom: 1px dashed;
   .personal {
     width: 100rpx;
     height: 100rpx;

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

@@ -1,5 +1,9 @@
 <template>
-  <ay-container :pageTopStyle="{ background: '#fff' }" cusClass="flex flex-col">
+  <ay-container
+    :pageTopStyle="{ background: '#fff' }"
+    cusClass="flex flex-col"
+    :titleAlginCenter="true"
+  >
     <!-- <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">
@@ -110,7 +114,8 @@ const methods = {
       })
       .then((res) => {
         store.user.initUserInfo(res)
-        ay.goHome()
+        ay.navigateBack()
+        // ay.goHome()
       })
   },
   agreement() {

+ 19 - 23
src/pages/order/components/payType.vue

@@ -1,14 +1,14 @@
 <template>
-  <div class="flex chunk s-fz" v-if="props.payselData" :class="{ checked: props.checked }">
-    <span
+  <div class="flex s-fz" v-if="props.payselData" :class="{ checked: props.checked }">
+    <!-- <span
       class="mr-spacd2 radio"
       :class="{ checked: props.checked }"
       @click="methods.choose()"
-    ></span>
+    ></span> -->
     <div class="flex-1">
-      <div class="font-bold inline" @click="methods.choose()">
+      <!-- <div class="font-bold inline" @click="methods.choose()">
         {{ props.type === 0 ? '个人支付' : '所属物流支付' }}
-      </div>
+      </div> -->
       <div class="childs-fc-mbd2 ml-spacd2 mt-spacd2">
         <div>
           结算金额
@@ -20,7 +20,8 @@
           :allAmount="props.payselData.allAmount"
           :carrierRebate="props.payselData.carrierRebate"
           :rebateDetail="props.payselData.rebateDetail"
-          @switchRebate="methods.switchRebate"
+          :enjoyRebate="props.enjoyRebate"
+          @update:enjoyRebate="emits('update:enjoyRebate', $event)"
         />
         <template v-if="props.type === 1">
           <div class="mt-spacd2 pt-spacd2 top-line">{{ props.payselData.carrierOrgName }}</div>
@@ -51,31 +52,26 @@ const props = withDefaults(
     type: 0 | 1
     payselData: 待支付订单_可选支付方式物流支付实体类 & 待支付订单_可选支付方式个人支付实体类
     checked: boolean
+    enjoyRebate?: boolean
   }>(),
   {
     checked: false,
+    enjoyRebate: true,
   },
 )
-const emits = defineEmits(['reData', 'choose', 'switchRebate'])
-const data = reactive({
-  showRebateDetail: false,
-  /** 享受优惠 */
-  enjoyRebate: true,
-})
+const emits = defineEmits(['reData', 'choose', 'switchRebate', 'update:enjoyRebate'])
+// const attrs = useAttrs()
+const data = reactive({})
 const amount = computed(() =>
-  data.enjoyRebate ? props.payselData?.amount : props.payselData?.allAmount,
+  props.enjoyRebate ? props.payselData?.amount : props.payselData?.allAmount,
 )
 const actualPrice = computed(() =>
-  data.enjoyRebate ? props.payselData.actualPrice : props.payselData.platformPrice,
+  props.enjoyRebate ? props.payselData.actualPrice : props.payselData.platformPrice,
 )
-const methods = {
-  choose() {
-    emits('choose', props.type)
-  },
-  switchRebate(checked) {
-    data.enjoyRebate = checked
-    emits('switchRebate', checked)
-  },
-}
+// const methods = {
+//   choose() {
+//     emits('choose', props.type)
+//   },
+// }
 </script>
 <style lang="scss" scoped></style>

+ 9 - 7
src/pages/order/components/rebateDetail.vue

@@ -2,7 +2,7 @@
   <div class="inline-block" v-if="props.carrierRebate">
     <div :class="{ 'text-right': props.type === 1 }">
       <switch
-        checked
+        :checked="props.enjoyRebate"
         class="nm-spac switch"
         color="#0084f4"
         @change="methods.switchChange"
@@ -11,7 +11,7 @@
       <div
         class="inline"
         @click="data.showRebateDetail = !data.showRebateDetail"
-        v-if="data.switchChecked"
+        v-if="props.enjoyRebate"
       >
         优惠金额
         <span class="price-color font-bold">{{ props.carrierRebate }}</span>
@@ -49,27 +49,29 @@ const props = withDefaults(
   defineProps<{
     /** 0:待支付页面 1:订单详情页面 */
     type: 0 | 1
+    /** 总优惠额 */
     carrierRebate: number
     allAmount: number
     rebateDetail: 待支付订单_可选支付方式优惠明细实体类[]
     /** 展示切换享受优惠 */
     showSwitchRebate: boolean
+    /** 享受优惠 */
+    enjoyRebate?: boolean
   }>(),
   {
     type: 0,
     showSwitchRebate: false,
+    enjoyRebate: true,
   },
 )
-const emits = defineEmits(['switchRebate'])
+const emits = defineEmits(['update:enjoyRebate'])
 const data = reactive({
   showRebateDetail: false,
-  switchChecked: true,
 })
-const showRebateDetail = computed(() => data.switchChecked && data.showRebateDetail)
+const showRebateDetail = computed(() => props.enjoyRebate && data.showRebateDetail)
 const methods = {
   switchChange(e) {
-    data.switchChecked = e.detail.value
-    emits('switchRebate', data.switchChecked)
+    emits('update:enjoyRebate', e.detail.value)
   },
 }
 </script>

+ 304 - 39
src/pages/order/createOrder.vue

@@ -1,8 +1,12 @@
 <template>
-  <ay-container>
+  <ay-container :hideIcon="data.hideIcon">
     <ayb-station type="2" :stationInfo="data.stationInfo" />
-    <div class="section">本次加气驾驶员</div>
-    <div class="chunk">
+    <div class="section">加气员</div>
+    <div class="s-fz font-bold">
+      {{ data.stationInfo.cashierName }} [ 工号:{{ data.stationInfo.no }} ] 为您服务
+    </div>
+
+    <div class="chunk" v-if="false">
       <div class="center justify-start">
         <image class="personal" :src="store.user.userInfo.head_url" mode="scaleToFill" />
         <div>
@@ -12,82 +16,332 @@
       </div>
     </div>
     <div class="station">
-      <div class="section">本次加气量(公斤)</div>
+      <div class="section">加气量(公斤)</div>
       <uni-easyinput
+        v-if="store.user.isLogined"
         v-model="data.gasQty"
         type="digit"
-        placeholder="请输入"
+        :clearable="false"
+        placeholder="请填写"
         focus
         @input="methods.input"
-        @confirm="methods.confirm"
+        @blur="methods.paysel"
+        @confirm="methods.paysel"
       />
+      <!-- @clear="methods.clear" -->
+      <div v-else class="no-login-input" @click="ay.goLogin()">请填写</div>
+      <div class="mt-spac">
+        <ay-skeletons
+          :rowList="data.rowList"
+          :loading="data.fpayType === -1 && store.webapi.strategy.paysel.ing"
+        >
+          <ay-tabs :tabs="tabs" v-model="data.fpayType" v-show="data.fpayType !== -1">
+            <template v-slot:tab0>
+              <pay-type :type="0" :paysel-data="personPay" v-model:enjoyRebate="data.enjoyRebate" />
+            </template>
+            <template v-slot:tab1>
+              <pay-type :type="1" :paysel-data="carrierPay" @re-data="methods.paysel" />
+            </template>
+          </ay-tabs>
+        </ay-skeletons>
+      </div>
     </div>
     <div class="btns">
-      <button
-        type="primary"
-        @click="methods.confirm"
-        :loading="store.webapi.pay.add_v2.ing"
-        :disabled="store.webapi.pay.add_v2.ios"
-      >
-        确定
+      <button type="primary" @click="methods.confirm" :loading="createing" :disabled="noCanPay">
+        {{ curPay?.buttonMsg }}
       </button>
     </div>
   </ay-container>
 </template>
 
 <script lang="ts" setup>
+import payType from './components/payType.vue'
+
 const data = ay.initData({
-  stationInfo: {},
+  input: '',
+  rowList: [
+    {
+      align: 'left',
+      colItems: [
+        {
+          style: {
+            width: '30%',
+          },
+        },
+      ],
+    },
+    ...Array(3).fill({
+      align: 'left',
+      colItems: 1,
+    }),
+  ],
+  hideIcon: false,
+  currentTab: 0,
+  stationInfo: {} as GasstationCashierVO对象,
   gasQty: '',
+  // 扫小程序码进来时,scene参数的值
+  wxCodeScene: '',
+  paysel: {} as 待支付订单_可选支付方式获取实体类,
+  /** 页面选择支付类型:-1:未呈现 0:个人:1:物流 */
+  fpayType: -1,
+  /** 享受优惠 */
+  enjoyRebate: true,
+  /** 原生支付状态 */
+  nativePayState: enums.ReqState.unasked,
+  /** 加气量已清除 */
+  cleared: false,
 })
-const gasQty = computed(() => Number(data.gasQty))
+const cashierId = computed(
+  () => data.wxCodeScene || pageConfig.value.params?.scene || pageConfig.value.params?.cashierId,
+)
+const gasQtyNum = computed(() => Number(data.gasQty))
 const user = computed(() => store.user.userInfo)
 const pageConfig = computed(() => store.curPage.pageConfig)
+const personPay = computed(() => data.paysel?.personPay)
+const carrierPay = computed(() => data.paysel?.carrierPay)
+/** 当前支付方式 */
+const curPay = computed<
+  待支付订单_可选支付方式物流支付实体类 & 待支付订单_可选支付方式个人支付实体类
+>(() => {
+  let rv: 待支付订单_可选支付方式物流支付实体类 & 待支付订单_可选支付方式个人支付实体类 = {
+    buttonMsg: '请填写本次加气量',
+    buttonEnable: false,
+  }
+  if (data.fpayType === 0) {
+    rv = {
+      ...data.paysel?.personPay,
+      amount: data.paysel.personPay.amount,
+    }
+    if (!data.enjoyRebate) {
+      rv.buttonMsg = rv.buttonMsgNoRebate
+      rv.amount = rv.allAmount
+    }
+  }
+  if (data.fpayType === 1) {
+    rv = data.paysel?.carrierPay
+  }
+  return rv
+})
+/** 订单创建中 */
+const createing = computed(
+  () =>
+    // 创建加气订单中
+    store.webapi.pay.add_v2.ing ||
+    // 订单支付接口请求中
+    store.webapi.pay.order_pay.ing,
+)
+const noCanPay = computed(
+  () =>
+    // 按钮不可点击
+    !curPay.value?.buttonEnable ||
+    // 获取待支付订单的可选支付方式中
+    store.webapi.strategy.paysel.ing ||
+    createing.value ||
+    // 订单支付接口请求成功 && 原生未支付失败
+    (store.webapi.pay.order_pay.success && data.nativePayState !== enums.ReqState.fail),
+)
+const tabs = computed(() => {
+  const tabs = []
+  if (carrierPay.value) {
+    tabs.push({ title: '所属物流支付', value: 1 })
+  }
+  if (personPay.value) {
+    tabs.push({ title: '个人支付', value: 0 })
+  }
+  return tabs
+})
+
 const methods = {
+  async checkNopayfordriver() {
+    const nopayfordriver = await webapi.pay.find_unpayfordriver()
+    if (nopayfordriver) {
+      ay.goPage(config.pages.order_orderDetail, {
+        params: { orderId: nopayfordriver.orderId },
+        goPageType: enums.GoPageType.redirectTo,
+      })
+      return true
+    }
+    return false
+  },
+
+  /** 个人支付-有无优惠切换 */
+  switchRebate(checked) {
+    data.enjoyRebate = checked
+  },
+  checkLogin() {
+    console.log('checkLogin')
+    if (store.user.isLogined) return
+    ay.goLogin()
+  },
   input() {
     nextTick(() => {
       data.gasQty = data.gasQty.replace(/^\D*(\d*\.{0,1}\d{0,2}).*/, '$1')
     })
   },
-  confirm() {
-    if (gasQty.value <= 0) {
+  async clear() {
+    data.fpayType = -1
+    data.cleared = true
+    await func.awaiter(100)
+    data.cleared = false
+  },
+  async paysel() {
+    // if (data.cleared) {
+    //   return
+    // }
+    if (gasQtyNum.value <= 0) {
+      data.fpayType = -1
+      data.enjoyRebate = true
       func.native.showToast('加气量需大于零')
       return false
     }
-    if (gasQty.value > store.common.data.preferWeight) {
-      func.native.showToast('加气量不能超过' + store.common.data.preferWeight)
-      return
-    }
-
-    webapi.pay
-      .add_v2({
-        cashierId: pageConfig.value.params.cashierId,
+    webapi.strategy
+      .paysel({
+        cashierId: cashierId.value,
         driverId: user.value.user_id,
-        gasQty: gasQty.value,
-        gasstationId: pageConfig.value.params.gasstationId,
-        createRole: 'driver', // 1 平台管理员 2 平台运营人员 filler 加气站企业管理者 cashier 收银员 carrier 物流公司管理者 driver 司机
+        gasQty: gasQtyNum.value,
         creater: user.value.user_id,
         createrName: user.value.user_name,
       })
       .then((res) => {
-        ay.goPage(config.pages.order_prePay, {
+        data.paysel = res
+        if (data.fpayType === -1) {
+          if (carrierPay.value) {
+            data.fpayType = 1
+          } else if (personPay.value) {
+            data.fpayType = 0
+          }
+        }
+      })
+  },
+  async confirm() {
+    if (store.webapi.strategy.paysel.ing) return
+    if (gasQtyNum.value <= 0) {
+      func.native.showToast('加气量需大于零')
+      return false
+    }
+    if (gasQtyNum.value > store.common.data.preferWeight) {
+      func.native.showToast('加气量不能超过' + store.common.data.preferWeight)
+    }
+    // 物流支付-仅创建订单
+    if (data.fpayType === 1 && carrierPay.value?.createOnly) {
+      methods.createOnly()
+    } else {
+      methods.pay()
+    }
+  },
+  createOnly() {
+    // {
+    //     cashierId: pageConfig.value.params.cashierId,
+    //     driverId: user.value.user_id,
+    //     gasQty: gasQtyNum.value,
+    //     gasstationId: pageConfig.value.params.gasstationId,
+    //     createRole: 'driver', // 1 平台管理员 2 平台运营人员 filler 加气站企业管理者 cashier 加气员 carrier 物流公司管理者 driver 司机
+    //     creater: user.value.user_id,
+    //     createrName: user.value.user_name,
+    //   }
+    webapi.pay.add_v2(data.paysel.gasOrder).then((res) => {
+      ay.goPage(config.pages.order_orderDetail, {
+        params: data.paysel.gasOrder,
+        goPageType: enums.GoPageType.redirectTo,
+      })
+    })
+  },
+  async pay() {
+    const params: OrderPayParam = {
+      // orderId: data.paysel.gasOrder.orderId,
+      payType: curPay.value.payType,
+      gasOrder: data.paysel.gasOrder,
+    }
+    // 需要微信支付
+    if ([1, 2, 3].includes(curPay.value.payType)) {
+      const li = await uni.login()
+      params.jsCode = li.code
+      params.wxAmount = curPay.value.amount
+    }
+    // 个人支付
+    if (data.fpayType === 0) {
+      params.personRebate = data.enjoyRebate ? 0 : 1
+    }
+    // 物流支付
+    if (data.fpayType === 1) {
+      params.carNumber = carrierPay.value.carNumber
+      params.carrierOrgId = carrierPay.value.carrierOrgId
+      params.carrierOrgName = carrierPay.value.carrierOrgName
+      params.linked = carrierPay.value.linked
+      params.tradeType = carrierPay.value.tradeType
+      params.truckId = carrierPay.value.truckId
+    }
+    webapi.pay.order_pay(params).then((res) => {
+      if ([1, 2, 3].includes(curPay.value.payType)) {
+        data.nativePayState = enums.ReqState.ing
+        uni.requestPayment({
+          ...JSON.parse(res.payInfo),
+          success() {
+            data.nativePayState = enums.ReqState.success
+            methods.paySuccess()
+          },
+          fail() {
+            data.nativePayState = enums.ReqState.fail
+            func.native.showToast({
+              icon: 'error',
+              title: '支付失败',
+            })
+            // 物流支付失败跳订单详情
+            if (data.fpayType === 1) {
+              ay.goPage(config.pages.order_orderDetail, {
+                params: data.paysel.gasOrder,
+                goPageType: enums.GoPageType.redirectTo,
+              })
+            }
+          },
+        })
+      } else {
+        methods.paySuccess()
+      }
+    })
+  },
+  paySuccess() {
+    func.native
+      .showToast({
+        icon: 'success',
+        title: '支付成功',
+      })
+      .then(() => {
+        ay.goPage(config.pages.order_orderDetail, {
+          params: data.paysel.gasOrder,
           goPageType: enums.GoPageType.redirectTo,
-          params: { orderId: res.orderId },
         })
       })
   },
 }
-
-ay.entrance(async (args) => {
-  const location = await func.native.getLocation()
-  data.stationInfo = await webapi.strategy.find_for_mini({
-    gasstationId: pageConfig.value.params.gasstationId,
-    longitude: location.longitude.toString(),
-    latitude: location.latitude.toString(),
-  })
-})
+ay.entrance(
+  async (args) => {
+    if (store.user.isLogined) {
+      const hasnp = await methods.checkNopayfordriver()
+      if (hasnp) return
+    }
+    data.wxCodeScene = args?.query?.scene
+    // 微信扫小程序码进来时,scene参数有值
+    if (data.wxCodeScene) {
+      // 未登录隐藏返回首页按钮
+      data.hideIcon = !store.user.isLogined
+    }
+    // console.log('params', pageConfig.value.params)
+    const location = await func.native.getLocation()
+    data.stationInfo = await webapi.strategy.find_by_cashier({
+      cashierId: cashierId.value, // '710613333157822464', // '600021999820734464',
+      longitude: location.longitude.toString(),
+      latitude: location.latitude.toString(),
+    })
+  },
+  {
+    addLoadTypes: [enums.LoadType.onShow],
+  },
+)
 onUnload(() => {
+  store.webapi.strategy.paysel.set()
   store.webapi.pay.add_v2.set()
+  store.webapi.pay.order_pay.set()
 })
 </script>
 
@@ -98,4 +352,15 @@ onUnload(() => {
   margin-right: $p-spac;
   border-radius: $p-spac;
 }
+::v-deep .is-input-border {
+  border: none;
+  border-bottom: 2rpx solid $p-color !important;
+  border-radius: 0;
+}
+.no-login-input {
+  padding: 20rpx;
+  font-size: 28rpx;
+  color: $gray-color;
+  border-bottom: 2rpx solid $p-color;
+}
 </style>

+ 130 - 25
src/pages/order/orderDetail.vue

@@ -1,5 +1,5 @@
 <template>
-  <ay-container :title="data.title" :showBackIcon="true">
+  <ay-container :title="data.title">
     <ay-skeletons :rowList="data.rowList" :loading="store.webapi.strategy.get_order_detail.ing">
       <div class="chunk2 p-color font-bold">
         <div>
@@ -18,13 +18,16 @@
       <div class="chunk2">
         <div>
           <div>
-            加气量
-            <ay-numer :value="data.orderDetail.gasQty" unit="公斤" :isSimple="true" />
+            <ay-numer pre="加气量" :value="data.orderDetail.gasQty" unit="公斤" :isSimple="true" />
           </div>
           <div>
             <div>
-              结算金额
-              <ay-numer :value="data.orderDetail.amount" pre="" unit="元" :isSimple="true" />
+              <ay-numer
+                pre="结算金额"
+                :value="data.orderDetail.amount"
+                unit="元"
+                :isSimple="true"
+              />
             </div>
           </div>
         </div>
@@ -39,9 +42,32 @@
         </div>
       </div>
       <div>
-        <ay-fieldGroups :fieldGroups="curFieldGroups" :targetData="data.orderDetail" />
+        <ay-fieldGroups :fieldGroups="curFieldGroups" :targetData="data.orderDetail">
+          <template v-slot:balance>
+            <span>可用余额</span>
+            <div class="center">
+              {{ data.orderDetail.carrierPay?.balance }}
+              <span class="ml-spacd4">元</span>
+              <ay-refresh
+                v-if="data.orderDetail.carrierPay?.linked === 0"
+                :loading="store.webapi.strategy.balance_refresh.ing"
+                @refresh="methods.balanceRefresh"
+              ></ay-refresh>
+            </div>
+          </template>
+        </ay-fieldGroups>
         <ayb-phone desc="对此单有疑问?请联系"></ayb-phone>
       </div>
+      <div class="btns">
+        <button
+          type="primary"
+          @click="methods.pay"
+          :loading="store.webapi.pay.wait_order_pay.ing"
+          :disabled="noCanPay"
+        >
+          {{ carrierPay?.buttonMsg }}
+        </button>
+      </div>
     </ay-skeletons>
   </ay-container>
 </template>
@@ -252,6 +278,15 @@ const data = ay.initData({
           key: 'carNumber',
         },
         {
+          // title: '可用余额',
+          // unit: '元',
+          show(data) {
+            //  待支付
+            return data.settleStatus === 1
+          },
+          slot: 'balance',
+        },
+        {
           title: '驾驶员',
           view(data) {
             let rv = data.driverName
@@ -278,7 +313,7 @@ const data = ay.initData({
         //   },
         // },
         // {
-        //   title: '收银员',
+        //   title: '加气员',
         //   key: 'cashierName',
         // },
         {
@@ -348,30 +383,100 @@ const data = ay.initData({
       ],
     },
   ] as IFieldGroup<订单详情>[],
+  // carrierPay: {} as 待支付订单_可选支付方式物流支付实体类,
+  /** 原生支付状态 */
+  nativePayState: enums.ReqState.unasked,
 })
+const carrierPay = computed(() => data.orderDetail.carrierPay)
+const noCanPay = computed(
+  () =>
+    // 按钮不可点击
+    !carrierPay.value?.buttonEnable ||
+    // 待支付订单余额刷新中
+    store.webapi.strategy.balance_refresh.ing ||
+    // 订单支付接口请求中
+    store.webapi.pay.order_pay.ing ||
+    // 订单支付接口请求成功 && 原生未支付失败
+    (store.webapi.pay.order_pay.success && data.nativePayState !== enums.ReqState.fail),
+)
+
 const curFieldGroups = computed(() =>
   data.fieldGroups.filter((f) => !f.roles || f?.roles?.includes('driver')),
 )
-const methods = {}
-ay.entrance((args) => {
-  webapi.strategy
-    .get_order_detail({
-      orderId: store.curPage.pageConfig.params.orderId,
-      orderType: 1,
-      // orderId: '-100636820576534528',
-    })
-    .then((res) => {
-      // data.title = '加气订单 · ' + func.convert.getOrderStatusStr(res.settleStatus)
-      const title = '加气订单'
-      const settleStatusStr = func.convert.getOrderStatusStr(res.settleStatus)
-      if (func.convert.unNull(settleStatusStr)) {
-        data.title = title + ' · ' + settleStatusStr
-      }
-      // store.curPage.pageConfig.title = '加气订单 · ' + config.common.settleStatus[res.settleStatus]
-      // uni.setNavigationBarTitle({ title: store.curPage.pageConfig.title })
+const methods = {
+  balanceRefresh() {
+    webapi.strategy
+      .balance_refresh({
+        orderId: data.orderDetail.orderId,
+      })
+      .then((res) => {
+        data.orderDetail.carrierPay = res
+      })
+  },
+  async pay() {
+    const params: OrderPayParam = {
+      orderId: data.orderDetail.orderId,
+      payType: carrierPay.value.payType,
+    }
+    // 需要微信支付
+    if ([1, 2, 3].includes(carrierPay.value.payType)) {
+      const li = await uni.login()
+      params.jsCode = li.code
+      params.wxAmount = carrierPay.value.amount
+    }
+    params.carNumber = carrierPay.value.carNumber
+    params.carrierOrgId = carrierPay.value.carrierOrgId
+    params.carrierOrgName = carrierPay.value.carrierOrgName
+    params.linked = carrierPay.value.linked
+    params.tradeType = carrierPay.value.tradeType
+    params.truckId = carrierPay.value.truckId
 
-      data.orderDetail = res
+    webapi.pay.wait_order_pay(params).then((res) => {
+      if ([1, 2, 3].includes(carrierPay.value.payType)) {
+        data.nativePayState = enums.ReqState.ing
+        uni.requestPayment({
+          ...JSON.parse(res.payInfo),
+          success() {
+            data.nativePayState = enums.ReqState.success
+            methods.getOrderDetail()
+          },
+          fail() {
+            data.nativePayState = enums.ReqState.fail
+            func.native.showToast({
+              icon: 'error',
+              title: '支付失败',
+            })
+          },
+        })
+      } else {
+        methods.getOrderDetail()
+      }
     })
+  },
+
+  getOrderDetail() {
+    webapi.strategy
+      .get_order_detail({
+        // orderId: store.curPage.pageConfig.params.orderId,
+        orderType: 1,
+        orderId: '100708065502429184',
+      })
+      .then((res) => {
+        // data.title = '加气订单 · ' + func.convert.getOrderStatusStr(res.settleStatus)
+        const title = '加气订单'
+        const settleStatusStr = func.convert.getOrderStatusStr(res.settleStatus)
+        if (func.convert.unNull(settleStatusStr)) {
+          data.title = title + ' · ' + settleStatusStr
+        }
+        // store.curPage.pageConfig.title = '加气订单 · ' + config.common.settleStatus[res.settleStatus]
+        // uni.setNavigationBarTitle({ title: store.curPage.pageConfig.title })
+
+        data.orderDetail = res
+      })
+  },
+}
+ay.entrance((args) => {
+  methods.getOrderDetail()
 })
 </script>
 

+ 1 - 1
src/pages/station/detail.vue

@@ -61,7 +61,7 @@
           <div>{{ func.convert.nullView(data.detail.fillingMachineNum) }}</div>
         </div>
         <div>
-          <span>收银员数量</span>
+          <span>加气员数量</span>
           <div>{{ func.convert.nullView(data.detail.cashierNum) }}</div>
         </div>
       </div>

+ 1 - 1
src/pages/webview/login.vue

@@ -5,7 +5,7 @@
 <script lang="ts" setup>
 const data = ay.initData({
   // url: `http://localhost:8118/#/login?reLaunchPage=${config.pages.index_index._url}`,
-  url: ay.getResourceUrl(`#/login?reLaunchPage=${config.pages.index_index._url}`),
+  url: ay.getResourceUrl(`#/login`), // ?reLaunchPage=${config.pages.index_index._url}`),
 })
 ay.entrance(() => {
   // #ifdef MP

+ 2 - 1
src/types/components.ts

@@ -54,7 +54,8 @@ interface AyContainerEntryArgs {
   /**
    * 页面参数
    */
-  options?: Parameters<Parameters<typeof onShow>[0]>[0]
+  query?: AnyObject
+  // options?: Parameters<Parameters<typeof onShow>[0]>[0]
   /**
    * 分页组件加载数据事件参数
    */

+ 2 - 0
src/types/global.d.ts

@@ -38,6 +38,8 @@ type IFieldGroup<T> = {
     show: (args: T) => boolean
     /** 呈现内容 */
     view: (args: T & string) => string
+    /** 插槽名称 */
+    slot?: string
   }[]
 }
 

+ 42 - 0
src/types/schemas/allinpay.d.ts

@@ -63,6 +63,44 @@ interface DateParam {
   /** undefined */
   updateDateTo?: string
 }
+interface GasOrderRebate对象 {
+  /** 受益方id */
+  benefited?: number
+  /** 让利方名 */
+  benefitedName?: string
+  /** 让利方类型:1贸易商(长城)2 站,3 平台 */
+  benefitedType?: number
+  /** 操作时间 */
+  createDate?: string
+  /** 满减值(公斤) */
+  fullQty?: number
+  /** 加气站id */
+  gasstationId?: string
+  /** 加气站名称 */
+  gasstationName?: string
+  /** id主键 */
+  id?: number
+  /** 让利方id */
+  interest?: number
+  /** 让利方名 */
+  interestName?: string
+  /** 让利方类型:1贸易商(长城)2 站,3 平台 */
+  interestType?: number
+  /** 优先级,默认0,值越大优先级越高 */
+  level?: number
+  /** 可叠加状态 */
+  multiple?: string
+  /** 加气站简称 */
+  nickName?: string
+  /** 订单编号(调用API生成) */
+  orderId?: string
+  /** 物流公司专项优惠,按公斤配置(元/公斤),3位小数 */
+  rebate?: number
+  /** 车辆经营类型:0=自营车辆 1=其他[挂靠车辆] 2=全部 */
+  truckType?: number
+  /** 优惠类型:1-物流专享优惠 2-满减优惠 */
+  type?: number
+}
 interface GasOrderVo {
   /** undefined */
   actualPrice?: number
@@ -218,6 +256,8 @@ interface GasOrder对象 {
   payType?: number
   /** 平台挂牌价 */
   platformPrice?: number
+  /** 优惠明细 */
+  rebateDetail?: GasOrderRebate对象[]
   /** 优惠叠加 */
   rebateconfig?: string
   /** 满减阈值(公斤) */
@@ -735,6 +775,8 @@ interface WxpayParam {
   /** undefined */
   code?: string
   /** undefined */
+  gasOrder?: GasOrder对象
+  /** undefined */
   gasOrderId?: number
   /** undefined */
   gasstationId?: number

+ 6 - 0
src/types/schemas/pay.d.ts

@@ -389,6 +389,8 @@ interface OrderPayParam {
   carrierOrgId?: number
   /** 所属物流公司名称 */
   carrierOrgName?: string
+  /** 订单信息 */
+  gasOrder?: GasOrder对象
   /** 小程序授权码 */
   jsCode?: string
   /** 所属物流车辆类型:0=自营车辆 1=挂靠车辆 */
@@ -958,6 +960,8 @@ interface WxpayParam {
   /** undefined */
   code?: string
   /** undefined */
+  gasOrder?: GasOrder对象
+  /** undefined */
   gasOrderId?: number
   /** undefined */
   jsCode?: string
@@ -1165,6 +1169,8 @@ interface 订单查询参数实体类 {
   carrierOrgId?: number
   /** 物流公司 */
   carrierOrgName?: string
+  /** 收银员id */
+  cashierId?: number
   /** 收银员姓名 */
   cashierName?: string
   /** 司机id(user.user.user_id) */

+ 201 - 5
src/types/schemas/strategy.d.ts

@@ -1211,6 +1211,76 @@ interface GasstationCarrierParam对象 {
   /** 司机id */
   truckId?: string
 }
+interface GasstationCashierParam对象 {
+  /** 司机id */
+  cashierId?: string
+  /** 司机id */
+  driverId?: string
+  /** 司机当前纬度 */
+  latitude?: string
+  /** 司机当前经度 */
+  longitude?: string
+}
+interface GasstationCashierVO对象 {
+  /** 实际结算价 */
+  actualPrice?: number
+  /** 地址 */
+  address?: string
+  /** 加气员名称 */
+  cashierName?: string
+  /** 收银员数量 */
+  cashierNum?: number
+  /** 城市 */
+  city?: string
+  /** 两个经纬度之间的直线距离(公里) */
+  distance?: number
+  /** 对接状态码 DJ100,DJ000 */
+  djCode?: string
+  /** 加注机数量 */
+  fillingMachineNum?: number
+  /** 加气限制状态(0关闭1开启)默认值关闭0 */
+  gasLimitStatus?: number
+  /** 加气限制库存量 */
+  gasLimitStock?: number
+  /** 加气站id(调用API生成) */
+  gasstationId?: string
+  /** 企业名称 */
+  gasstationName?: string
+  /** 加气员头像 */
+  headUrl?: string
+  /** 加气站宣传文案 */
+  introduce?: string
+  /** 纬度 */
+  latitude?: string
+  /** 今日挂牌价-加气站输入的价格 */
+  listPrice?: number
+  /** 经度 */
+  longitude?: string
+  /** 加气员手机号 */
+  mobile?: string
+  /** 加气站名称 */
+  nickName?: string
+  /** 加气员工号 */
+  no?: string
+  /** 加气站形象图列表 */
+  orgPics?: array
+  /** 平台挂牌价 */
+  platformPrice?: number
+  /** 省份 */
+  province?: string
+  /** 加气员二维码 */
+  qrcode?: string
+  /** 地区 */
+  region?: string
+  /** 库存量 */
+  stock?: number
+  /** 优惠标签 */
+  tags?: array
+  /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
+  tradeType?: string
+  /** 头像 */
+  url?: string
+}
 interface GasstationDateParam {
   /** 时间区间 */
   dateParam?: DateParam
@@ -3154,6 +3224,52 @@ interface PurchaseLimitConfig对象 {
   /** 限量存销比(存量/周日均销量) */
   rate?: number
 }
+interface PurchaseListVO {
+  /** 取消时间 */
+  cancelTime?: string
+  /** 车牌号 */
+  carNumber?: string
+  /** 完成时间 */
+  completeTime?: string
+  /** 确认时间 */
+  confirmTime?: string
+  /** 创建时间,提报时间 */
+  createTime?: string
+  /** 异常提报时间 */
+  exceptionApplyTime?: string
+  /** 加气站id */
+  gasstationId?: string
+  /** 企业名称 */
+  gasstationName?: string
+  /** 主键id */
+  id?: string
+  /** 出港时间 */
+  leaveTime?: string
+  /** 锁定时间 */
+  lockTime?: string
+  /** 测试标识:0-未测试 2-已测试 */
+  mockFlag?: number
+  /** 关联计划编号 */
+  mockTrace?: string
+  /** 变更申请时间 */
+  modifyApplyTime?: string
+  /** 加气站名称 */
+  nickName?: string
+  /** 计划到站时间 */
+  planTime?: string
+  /** 配送建议 */
+  propose?: string
+  /** 签收时间 */
+  reachTime?: string
+  /** 0:已取消;1:已下单;2:已确认;3:已出港;4:已签收;5:已完成;6已锁定;7变更待处理;8异常待处理 */
+  status?: string
+  /** 测试标识:0-正常 1-测试 */
+  testFlag?: number
+  /** 挂车牌号 */
+  trailerNumber?: string
+  /** 出港磅单录入时间 */
+  uploadTime?: string
+}
 interface PurchaseModifyApplyParam {
   /** 申请原因 */
   applyNote?: string
@@ -3207,6 +3323,10 @@ interface PurchasePageParam {
   leaveTimeFrom?: string
   /** 出港到站结束时间 */
   leaveTimeTo?: string
+  /** 测试标识:0-未测试 2-已测试 */
+  mockFlag?: number
+  /** 关联计划编号 */
+  mockTrace?: string
   /** 加气站名称 */
   nickName?: string
   /** 时间查询类型,2提报时间,3锁定时间、4、变更提报时间、5确认时间、、7、出港磅单录入时间、8签收时间、9完成时间、10、取消时间、11异常订单提交时间 */
@@ -3217,6 +3337,8 @@ interface PurchasePageParam {
   planTimeTo?: string
   /** 计划状态 */
   status?: number
+  /** 是否为测试计划:0-正常 1-测试 */
+  testFlag?: number
 }
 interface PurchaseProposeDetail对象 {
   /** 加气站id */
@@ -3327,11 +3449,11 @@ interface Purchase对象 {
   lngFromName?: string
   /** 订单生成时间 */
   mockDate?: string
-  /** 测试标识:0-非模拟 1-模拟测试 导出 2-模拟测试 导入 */
+  /** 测试标识:0-未测试 1-模拟测试 2-已测试 */
   mockFlag?: number
   /** 订单生成散列小时时间 */
   mockHour?: number
-  /** 模拟计划计划id集合 */
+  /** 关联计划编号 */
   mockTrace?: string
   /** 变更申请标识,1修改申请,2取消申请;3异常申请 */
   modifyApplyType?: number
@@ -3347,6 +3469,8 @@ interface Purchase对象 {
   reachTime?: string
   /** 0:已取消;1:已下单;2:已确认;3:已出港;4:已签收;5:已完成;6已锁定;7变更待处理;8异常待处理 */
   status?: number
+  /** 是否为测试计划:0-正常 1-测试 */
+  testFlag?: number
   /** 挂车牌号 */
   trailerNumber?: string
   /** 出港磅单地址 */
@@ -3417,7 +3541,7 @@ interface Purchase测试LNG计划详情 {
   lngFromName?: string
   /** 订单生成时间 */
   mockDate?: string
-  /** 测试标识:0-非模拟 1-模拟测试 导出 2-模拟测试 导入 */
+  /** 测试标识:0-未测试 1-模拟测试 2-已测试 */
   mockFlag?: number
   /** 正常计划站企业名称 */
   mockGasstationName?: string
@@ -3427,7 +3551,7 @@ interface Purchase测试LNG计划详情 {
   mockNickName?: string
   /** 正常计划编号 */
   mockPurchaseId?: string
-  /** 模拟计划计划id集合 */
+  /** 关联计划编号 */
   mockTrace?: string
   /** 变更申请标识,1修改申请,2取消申请;3异常申请 */
   modifyApplyType?: number
@@ -3443,6 +3567,8 @@ interface Purchase测试LNG计划详情 {
   reachTime?: string
   /** 0:已取消;1:已下单;2:已确认;3:已出港;4:已签收;5:已完成;6已锁定;7变更待处理;8异常待处理 */
   status?: number
+  /** 是否为测试计划:0-正常 1-测试 */
+  testFlag?: number
   /** 挂车牌号 */
   trailerNumber?: string
   /** 出港磅单地址 */
@@ -4048,6 +4174,8 @@ interface User对象 {
   createrName?: string
   /** 绑定标识 0未绑定 1已绑定 */
   flag?: number
+  /** 头像 */
+  headUrl?: string
   /** 身份证编号 */
   idCardNo?: string
   /** 关键字 */
@@ -4056,6 +4184,8 @@ interface User对象 {
   lastLoginDate?: string
   /** 手机号 */
   mobile?: string
+  /** 工号 */
+  no?: string
   /** 微信绑定信息(openid) */
   openId?: string
   /** 组织id(user.org.org_id) */
@@ -4064,6 +4194,8 @@ interface User对象 {
   orgName?: string
   /** 密码 */
   password?: string
+  /** 二维码 */
+  qrcode?: string
   /** 状态(0:启用 1:停用) */
   status?: number
   /** 卡车id */
@@ -4361,6 +4493,42 @@ interface 分页查询参数 {
   /** 模糊查询关键词 */
   keyword?: string
 }
+interface 加气员业绩VO实体类 {
+  /** 时段数据 */
+  dateList?: 加气员业绩日期VO实体类[]
+  /** 加气总量 */
+  gasQtyTotal?: number
+}
+interface 加气员业绩加气量VO实体类 {
+  /** 加气员id */
+  cashierId?: number
+  /** 加气员名称 */
+  cashierName?: string
+  /** 当日加气量 */
+  dayQty?: number
+  /** 日期 */
+  daytime?: string
+  /** 加气员工号 */
+  no?: string
+  /** 加气量 */
+  totalQty?: number
+}
+interface 加气员业绩日期VO实体类 {
+  /** 加气员业绩数据 */
+  cashierList?: 加气员业绩加气量VO实体类[]
+  /** 日期 */
+  curDate?: string
+  /** 当日 */
+  curDateStr?: string
+  /** 累计 */
+  totalDateStr?: string
+}
+interface 加气员业绩移动端VO实体类 {
+  /** 加气员业绩数据 */
+  cashierList?: 加气员业绩加气量VO实体类[]
+  /** 加气总量 */
+  gasQtyTotal?: number
+}
 interface 加气站交班信息管理表实体类 {
   /** 创建时间 */
   createDate?: string
@@ -4818,6 +4986,8 @@ interface 待支付订单_可选支付方式物流支付实体类 {
   carrierOrgName?: string
   /** 总优惠额 */
   carrierRebate?: number
+  /** 自营车余额不足,仅创建订单 */
+  createOnly?: boolean
   /** 所属物流车辆类型:0=自营车辆 1=挂靠车辆 */
   linked?: number
   /** 支付方式(0:所属物流/大象余额 1:所属物流/微信 2:所属物流/大象余额+微信 3:个人支付/微信 11:组合支付 ) */
@@ -4842,6 +5012,8 @@ interface 待支付订单_可选支付方式站价格和优惠的快照信息 {
 interface 待支付订单_可选支付方式获取实体类 {
   /** 物流支付 */
   carrierPay?: 待支付订单_可选支付方式物流支付实体类
+  /** 订单信息 */
+  gasOrder?: GasOrder对象
   /** 个人支付 */
   personPay?: 待支付订单_可选支付方式个人支付实体类
   /** 站价格和优惠快照信息 */
@@ -4971,6 +5143,10 @@ interface 日统计返回实体类 {
   /** 销售均价 */
   saleValuePrice?: number
 }
+interface 智慧数据加气员业绩日期选项VO {
+  /** 日期选项列表 */
+  dateList?: 智慧数据经营趋势[]
+}
 interface 智慧数据动态库存 {
   /** 账存量 */
   acountQty?: number
@@ -5004,10 +5180,18 @@ interface 智慧数据单日经营趋势 {
   saleValuePrice?: number
 }
 interface 智慧数据经营趋势 {
+  /** 默认 0-未选中 1-选中 */
+  current?: number
   /** 经营趋势 */
   data?: 智慧数据单日经营趋势[]
-  /** 交班时间 */
+  /** 查询结束日期,格式:yyyy-MM-dd */
+  endDate?: string
+  /** 选项日期范围字符串 */
   handoverTime?: string
+  /** 选项名称 */
+  name?: string
+  /** 查询开始日期,格式:yyyy-MM-dd */
+  startDate?: string
 }
 interface 气价管理查询参数 {
   /** 物流公司id */
@@ -5612,6 +5796,8 @@ interface 订单查询参数实体类 {
   carrierOrgId?: number
   /** 物流公司 */
   carrierOrgName?: string
+  /** 收银员id */
+  cashierId?: number
   /** 收银员姓名 */
   cashierName?: string
   /** 司机id(user.user.user_id) */
@@ -5642,6 +5828,8 @@ interface 订单查询参数实体类 {
   startCreateDate?: string
   /** 支付时间查询开始时间,格式:yyyy-MM-dd HH:mm:ss */
   startUpdateDate?: string
+  /** 是否查询测试订单,null(不传参).全部,0 正常订单,1 测试订单 */
+  testOrder?: number
   /** 交易模式,null(不传参)全部  1大象经销 2大象直销 10.其他,多个状态查询,逗号间隔 */
   tradeType?: string
 }
@@ -5668,6 +5856,8 @@ interface 订单详情 {
   carrierOrgId?: string
   /** 物流公司名称(user.org.org_name) */
   carrierOrgName?: string
+  /** 物流支付 */
+  carrierPay?: 待支付订单_可选支付方式物流支付实体类
   /** 总优惠额(优惠金额) */
   carrierRebate?: number
   /** 总优惠金额(站、司机、收银员、物流显示的,处理了加价的) */
@@ -5712,6 +5902,8 @@ interface 订单详情 {
   gwayamount?: number
   /** 长城奥扬付大象平台服务价=大象加气平台服务价 */
   gwayprice?: number
+  /** lng计划编号 */
+  lngId?: string
   /** 经营模式(0-一体化 1-新营销) */
   marketType?: number
   /** 加气站简称 */
@@ -5768,6 +5960,8 @@ interface 订单详情 {
   stationDiffPrice?: number
   /** 站联系方式 */
   stationMobile?: string
+  /** 数据类型:0 正常订单(默认),1 测试订单 */
+  testOrder?: number
   /** 交易模式(1经销模式;2直销模式,默认经销模式1) */
   tradeType?: number
   /** 卡车id */
@@ -5780,6 +5974,8 @@ interface 订单详情查询参数 {
   orderId?: number
   /** 销售方式, 1.大象线上,2.加注机线下-优惠,3.加注机线下-标准,4.三方线上-团液,5.三方线上-万金油,6.试机,7.CNG,8.三方线上-车旺,9.三方线上-解放,10.三方线上-成丰 */
   orderType?: number
+  /** 数据类型:0正常(默认),1 测试 */
+  testOrder?: number
 }
 interface 设备监控数据实体类 {
   /** 泵气蚀 报警信息 有报警时使用 */

+ 12 - 0
src/types/schemas/user.d.ts

@@ -1279,6 +1279,14 @@ interface Resource {
   /** undefined */
   url?: URL
 }
+interface ResponseEntity {
+  /** undefined */
+  body?: AnyObject
+  /** undefined */
+  statusCode?: string
+  /** undefined */
+  statusCodeValue?: number
+}
 interface RoleApi对象 {
   /** apiid(api.api_id) */
   apiId?: string
@@ -1702,6 +1710,8 @@ interface User对象 {
   loginType?: number
   /** 手机号 */
   mobile?: string
+  /** 工号 */
+  no?: string
   /** 微信绑定信息(openid) */
   openId?: string
   /** 组织id(user.org.org_id) */
@@ -1712,6 +1722,8 @@ interface User对象 {
   orgShortName?: string
   /** 密码 */
   password?: string
+  /** 二维码 */
+  qrcode?: string
   /** 状态(0:启用 1:停用) */
   status?: number
   /** 修改日期时间 */

+ 1 - 0
src/utils/api/web/request/before.ts

@@ -55,6 +55,7 @@ export default {
       'Content-Type': 'application/json;charset=UTF-8',
       Authorization: store.user.Authorization,
       Identifier: store.user.userInfo.Identifier,
+      ver: config.common.vers.cur,
     }
 
     if (options.urlObj.isUpload) {

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

@@ -2,6 +2,12 @@ import pages from './pages'
 import subPages from './subPages'
 import webapi from './webapi'
 const common = {
+  vers: {
+    加气支付极速版: 'jqjs-20250401',
+    get cur() {
+      return this.加气支付极速版
+    },
+  },
   isH5: __UNI_PLATFORM__ === 'h5',
   isApp: __UNI_PLATFORM__ === 'app',
   isMp: __UNI_PLATFORM__.startsWith('mp-'),

+ 44 - 2
src/utils/config/interFaces/allinpay.ts

@@ -341,11 +341,11 @@ export default {
 
     resType: {} as ResponseEntity,
   },
-  /** 微信充值通联单边账处理 */
+  /**  B2B充值回调 */
   recharge: {
     realUrl: '/allinpay/pay/callback/recharge',
 
-    resType: {} as boolean,
+
   },
   /** 分账退款申请回调 */
   splitRefund_1: {
@@ -371,12 +371,24 @@ export default {
 
     resType: {} as ResponseEntity,
   },
+  /** 微信所属物流支付回调 */
+  wxpay_carrier_v2: {
+    realUrl: '/allinpay/pay/callback/wxpay_carrier_v2',
+
+    resType: {} as ResponseEntity,
+  },
   /** 微信个人支付回调 */
   wxpay_person: {
     realUrl: '/allinpay/pay/callback/wxpay_person',
 
     resType: {} as ResponseEntity,
   },
+  /** 微信个人支付回调 */
+  wxpay_person_v2: {
+    realUrl: '/allinpay/pay/callback/wxpay_person_v2',
+
+    resType: {} as ResponseEntity,
+  },
   /** 订单返现(strategy使用) */
   cashback: {
     realUrl: '/allinpay/pay/cashback',
@@ -437,12 +449,24 @@ export default {
     reqType: {} as WxpayParam,
     resType: {} as any,
   },
+  /** 所属物流挂靠车微信支付(小程序支付) */
+  minapay_carrier_v2: {
+    realUrl: '/allinpay/pay/minapay_carrier_v2',
+    reqType: {} as WxpayParam,
+    resType: {} as any,
+  },
   /** 驾驶员个人微信支付(小程序支付) */
   minapay_person: {
     realUrl: '/allinpay/pay/minapay_person',
     reqType: {} as WxpayParam,
     resType: {} as any,
   },
+  /** 驾驶员个人微信支付(小程序支付) */
+  minapay_person_v2: {
+    realUrl: '/allinpay/pay/minapay_person_v2',
+    reqType: {} as WxpayParam,
+    resType: {} as any,
+  },
   /** 查询账户收支明细 */
   query_bankIn_expDetail: {
     realUrl: '/allinpay/pay/query_bankIn_expDetail',
@@ -467,6 +491,12 @@ export default {
     reqType: {} as RelyConsumeParam,
     resType: {} as any,
   },
+  /** 挂靠车余额消费 */
+  rely_consume_v3: {
+    realUrl: '/allinpay/pay/rely_consume_v3',
+    reqType: {} as RelyConsumeParam,
+    resType: {} as any,
+  },
   /** 自营车消费 */
   self_consume: {
     realUrl: '/allinpay/pay/self_consume',
@@ -479,6 +509,12 @@ export default {
     reqType: {} as SelfConsumeParam,
     resType: {} as any,
   },
+  /** 自营车直销消费 */
+  self_consume_direct_v3: {
+    realUrl: '/allinpay/pay/self_consume_direct_v3',
+    reqType: {} as SelfConsumeParam,
+    resType: {} as any,
+  },
   /** 直销模式自营车消费 */
   self_consume_directsales: {
     realUrl: '/allinpay/pay/self_consume_directsales',
@@ -491,6 +527,12 @@ export default {
     reqType: {} as SelfConsumeParam,
     resType: {} as any,
   },
+  /** 自营车经销消费 */
+  self_consume_v3: {
+    realUrl: '/allinpay/pay/self_consume_v3',
+    reqType: {} as SelfConsumeParam,
+    resType: {} as any,
+  },
   /** 提现申请 */
   withdraw_apply: {
     realUrl: '/allinpay/pay/withdraw_apply',

+ 71 - 71
src/utils/config/interFaces/gasdata.ts

@@ -1,427 +1,427 @@
 export default {
   /** 添加LNG_Sales */
   add: {
-    realUrl: '/gasdata/LNG_Sales/add' as const,
+    realUrl: '/gasdata/LNG_Sales/add',
     reqType: {} as LngSales对象,
     resType: {} as any,
   },
   /** 获取LNG_Sales列表 */
   list: {
-    realUrl: '/gasdata/LNG_Sales/list' as const,
+    realUrl: '/gasdata/LNG_Sales/list',
     reqType: {} as IPageParams<LngSales对象>,
     resType: {} as any,
   },
   /** 修改LNG_Sales */
   update: {
-    realUrl: '/gasdata/LNG_Sales/update' as const,
+    realUrl: '/gasdata/LNG_Sales/update',
     reqType: {} as LngSales对象,
     resType: {} as any,
   },
   /** 添加gasstation_order */
   add_1: {
-    realUrl: '/gasdata/gasorder/add' as const,
+    realUrl: '/gasdata/gasorder/add',
     reqType: {} as GasstationOrder对象,
     resType: {} as any,
   },
   /** 获取gasstation_order列表 */
   list_1: {
-    realUrl: '/gasdata/gasorder/list' as const,
+    realUrl: '/gasdata/gasorder/list',
     reqType: {} as IPageParams<GasstationOrder对象>,
     resType: {} as any,
   },
   /** 加气站上传数据接口 */
   receive: {
-    realUrl: '/gasdata/gasorder/receive' as const,
+    realUrl: '/gasdata/gasorder/receive',
     reqType: {} as GasstationDataParam,
     resType: {} as any,
   },
   /** 修改gasstation_order */
   update_1: {
-    realUrl: '/gasdata/gasorder/update' as const,
+    realUrl: '/gasdata/gasorder/update',
     reqType: {} as GasstationOrder对象,
     resType: {} as any,
   },
   /** 添加gasstation */
   add_2: {
-    realUrl: '/gasdata/gasstation/add' as const,
+    realUrl: '/gasdata/gasstation/add',
     reqType: {} as Gasstation对象,
     resType: {} as any,
   },
   /** 智能分析,LNG价格对比和站点分布 */
   analyse1: {
-    realUrl: '/gasdata/gasstation/analyse1' as const,
+    realUrl: '/gasdata/gasstation/analyse1',
     reqType: {} as DistrictParam,
     resType: {} as any,
   },
   /** 智能分析,LNG市场份额 */
   analyse2: {
-    realUrl: '/gasdata/gasstation/analyse2' as const,
+    realUrl: '/gasdata/gasstation/analyse2',
     reqType: {} as DistrictParam,
     resType: {} as any,
   },
   /** 同步strategy旧数据 */
   combat: {
-    realUrl: '/gasdata/gasstation/combat' as const,
+    realUrl: '/gasdata/gasstation/combat',
 
     resType: {} as any,
   },
   /** 业务区域配置加气站同步 */
   district: {
-    realUrl: '/gasdata/gasstation/district' as const,
+    realUrl: '/gasdata/gasstation/district',
     reqType: {} as 获取用户业务区域列表,
     resType: {} as any,
   },
   /** 修改站点类型 */
   edit: {
-    realUrl: '/gasdata/gasstation/edit' as const,
+    realUrl: '/gasdata/gasstation/edit',
     reqType: {} as Gasstation对象,
     resType: {} as any,
   },
   /** 获取gasstation列表 */
   list_2: {
-    realUrl: '/gasdata/gasstation/list' as const,
+    realUrl: '/gasdata/gasstation/list',
     reqType: {} as Gasstation对象,
     resType: {} as Array<Gasstation列表对象>,
   },
   /** 获取gasstation列表 */
   newList: {
-    realUrl: '/gasdata/gasstation/newList' as const,
+    realUrl: '/gasdata/gasstation/newList',
     reqType: {} as Gasstation对象,
     resType: {} as Array<Gasstation列表对象>,
   },
   /** 批量编辑列表 */
   page: {
-    realUrl: '/gasdata/gasstation/page' as const,
+    realUrl: '/gasdata/gasstation/page',
     reqType: {} as IPageParams<Gasstation对象>,
     resType: {} as Gasstation列表对象,
   },
   /** 删除非大象站 */
   remove: {
-    realUrl: '/gasdata/gasstation/remove' as const,
+    realUrl: '/gasdata/gasstation/remove',
     reqType: {} as Gasstation对象,
     resType: {} as any,
   },
   /** 定时同步settle的加气量/结算价更新信息 */
   add_3: {
-    realUrl: '/gasdata/gasstation/settle/add' as const,
+    realUrl: '/gasdata/gasstation/settle/add',
 
     resType: {} as any,
   },
   /** 定时同步strategy.gasstation的更新信息 */
   add_4: {
-    realUrl: '/gasdata/gasstation/strategy/add' as const,
+    realUrl: '/gasdata/gasstation/strategy/add',
 
     resType: {} as any,
   },
   /** 加气站站点编辑 */
   update_2: {
-    realUrl: '/gasdata/gasstation/update' as const,
+    realUrl: '/gasdata/gasstation/update',
     reqType: {} as Gasstation对象,
     resType: {} as any,
   },
   /** 加气站情报编辑 */
   info: {
-    realUrl: '/gasdata/gasstation/update/info' as const,
+    realUrl: '/gasdata/gasstation/update/info',
     reqType: {} as Gasstation对象,
     resType: {} as any,
   },
   /** 添加gasstation_info_log */
   add_5: {
-    realUrl: '/gasdata/gasstation_info_log/add' as const,
+    realUrl: '/gasdata/gasstation_info_log/add',
     reqType: {} as GasstationInfoLog对象,
     resType: {} as any,
   },
   /** 获取gasstation_info_log列表 */
   list_3: {
-    realUrl: '/gasdata/gasstation_info_log/list' as const,
+    realUrl: '/gasdata/gasstation_info_log/list',
     reqType: {} as IPageParams<GasstationInfoLog对象>,
     resType: {} as any,
   },
   /** 修改gasstation_info_log */
   update_3: {
-    realUrl: '/gasdata/gasstation_info_log/update' as const,
+    realUrl: '/gasdata/gasstation_info_log/update',
     reqType: {} as GasstationInfoLog对象,
     resType: {} as any,
   },
   /** 添加gasstation_log */
   add_6: {
-    realUrl: '/gasdata/gasstation_log/add' as const,
+    realUrl: '/gasdata/gasstation_log/add',
     reqType: {} as GasstationLog对象,
     resType: {} as any,
   },
   /** 获取gasstation_log列表 */
   list_4: {
-    realUrl: '/gasdata/gasstation_log/list' as const,
+    realUrl: '/gasdata/gasstation_log/list',
     reqType: {} as IPageParams<GasstationLog对象>,
     resType: {} as any,
   },
   /** 修改gasstation_log */
   update_4: {
-    realUrl: '/gasdata/gasstation_log/update' as const,
+    realUrl: '/gasdata/gasstation_log/update',
     reqType: {} as GasstationLog对象,
     resType: {} as any,
   },
   /** 添加gasstation_token */
   add_7: {
-    realUrl: '/gasdata/gasstation_token/add' as const,
+    realUrl: '/gasdata/gasstation_token/add',
     reqType: {} as GasstationToken对象,
     resType: {} as any,
   },
   /** 获取gasstation_token列表 */
   list_5: {
-    realUrl: '/gasdata/gasstation_token/list' as const,
+    realUrl: '/gasdata/gasstation_token/list',
     reqType: {} as IPageParams<GasstationToken对象>,
     resType: {} as any,
   },
   /** 修改gasstation_token */
   update_5: {
-    realUrl: '/gasdata/gasstation_token/update' as const,
+    realUrl: '/gasdata/gasstation_token/update',
     reqType: {} as GasstationToken对象,
     resType: {} as any,
   },
   /** 添加gauge */
   add_8: {
-    realUrl: '/gasdata/gauge/add' as const,
+    realUrl: '/gasdata/gauge/add',
     reqType: {} as Gauge对象,
     resType: {} as any,
   },
   /** 多车监控 */
   all: {
-    realUrl: '/gasdata/gauge/all' as const,
+    realUrl: '/gasdata/gauge/all',
     reqType: {} as 多车监控排序,
     resType: {} as any,
   },
   /** excel导出智能液位计 */
   export: {
-    realUrl: '/gasdata/gauge/export' as const,
+    realUrl: '/gasdata/gauge/export',
 
     resType: {} as boolean,
   },
   /** 获取gauge列表 */
   list_6: {
-    realUrl: '/gasdata/gauge/list' as const,
+    realUrl: '/gasdata/gauge/list',
     reqType: {} as IPageParams<Gauge对象>,
     resType: {} as IPage<Gauge对象>,
   },
   /** 单车监控 */
   one: {
-    realUrl: '/gasdata/gauge/one' as const,
+    realUrl: '/gasdata/gauge/one',
     reqType: {} as Truck对象,
     resType: {} as any,
   },
   /** 删除gauge */
   remove_1: {
-    realUrl: '/gasdata/gauge/remove' as const,
+    realUrl: '/gasdata/gauge/remove',
     reqType: {} as Gauge对象,
     resType: {} as any,
   },
   /** 轨迹回放 */
   trajectory: {
-    realUrl: '/gasdata/gauge/trajectory' as const,
+    realUrl: '/gasdata/gauge/trajectory',
     reqType: {} as 轨迹回放,
     resType: {} as any,
   },
   /** 修改gauge */
   update_6: {
-    realUrl: '/gasdata/gauge/update' as const,
+    realUrl: '/gasdata/gauge/update',
     reqType: {} as Gauge对象,
     resType: {} as any,
   },
   /** 添加gauge_container */
   add_9: {
-    realUrl: '/gasdata/gauge_container/add' as const,
+    realUrl: '/gasdata/gauge_container/add',
     reqType: {} as GaugeContainer对象,
     resType: {} as any,
   },
   /** 获取gauge_container列表 */
   list_7: {
-    realUrl: '/gasdata/gauge_container/list' as const,
+    realUrl: '/gasdata/gauge_container/list',
     reqType: {} as IPageParams<GaugeContainer对象>,
     resType: {} as any,
   },
   /** 修改gauge_container */
   update_7: {
-    realUrl: '/gasdata/gauge_container/update' as const,
+    realUrl: '/gasdata/gauge_container/update',
     reqType: {} as GaugeContainer对象,
     resType: {} as any,
   },
   /** 添加gauge_log */
   add_10: {
-    realUrl: '/gasdata/gauge_log/add' as const,
+    realUrl: '/gasdata/gauge_log/add',
     reqType: {} as GaugeLog对象,
     resType: {} as any,
   },
   /** 获取gauge_log列表 */
   list_8: {
-    realUrl: '/gasdata/gauge_log/list' as const,
+    realUrl: '/gasdata/gauge_log/list',
     reqType: {} as IPageParams<GaugeLog对象>,
     resType: {} as any,
   },
   /** 修改gauge_log */
   update_8: {
-    realUrl: '/gasdata/gauge_log/update' as const,
+    realUrl: '/gasdata/gauge_log/update',
     reqType: {} as GaugeLog对象,
     resType: {} as any,
   },
   /** 添加lng_container */
   add_11: {
-    realUrl: '/gasdata/lng_container/add' as const,
+    realUrl: '/gasdata/lng_container/add',
     reqType: {} as LngContainer对象,
     resType: {} as any,
   },
   /** 根据车牌号查询配置的气瓶 */
   car: {
-    realUrl: '/gasdata/lng_container/car' as const,
+    realUrl: '/gasdata/lng_container/car',
     reqType: {} as LngContainer对象,
     resType: {} as any,
   },
   /** excel导出车载LNG气瓶 */
   export_1: {
-    realUrl: '/gasdata/lng_container/export' as const,
+    realUrl: '/gasdata/lng_container/export',
 
     resType: {} as boolean,
   },
   /** 获取lng_container列表 */
   list_9: {
-    realUrl: '/gasdata/lng_container/list' as const,
+    realUrl: '/gasdata/lng_container/list',
     reqType: {} as IPageParams<LngContainer对象>,
     resType: {} as any,
   },
   /** 获取lng_container分页列表 */
   page_1: {
-    realUrl: '/gasdata/lng_container/page' as const,
+    realUrl: '/gasdata/lng_container/page',
     reqType: {} as IPageParams<LngContainer对象>,
     resType: {} as any,
   },
   /** 删除气瓶配置 */
   remove_2: {
-    realUrl: '/gasdata/lng_container/remove' as const,
+    realUrl: '/gasdata/lng_container/remove',
     reqType: {} as LngContainer对象,
     resType: {} as any,
   },
   /** 修改lng_container */
   update_9: {
-    realUrl: '/gasdata/lng_container/update' as const,
+    realUrl: '/gasdata/lng_container/update',
     reqType: {} as LngContainer对象,
     resType: {} as any,
   },
   /** 添加lng_container_log */
   add_12: {
-    realUrl: '/gasdata/lng_container_log/add' as const,
+    realUrl: '/gasdata/lng_container_log/add',
     reqType: {} as LngContainerLog对象,
     resType: {} as any,
   },
   /** 获取lng_container_log列表 */
   list_10: {
-    realUrl: '/gasdata/lng_container_log/list' as const,
+    realUrl: '/gasdata/lng_container_log/list',
     reqType: {} as IPageParams<LngContainerLog对象>,
     resType: {} as any,
   },
   /** 修改lng_container_log */
   update_10: {
-    realUrl: '/gasdata/lng_container_log/update' as const,
+    realUrl: '/gasdata/lng_container_log/update',
     reqType: {} as LngContainerLog对象,
     resType: {} as any,
   },
   /** 智能液位计上传数据接口 */
   receive_1: {
-    realUrl: '/gasdata/lngtruck/receive' as const,
+    realUrl: '/gasdata/lngtruck/receive',
     reqType: {} as LiquidGauge,
     resType: {} as any,
   },
   /** 车辆修改同步数据接口 */
   updateLngTruck: {
-    realUrl: '/gasdata/lngtruck/updateLngTruck' as const,
+    realUrl: '/gasdata/lngtruck/updateLngTruck',
     reqType: {} as LiquidGauge,
     resType: {} as any,
   },
   /** 添加tbl_exchange_record_his */
   add_13: {
-    realUrl: '/gasdata/tbl_exchange_record_his/add' as const,
+    realUrl: '/gasdata/tbl_exchange_record_his/add',
     reqType: {} as TblExchangeRecordHis对象,
     resType: {} as any,
   },
   /** 获取tbl_exchange_record_his列表 */
   list_11: {
-    realUrl: '/gasdata/tbl_exchange_record_his/list' as const,
+    realUrl: '/gasdata/tbl_exchange_record_his/list',
     reqType: {} as IPageParams<TblExchangeRecordHis对象>,
     resType: {} as any,
   },
   /** 修改tbl_exchange_record_his */
   update_11: {
-    realUrl: '/gasdata/tbl_exchange_record_his/update' as const,
+    realUrl: '/gasdata/tbl_exchange_record_his/update',
     reqType: {} as TblExchangeRecordHis对象,
     resType: {} as any,
   },
   /** 添加thirdgas27 */
   add_14: {
-    realUrl: '/gasdata/thirdgas27/add' as const,
+    realUrl: '/gasdata/thirdgas27/add',
     reqType: {} as Thirdgas27对象,
     resType: {} as any,
   },
   /** 获取thirdgas27列表 */
   list_12: {
-    realUrl: '/gasdata/thirdgas27/list' as const,
+    realUrl: '/gasdata/thirdgas27/list',
     reqType: {} as IPageParams<Thirdgas27对象>,
     resType: {} as any,
   },
   /** 修改thirdgas27 */
   update_12: {
-    realUrl: '/gasdata/thirdgas27/update' as const,
+    realUrl: '/gasdata/thirdgas27/update',
     reqType: {} as Thirdgas27对象,
     resType: {} as any,
   },
   /** 添加thirdgas30 */
   add_15: {
-    realUrl: '/gasdata/thirdgas30/add' as const,
+    realUrl: '/gasdata/thirdgas30/add',
     reqType: {} as Thirdgas30对象,
     resType: {} as any,
   },
   /** 获取thirdgas30列表 */
   list_13: {
-    realUrl: '/gasdata/thirdgas30/list' as const,
+    realUrl: '/gasdata/thirdgas30/list',
     reqType: {} as IPageParams<Thirdgas30对象>,
     resType: {} as any,
   },
   /** 修改thirdgas30 */
   update_13: {
-    realUrl: '/gasdata/thirdgas30/update' as const,
+    realUrl: '/gasdata/thirdgas30/update',
     reqType: {} as Thirdgas30对象,
     resType: {} as any,
   },
   /** 添加thirdgas45 */
   add_16: {
-    realUrl: '/gasdata/thirdgas45/add' as const,
+    realUrl: '/gasdata/thirdgas45/add',
     reqType: {} as Thirdgas45对象,
     resType: {} as any,
   },
   /** 获取thirdgas45列表 */
   list_14: {
-    realUrl: '/gasdata/thirdgas45/list' as const,
+    realUrl: '/gasdata/thirdgas45/list',
     reqType: {} as IPageParams<Thirdgas45对象>,
     resType: {} as any,
   },
   /** 修改thirdgas45 */
   update_14: {
-    realUrl: '/gasdata/thirdgas45/update' as const,
+    realUrl: '/gasdata/thirdgas45/update',
     reqType: {} as Thirdgas45对象,
     resType: {} as any,
   },
   /** 添加thirdgas9 */
   add_17: {
-    realUrl: '/gasdata/thirdgas9/add' as const,
+    realUrl: '/gasdata/thirdgas9/add',
     reqType: {} as Thirdgas9对象,
     resType: {} as any,
   },
   /** 获取thirdgas9列表 */
   list_15: {
-    realUrl: '/gasdata/thirdgas9/list' as const,
+    realUrl: '/gasdata/thirdgas9/list',
     reqType: {} as IPageParams<Thirdgas9对象>,
     resType: {} as any,
   },
   /** 修改thirdgas9 */
   update_15: {
-    realUrl: '/gasdata/thirdgas9/update' as const,
+    realUrl: '/gasdata/thirdgas9/update',
     reqType: {} as Thirdgas9对象,
     resType: {} as any,
   },

+ 12 - 15
src/utils/config/interFaces/index.ts

@@ -1,30 +1,27 @@
-import websocket from './websocket'
-import message from './message'
 import account from './account'
-import tms from './tms'
-import allinpay from './allinpay'
-import user from './user'
+import message from './message'
+import gasdata from './gasdata'
 import pay from './pay'
+import allinpay from './allinpay'
 import settle from './settle'
+import user from './user'
 import strategy from './strategy'
 
 export default {
-  /** websocket打印中心 */
-  websocket,
-  /** 消息中心 */
-  message,
   /** 账户中心 */
   account,
-  /** 运力中心 */
-  tms,
-  /** 通联支付 */
-  allinpay,
-  /** 用户中心 */
-  user,
+  /** 消息中心 */
+  message,
+  /** 加气站数据采集 */
+  gasdata,
   /** 支付中心 */
   pay,
+  /** 通联支付 */
+  allinpay,
   /** 结算中心 */
   settle,
+  /** 用户中心 */
+  user,
   /** 运营策略中心 */
   strategy,
 }

+ 18 - 0
src/utils/config/interFaces/pay.ts

@@ -77,6 +77,12 @@ export default {
     reqType: {} as IPageParams<GasOrderListParam>,
     resType: {} as any,
   },
+  /** 创建加气订单(不保存) */
+  create: {
+    realUrl: '/pay/gas_order/create',
+    reqType: {} as GasOrder对象,
+    resType: {} as any,
+  },
   /** 查询指定司机是否有待支付的订单 */
   driver_order_check: {
     realUrl: '/pay/gas_order/driver_order_check',
@@ -125,6 +131,12 @@ export default {
     reqType: {} as Record<any, any>,
     resType: {} as any,
   },
+  /** 待支付订单详情for卡车 */
+  find_nopayfordrivertruck: {
+    realUrl: '/pay/gas_order/find_nopayfordrivertruck',
+
+    resType: {} as any,
+  },
   /** 待支付订单详情for司机 */
   find_unpayfordriver: {
     realUrl: '/pay/gas_order/find_unpayfordriver',
@@ -431,6 +443,12 @@ export default {
     reqType: {} as SelfConsumeParam,
     resType: {} as any,
   },
+  /** 待支付订单支付 */
+  wait_order_pay: {
+    realUrl: '/pay/pay/wait_order_pay',
+    reqType: {} as OrderPayParam,
+    resType: {} as any,
+  },
   /** 提现申请 */
   withdraw_apply: {
     realUrl: '/pay/pay/withdraw_apply',

+ 38 - 2
src/utils/config/interFaces/strategy.ts

@@ -512,6 +512,24 @@ export default {
     reqType: {} as GasOrder对象,
     resType: {} as any,
   },
+  /** 智慧数据加气员业绩(PC端) */
+  cashier_trend: {
+    realUrl: '/strategy/flag_smart_data/cashier_trend',
+    reqType: {} as 旗舰站智慧数据经营趋势查询参数_开始和结束日期不传为默认近7天,
+    resType: {} as 加气员业绩VO实体类,
+  },
+  /** 智慧数据加气员业绩(移动端) */
+  cashier_trend_mp: {
+    realUrl: '/strategy/flag_smart_data/cashier_trend_mp',
+    reqType: {} as 旗舰站智慧数据经营趋势查询参数_开始和结束日期不传为默认近7天,
+    resType: {} as 加气员业绩VO实体类,
+  },
+  /** 智慧数据加气员业绩日期选项 */
+  cashier_trend_select: {
+    realUrl: '/strategy/flag_smart_data/cashier_trend_select',
+
+    resType: {} as 智慧数据加气员业绩日期选项VO,
+  },
   /** 智慧数据加气站当日时段销量 */
   daytime_sales: {
     realUrl: '/strategy/flag_smart_data/daytime_sales',
@@ -638,13 +656,19 @@ export default {
     reqType: {} as IPageParams<GasLimitConfigLog对象>,
     resType: {} as any,
   },
+  /** 待支付订单余额刷新(物流支付信息) */
+  balance_refresh: {
+    realUrl: '/strategy/gas_order/balance_refresh',
+    reqType: {} as GasOrder对象,
+    resType: {} as 待支付订单_可选支付方式物流支付实体类,
+  },
   /** 设置订单的协作车信息(个人支付) */
   get_person_trucks: {
     realUrl: '/strategy/gas_order/get_person_trucks',
     reqType: {} as GasOrder对象,
     resType: {} as any,
   },
-  /** 获取待支付订单的可选支付方式 */
+  /** 用户输入加气量,获取支付信息 */
   paysel: {
     realUrl: '/strategy/gas_order/paysel',
     reqType: {} as GasOrder对象,
@@ -719,6 +743,12 @@ export default {
     reqType: {} as GasstationCarrierParam对象,
     resType: {} as GasstationVO对象,
   },
+  /** 加气极速版-根据收银员id查询加气站信息 */
+  find_by_cashier: {
+    realUrl: '/strategy/gasstation/find_by_cashier',
+    reqType: {} as GasstationCashierParam对象,
+    resType: {} as GasstationCashierVO对象,
+  },
   /** 根据gasstationId或加气站简称查询加气站信息 */
   find_by_name: {
     realUrl: '/strategy/gasstation/find_by_name',
@@ -803,6 +833,12 @@ export default {
     reqType: {} as DistrictOrgIdsParam,
     resType: {} as any,
   },
+  /** 根据gasstationId 查询加气站信息 */
+  get_info: {
+    realUrl: '/strategy/gasstation/get_info',
+    reqType: {} as Gasstation对象,
+    resType: {} as Gasstation对象,
+  },
   /** 生成加气站/收银员二维码 */
   get_qrcode: {
     realUrl: '/strategy/gasstation/get_qrcode',
@@ -2013,7 +2049,7 @@ export default {
   list_50: {
     realUrl: '/strategy/purchase/list',
     reqType: {} as IPageParams<PurchasePageParam>,
-    resType: {} as any,
+    resType: {} as PurchaseListVO,
   },
   /** 测试LNG计划创建 */
   mock: {

+ 33 - 0
src/utils/config/interFaces/user.ts

@@ -1402,6 +1402,18 @@ export default {
     reqType: {} as RoleMenu对象,
     resType: {} as any,
   },
+  /** getQrcode */
+  getqrcode: {
+    realUrl: '/user/test/getqrcode',
+
+    resType: {} as any,
+  },
+  /** generateImage */
+  qrcode_save: {
+    realUrl: '/user/test/qrcode_save',
+
+
+  },
   /** 查询物流客户的企业基本信息接口 */
   qry_account: {
     realUrl: '/user/third_party/qry_account',
@@ -1444,6 +1456,18 @@ export default {
     reqType: {} as IPageParams<User对象>,
     resType: {} as IPage<User对象>,
   },
+  /** 批量生成加气员的二维码和工号(旧数据处理) */
+  cashier_qrcode_gen: {
+    realUrl: '/user/user/cashier_qrcode_gen',
+
+    resType: {} as any,
+  },
+  /** 保存加气员二维码图片 */
+  cashier_qrcode_save: {
+    realUrl: '/user/user/cashier_qrcode_save',
+    reqType: {} as User对象,
+    resType: {} as ResponseEntity,
+  },
   /** 用户组织变更 */
   changeOrg: {
     realUrl: '/user/user/changeOrg',
@@ -1567,6 +1591,15 @@ export default {
 
     resType: {} as Array<User对象>,
   },
+  /** 查询收银员列表 */
+  list_cashiers: {
+    realUrl: '/user/user/list_cashiers',
+    reqType: {} as {
+      /** gasstationId */
+      gasstationId: number
+    },
+    resType: {} as Array<User对象>,
+  },
   /** 根据orgId,查询user列表 */
   list_org: {
     realUrl: '/user/user/list_org',

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

@@ -79,9 +79,12 @@ export default {
   order_createOrder: {
     _url: '/pages/order/createOrder',
     _type: 'page',
-    title: '创建订单',
-    identity: true,
-    isPager: false
+    title: '加气订单',
+    identity: false,
+    isPager: false,
+    style: {
+      navigationStyle: 'custom'
+    }
   } as ayPage,
   order_prePay: {
     _url: '/pages/order/prePay',

+ 4 - 2
src/utils/container/index.ts

@@ -108,7 +108,8 @@ export default {
    * @params type 0:手机号快捷 1:账号、密码
    */
   goLogin(type = 0) {
-    if (type === 0) ay.goPage(config.pages.login_index, { goPageType: enums.GoPageType.reLaunch }) // { params: { backPage: curPage } })
+    if (type === 0) ay.goPage(config.pages.login_index)
+    //, { goPageType: enums.GoPageType.reLaunch }) // { params: { backPage: curPage } })
     // func.face.showToast({
     //   title: '请登录',
     //   icon: 'error',
@@ -204,7 +205,8 @@ export default {
     onUnload(() => {
       store.curPage.removeCurPagerInfo()
     })
-    onLoad(async () => {
+    onLoad(async (query) => {
+      args.query = query
       if (!func.antiShake({ func: init, immediately: true, mark: tempid })) {
         return
       }

+ 14 - 0
src/utils/func/index.ts

@@ -17,6 +17,20 @@ export default {
   native,
   convert,
   validate,
+  /** 获取页面参数 */
+  getPQ(path) {
+    const rv = { page: '', query: {} }
+    rv.page = path.split('?')[0]
+    const query = path.split('?')[1]
+    if (query && query.length) {
+      const queryArr = query.split('&')
+      queryArr.forEach((f) => {
+        const ca = f.split('=')
+        rv.query[ca[0]] = ca[1]
+      })
+    }
+    return rv
+  },
   isnull(data) {
     return !data && data !== 0
   },

+ 19 - 12
src/utils/func/native.ts

@@ -1,19 +1,19 @@
 export default {
   async scan() {
+    const ret = { scanType: 'QR_CODE', query: {}, path: '' }
     // #ifdef H5
     // debug模式模拟 扫码信息
     if (store.common.data.debug) {
-      return {
+      ret.query = {
         cashierId: '710613333157822464',
         gasstationId: '710613333157822464',
-
-        orgId: '720613316032479232',
       }
+      return ret
     }
     // #endif
-    const reqStr = await uni
+    const scanRes = await uni
       .scanCode({
-        scanType: ['qrcode'],
+        scanType: ['qrCode', 'wxCode'],
       })
       .catch((err) => {
         // 二维码解析失败
@@ -22,13 +22,20 @@ export default {
         }
         return Promise.reject(err)
       })
-    let ret = {}
-    try {
-      ret = JSON.parse(reqStr.result)
-    } catch {
-      // 反序列化失败
-      func.native.showToast('二维码无效')
-      return Promise.reject(new Error('反序列化失败'))
+    if (scanRes.scanType === 'QR_CODE') {
+      try {
+        ret.query = JSON.parse(scanRes.result)
+      } catch {
+        // 反序列化失败
+        func.native.showToast('二维码无效')
+        return Promise.reject(new Error('反序列化失败'))
+      }
+    }
+    if (scanRes.scanType === 'WX_CODE') {
+      ret.scanType = 'WX_CODE'
+      const pqo = func.getPQ(scanRes.path)
+      ret.query = pqo.query
+      ret.path = pqo.page
     }
     return ret
   },

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

@@ -1,5 +1,5 @@
 import { defineStore } from 'pinia'
-const debug = () => import.meta.env.DEV && false
+const debug = () => import.meta.env.DEV && true
 /** 当前页面地址 */
 const curPage = ref<string>()
 /** 预制页面地址 */