Explorar el Código

基础架构+散户加气3.1

chenlei hace 1 año
padre
commit
a1c3283bd6
Se han modificado 40 ficheros con 434 adiciones y 170 borrados
  1. 1 0
      .gitignore
  2. 10 3
      README.md
  3. 0 1
      env/.env.production
  4. 27 0
      keys/private.wx0f5cb3758131bea7.key
  5. 27 0
      keys/private.wx72ba78af2cf68cf0.key
  6. 3 1
      package.json
  7. 5 2
      scripts/test.js
  8. 19 10
      src/components/business/phone/index.vue
  9. 45 21
      src/components/container/index.vue
  10. 0 4
      src/components/flowLine1/index.vue
  11. 1 1
      src/components/skeletons/index.vue
  12. 1 1
      src/components/sticky/index.vue
  13. 8 1
      src/pages.json
  14. 1 1
      src/pages/account/index.vue
  15. 98 0
      src/pages/cards/detail.vue
  16. 46 27
      src/pages/cards/index.vue
  17. 2 2
      src/pages/index/index.vue
  18. 1 1
      src/pages/list/index.vue
  19. 12 5
      src/pages/login/index.vue
  20. 3 3
      src/pages/order/createOrder.vue
  21. 1 1
      src/pages/order/index.vue
  22. 2 3
      src/pages/order/orderDetail.vue
  23. 1 1
      src/pages/order/prePay.vue
  24. 1 1
      src/pages/org/index.vue
  25. 1 1
      src/pages/personCenter/index.vue
  26. 1 1
      src/pages/personCenter/mobile.vue
  27. 1 1
      src/pages/personCenter/password.vue
  28. 1 1
      src/pages/personCenter/userIdCard.vue
  29. 16 24
      src/pages/station/detail.vue
  30. 1 1
      src/pages/truckInfo/detail.vue
  31. 1 1
      src/pages/truckInfo/index.vue
  32. 3 4
      src/pages/webview/index.vue
  33. 1 1
      src/pages/webview/login.vue
  34. 0 18
      src/style/index.scss
  35. 35 1
      src/types/schemas/strategy.d.ts
  36. 20 0
      src/utils/config/index.ts
  37. 18 0
      src/utils/config/interFaces/strategy.ts
  38. 11 1
      src/utils/config/pages.ts
  39. 6 9
      src/utils/container/index.ts
  40. 3 16
      src/utils/store/curPage.ts

+ 1 - 0
.gitignore

@@ -7,6 +7,7 @@ yarn-error.log*
 pnpm-debug.log*
 lerna-debug.log*
 
+node_modules_
 node_modules
 .DS_Store
 dist

+ 10 - 3
README.md

@@ -32,9 +32,12 @@
 ## 🔗 发布
 
 - web平台: `pnpm build:h5`,打包后的文件在 `dist/build/h5`,可以放到web服务器,如nginx运行。如果最终不是放在根目录,可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
-- weixin平台:开发环境:`pnpm build:d:mp`、
-  测试环境:`pnpm build:t:mp`、 生产环境:`pnpm build:mp`。
-  均可自动上传到对应的小程序后台, 打包后的文件在 `dist/build/mp-weixin`,可用微信开发者工具导入查看效果。
+- weixin平台:
+  - 仅打包:开发环境:`pnpm build:d:mp`、
+    测试环境:`pnpm build:t:mp`、 生产环境:`pnpm build:mp`。打包后的文件在 `dist/build/mp-weixin`,可用微信开发者工具导入查看效果。
+  - 自动上传:开发环境:`pnpm build:dp:mp`、
+    测试环境:`pnpm build:tp:mp`、 生产环境:`pnpm build:p:mp`。
+    均可自动上传到对应的小程序后台。
 - APP平台:`pnpm build:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/build/app` 文件夹,选择发行 - APP云打包。
 
 ## 📦 TODO
@@ -63,3 +66,7 @@
 - 22.微信小程序环境支持websocket-stomp协议,收银员扫描驾驶员二维码创建订单后,驾驶员端自动跳转待支付页面。
 - 23.构建项目时自动化上传体验版至小程序后台。√
 - 24.构建项目时可区分开发、测试、生成环境,编写对应的命令。√
+- 25.在页面跳转时支持页面预初始化。
+- 26.容器组件根据页面公共配置,自动识别支持自定义头部,呈现头部区域标题、返回按钮。
+- 27.编写公共组件:计数器、抽屉、详情页模板、流光加载效果、浮点单位、刷新、骨架屏、吸顶。
+- 28.编写业务组件:车牌号输入、拨打电话、加气站模块。

+ 0 - 1
env/.env.production

@@ -32,7 +32,6 @@ VITE_RESOURCE_BASEURL = 'https://wx.auyen.com'
 ## websocket
 # 开发环境
 # VITE_WEBSOCKET_BASEURL = 'wss://dwx.auyen.com'
-# 测试环境
 # VITE_WEBSOCKET_BASEURL = 'wss://twx.auyen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+oxbf6yQj8cJ9ODCeQkZbQxlevA4/rjoUU5CUGKZZtf9ObxhxmJQu+aQu1wBT9qvI
+67ySFwKBgQCwKgR7bUIpd2HLfWNG/YkCV4/Wz5J/2SPMy0B/lf0QF1Gpk6Stdtdu
+cL1HmnmKJycQI5JdyxbGxZj0J7P/tUkxlEaO1uZnrV71FErsCp9XdaEvkdQ8p0Sy
+vYnRXOMyfw6Q4OMwQq2A0aOdHzEfy8VLqVt5k5403DEWkdiVMzwUfA==
+-----END RSA PRIVATE KEY-----

+ 3 - 1
package.json

@@ -45,8 +45,10 @@
     "build:mp-alipay": "uni build -p mp-alipay",
     "build:d:mp": "uni build -p mp-weixin --mode=development",
     "build:dp:mp": "uni build -p mp-weixin --mode=development && node ./scripts/upload.js development",
+    "build:t:mp": "uni build -p mp-weixin --mode=test",
     "build:tp:mp": "uni build -p mp-weixin --mode=test && node ./scripts/upload.js test",
-    "build:mp": "uni build -p mp-weixin && node ./scripts/upload.js",
+    "build:mp": "uni build -p mp-weixin",
+    "build:p:mp": "uni build -p mp-weixin && node ./scripts/upload.js production",
     "build:mp-baidu": "uni build -p mp-baidu",
     "build:mp-jd": "uni build -p mp-jd",
     "build:mp-kuaishou": "uni build -p mp-kuaishou",

+ 5 - 2
scripts/test.js

@@ -1,2 +1,5 @@
-const os = require('os')
-console.log(os.hostname())
+const path = require('node:path')
+const { loadEnv } = require('vite')
+const args = process.argv.slice(2) // 去掉第一个和第二个参数(node路径和脚本路径)
+const env = loadEnv(args[0], path.resolve(process.cwd(), 'env'))
+console.log(env)

+ 19 - 10
src/components/business/phone/index.vue

@@ -1,10 +1,10 @@
 <template>
-  <div class="gray-color" :class="{ 'text-center': props.center }">
+  <div class="gray-color" :class="{ 'text-center': props.center, 'w-100%': props.w100 }">
     {{ props.desc }}
-    <span :class="{ 'p-color': props.phone }" @click="methods.phone">
+    <div :class="{ 'p-color': props.phone }" @click="methods.phone">
       <uni-icons type="phone-filled" color="" class="mr-spacd4" size="none"></uni-icons>
-      <span>{{ func.convert.nullView(props.phone) }}</span>
-    </span>
+      <div>{{ func.convert.nullView(props.phone) }}</div>
+    </div>
   </div>
 </template>
 <script lang="ts" setup>
@@ -12,11 +12,15 @@ defineOptions({
   name: '',
 })
 
-const props = withDefaults(defineProps<{ desc: string; phone: string; center: boolean }>(), {
-  desc: '',
-  center: true,
-  phone: store.common.data.phone,
-})
+const props = withDefaults(
+  defineProps<{ desc: string; phone: string; center: boolean; w100: boolean }>(),
+  {
+    desc: '',
+    center: true,
+    phone: store.common.data.phone,
+    w100: true,
+  },
+)
 const data = {}
 const methods = {
   phone() {
@@ -28,4 +32,9 @@ const methods = {
   },
 }
 </script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+div,
+view {
+  display: inline-block;
+}
+</style>

+ 45 - 21
src/components/container/index.vue

@@ -1,15 +1,12 @@
 <template>
   <!-- 小程序环境 会把$attrs 解析到最外层标签(虚拟标签,导致无效),只能使用自定义参数 -->
-  <div class="container" :style="cusStyle">
-    <ay-sticky
-      top="0px"
-      v-if="store.curPage.pageData?.pageConfig?.style?.navigationStyle === 'custom'"
-    >
-      <div class="page-custom" :style="{ height: props.topHeight }">
-        <div class="center justify-start page-title">
+  <div class="container" :class="props.cusClass" :style="props.cusStyle">
+    <ay-sticky top="0px" v-if="data.isCustom">
+      <div class="page-top" :style="{ height: props.topHeight, ...props.pageTopStyle }">
+        <div class="center page-title" :class="{ 'justify-start': data.titleAlginStart }">
           <uni-icons
             class="mr-spacd4"
-            v-if="props.showBackIcon"
+            v-if="data.showBackIcon"
             type="left"
             color=""
             size="24"
@@ -19,7 +16,7 @@
         </div>
       </div>
     </ay-sticky>
-
+    <div class="pt-spac" v-if="props.showSpac" />
     <!-- 小程序内只能用v-if移除组件,如果用v-show条件false时,整个页面不显示。。 -->
     <ay-pull v-if="store.curPage.pageConfig?.isPager">
       <slot />
@@ -33,25 +30,33 @@ defineOptions({
 })
 const props = withDefaults(
   defineProps<{
+    cusClass?: AnyObject | string[]
     cusStyle?: AnyObject
+    pageTopStyle?: AnyObject
     title?: string
     topHeight: string
-    showBackIcon?: boolean
+    showSpac: boolean
   }>(),
   {
-    topHeight: `${config.common.SystemInfo.safeArea.top + 44}px`,
+    showSpac: true,
+    topHeight: `${config.common.safeAreaTopHeight}px`,
   },
 )
-const title = computed(() => props.title || store.curPage.pageConfig.title)
-const cusStyle = computed(() => {
-  let rv = props.cusStyle
-  if (title.value) {
-    rv = {
-      'padding-top': 0,
-      ...rv,
-    }
-  }
-  return rv
+/** 采用局部数据 代替全局存储数据,防止页面跳转时显示下个页面的标题等信息 */
+const data = reactive({
+  title: '',
+  showBackIcon: false,
+  titleAlginStart: true,
+  isCustom: false,
+})
+const title = computed(() => props.title || data.title)
+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'
 })
 </script>
 <style lang="scss" scoped>
@@ -60,5 +65,24 @@ const cusStyle = computed(() => {
   box-sizing: border-box;
   min-height: 100vh;
   padding: $p-spac;
+  padding-top: 0;
+}
+
+.page-top {
+  padding: 0 $p-spac;
+  margin: 0 calc($p-spac / -1);
+  // margin-bottom: $p-spac;
+  background-color: #f8f8f8;
+  @apply flex;
+  @apply items-end;
+}
+
+.page-title {
+  // position: absolute;
+  // top: 50px;
+  // right: 0;
+  // left: 0;
+  width: 100%;
+  height: 44px;
 }
 </style>

+ 0 - 4
src/components/flowLine1/index.vue

@@ -1,4 +0,0 @@
-<template>
-  <div />
-</template>
-<script setup></script>

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

@@ -44,7 +44,7 @@ export default {
     },
     rowList: {
       type: Array,
-      default: () => [],
+      default: () => config.common.skeletons,
     },
     loading: {
       type: Boolean,

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

@@ -13,7 +13,7 @@ const props = withDefaults(
     targetComponent?: any
   }>(),
   {
-    top: '',
+    top: '', // config.common.safeAreaTopHeight - 1 + 'px',
   },
 )
 const emit = defineEmits<{ (e: 'stickChange', sr: stickyResult): void }>()

+ 8 - 1
src/pages.json

@@ -31,6 +31,10 @@
       "type": "page"
     },
     {
+      "path": "pages/cards/detail",
+      "type": "page"
+    },
+    {
       "path": "pages/cards/index",
       "type": "page"
     },
@@ -65,7 +69,10 @@
     },
     {
       "path": "pages/order/prePay",
-      "type": "page"
+      "type": "page",
+      "style": {
+        "navigationStyle": "custom"
+      }
     },
     {
       "path": "pages/org/index",

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

@@ -24,7 +24,7 @@ const userTitle = computed(() => {
   const ui = store.user.userInfo
   return `${ui.user_name}[${ui.mobileDes}]`
 })
-const data = reactive({
+const data = ay.initData({
   accountInfo: {} as IAccountInfo,
 })
 

+ 98 - 0
src/pages/cards/detail.vue

@@ -0,0 +1,98 @@
+<template>
+  <ay-container>
+    <ay-skeletons :loading="data.loading">
+      <div class="top mb-spac" id="top">
+        <div class="top-item">
+          卡号:{{ func.convert.nullView(data.truckCard.cardId) }} 车牌号:{{
+            func.convert.nullView(params?.carNumber)
+          }}
+        </div>
+        <div class="top-item flex">
+          <div class="flex-1 text-center after-line">
+            <div class="b-fz mb-spac">{{ func.convert.nullView(data.truckCard.balance) }}</div>
+            <div>可用余额(元)</div>
+          </div>
+          <div class="flex-1 text-center">
+            <div class="b-fz mb-spac">{{ -1 * data.truckCard.rebate }}</div>
+            <div>最新优惠(元/公斤)</div>
+          </div>
+        </div>
+      </div>
+      <div class="mb-spacm4 pb-spac" id="list">
+        <div class="chunk childs-fcjb-mbd2" v-for="(cb, i) in data.cardBill" :key="i">
+          <div>
+            <div>加气优惠</div>
+            <div class="font-bold">{{ -1 * cb.diffAmount }}元</div>
+          </div>
+          <div>
+            <div>{{ func.getDate(cb.updateDate).format() }}</div>
+            <div>优惠余额 {{ cb.remainAmount }}元</div>
+          </div>
+        </div>
+        <div class="btns" v-if="data.truckCard.status">
+          <div class="flex-1 m0 s-fz chunk tips">
+            您的"购车加气优惠卡"不可用,可咨询客服:
+            <ayb-phone :w100="false"></ayb-phone>
+          </div>
+        </div>
+      </div>
+    </ay-skeletons>
+  </ay-container>
+</template>
+
+<script lang="ts" setup>
+const data = reactive({
+  loading: true,
+  truckCard: {} as 车辆购车加气优惠卡信息VO类,
+  cardBill: [] as 加气优惠卡账单实体类[],
+})
+const methods = {}
+const params = computed(() => store.curPage.pageConfig.params as 司机车辆管理信息)
+ay.entrance(async (args) => {
+  await webapi.account
+    .get_truck_card<{
+      orgId: string
+      truckId: string
+    }>({ orgId: store.user.userInfo.orgId, truckId: params.value.truckId })
+    .then((truckCard) => {
+      data.truckCard = truckCard
+    })
+    .catch(() => {})
+
+  await webapi.account
+    .get_card_bill<{ cardId: string }>({ cardId: data.truckCard.cardId })
+    .then((res) => {
+      data.cardBill = res as 加气优惠卡账单实体类[]
+    })
+
+  data.loading = false
+})
+</script>
+
+<style lang="scss" scoped>
+.top {
+  color: $p-recolor;
+  background-color: $p-color;
+  border-radius: $p-spac;
+  .top-item {
+    padding: $p-spac;
+    border-bottom: 1rpx solid rgba($p-recolor, 0.4);
+  }
+  .after-line {
+    position: relative;
+    &::after {
+      position: absolute;
+      top: 10%;
+      right: 0;
+      width: 1rpx;
+      height: 80%;
+      content: '';
+      background-color: rgba($p-recolor, 0.4);
+    }
+  }
+}
+.tips {
+  background-color: rgba(#f5bc44, 0.2);
+  border: 1rpx solid #f5bc44;
+}
+</style>

+ 46 - 27
src/pages/cards/index.vue

@@ -11,8 +11,12 @@
         {{ t.label }}
       </div>
     </div>
-    <ay-skeletons :rowList="data.rowList" :loading="data.loading">
-      <div class="chunk card" v-if="data.tabs[0].active">
+    <ay-skeletons :loading="data.loading" v-if="data.tabs[0].active">
+      <div class="chunk card" v-if="store.webapi.account.get_truck_card.success">
+        <div class="absolute detail s-fz" @click="methods.detail">
+          详情
+          <uni-icons type="right" color="" size="12" />
+        </div>
         <div class="font-bold p-color">购车加气优惠卡</div>
         <div class="s-fz">[{{ func.convert.nullView(data.truckInfo.carNumber) }}]</div>
         <div class="mt-spac">
@@ -20,31 +24,35 @@
           <ay-numer :value="data.truckCard.balance" unit="元" />
         </div>
       </div>
+      <div class="text-center mt-spac" v-else>
+        <img class="no-data mt-spacm4" src="@img/no-data.png" />
+        <div>暂无可用,敬请期待~</div>
+      </div>
     </ay-skeletons>
     <div class="text-center mt-spac" v-if="data.tabs[1].active">
-      <img class="no-data" src="@img/no-data.png" />
+      <img class="no-data mt-spacm4" src="@img/no-data.png" />
       <div>暂无可用,敬请期待~</div>
     </div>
   </ay-container>
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   loading: true,
-  rowList: [
-    {
-      align: 'left',
-      verticalAlign: 'top',
-      colItems: [
-        {
-          style: {
-            height: '200rpx',
-            width: '100%',
-          },
-        },
-      ],
-    },
-  ],
+  // rowList: [
+  //   {
+  //     align: 'left',
+  //     verticalAlign: 'top',
+  //     colItems: [
+  //       {
+  //         style: {
+  //           height: '200rpx',
+  //           width: '100%',
+  //         },
+  //       },
+  //     ],
+  //   },
+  // ],
   tabs: [
     { label: '优惠卡', active: true },
     { label: '优惠券', active: false },
@@ -57,6 +65,9 @@ const methods = {
     data.tabs.forEach((f) => (f.active = false))
     t.active = true
   },
+  detail() {
+    ay.goPage(config.pages.cards_detail, { params: data.truckInfo })
+  },
 }
 
 ay.entrance(async (args) => {
@@ -66,15 +77,18 @@ ay.entrance(async (args) => {
       data.truckInfo = res
     })
     .catch(() => {})
-  await webapi.account
-    .get_truck_card<{
-      orgId: string
-      truckId: string
-    }>({ orgId: store.user.userInfo.orgId, truckId: data.truckInfo.truckId })
-    .then((truckCard) => {
-      data.truckCard = truckCard
-    })
-    .catch(() => {})
+  if (data.truckInfo.truckId) {
+    await webapi.account
+      .get_truck_card<{
+        orgId: string
+        truckId: string
+      }>({ orgId: store.user.userInfo.orgId, truckId: data.truckInfo.truckId })
+      .then((truckCard) => {
+        data.truckCard = truckCard
+      })
+      .catch(() => {})
+  }
+
   data.loading = false
 })
 </script>
@@ -93,4 +107,9 @@ ay.entrance(async (args) => {
   width: 740rpx;
   height: 350rpx;
 }
+.detail {
+  top: $p-spac;
+  right: $p-spac;
+  color: $p-color;
+}
 </style>

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

@@ -1,5 +1,5 @@
 <template>
-  <ay-container v-show="store.user.isLogined" :title="data.title">
+  <ay-container v-show="store.user.isLogined">
     <div class="chunk">
       <div class="center justify-between top">
         <div class="center" @click="methods.goPerson">
@@ -245,7 +245,7 @@ const data = ay.initData({
   },
   hiddenDoor: [],
 })
-const topHeight = computed(() => config.common.SystemInfo.safeArea.top + 44)
+const topHeight = computed(() => config.common.safeAreaTopHeight)
 const topHeightPX = computed(() => `${topHeight.value}px`)
 const showcm = computed(() => {
   return (

+ 1 - 1
src/pages/list/index.vue

@@ -10,7 +10,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   list: [] as GasstationVO对象[],
   loading: false,
   pageInfo: {},

+ 12 - 5
src/pages/login/index.vue

@@ -1,7 +1,13 @@
 <template>
-  <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">
+  <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="center info">
         <image class="logo" src="/static/logo.png" mode="scaleToFill" />
         <span class="desc">优质加气 大象帮你</span>
@@ -35,7 +41,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   check: false,
   shake: false,
 })
@@ -105,7 +111,8 @@ onUnload(() => {
   height: 44px;
 }
 .login-con {
-  height: calc(100vh - 54px - $p-spac);
+  // height: calc(100vh - 54px - $p-spac);
+  flex: 1;
 }
 .login-phone {
   box-sizing: border-box;

+ 3 - 3
src/pages/order/createOrder.vue

@@ -2,8 +2,8 @@
   <ay-container>
     <ayb-station type="2" :stationInfo="data.stationInfo" />
     <div class="section">本次加气驾驶员</div>
-    <div class="chunk childs-fc-mbd2">
-      <div>
+    <div class="chunk">
+      <div class="center justify-start">
         <image class="personal" :src="store.user.userInfo.head_url" mode="scaleToFill" />
         <div>
           <div class="p-fz">{{ store.user.userInfo.user_name }}</div>
@@ -36,7 +36,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   stationInfo: {},
   gasQty: '',
 })

+ 1 - 1
src/pages/order/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <ay-container :cusStyle="{ 'padding-top': 0 }">
+  <ay-container :showSpac="false">
     <ay-sticky relativeTo="#orderList" targetSelector="#top">
       <div class="center pt-spac pb-spac" id="top">
         <uni-datetime-picker

+ 2 - 3
src/pages/order/orderDetail.vue

@@ -45,18 +45,17 @@
           </div>
         </div>
       </div>
-
       <div>
         <ay-fieldGroups :fieldGroups="curFieldGroups" :targetData="data.orderDetail" />
+        <ayb-phone desc="对此单有疑问?请联系"></ayb-phone>
       </div>
     </ay-skeletons>
-    <ayb-phone desc="对此单有疑问?请联系"></ayb-phone>
   </ay-container>
 </template>
 
 <script lang="ts" setup>
 const staticData = {}
-const data = reactive({
+const data = ay.initData({
   title: '',
   rowList: [
     {

+ 1 - 1
src/pages/order/prePay.vue

@@ -102,7 +102,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   /** 数据未加载完毕 */
   firstUnload: true,
   /** 页面选择支付类型: -1:未选择 0:个人:1:物流 */

+ 1 - 1
src/pages/org/index.vue

@@ -79,7 +79,7 @@ import topbg1 from '@img/driver_apply1.png'
 import topbg3 from '@img/driver_apply3.png'
 const inputDialog = ref()
 
-const data = reactive({
+const data = ay.initData({
   firstLoad: true,
   rowList: [
     {

+ 1 - 1
src/pages/personCenter/index.vue

@@ -65,7 +65,7 @@
 
 <script lang="ts" setup>
 import defHead from '@img/icons/turnk_number_head.png'
-const data = reactive({
+const data = ay.initData({
   userInfo: {} as DerIUserInfo,
 })
 const methods = ay.initMethods(

+ 1 - 1
src/pages/personCenter/mobile.vue

@@ -49,7 +49,7 @@ const rules = {
     ],
   },
 }
-const data = reactive({
+const data = ay.initData({
   mobile: '',
   code: '',
   waiting: false,

+ 1 - 1
src/pages/personCenter/password.vue

@@ -77,7 +77,7 @@ const changeFormRules = {
     ],
   },
 }
-const data = reactive({
+const data = ay.initData({
   step: 0,
   newPassword: '',
   rePassword: '',

+ 1 - 1
src/pages/personCenter/userIdCard.vue

@@ -149,7 +149,7 @@ const rules = {
     ],
   },
 }
-const data = reactive({
+const data = ay.initData({
   idCardFront: '',
   idCardBack: '',
   realname: '',

+ 16 - 24
src/pages/station/detail.vue

@@ -1,5 +1,5 @@
 <template>
-  <ay-container :cusStyle="{ padding: 0 }">
+  <ay-container :cusStyle="{ padding: 0 }" :showSpac="false">
     <swiper
       class="swiper nmb-spac"
       circular
@@ -19,14 +19,14 @@
         <div class="flex-1">
           <div class="center justify-start mb-spacd2">
             <uni-icons type="location-filled" size="16" class="mr-spacd4" />
-            {{ func.convert.nullView(stationInfo.distance) }}km |
+            {{ func.convert.nullView(data.detail.distance) }}km |
             {{ func.convert.nullView(data.detail.address) }}
           </div>
           <ayb-phone :phone="data.detail.mobile" :center="false"></ayb-phone>
         </div>
         <div
           class="text-center p-color"
-          :class="{ 'gray-color': !stationInfo.longitude }"
+          :class="{ 'gray-color': !data.detail.longitude }"
           @click="methods.openLocation"
         >
           <uni-icons type="paperplane-filled" color="" size="24" />
@@ -42,7 +42,7 @@
           <div class="lng bs-fz">LNG</div>
           <div>
             <span class="font-bold mr-spacd2 price-color bs-fz">
-              {{ stationInfo.actualPrice }}
+              {{ data.detail.actualPrice }}
             </span>
             <span class="s-fz price">元/公斤</span>
           </div>
@@ -68,27 +68,24 @@
 
 <script lang="ts" setup>
 import defstation from '@img/defstation.png'
-const data = reactive({
-  detail: {} as DerIStationDetail,
-  stationInfo: null as GasstationVO对象,
+const data = ay.initData({
+  detail: {} as GasstationVO对象,
 })
 
 const methods = {
   openLocation() {
     func.native.openLocation({
-      latitude: Number(stationInfo.value.latitude),
-      longitude: Number(stationInfo.value.longitude),
-      name: stationInfo.value.nickName,
-      address: stationInfo.value.address,
+      latitude: Number(data.detail.latitude),
+      longitude: Number(data.detail.longitude),
+      name: data.detail.nickName,
+      address: data.detail.address,
     })
   },
 }
 const params = computed(() => {
   return store.curPage.pageConfig.params as GasstationVO对象
 })
-const stationInfo = computed(() => {
-  return data.stationInfo || params.value
-})
+
 const pics = computed(() => {
   let rv = []
   if (data.detail.orgPics?.length > 0) {
@@ -104,17 +101,12 @@ const pics = computed(() => {
 })
 
 ay.entrance(async (args) => {
-  webapi.user.find_3({ gasstationId: params.value.gasstationId }).then((res) => {
-    data.detail = res
+  const location = await func.native.getLocation()
+  data.detail = await webapi.strategy.find_for_mini({
+    gasstationId: params.value.gasstationId,
+    longitude: location.longitude.toString(),
+    latitude: location.latitude.toString(),
   })
-  if (!Object.hasOwn(params.value, 'distance')) {
-    const location = await func.native.getLocation()
-    data.stationInfo = await webapi.strategy.find_for_mini({
-      gasstationId: params.value.gasstationId,
-      longitude: location.longitude.toString(),
-      latitude: location.latitude.toString(),
-    })
-  }
 })
 </script>
 

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

@@ -5,7 +5,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+const data = ay.initData({
   fieldGroups: [
     {
       fields: [

+ 1 - 1
src/pages/truckInfo/index.vue

@@ -43,7 +43,7 @@
 
 <script lang="ts" setup>
 const carNumber = ref()
-const data = reactive({
+const data = ay.initData({
   truckInfo: {} as 司机车辆管理信息,
 })
 const userTitle = computed(() => {

+ 3 - 4
src/pages/webview/index.vue

@@ -1,14 +1,13 @@
 <template>
-  <web-view :src="data.url" @message="methods.bindmessage" />
+  <web-view :src="url" @message="methods.bindmessage" />
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
-  url: store.curPage.pageConfig.params.url,
-})
+const url = computed(() => store.curPage.pageConfig?.params?.url)
 const methods = {
   bindmessage(e) {},
 }
+ay.entrance()
 </script>
 
 <style></style>

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

@@ -3,7 +3,7 @@
 </template>
 
 <script lang="ts" setup>
-const data = reactive({
+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}`),
 })

+ 0 - 18
src/style/index.scss

@@ -412,24 +412,6 @@ image {
   }
 }
 
-.page-custom {
-  padding: 0 $p-spac;
-  margin: 0 calc($p-spac / -1);
-  margin-bottom: $p-spac;
-  background-color: #f8f8f8;
-  @apply flex;
-  @apply items-end;
-}
-
-.page-title {
-  // position: absolute;
-  // top: 50px;
-  // right: 0;
-  // left: 0;
-  width: 100%;
-  height: 44px;
-}
-
 // #region 穿透到组件内样式,以pass-com 开头
 .pass-com-rotater {
   display: inline-block;

+ 35 - 1
src/types/schemas/strategy.d.ts

@@ -1280,12 +1280,16 @@ interface GasstationVO对象 {
   actualPrice?: number
   /** 地址 */
   address?: string
+  /** 收银员数量 */
+  cashierNum?: number
   /** 城市 */
   city?: string
   /** 两个经纬度之间的直线距离(公里) */
   distance?: number
   /** 对接状态码 DJ100,DJ000 */
   djCode?: string
+  /** 加注机数量 */
+  fillingMachineNum?: number
   /** 加气限制状态(0关闭1开启)默认值关闭0 */
   gasLimitStatus?: number
   /** 加气限制库存量 */
@@ -1294,14 +1298,20 @@ interface GasstationVO对象 {
   gasstationId?: string
   /** 企业名称 */
   gasstationName?: string
+  /** 加气站宣传文案 */
+  introduce?: string
   /** 纬度 */
   latitude?: string
   /** 今日挂牌价-加气站输入的价格 */
   listPrice?: number
   /** 经度 */
   longitude?: string
+  /** 手机号 */
+  mobile?: string
   /** 加气站名称 */
   nickName?: string
+  /** 加气站形象图列表 */
+  orgPics?: array
   /** 平台挂牌价 */
   platformPrice?: number
   /** 省份 */
@@ -3585,6 +3595,10 @@ interface User对象 {
   /** 用户类型(0 平台用户 1加气企业用户 2物流公司 用户 3卡车经销商用户 4司机 5收银员 */
   userType?: number
 }
+interface ip白名单校验_参数类 {
+  /** 要校验的ip */
+  ip?: string
+}
 interface manPriceSnpLog对象 {
   /** 采购价(元/公斤) */
   buyPrice?: number
@@ -4040,6 +4054,8 @@ interface 司机账户余额信息 {
   flag?: number
   /** 不足余额额度 */
   limitAmount?: number
+  /** 0=自营 1=挂靠车辆 */
+  linked?: number
   /** 组织id */
   orgId?: string
   /** 组织名称 */
@@ -4261,6 +4277,18 @@ interface 待支付订单_可选支付方式获取实体类 {
   /** 个人支付 */
   personPay?: 待支付订单_可选支付方式个人支付实体类
 }
+interface 成丰三方对接对象 {
+  /** 组织名称 */
+  orgName?: string
+  /** 退款推送地址 */
+  refundUrl?: string
+  /** 加气站推送地址 */
+  stationUrl?: string
+  /** 车牌号后缀 */
+  suffix?: string
+  /** 对接物流id */
+  thirdId?: number
+}
 interface 成丰对接_站全量查询参数 {
   /** 车牌号 */
   carNumber?: string
@@ -4268,6 +4296,8 @@ interface 成丰对接_站全量查询参数 {
   end?: string
   /** 加气站id */
   gasstationId?: number
+  /** 推送加气站id列表 */
+  ids?: array
   /** 订单状态(1.待支付 2.已支付 3.已取消 6.已退款) */
   orderStatus?: number
   /** 物流公司id */
@@ -4962,10 +4992,14 @@ interface 订单导出参数 {
 interface 订单查询参数实体类 {
   /** 车牌号 */
   carNumber?: string
+  /** 物流公司id(user.org.org_id) */
+  carrierOrgId?: number
   /** 物流公司 */
   carrierOrgName?: string
   /** 收银员姓名 */
   cashierName?: string
+  /** 司机id(user.user.user_id) */
+  driverId?: number
   /** 驾驶员姓名 */
   driverName?: string
   /** 创建时间查询结束时间,格式:yyyy-MM-dd HH:mm:ss */
@@ -4993,7 +5027,7 @@ interface 订单查询参数实体类 {
   /** 支付时间查询开始时间,格式:yyyy-MM-dd HH:mm:ss */
   startUpdateDate?: string
   /** 交易模式,null(不传参)全部  1大象经销 2大象直销 10.其他,多个状态查询,逗号间隔 */
-  tradeTypes?: string
+  tradeType?: string
 }
 interface 订单详情 {
   /** 实际气价(结算价)=platform_price-rebate */

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

@@ -5,9 +5,29 @@ const common = {
   isH5: __UNI_PLATFORM__ === 'h5',
   isApp: __UNI_PLATFORM__ === 'app',
   isMp: __UNI_PLATFORM__.startsWith('mp-'),
+  /** 骨架屏默认 */
+  skeletons: [
+    ...Array(20).fill({
+      align: 'left',
+      colItems: 1,
+    }),
+    {
+      align: 'left',
+      colItems: [
+        {
+          style: {
+            width: '60%',
+          },
+        },
+      ],
+    },
+  ],
   /** 驾驶员申请状态
    * 1.无任何信息 2.显示物流公司信息 3.显示退出申请 4.显示加入申请 5.显示预添加信息
    */
+  get safeAreaTopHeight() {
+    return config.common.SystemInfo.safeArea.top + 44
+  },
   get orgDetailType() {
     return { 3: '申请退出', 4: '申请加入' }
   },

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

@@ -2312,6 +2312,24 @@ export default {
     reqType: {} as 成丰对接_站全量查询参数,
     resType: {} as any,
   },
+  /** 根据orgId查询三方Org信息 */
+  get: {
+    realUrl: '/strategy/third_party/get' as const,
+    reqType: {} as 成丰对接_站全量查询参数,
+    resType: {} as 成丰三方对接对象,
+  },
+  /** 校验ip白名单 */
+  get_ip: {
+    realUrl: '/strategy/third_party/get_ip' as const,
+    reqType: {} as ip白名单校验_参数类,
+    resType: {} as any,
+  },
+  /** 根据orgId获取对接方信息 */
+  get_org: {
+    realUrl: '/strategy/third_party/get_org' as const,
+    reqType: {} as 成丰对接_站全量查询参数,
+    resType: {} as any,
+  },
   /** 物流车辆信息分页查询接口 */
   page_truck: {
     realUrl: '/strategy/third_party/page_truck' as const,

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

@@ -94,7 +94,10 @@ export default {
     _type: 'page',
     title: '加气订单 · 待支付',
     identity: true,
-    isPager: false
+    isPager: false,
+    style: {
+      navigationStyle: 'custom'
+    }
   } as ayPage,
   truckInfo_detail: {
     _url: '/pages/truckInfo/detail',
@@ -144,5 +147,12 @@ export default {
     title: '优惠卡/券',
     identity: true,
     isPager: false
+  } as ayPage,
+  cards_detail: {
+    _url: '/pages/cards/detail',
+    _type: 'page',
+    title: '购车优惠卡',
+    identity: true,
+    isPager: false
   } as ayPage
 }

+ 6 - 9
src/utils/container/index.ts

@@ -17,16 +17,14 @@ const staticData = {
 type ExtType<T> = Record<keyof T, { showLoading?: boolean }>
 export default {
   staticData,
-  initData(data) {
+  initData<T extends object>(data: T) {
     const rd = reactive(data)
-    const presetCurPage = store.curPage.initPageInfo({ data: rd, preset: true })
-    rd.pageConfig = {
-      title: presetCurPage.title,
-      style: presetCurPage.style,
-    }
+    // const presetCurPage = store.curPage.initPageInfo({ data: rd, preset: true })
+    // rd.pageConfig = {
+    //   title: presetCurPage.title,
+    //   style: presetCurPage.style,
+    // }
     return rd
-    // data.pageConfig = store.
-    // return reactive(data)
   },
   /** 初始化对象内的方法,自动为对象内所有方法增加防重提功能(同步方法、异步方法执行中再次触发不执行) */
 
@@ -165,7 +163,6 @@ export default {
       store.curPage.removeCurPagerInfo()
     })
     onLoad(() => {
-      console.log('onLoad')
       if (!func.antiShake({ func: init, immediately: true, mark: tempid })) {
         return
       }

+ 3 - 16
src/utils/store/curPage.ts

@@ -1,5 +1,5 @@
 import { defineStore } from 'pinia'
-const debug = () => import.meta.env.DEV && true
+const debug = () => import.meta.env.DEV && false
 /** 当前页面地址 */
 const curPage = ref<string>()
 /** 预制页面地址 */
@@ -13,9 +13,6 @@ const pageConfig = computed(() => {
 const pagerInfo = computed(() => {
   return pageConfig.value.pagerInfo
 })
-const pageData = computed(() => {
-  return pageConfig.value.data
-})
 const loadMoreStatus = computed(() => {
   let rv = 'more'
   if (pagerInfo.value.finished) {
@@ -122,7 +119,6 @@ export default defineStore(
       initPageInfo({
         page,
         params,
-        data,
         preset = false,
       }: { page?: ayPage; params?: AnyObject; data?: AnyObject; preset?: boolean } = {}) {
         const prePagePath = curPage.value
@@ -152,18 +148,10 @@ export default defineStore(
         if (params) {
           pageConfigs[presetCurPage.value].params = params
         }
-        if (data) {
-          pageConfigs[presetCurPage.value].data = data
-        }
         return pageConfigs[presetCurPage.value]
       },
-      switchPageInfo() {
-        const cps = getCurrentPages()
-        if (cps.length === 0) {
-          return
-        }
-        const cur = cps[cps.length - 1]
-        curPage.value = '/' + cur.route
+      activePage() {
+        curPage.value = presetCurPage.value
       },
       getPageInfo(route) {
         if (route === '/') {
@@ -188,7 +176,6 @@ export default defineStore(
       /** 当前页面配置信息 */
       pageConfig,
       pagerInfo,
-      pageData,
       /** 分页相关方法 */
       pagerMethods,
       /** uni-load-more 状态 */