7 Commit-ok 338e629852 ... b9b164946b

Szerző SHA1 Üzenet Dátum
  zouzexu b9b164946b config: 更新开发环境API配置 3 hete
  zouzexu ff13bccacd Merge branch 'zzx' 1 hónapja
  zouzexu f67787eadc ``` 1 hónapja
  zhangtao 6f9c8fef94 feat(payment): 更新支付页面标题及完善支付流程 1 hónapja
  zhangtao 4e6e347754 feat(common): 新增threePay页面并调整pages配置 1 hónapja
  zhangtao 92a57cd854 fix(afterSalesDetail): 修复退款金额显示逻辑 1 hónapja
  zhangtao 19119adc7f style(manifest): 删除多余的空白行 2 hónapja

+ 1 - 0
src/api/globals.d.ts

@@ -1545,4 +1545,5 @@ export interface wxpay {
    * 支付方式 0-微信 1-积分 2-混合
    */
   payType: number
+  price: number
 }

+ 2 - 2
src/config/index.ts

@@ -12,10 +12,10 @@ const mapEnvVersion = {
   // develop: 'http://192.168.1.21:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
   // develop: 'http://47.109.84.152:8081', // 测试代理
-  develop: 'http://192.168.1.242:8080', // 测试直连
+  // develop: 'http://192.168.1.242:8080', // 测试直连
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
   // develop: 'https://25740642.r3.cpolar.top',
-  // develop: 'https://smqjh.api.zswlgz.com',
+  develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */

+ 8 - 0
src/pages.json

@@ -273,6 +273,14 @@
             "disableScroll": true
           }
         },
+        {
+          "path": "threePay/index",
+          "name": "smqjh-threePay",
+          "islogin": false,
+          "style": {
+            "navigationBarTitleText": "支付"
+          }
+        },
         {
           "path": "user-center/index",
           "name": "common-user-center",

+ 2 - 2
src/subPack-charge/chargeVoucher/chargeVoucher.vue

@@ -81,12 +81,12 @@ async function submitPay() {
     })
     uni.hideLoading()
     await useUserStore().getWxCommonPayment(payRes.data)
-    await useUserStore().paySuccess('charge-buy-a-ticket-list', '/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
+    await useUserStore().paySuccess('charge-buy-a-ticket-list', 'subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
   }
   catch (error) {
     uni.hideLoading()
     console.error('支付失败:', error)
-    await useUserStore().payError('charge-buy-a-ticket-list', '/subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
+    await useUserStore().payError('charge-buy-a-ticket-list', 'subPack-charge/chargeBuyaTicketList/chargeBuyaTicketList')
   }
 }
 

+ 3 - 1
src/subPack-common/afterSalesDetail/index.vue

@@ -347,7 +347,9 @@ function handleGOCoupon() {
             共减
           </view>
           <view class="ml5rpx text-28rpx text-#FF4D3A font-semibold">
-            ¥{{ Number(refundOrderInfo.omsOrderVo.offsetPointsMoney) + Number(refundOrderInfo.couponBaseInfoDTO?.discountMoney) }}
+            <!-- ¥{{ Number(refundOrderInfo.omsOrderVo.offsetPointsMoney) + Number(refundOrderInfo.couponBaseInfoDTO?.discountMoney) }} -->
+
+            {{ Number(refundOrderInfo.omsOrderVo.offsetPoints) / 100 + (Number(refundOrderInfo.couponBaseInfoDTO?.discountMoney) || 0) }}
           </view>
         </view>
         <view class="ml10rpx flex items-center">

+ 40 - 0
src/subPack-common/threePay/index.vue

@@ -0,0 +1,40 @@
+<script setup lang="ts">
+import type { wxpay } from '@/api/globals'
+
+definePage({ name: 'smqjh-threePay', islogin: false, style: { navigationBarTitleText: '支付' } })
+
+const orderNumber = ref()
+onLoad((options: any) => {
+  orderNumber.value = options.orderNumber
+  handlePay()
+})
+const priceInfo = ref<wxpay>()
+async function handlePay() {
+  const res = await useUserStore().handleCommonPayMent(orderNumber.value)
+  priceInfo.value = res
+}
+async function handleGoPay() {
+  if (priceInfo.value?.payType !== 1) {
+    try {
+      await useUserStore().getWxCommonPayment(priceInfo.value as wxpay)
+    }
+    catch {
+      // console.log(111)
+      useGlobalToast().show({ msg: '支付失败!请重试' })
+    }
+  }
+}
+</script>
+
+<template>
+  <view class="px20rpx pt20rpx">
+    <view class="mb20rpx text-center text-48rpx text-#FF4A39">
+      ¥{{ priceInfo?.price }}
+    </view>
+    <wd-button block @click="handleGoPay">
+      确认支付
+    </wd-button>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/subPack-xsb/components/coupon/index.vue

@@ -87,7 +87,7 @@ function handleUseCoupon() {
             >
               去使用
             </view>
-            <wd-button v-if="itemcoupon.useStatus === 1" hairline plain size="small" type="info" @click="router.replace({ name: 'xsb-orderDetaile', params: { id: String(itemcoupon.lockOrderId) } })">
+            <wd-button v-if="itemcoupon.useStatus === 1" plain hairline size="small" type="info" @click="router.replace({ name: 'xsb-orderDetaile', params: { id: String(itemcoupon.lockOrderId) } })">
               查看订单
             </wd-button>
             <wd-button v-if="itemcoupon.useStatus === 7" plain hairline size="small" type="info" @click="router.replace({ name: 'xsb-orderDetaile', params: { id: String(itemcoupon.lockOrderId) } })">

+ 5 - 0
src/subPack-xsb/confirmOrder/index.vue

@@ -204,6 +204,11 @@ function handleSelectCoupon(item: Api.AppMemberCouponVO) {
   if (item.isUsed !== 2 || !item.allowanceId) {
     return
   }
+  // 再次点击已选中的券则取消选中
+  if (draftCouponId.value === item.allowanceId) {
+    draftCouponId.value = undefined
+    return
+  }
   draftCouponId.value = item.allowanceId
 }
 

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

@@ -94,7 +94,7 @@ export const useSysXsbStore = defineStore('system-xsb', {
         Apis.xsb.nearestShop({ data: { longitude, latitude } }).then((res) => {
           const newShop = this.xsbShopList.find(it => it.shopId === res.data.nearestShopId)
           if (newShop) {
-            this.SelectShopInfo = this.SelectShopInfo || newShop
+            this.SelectShopInfo = this.SelectShopInfo.shopId ? this.SelectShopInfo : newShop
           }
           resolve(res)
         }).catch((err) => { reject(err) })

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

@@ -24,6 +24,7 @@ interface NavigateToOptions {
        "/subPack-common/paySuccess/index" |
        "/subPack-common/revalue/index" |
        "/subPack-common/revalueSuccess/index" |
+       "/subPack-common/threePay/index" |
        "/subPack-common/user-center/index" |
        "/subPack-smqjh/bannerDetaile/index" |
        "/subPack-smqjh/giveawaysVip/giveawaysVip" |