Преглед на файлове

Merge remote-tracking branch 'origin/master' into zhangtao

zhangtao преди 4 дни
родител
ревизия
5a13f2fbf1

+ 65 - 0
src/api/api.type.d.ts

@@ -2430,7 +2430,72 @@ namespace Api {
      * 充电电费
      */
     totalMoney?: number
+    /**
+     * 用户实付
+     */
+    actualTotal?: number
+    platformVolume?: number
+  }
+
+  export interface RechargeLevel {
+    createTime?: string
+    /**
+     * 逻辑删除(0-未删除 1-已删除)
+     */
+    isDeleted?: number
+    /**
+     * 充值金额
+     */
+    money?: number
+    /**
+     * 充值档位名称
+     */
+    name?: string
+    /**
+     * 状态 (0-不可用 1-可用)
+     */
+    status?: number
+    /**
+     * 充值提示
+     */
+    tips?: string
+    updateTime?: string
+  }
+
+  export interface chargeLevelRequest {
+    /**
+     * 收货人电话
+     */
+    consigneeMobile?: string
+    /**
+     * 收货人姓名
+     */
+    consigneeName?: string
+    /**
+     * 购券金额
+     */
+    couponAmount?: number
+    [property: string]: any
+  }
 
+  export interface PurchaseRecordVO {
+    /**
+     * 购券金额
+     */
+    couponAmount?: number
+    /**
+     * 购卷时间
+     */
+    createTime?: string
+    /**
+     * 购券记录编号
+     */
+    recordNo?: string
+    /**
+     * 记录状态:1-已取消 2-已到账 3-退款
+     */
+    recordStatus?: number
+    [property: string]: any
   }
 
   interface videoRightHomePage {

+ 7 - 1
src/api/apiDefinitions.ts

@@ -99,6 +99,11 @@ export default {
   'charge.stopCharge': ['POST', '/smqjh-system/applet/v1/station/stopCharge'],
   'charge.stationInfoMapList': ['GET', '/smqjh-system/applet/v1/homePage/getStationInfoMapList'],
   'charge.orderDetail': ['GET', '/smqjh-oms/api/v1/order/getChargeOrder'],
+  'charge.getReChargeLevel': ['GET', '/smqjh-system/applet/v1/purchaseRecord/getReChargeLevel'],
+  'charge.addPurchaseRecord': ['POST', '/smqjh-system/applet/v1/purchaseRecord/addPurchaseRecord'],
+  'charge.wxJsApiPay': ['POST', '/smqjh-oms/service/pay/jsapi'],
+  'charge.getPurchaseRecordPage': ['POST', '/smqjh-system/applet/v1/purchaseRecord/getPurchaseRecordPage'],
+  'charge.userCouponRefund':['GET','/smqjh-oms/api/v1/order_cd/userCouponRefund'],
 
   'videoRight.findAppByPage': ['GET', '/smqjh-pms/app-api/v1/videoProduct/findAppByPage'],
   'videoRight.goodsDetail': ['GET', '/smqjh-pms/app-api/v1/videoProduct/findById'],
@@ -118,6 +123,7 @@ export default {
   'djk.welfareClaimInfoDetaile':['GET', '/smqjh-pms/app-api/v1/welfareClaimInfo/{memberId}'],
   'djk.welfareClaimInfoPopup':['GET', '/smqjh-pms/app-api/v1/welfareClaimInfo/popup/{memberId}'],
   'djk.addWelfareOrder':['POST', '/smqjh-oms/api/v1/djkOrder/addWelfareOrder'],
-  'djk.submitRefund':['POST', '/smqjh-oms/api/v1/djkOrder/submitRefund'],
+  'djk.submitRefund': ['POST', '/smqjh-oms/api/v1/djkOrder/submitRefund'],
 
+  'refueling.getPayCode':['POST','/smqjh-pms/api/v1/refueling/generateQrCode']
 };

+ 83 - 15
src/api/globals.d.ts

@@ -206,7 +206,7 @@ declare global {
     }
     xsb: {
       popupConfig<
-        Config extends Alova2MethodConfig<apiResData<any>> & { }
+        Config extends Alova2MethodConfig<apiResData<any>> & {}
       >(
         config: Config
       ): Alova2Method<apiResData<any>, 'xsb.popupConfig', Config>;
@@ -914,19 +914,70 @@ declare global {
       ): Alova2Method<apiResData<any>, 'charge.stationInfoMapList', Config>;
 
       orderDetail<
-        Config extends Alova2MethodConfig<apiResData<chargeOrderDetail>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.chargeOrderDetail>> & {
           data: {
             orderNumber?: string | null;
           }
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<chargeOrderDetail>, 'charge.orderDetail', Config>;
+      ): Alova2Method<apiResData<Api.chargeOrderDetail>, 'charge.orderDetail', Config>;
+
+      getReChargeLevel<
+        Config extends Alova2MethodConfig<apiResData<Api.RechargeLevel[]>> & {}
+      >(
+        config: Config
+      ): Alova2Method<apiResData<Api.RechargeLevel[]>, 'charge.getReChargeLevel', Config>;
+
+      addPurchaseRecord<
+        Config extends Alova2MethodConfig<apiResData<string>> & {
+          data: {
+            couponAmount?: number;
+            consigneeName?: string;
+            consigneeMobile?: string;
+          }
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<string>, 'charge.addPurchaseRecord', Config>;
+
+      wxJsApiPay<
+        Config extends Alova2MethodConfig<apiResData<wxpay>> & {
+          data: {
+            orderNumber?: string;
+          }
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<wxpay>, 'charge.wxJsApiPay', Config>;
+
+      getPurchaseRecordPage<
+        Config extends Alova2MethodConfig<listData<Api.PurchaseRecordVO>> & {
+          data: {
+            /**
+             * 页码
+             */
+            pageNum?: number;
+            /**
+             * 每页记录数
+             */
+            pageSize?: number;
+          }
+        }
+      >(
+        config: Config
+      ): Alova2Method<listData<Api.PurchaseRecordVO>, 'charge.getPurchaseRecordPage', Config>;
+
+      userCouponRefund<
+        Config extends Alova2MethodConfig<apiResData<any>> & {}
+      >(
+        config: Config
+      ): Alova2Method<apiResData<any>, 'charge.userCouponRefund', Config>;
     }
 
     videoRight: {
       findAppByPage<
-        Config extends Alova2MethodConfig<apiResData<videoRightHomePage>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.videoRightHomePage>> & {
           data: {
             pageNum?: number;
             pageSize?: number;
@@ -935,48 +986,48 @@ declare global {
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<videoRightHomePage>, 'videoRight.findAppByPage', Config>;
+      ): Alova2Method<apiResData<Api.videoRightHomePage>, 'videoRight.findAppByPage', Config>;
 
       goodsDetail<
-        Config extends Alova2MethodConfig<apiResData<VideoProductVo>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.VideoProductVo>> & {
           data: {
             id: string
           }
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<VideoProductVo>, 'videoRight.goodsDetail', Config>;
+      ): Alova2Method<apiResData<Api.VideoProductVo>, 'videoRight.goodsDetail', Config>;
 
       goodsPreview<
-        Config extends Alova2MethodConfig<apiResData<VideoProductOrderPreviewVo>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.VideoProductOrderPreviewVo>> & {
           data: {
             id: string
           }
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<VideoProductOrderPreviewVo>, 'videoRight.goodsPreview', Config>;
+      ): Alova2Method<apiResData<Api.VideoProductOrderPreviewVo>, 'videoRight.goodsPreview', Config>;
 
       orderCreate<
-        Config extends Alova2MethodConfig<videoRightCreateOrder> & {
+        Config extends Alova2MethodConfig<Api.videoRightCreateOrder> & {
           data: Api.videoRightsubmitOrder;
         }
       >(
         config: Config
-      ): Alova2Method<videoRightCreateOrder, 'videoRight.orderCreate', Config>;
+      ): Alova2Method<Api.videoRightCreateOrder, 'videoRight.orderCreate', Config>;
 
       orderDetail<
-        Config extends Alova2MethodConfig<apiResData<VirtualOrderDetailVo>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.VirtualOrderDetailVo>> & {
           data: {
             orderNumber: string
           }
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<VirtualOrderDetailVo>, 'videoRight.goodsPreview', Config>;
+      ): Alova2Method<apiResData<Api.VirtualOrderDetailVo>, 'videoRight.goodsPreview', Config>;
 
       orderList<
-        Config extends Alova2MethodConfig<apiResData<DataVirtualOrderListVo>> & {
+        Config extends Alova2MethodConfig<apiResData<Api.DataVirtualOrderListVo>> & {
           data: {
             rechargeStatus?: string
             pageNum?: number
@@ -985,7 +1036,7 @@ declare global {
         }
       >(
         config: Config
-      ): Alova2Method<apiResData<DataVirtualOrderListVo>, 'videoRight.orderList', Config>;
+      ): Alova2Method<apiResData<Api.DataVirtualOrderListVo>, 'videoRight.orderList', Config>;
     }
     djk: {
       appletGoodsList<
@@ -1179,6 +1230,23 @@ declare global {
         config: Config
       ): Alova2Method<apiResData<any>, 'djk.submitRefund', Config>;
     }
+    refueling: {
+      /**
+       * 加油支付码
+       */
+      getPayCode<
+        Config extends Alova2MethodConfig<apiResData<string>> & {
+          data: {
+            /**
+             * 二维码内容
+             */
+            content?: string;
+          };
+        }
+      >(
+        config: Config
+      ): Alova2Method<apiResData<string>, 'refueling.getPayCode', Config>;
+    }
   }
 }
 var Apis: Apis;

+ 1 - 1
src/config/index.ts

@@ -6,7 +6,7 @@ const mapEnvVersion = {
   // develop: 'http://192.168.1.101:8080',
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
-  // develop: 'http://192.168.0.19:8080',
+  // develop: 'http://192.168.0.19:8080', // 邓
   // develop: 'http://192.168.0.217:8080', // 黄
   // develop: 'http://192.168.0.11:8080', // 王
   // develop: 'http://192.168.1.89:8080', // 田

+ 19 - 1
src/pages.json

@@ -397,6 +397,14 @@
     {
       "root": "subPack-charge",
       "pages": [
+        {
+          "path": "chargeBuyaTicketList/chargeBuyaTicketList",
+          "name": "charge-buy-a-ticket-list",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "购券记录"
+          }
+        },
         {
           "path": "chargeDetail/chargeDetail",
           "name": "charge-detail",
@@ -469,6 +477,15 @@
             "navigationStyle": "custom"
           }
         },
+        {
+          "path": "chargeVoucher/chargeVoucher",
+          "name": "charge-voucher",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "",
+            "navigationStyle": "custom"
+          }
+        },
         {
           "path": "index/index",
           "name": "charge-index",
@@ -506,7 +523,8 @@
           "name": "video-rights-order-info",
           "islogin": true,
           "style": {
-            "navigationBarTitleText": "订单确认"
+            "navigationBarTitleText": "订单确认",
+            "navigationStyle": "custom"
           }
         },
         {

+ 7 - 0
src/pages/index/index.vue

@@ -85,6 +85,13 @@ function handleClick(name: string) {
     show({ msg: '您所属的企业暂无权限查看 !' })
     return
   }
+  if (name === 'refueling-tabbar') { // 跳转至公众号
+    ;(wx as any).openOfficialAccountProfile({
+      username: 'gh_6a682fa2ed1d',
+    })
+    return
+  }
+
   router.push({ name })
 }
 onShareAppMessage(() => {

+ 97 - 0
src/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList.vue

@@ -0,0 +1,97 @@
+<script setup lang="ts">
+import { createGlobalLoadingMiddleware } from '@/api/core/middleware'
+
+definePage({
+  name: 'charge-buy-a-ticket-list',
+  islogin: false,
+  style: {
+    navigationBarTitleText: '购券记录',
+  },
+})
+
+/**
+ * 获取购券记录列表
+ */
+const { data: recordList, isLastPage, page } = usePagination((pageNum, pageSize) =>
+  Apis.charge.getPurchaseRecordPage({ data: { pageNum, pageSize } }), {
+  data: (resp) => {
+    return resp.data?.list
+  },
+  initialData: [],
+  initialPage: 1,
+  initialPageSize: 10,
+  append: true,
+  immediate: true,
+  middleware: createGlobalLoadingMiddleware(),
+})
+
+onReachBottom(() => {
+  if (!isLastPage.value) {
+    page.value++
+  }
+})
+
+/**
+ * 获取状态文本
+ */
+function getStatusText(recordStatus?: number) {
+  switch (recordStatus) {
+    case 1:
+      return '已取消'
+    case 2:
+      return '已到账'
+    case 3:
+      return '退款'
+    default:
+      return '未知'
+  }
+}
+
+/**
+ * 获取状态样式
+ */
+function getStatusClass(recordStatus?: number) {
+  switch (recordStatus) {
+    case 1:
+      return 'bg-#AAAAAA text-#666666'
+    case 2:
+      return 'bg-#9ED605 text-#FFFFFF'
+    case 3:
+      return 'bg-#FF9500 text-#FFFFFF'
+    default:
+      return 'bg-#AAAAAA text-#666666'
+  }
+}
+</script>
+
+<template>
+  <view class="min-h-screen bg-#F5F7FB px-24rpx">
+    <view class="h-10rpx" />
+    <StatusTip v-if="!recordList.length" tip="暂无内容" />
+    <view v-for="item in recordList" :key="item.recordNo" class="mt-20rpx bg-#FFFFFF px-24rpx py-28rpx">
+      <view class="relative flex items-center justify-between">
+        <view class="text-32rpx font-bold">
+          {{ item.couponAmount }}元充电费抵扣券
+        </view>
+        <view class="absolute right-[-24rpx] rounded-[30rpx_0rpx_0rpx_4rpx] px-14rpx py-8rpx text-28rpx text-#FFF" :class="getStatusClass(item.recordStatus)">
+          • {{ getStatusText(item.recordStatus) }}
+        </view>
+      </view>
+      <view class="mt-28rpx h-2rpx w-full bg-#F0F0F0" />
+      <view class="mt-28rpx">
+        <view class="text-24rpx text-#AAAAAA">
+          订单编号:{{ item.recordNo }}
+        </view>
+        <view class="mt-20rpx text-24rpx text-#AAAAAA">
+          购券时间:{{ item.createTime }}
+        </view>
+        <view class="mt-20rpx text-24rpx text-#AAAAAA">
+          实付金额:{{ item.couponAmount }}元
+        </view>
+      </view>
+    </view>
+    <view class="h-20rpx" />
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 19 - 3
src/subPack-charge/chargeOrderDetail/chargeOrderDetail.vue

@@ -158,10 +158,26 @@ async function getOrderDetail() {
         </view> -->
         <view class="mt-28rpx flex items-center justify-between">
           <view class="text-28rpx font-500">
-            实际结算费用
+            订单金额
           </view>
           <view class="text-28rpx text-#F44033">
-            {{ chargeOrderDetail?.realCost }}元
+            {{ chargeOrderDetail?.actualTotal || '--' }}元
+          </view>
+        </view>
+        <view class="mt-28rpx flex items-center justify-between">
+          <view class="text-24rpx">
+            积分扣减
+          </view>
+          <view class="text-24rpx text-#F44033">
+            {{ chargeOrderDetail?.realCost || '--' }}元
+          </view>
+        </view>
+        <view class="mt-28rpx flex items-center justify-between">
+          <view class="text-24rpx">
+            平台券
+          </view>
+          <view class="text-24rpx text-#F44033">
+            {{ chargeOrderDetail?.platformVolume || '--' }}元
           </view>
         </view>
       </view>
@@ -170,7 +186,7 @@ async function getOrderDetail() {
           !
         </view>
         <view class="text-24rpx">
-          本次充电费用已从您的“账户余额”中抵扣结算
+          本次充电费用已通过您的积分与市民券抵扣结算
         </view>
       </view>
     </view>

+ 174 - 0
src/subPack-charge/chargeVoucher/chargeVoucher.vue

@@ -0,0 +1,174 @@
+<script setup lang="ts">
+import router from '@/router'
+import { StaticUrl } from '@/config'
+
+const { userInfo } = storeToRefs(useUserStore())
+definePage({
+  name: 'charge-voucher',
+  islogin: true,
+  style: {
+    navigationBarTitleText: '',
+    navigationStyle: 'custom',
+  },
+})
+const { statusBarHeight, MenuButtonHeight, opcity } = storeToRefs(useSysStore())
+const couponBalance = ref()
+onLoad((options: any) => {
+  console.log(options, '路由参数')
+  couponBalance.value = options.couponBalance
+})
+onMounted(() => {
+  opcity.value = 0
+  getRechargeLevels()
+})
+onPageScroll((e) => {
+  const calculatedOpacity = e.scrollTop / 100
+  opcity.value = Math.min(1, Math.max(0.1, calculatedOpacity))
+})
+
+const selectIndex = ref<number>()
+
+/**
+ * 获取充值挡位
+ */
+const rechargeLevels = ref<Api.RechargeLevel[]>([])
+async function getRechargeLevels() {
+  const res = await Apis.charge.getReChargeLevel({})
+  rechargeLevels.value = res.data
+}
+function selectVoucher(index: number) {
+  selectIndex.value = index
+  console.log('Selected voucher index:', index)
+}
+
+// 安全获取充值档位
+function getSelectedLevel(): Api.RechargeLevel | undefined {
+  if (selectIndex.value === undefined || !rechargeLevels.value)
+    return undefined
+  return rechargeLevels.value[selectIndex.value]
+}
+
+/**
+ * 提交支付
+ */
+async function submitPay() {
+  if (selectIndex.value === undefined) {
+    return useGlobalMessage().alert('请选择充值金额')
+  }
+  const selectedLevel = getSelectedLevel()
+  if (!selectedLevel) {
+    return
+  }
+  try {
+    uni.showLoading({ title: '下单中...', mask: true })
+    const orderRes = await Apis.charge.addPurchaseRecord({
+      data: {
+        couponAmount: selectedLevel.money,
+        consigneeName: userInfo.value?.nickName || '',
+        consigneeMobile: userInfo.value?.mobile || '',
+      },
+    })
+    const orderNumber = orderRes.data
+    if (!orderNumber) {
+      uni.hideLoading()
+      uni.showToast({ title: '下单失败', icon: 'none' })
+      return
+    }
+    const payRes = await Apis.charge.wxJsApiPay({
+      data: {
+        orderNumber,
+      },
+    })
+    uni.hideLoading()
+    await useUserStore().getWxCommonPayment(payRes.data)
+    useUserStore().paySuccess('charge-buy-a-ticket-list', '/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
+  }
+  catch (error) {
+    uni.hideLoading()
+    console.error('支付失败:', error)
+    useUserStore().payError('charge-buy-a-ticket-list', '/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
+  }
+}
+</script>
+
+<template>
+  <view class="min-h-screen" :style="{ backgroundImage: `url(${StaticUrl}/buy-center-bg.png)`, backgroundSize: 'cover', backgroundPosition: 'center' }">
+    <wd-navbar
+      title="购券中心" :custom-style="`background-color: rgba(226, 255, 145, ${opcity})`" :bordered="false"
+      :z-index="99" safe-area-inset-top left-arrow fixed @click-left="router.back()"
+    />
+    <view :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }" class="px24rpx">
+      <view class="h-342rpx" />
+      <view class="relative rounded-16rpx from-[#E1FF90] via-[#FAFFEE] to-[#FFFFFF] bg-gradient-to-b p-12rpx">
+        <image
+          class="absolute right-12rpx top-12rpx h-144rpx w-144rpx"
+          :src="`${StaticUrl}/buy-center-cardIcon.png`"
+          mode="scaleToFill"
+        />
+        <view class="mt-16rpx text-center">
+          <view class="text-28rpx">
+            平台券金额
+          </view>
+          <view class="mt-16rpx text-28rpx font-800">
+            {{ couponBalance }}
+            <text class="text-24rpx">
+              元
+            </text>
+          </view>
+        </view>
+        <view class="mb-16rpx mt-28rpx flex items-center justify-around text-28rpx">
+          <view @click="router.push({ name: 'charge-buy-a-ticket-list' })">
+            充值记录
+          </view>
+          <view class="h-40rpx w-2rpx bg-#E6E6E6" />
+          <view @click="router.push({ name: 'charge-buy-a-ticket-list' })">
+            退款
+          </view>
+        </view>
+      </view>
+      <view class="mt-20rpx">
+        <view class="text-32rpx font-bold">
+          本次充值
+        </view>
+        <view class="mt-24rpx flex flex-wrap items-center justify-start gap-20rpx">
+          <view v-for="(item, index) in rechargeLevels" :key="index" class="h-136rpx w-220rpx text-center" :class="selectIndex === index ? 'text-[#9ED605]' : 'text-#2B303Ac'" :style="{ backgroundImage: `url(${StaticUrl}/${selectIndex === index ? 'buy-center-rechargesel' : 'buy-center-recharge'}.png)`, backgroundSize: 'cover', backgroundPosition: 'center' }" @click="selectVoucher(index)">
+            <view class="h-80rpx text-28rpx font-bold line-height-[80rpx]">
+              {{ item?.money }}<text class="text-24rpx">
+                元
+              </text>
+            </view>
+            <view class="h-46rpx text-28rpx font-bold line-height-[46rpx] font-italic">
+              {{ item?.name }}
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="mt-24rpx">
+        <view class="font-bold">
+          温馨提示
+        </view>
+        <view class="mt-24rpx text-24rpx text-#AAAAAA">
+          <view>1.平台券仅限本平台使用,不可转赠和出售。</view>
+          <view class="mt-20rpx">
+            2.平台券仅可用于本平台充电服务,若订单金额超过平台券余额,
+            需补足差价;若余额有剩余,可留存下次使用;剩余平台券余额支
+            持手动退款。
+          </view>
+          <view class="mt-20rpx">
+            3.平台保留调整平台券使用规则的权利,调整前将提前公告。
+            如有疑问,请联系客服。
+          </view>
+        </view>
+      </view>
+      <view
+        class="fixed bottom-66rpx left-24rpx h-100rpx w-702rpx rounded-16rpx text-center text-28rpx font-800 line-height-[100rpx]"
+        :class="selectIndex === undefined ? 'bg-[#CCCCCC] text-white' : 'bg-[linear-gradient(90deg,#DBFC81_0%,#9ED605_100%)] text-black shadow-[inset_0rpx_6rpx_20rpx_2rpx_#FFFFFF]'"
+        @click="submitPay"
+      >
+        立即支付
+      </view>
+    </view>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 114 - 30
src/subPack-charge/index/index.vue

@@ -73,6 +73,32 @@ function handleFilterClick(filterKey: number) {
   activeFilter.value = filterKey
   reload()
 }
+
+/**
+ * 申请退款
+ */
+
+function refund() {
+  useGlobalMessage().confirm({
+    title: '提示',
+    msg: '退款按照购券记录进行逐笔退款,可能产生多笔退款到账记录,请注意查收。',
+    success: async () => {
+      const res = await Apis.charge.userCouponRefund({})
+      if (res.code === '00000') {
+        useGlobalMessage().confirm({
+          title: '提示',
+          msg: '申请退款成功,预计3个工作日内分一笔或多笔退还,到期如未到账请联系客服!',
+          success: () => {
+            refresh()
+          },
+          fail: () => {
+            refresh()
+          },
+        })
+      }
+    },
+  })
+}
 </script>
 
 <template>
@@ -98,49 +124,107 @@ function handleFilterClick(filterKey: number) {
             class="h-100rpx w-100rpx"
             :src="`${userInfo && userInfo?.avatarUrl ? userInfo.avatarUrl : `${StaticUrl}/charge-default-avatar.png`}`"
           />
-          <view class="flex items-center gap-16rpx">
-            <view class="text-32rpx text-#2B303A font-bold">
-              {{ userInfo?.nickName || '暂未登录' }}
-            </view>
-            <view v-if="!token" class="text-24rpx text-#9ED605" @click="router.replace({ name: 'smqjh-login' })">
-              授权登录
+          <view>
+            <view class="flex items-center gap-16rpx">
+              <view class="text-32rpx text-#2B303A font-bold">
+                {{ userInfo?.nickName || '暂未登录' }}
+              </view>
+              <view v-if="!token" class="text-24rpx text-#9ED605" @click="router.replace({ name: 'smqjh-login' })">
+                授权登录
+              </view>
+              <view v-else class="rounded-8rpx bg-#E9FFAC px12rpx py4rpx text-24rpx text-#9ED605">
+                {{ userInfo.channelName }}
+              </view>
             </view>
-            <view v-else class="rounded-8rpx bg-#9ED605 px12rpx py4rpx text-24rpx text-#FFF opacity-70">
-              {{ userInfo.channelName }}
+            <view class="mt-16rpx text-28rpx font-bold">
+              {{ userInfo?.mobile }}
             </view>
           </view>
         </view>
-        <view class="mt-20rpx flex items-center justify-between gap-18rpx">
-          <view class="bg-#F3FFD1 p-24rpx">
-            <view class="flex items-center justify-between gap-48rpx text-28rpx text-#2B303A font-bold">
-              <view>我的积分</view>
-              <view>可用充电余额</view>
+        <view class="mt-20rpx rounded-16rpx bg-#F3FFD1 px-24rpx py-30rpx">
+          <view class="relative flex items-center justify-between">
+            <view class="flex items-center gap-16rpx">
+              <view class="h-40rpx w-40rpx">
+                <image
+                  class="h-40rpx w-40rpx"
+                  :src="`${StaticUrl}/charge-mine-wallet.png`"
+                  mode="scaleToFill"
+                />
+              </view>
+              <view class="text-32rpx font-bold">
+                我的钱包
+              </view>
+            </view>
+            <view class="absolute right-[-24rpx] h-44rpx w-120rpx rounded-[22rpx_0_0_22rpx] bg-#9ED605 text-center text-28rpx text-#FFF line-height-[44rpx]" @click="refund">
+              退还
             </view>
-            <view class="mt-24rpx flex items-center gap-30rpx text-28rpx text-#9ED605 font-500">
-              <view class="flex items-center gap-20rpx">
-                <text class="w-120rpx overflow-hidden truncate whitespace-nowrap">
-                  {{ userAccountInfo?.availablePoints || '0.00' }}
-                </text>
-                <image class="h-30rpx w-30rpx" :src="`${StaticUrl}/charge-acc.png`" />
-              </view>
-              <view class="w-120rpx overflow-hidden truncate whitespace-nowrap">
-                <text class="text-20rpx">
+          </view>
+          <view class="mt-24rpx flex items-center justify-around">
+            <view class="text-center">
+              <view class="text-28rpx">
+                企业积分
+              </view>
+              <view class="mt-16rpx text-40rpx text-#9ED605 font-bold">
+                {{ userAccountInfo?.availablePoints || '0.00' }}
+              </view>
+            </view>
+            <view class="h-92rpx w-2rpx bg-#9ED605" />
+            <view class="text-center">
+              <view class="text-28rpx">
+                平台券
+              </view>
+              <view class="mt-16rpx text-40rpx text-#9ED605 font-bold">
+                <text class="text-24rpx">
-                </text>
-                {{ userAccountInfo?.balance || '0.00' }}
+                </text>{{ userAccountInfo?.couponBalance || '0.00' }}
               </view>
             </view>
           </view>
-          <view class="flex items-center gap-20rpx bg-#F3FFD1 p-24rpx" @click="router.push({ name: 'charge-order-list' })">
-            <view>
-              <view class="text-28rpx font-bold">
+        </view>
+      </view>
+      <view class="mt-24rpx flex justify-between">
+        <view class="flex items-center gap-18rpx rounded-16rpx bg-#FFF px-24rpx py-28rpx">
+          <view>
+            <view class="flex items-center gap-16rpx" @click="router.push({ name: 'charge-order-list' })">
+              <text class="text-32rpx font-bold">
                 充电订单
+              </text>
+              <view class="h-30rpx w-30rpx rounded-50% bg-#000 text-center line-height-[30rpx]">
+                <wd-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
               </view>
-              <view class="mt-24rpx text-28rpx text-#9ED605 font-500">
-                {{ userAccountInfo?.chargingOrderCount || '0' }}
+            </view>
+            <view class="mt-16rpx text-24rpx">
+              查看充电订单
+            </view>
+          </view>
+          <view class="h-100rpx w-100rpx">
+            <image
+              class="h-100rpx w-100rpx"
+              :src="`${StaticUrl}/charge-mine-order.png`"
+              mode="scaleToFill"
+            />
+          </view>
+        </view>
+        <view class="flex items-center gap-18rpx rounded-16rpx bg-#FFF px-24rpx py-28rpx" @click="router.push({ name: 'charge-voucher', params: { couponBalance: userAccountInfo?.couponBalance } })">
+          <view>
+            <view class="flex items-center gap-16rpx">
+              <text class="text-32rpx font-bold">
+                购券中心
+              </text>
+              <view class="h-30rpx w-30rpx rounded-50% bg-#000 text-center line-height-[30rpx]">
+                <wd-icon name="arrow-right" color="#FFFFFF" size="30rpx" />
               </view>
             </view>
-            <image class="h-80rpx w-80rpx" :src="`${StaticUrl}/charge-order.png`" />
+            <view class="mt-16rpx text-24rpx">
+              平台券充值
+            </view>
+          </view>
+          <view class="h-100rpx w-100rpx">
+            <image
+              class="h-100rpx w-100rpx"
+              :src="`${StaticUrl}/charge-mine-voucher.png`"
+              mode="scaleToFill"
+            />
           </view>
         </view>
       </view>

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

@@ -80,7 +80,7 @@ function getLabel(val: string) {
             {{ (type[Number(item.pointsType) - 1] == '下单' ? getLabel(item.businessType) : type[Number(item.pointsType) - 1]) || '未知状态' }}
           </view>
           <view class="text-[#FF4A39]">
-            {{ item?.variablePoints || 0 }}
+            {{ item?.pointsTypeName }}{{ item?.variablePoints || 0 }}
           </view>
         </view>
         <view class="mt-20rpx flex items-center justify-between text-28rpx text-[#AAAAAA]">

+ 47 - 0
src/subPack-refueling/commonTab/index.vue

@@ -7,15 +7,61 @@ definePage({
   },
 })
 
+onMounted(() => {
+  console.log('触发加载')
+  getPayQrcode()
+})
+
 function refuelingPay() {
   console.log('触发跳转')
   // router.push({ name: 'refueling-webview' })
+  // wx.openOfficialAccountArticle({
+  //   url: 'https://smqjh.admin.zswlgz.com/test.html', // 此处填写公众号的原始 ID
+  //   success: (res) => {
+  //   },
+  //   fail: (res) => {
+  //     console.log(res, 'err')
+  //   },
+  // })
   uni.navigateToMiniProgram({
     appId: 'wx0d252f6ed9755862', // 滴滴加油小程序appId
     path: 'packageA/pages/open-energy-pay/index?orderId=&tradeId=&appId=wx43b5b906cc30ed0b&path=/pages/index/index&envVersion=小程序回跳环境', // 滴滴加油收银台页面地址,需要拼接orderId和tradeId
     envVersion: 'release', // 固定release
   })
 }
+
+const payQrCode = ref('')
+async function getPayQrcode() {
+  const res = await Apis.refueling.getPayCode({
+    data: {
+      content: 'https://static.am.xiaojukeji.com/cf-terminal/oil/thanos-fe-oil/pages/open-energy-h5-pay/index.html?orderId=3521815091021431239&tradeId=20260226b3dd729612c482ab35c26879ca59118a10560142',
+    },
+  })
+  payQrCode.value = res.data
+}
+function testClick() {
+  uni.previewImage({
+    // 需要预览的图片链接列表
+    urls: [payQrCode.value],
+    // 当前显示图片的链接
+    current: payQrCode.value,
+    // 图片指示器样式
+    indicator: 'default',
+    // 是否可循环预览
+    loop: false,
+    showmenu: true,
+    // 长按图片显示操作菜单
+    longPressActions: {
+      itemList: ['发送给朋友', '保存到相册', '识别图中二维码'],
+    },
+    success: (res) => {
+      console.log('previewImage res', res)
+    },
+    fail: (err) => {
+      console.log('previewImage err', err)
+    },
+  })
+}
 </script>
 
 <template>
@@ -23,6 +69,7 @@ function refuelingPay() {
     <wd-button @click="refuelingPay">
       加油充值
     </wd-button>
+    <image :src="payQrCode" @click="testClick" />
   </view>
 </template>
 

+ 15 - 4
src/subPack-videoRights/commonTab/components/home.vue

@@ -57,15 +57,16 @@ function clearSearch() {
       <scroll-view scroll-y type="custom">
         <grid-view type="masonry" cross-axis-count="2" main-axis-gap="10" cross-axis-gap="10">
           <view v-for="item in videoDataList" :key="item?.id" class="mt-18rpx rounded-16rpx bg-#FFF" @click="router.push({ name: 'video-rights-detail', params: { id: item.id } })">
-            <view>
+            <view class="image-wrapper h-342rpx w-342rpx">
               <image
-                class="h-342rpx w-342rpx rounded-16rpx"
+                class="h-full w-full rounded-16rpx object-c"
+                mode="aspectFill"
                 :src="item.productImg ? item.productImg : `${StaticUrl}/list-page-img.png`"
               />
             </view>
             <view class="mx20rpx my-24rpx">
               <view class="text-28rpx font-bold">
-                {{ item.productName }}
+                {{ item.localProductName ? item.localProductName : item.productName }}
               </view>
               <view class="mt-30rpx flex items-center justify-between">
                 <view class="text-#FF4D3A">
@@ -90,4 +91,14 @@ function clearSearch() {
   </view>
 </template>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.image-wrapper {
+  overflow: hidden;
+}
+.image-wrapper .object-c {
+  width: 100%;
+  height: 100%;
+  object-fit: cover;
+  display: block;
+}
+</style>

+ 1 - 1
src/subPack-videoRights/videoRightsDetail/videoRightsDetail.vue

@@ -27,7 +27,7 @@ async function getGoodsDetail() {
 <template>
   <view class="video-rights-detail-page">
     <view class="relative h-750rpx">
-      <image class="h-750rpx w-full" :src="`${StaticUrl}/videoRight-goodsDetail.png`" />
+      <image class="h-750rpx w-full" :src="goodsDetail?.productImg ? goodsDetail?.productImg : `${StaticUrl}/videoRight-goodsDetail.png`" />
       <view class="absolute bottom-0 left-24rpx right-24rpx rounded-16rpx bg-#FFF p-24rpx">
         <view class="flex items-center gap-18rpx">
           <view class="text-#FF4D3A">

+ 25 - 1
src/subPack-videoRights/videoRightsOrderInfo/videoRightsOrderInfo.vue

@@ -3,17 +3,21 @@ import StatusDisplay from '../components/StatusDisplay.vue'
 import { StaticUrl } from '@/config'
 import router from '@/router'
 
+const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
 definePage({
   name: 'video-rights-order-info',
   islogin: true,
   style: {
     navigationBarTitleText: '订单确认',
+    navigationStyle: 'custom',
   },
 })
 
 const orderNo = ref('')
+const topUp = ref('')
 onLoad((options: any) => {
   orderNo.value = options.orderNo
+  topUp.value = options.topUp
   console.log(options, '页面数据')
 })
 onMounted(() => {
@@ -25,9 +29,29 @@ async function getOrderDetail() {
   const res = await Apis.videoRight.orderDetail({ data: { orderNumber: orderNo.value } })
   videoRightOrderDetail.value = res.data
 }
+
+function orderBack() {
+  const vrIndex = 'subPack-videoRights/commonTab/index'
+  const pages = getCurrentPages()
+  const targetPageIndex = pages.findIndex(page => page.route === vrIndex)
+  if (topUp.value === 'true') {
+    if (targetPageIndex !== -1) {
+      const delta = pages.length - targetPageIndex - 1
+      router.back({ delta, animationType: 'fade-out' })
+    }
+  }
+  else {
+    router.back()
+  }
+}
 </script>
 
 <template>
+  <wd-navbar
+    title="订单详情" custom-style="background-color:#FFF" :bordered="false" :z-index="99"
+    safe-area-inset-top left-arrow fixed @click-left="orderBack"
+  />
+  <view :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }" />
   <view class="video-rights-order-info-page">
     <view class="box-border px24rpx">
       <view class="h-22rpx" />
@@ -100,7 +124,7 @@ async function getOrderDetail() {
       </view>
     </view>
     <view class="fixed bottom-0 h-174rpx w-full border-[1rpx_solid_#EEEEEE] bg-#FFF px-24rpx">
-      <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="router.back()">
+      <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="orderBack">
         返回
       </wd-button>
     </view>

+ 1 - 1
src/subPack-videoRights/videoRightsSubmitOrder/videoRightsSubmitOrder.vue

@@ -79,7 +79,7 @@ function submitPay() {
       useGlobalLoading().loading({ msg: '提交中...' })
       const res = await Apis.videoRight.orderCreate({ data: submitFrom.value })
       useGlobalLoading().close()
-      router.push({ name: 'video-rights-order-info', params: { orderNo: res.data } })
+      router.push({ name: 'video-rights-order-info', params: { orderNo: res.data, topUp: 'true' } })
     },
   })
 }

+ 3 - 3
src/subPack-xsb/commonTab/components/index.vue

@@ -227,8 +227,8 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
           </wd-notice-bar>
         </view>
         <view class="relative mt20rpx box-border" @click="useGlobalToast().show('敬请期待 !')">
-          <image :src="`${StaticUrl}/xsb-index.png`" class="h236rpx w-full" />
-          <view class="absolute left-0 top-0 box-border h-full w-full flex items-end justify-between px16rpx pb16rpx">
+          <image :src="`${StaticUrl}/xsb-index-bg.jpg`" class="h236rpx w-full rounded-16rpx" />
+          <!-- <view class="absolute left-0 top-0 box-border h-full w-full flex items-end justify-between px16rpx pb16rpx">
             <image
               :src="`${StaticUrl}/xsb-index1.png`"
               class="h148rpx w328rpx"
@@ -237,7 +237,7 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
               :src="`${StaticUrl}/xsb-index2.png`"
               class="h148rpx w328rpx"
             />
-          </view>
+          </view> -->
         </view>
         <view class="my20rpx">
           <scroll-view scroll-x class="whitespace-nowrap">

+ 2 - 0
src/uni-pages.d.ts

@@ -36,6 +36,7 @@ interface NavigateToOptions {
        "/subPack-film/order-detail/index" |
        "/subPack-film/select-time/index" |
        "/subPack-film/submit-order/index" |
+       "/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList" |
        "/subPack-charge/chargeDetail/chargeDetail" |
        "/subPack-charge/chargeing/chargeing" |
        "/subPack-charge/chargeMap/chargeMap" |
@@ -44,6 +45,7 @@ interface NavigateToOptions {
        "/subPack-charge/chargeSearchList/chargeSearchList" |
        "/subPack-charge/chargeSiteDetail/chargeSiteDetail" |
        "/subPack-charge/chargeStart/chargeStart" |
+       "/subPack-charge/chargeVoucher/chargeVoucher" |
        "/subPack-charge/index/index" |
        "/subPack-videoRights/commonTab/index" |
        "/subPack-videoRights/videoRightsDetail/videoRightsDetail" |