From 18b45638fe3aac07e65aeb5b1da337d4e4bdc87c Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期日, 30 十一月 2025 18:24:36 +0800
Subject: [PATCH] fix(pay): 更新支付页面文案及逻辑

---
 pages/pay/scanpay.vue |  379 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 220 insertions(+), 159 deletions(-)

diff --git a/pages/pay/scanpay.vue b/pages/pay/scanpay.vue
index 44c7ec0..892a0ed 100644
--- a/pages/pay/scanpay.vue
+++ b/pages/pay/scanpay.vue
@@ -1,10 +1,11 @@
 <!-- 鎵爜鏀粯 -->
 <template>
   <view class="page">
+    <u-alert closable description="瀹夊叏鎻愰啋锛氶鍏呭�奸噾棰濈敱閭偍閾惰鐩戠!" type="warning"></u-alert>
     <view class="shop u-flex u-row-between">
       <view class="u-m-r-30">
         <view class="u-font-28 color-666 u-m-b-10">浠樻缁�</view>
-        <view class="u-font-34 font-bold color-333">{{ shopInfo.shop_name }}</view>
+        <view class="u-font-44 font-bold color-333">{{ shopInfo.shop_name }}</view>
       </view>
       <image :src="shopInfo.logo_image||'/static/imgs/store-logo.png'" class="avg-img"></image>
     </view>
@@ -21,14 +22,31 @@
         <view class="mask" @click="showBord"></view>
       </view>
       <view class="u-font-28 color-666 u-m-t-60">閫夋嫨鏀粯鏂瑰紡</view>
-      <u-radio-group v-model="bankCardId" placement="column">
+      <u-radio-group v-model="payWay" placement="column">
+        <view v-if="platform == 15" class="u-border-bottom u-p-v-20 u-flex u-row-between">
+          <image class="pay-icon" src="@/static/imgs/pay-union.png"></image>
+          <view class="flex-1">
+            <view class="u-font-30 color-333">浜戦棯浠�</view>
+            <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text>
+            <text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
+              鍙敤
+              <text class="color-red">{{ integral }}</text>
+              绉垎
+            </text>
+          </view>
+          <view v-if="token&&couponInfo&&shopInfo.user_coupon_flag&&shopInfo.app_pay_use_coupon_flag" class="tag-pain">
+            婊{
+              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
+            }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
+          </view>
+          <u-radio :customStyle="{ marginLeft: '10rpx' }" :name="15" activeColor="#D41F28" @change="radioChange($event,15)"></u-radio>
+        </view>
         <view v-if="platform == 5" class="u-border-bottom u-p-v-20 u-flex u-row-between">
-          <image src="@/static/imgs/pay-zfb.png" class="pay-icon"></image>
+          <image class="pay-icon" mode="widthFix" src="@/static/imgs/pay-zfb.png"></image>
           <view class="flex-1">
             <view class="u-font-30 color-333">鏀粯瀹�</view>
             <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text>
-            <text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag"
-                  class="u-font-24 color-999 u-m-t-10">
+            <text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
               鍙敤
               <text class="color-red">{{ integral }}</text>
               绉垎
@@ -39,16 +57,14 @@
               parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
             }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
           </view>
-          <u-radio @change="radioChange($event,5)" :name="5" activeColor="#D41F28"
-                   :customStyle="{ marginLeft: '10rpx' }"></u-radio>
+          <u-radio :customStyle="{ marginLeft: '10rpx' }" :name="5" activeColor="#D41F28" @change="radioChange($event,5)"></u-radio>
         </view>
         <view v-if="platform == 2" class="u-border-bottom u-p-v-20 u-flex u-row-between">
-          <image src="@/static/imgs/pay-wx.png" class="pay-icon"></image>
+          <image class="pay-icon" mode="widthFix" src="@/static/imgs/pay-wx.png"></image>
           <view class="flex-1">
             <view class="u-font-30 color-333">寰俊</view>
             <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text>
-            <text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag"
-                  class="u-font-24 color-999 u-m-t-10">
+            <text v-if="!isNew&&token&&shopInfo.use_score_flag&&shopInfo.app_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
               鍙敤
               <text class="color-red">{{ integral }}</text>
               绉垎
@@ -59,119 +75,119 @@
               parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
             }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
           </view>
-          <u-radio @change="radioChange($event,2)" :name="2" activeColor="#D41F28"
-                   :customStyle="{ marginLeft: '10rpx' }">
+          <u-radio :customStyle="{ marginLeft: '10rpx' }" :name="2" activeColor="#D41F28" @change="radioChange($event,2)">
           </u-radio>
         </view>
-        <navigator v-if="shuaka&&token&&bankCard!=-1" class="shuka" url="/pages/pay/shuaKa/shuaKa">
-          <image src="/static/shuaka/shuaka.png" mode=""></image>
-        </navigator>
-        <view v-if="bankCard.id" class="u-border-bottom u-p-v-20 u-flex">
-          <view @click="bordShow=false;bankCardOpen=true" class="flex-1 u-flex">
-            <image :src="bankCardStyle.logo" class="pay-icon"></image>
-            <view>
-              <view class="u-font-30 color-333 u-flex">
-                {{ bankCard.bankName }}({{ cardType[bankCard.cardType] }})({{ bankCard.cardNo }})
-                <u-icon name="arrow-right"
-                        color="#000">
-                </u-icon>
-              </view>
-              <!-- <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text> -->
-              <text v-if="!isNew&&shopInfo.use_score_flag&&shopInfo.bank_pay_use_score_flag"
-                    class="u-font-24 color-999 u-m-t-10">
-                鍙敤
-                <text class="color-red">{{ integral }}</text>
-                绉垎
-              </text>
+        <view class="u-border-bottom u-p-v-20 u-flex u-row-between">
+          <image class="pay-icon" mode="widthFix" src="@/static/zjjg/yue.png"></image>
+          <view class="flex-1">
+            <view class="u-flex">
+              <view class="u-font-30 color-333">鍌ㄥ�煎崱</view>
+              <navigator class="u-m-l-30" :url="`/pages/pay/recharge?cardInfo=${encodeURIComponent(JSON.stringify(cardInfo))}`">
+                <u-button size="mini" type="warning">鍘诲厖鍊�</u-button>
+              </navigator>
             </view>
+
+            <text class="u-font-24 color-999 u-m-t-10">
+              鍙敤浣欓
+              <text class="color-red">锟{ cardInfo.amount }}</text>
+            </text>
           </view>
-          <view v-if="!isNew&&shopInfo.user_coupon_flag&&shopInfo.bank_pay_use_coupon_flag&&couponInfo"
-                class="tag-pain">
-            婊{
-              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
-            }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
-          </view>
-          <u-radio @change="radioChange($event,3)" :name="bankCard.id" activeColor="#D41F28"
-                   :customStyle="{ marginLeft: '10rpx' }">
+
+          <u-radio :customStyle="{ marginLeft: '10rpx' }" :name="14" activeColor="#D41F28" @change="radioChange($event,14)">
           </u-radio>
         </view>
+        <!--				<navigator v-if="shuaka&&token&&bankCard!=-1" class="shuka" url="/pages/pay/shuaKa/shuaKa">
+                  <image src="/static/shuaka/shuaka.png" mode=""></image>
+                </navigator>
+                <view v-if="bankCard.id" class="u-border-bottom u-p-v-20 u-flex">
+                  <view @click="bordShow=false;bankCardOpen=true" class="flex-1 u-flex">
+                    <image :src="bankCardStyle.logo" class="pay-icon"></image>
+                    <view>
+                      <view class="u-font-30 color-333 u-flex">
+                        {{ bankCard.bankName }}({{ cardType[bankCard.cardType] }})({{ bankCard.cardNo }})
+                        <u-icon name="arrow-right" color="#000">
+                        </u-icon>
+                      </view>
+                      &lt;!&ndash; <text v-if="isNew" class="tag u-m-t-10">浼氬憳浜紭鎯�</text> &ndash;&gt;
+                      <text v-if="!isNew&&shopInfo.use_score_flag&&shopInfo.bank_pay_use_score_flag" class="u-font-24 color-999 u-m-t-10">
+                        鍙敤
+                        <text class="color-red">{{ integral }}</text>
+                        绉垎
+                      </text>
+                    </view>
+                  </view>
+                  <view v-if="!isNew&&shopInfo.user_coupon_flag&&shopInfo.bank_pay_use_coupon_flag&&couponInfo" class="tag-pain">
+                    婊{
+                      parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
+                    }}鍏冨噺{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}鍏�
+                  </view>
+                  <u-radio @change="radioChange($event,3)" :name="bankCard.id" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }">
+                  </u-radio>
+                </view>-->
       </u-radio-group>
-      <navigator v-if="bankCard==-1&&bindCard&&token&&!isNew" class="shuka" url="/pages/pay/bindCard/bindCard">
-        <image src="/static/bangka.png" mode=""></image>
-      </navigator>
-      <navigator v-if="bankCard==-1&&!isNew" url="/pages/pay/bindCard/bindCard"
-                 class="u-border-bottom u-p-v-20 u-flex u-row-between">
-        <view class="u-flex-1 u-flex ">
-          <image class="pay-icon" :src="bankCardStyle.logo" mode=""></image>
-          <view class="flex-1 u-m-l-20">
-            <view class="u-font-30 color-333">閾惰鍗�</view>
-            <view class="u-font-24 color-red">缁戝崱鍙韩鏇村浼樻儬</view>
-          </view>
+      <navigator :url="`/pages/pay/vipEwm?cardInfo=${encodeURIComponent(JSON.stringify(cardInfo1))}`" class="u-border-bottom u-p-v-20 u-flex u-row-between">
+        <image class="pay-icon" mode="widthFix" src="@/static/zjjg/cika.png"></image>
+        <view class="flex-1 u-m-l-20">
+          <view class="u-font-30 color-333">娆″崱鏀粯</view>
+          <text class="u-font-24 color-999 u-m-t-10">
+            鍙敤娆℃暟
+            <text class="color-red">{{ cardInfo1.times }}娆�</text>
+          </text>
         </view>
-        <u-radio disabled activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }">
-        </u-radio>
       </navigator>
-      <navigator v-if="isNew" class="reg-btn" :url="'/pages/pay/register?cid='+cid">
-        <image src="/static/register-btn.png" mode=""></image>
+      <!--			<navigator v-if="bankCard==-1&&bindCard&&token&&!isNew" class="shuka" url="/pages/pay/bindCard/bindCard">
+              <image src="/static/bangka.png" mode=""></image>
+            </navigator>
+            <navigator v-if="bankCard==-1&&!isNew" url="/pages/pay/bindCard/bindCard" class="u-border-bottom u-p-v-20 u-flex u-row-between">
+              <view class="u-flex-1 u-flex ">
+                <image class="pay-icon" :src="bankCardStyle.logo" mode=""></image>
+                <view class="flex-1 u-m-l-20">
+                  <view class="u-font-30 color-333">閾惰鍗�</view>
+                  <view class="u-font-24 color-red">缁戝崱鍙韩鏇村浼樻儬</view>
+                </view>
+              </view>
+              <u-radio disabled activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }">
+              </u-radio>
+            </navigator>-->
+      <!--			<navigator v-if="isNew" class="reg-btn" :url="'/pages/pay/register?cid='+cid">
+              <image src="/static/register-btn.png" mode=""></image>
+            </navigator>-->
+      <navigator :url="'/pages/pay/register?cid='+cid" class="reg-url">
+        鍔犲叆銆妠{ shopInfo.shop_name }}銆嬩細鍛橈紝浜彈鏇村浼樻儬
       </navigator>
-      <!--			<view class="btn">
-        <wx-open-launch-weapp class="wx-app" id="launch-btn" appid="wxfc579973fbdde096"
-          username="gh_3676c3af5dda" path="pages/index/index" env-version="release">
-          <script type="text/wxtag-template">
-            <style>
-              .btn {
-                border: none;
-                position: absolute;
-                top: 0;
-                right: 0;
-                bottom: 0;
-                left: 0;
-                width: 100%;
-                border-radius: 50px;
-                text-align: center;
-                line-height: 100%;
-                color: #BF3B00;
-                font-size: 18px;
-                font-weight: 600;
-                background: linear-gradient(180deg, rgba(253, 222, 95, 1) 0%, rgba(254, 172, 31, 1) 71%, rgba(254, 186, 40, 1) 100%);
-               }
-            </style>
-            <button class="btn">鎵撳紑灏忕▼搴�</button>
-          </script>
-        </wx-open-launch-weapp>
-      </view>-->
     </view>
 
 
     <button class="pay-it" @click="pay">浠樻</button>
     <!-- 閫夋嫨閾惰鍗� -->
-    <u-popup mode="bottom" :closeable="true" :show="bankCardOpen" :round="10" @close="bankCardOpen = false">
+    <u-popup :closeable="true" :round="10" :show="bankCardOpen" mode="bottom" @close="bankCardOpen = false">
       <view class="u-font-32 color-333 u-text-center u-p-30 u-border-bottom">閫夋嫨閾惰鏀粯</view>
-      <scroll-view scroll-y class="u-p-h-30 bankCard-list">
+      <scroll-view class="u-p-h-30 bankCard-list" scroll-y>
         <block v-for="(item,i) in bankCardList" :key="i">
-          <view @click="chooseBankCard(item)" class="u-border-bottom u-p-v-30 u-flex">
+          <view class="u-border-bottom u-p-v-30 u-flex" @click="chooseBankCard(item)">
             <view class="flex-1 u-flex">
-              <image :src="bankCardStyle.logo" class="pay-icon"></image>
+              <image :src="bankCardStyle.logo" class="pay-icon" mode="widthFix"></image>
               <view>
                 <view class="u-font-26 color-333">{{ item.bankName }}</view>
                 <view class="u-m-t-10 u-font-28 color-333">{{ cardType[item.cardType] }}({{ item.cardNo }})
                 </view>
               </view>
             </view>
-            <u-icon name="checkbox-mark" :color="bankCardId==item.id?'#D31F28':'#fff'" size="22"></u-icon>
+            <u-icon :color="bankCardId==item.id?'#D31F28':'#fff'" name="checkbox-mark" size="22"></u-icon>
           </view>
         </block>
-        <navigator url="/pages/pay/bindCard/bindCard" class="u-border-bottom u-p-v-30 u-flex">
+        <navigator class="u-border-bottom u-p-v-30 u-flex" url="/pages/pay/bindCard/bindCard">
           <view class="add-icon">
-            <u-icon name="plus" bold color="#D31F28"></u-icon>
+            <u-icon bold color="#D31F28" name="plus"></u-icon>
           </view>
           <view class="u-font-28 color-333 u-m-l-20">浣跨敤鏂板崱鏀粯</view>
         </navigator>
       </scroll-view>
     </u-popup>
     <!-- 鏁板瓧閿洏 -->
-    <u-popup :show="bordShow" :overlay="false" @close="bordShow = false">
-      <key-bord @changeMoney="changeMoney" :num.sync="money" @close="bordShow = false" @pay="pay"></key-bord>
+    <u-popup :overlay="false" :show="bordShow" @close="bordShow = false">
+      <key-bord :num.sync="money" @changeMoney="changeMoney" @close="bordShow = false" @pay="pay"></key-bord>
     </u-popup>
     <!-- 鏀粯楠岃瘉鐮� -->
     <u-popup :show="codeShow" closeable mode="center" @close="codeShow = false">
@@ -180,11 +196,10 @@
         <view class="u-text-center u-m-b-20 color-666">{{ shopInfo.shop_name }}</view>
         <view class="u-flex u-row-center font-bold u-m-b-40">
           <text class="u-font-42">锟�</text>
-          <text
-              class="u-font-money">{{ money }}
+          <text class="u-font-money">{{ money }}
           </text>
         </view>
-        <u-code-input @finish="bankPay" v-model="smscode" mode="box" :focus="true"></u-code-input>
+        <u-code-input v-model="smscode" :focus="true" mode="box" @finish="bankPay"></u-code-input>
       </view>
 
     </u-popup>
@@ -192,34 +207,28 @@
 </template>
 
 <script>
-import {
-  config,
-  cardType,
-  ACCESSTOKEN
-} from '@/common/config.js';
-import {
-  headBand,
-  bankCardStyle,
-  myBankCard,
-  queryShop,
-  queryMyDiscount,
-  getScoreWorth,
-  getOpenId,
-  getUserId,
-  queryScore,
-  queryMyUseSweepPayMaxCoupon,
-  getWechatConfigInfo,
-  saveWxOrder,
-  tlPay
-} from '@/common/api/index'
+import {ACCESSTOKEN, cardType, config} from '@/common/config.js';
+import {bankCardStyle, getScoreWorth, getWechatConfigInfo, headBand, myBankCard, queryMyDiscount, queryMyUseSweepPayMaxCoupon, queryScore, queryShop, saveWxOrder, tlPay, userLogin} from '@/common/api/index'
 import wx from 'weixin-js-sdk'; // 浣跨敤js-sdk
-import {
-  activityInfo
-} from '@/common/api/shuaka'
+import {activityInfo} from '@/common/api/shuaka'
 
 export default {
   data() {
     return {
+      cardInfo1: {
+        type: 1,
+        name: '',
+        amount: 0,
+        score: 0,
+        times: 12
+      },
+      cardInfo: {
+        type: 0,
+        name: '',
+        amount: 200,
+        score: 0,
+        times: 12
+      },
       platform: this.$utils.getPlat(),
       cardType: cardType,
       cid: '',
@@ -238,7 +247,7 @@
       money: '', // 閲戦
       integral: 0, // 浣跨敤绉垎
       couponInfo: null, // 浼樻儬鍒稿唴瀹�
-      payWay: 3, //鏀粯鏂瑰紡 5 鏀粯瀹� 2 寰俊 3閾惰鍗�
+      payWay: 3, //鏀粯鏂瑰紡 5 鏀粯瀹� 2 寰俊 3閾惰鍗� 15浜戦棯浠�
       token: null,
       isNew: false, // 鏄惁鏂扮敤鎴凤紝鏂扮敤鎴锋煡璇笉鍒扮Н鍒嗗拰閾惰鍗�
       codeShow: false, // 閾惰鍗℃敮浠橀獙璇佺爜杈撳叆寮圭獥
@@ -273,32 +282,26 @@
       uni.setStorageSync('CID', opt.cid)
       this.init()
     }
-    if (opt.code || opt.auth_code) {
-      let type = this.platform
+    if (opt.code || opt.auth_code || opt.userAuthCode) {
       let code = opt.code
       if (this.platform == 5) {
         code = opt.auth_code
       }
+      if (this.platform == 15) {
+        code = opt.userAuthCode
+      }
       this.end++
-      getOpenId({
+      userLogin({
+        platform: this.platform,
         params: {
-          code: opt.code
+          code
         }
       }).then(res => {
-        this.count++
-        if (this.count >= this.end) {
-          uni.hideLoading()
-        }
-        this.token = res.token.accessToken
-        uni.setStorageSync(ACCESSTOKEN, res.token.accessToken)
-        uni.setStorageSync('IS_NEW', res.isNew)
-        this.isNew = res.isNew
-        if (!res.isNew) {
-          this.getUserInfo()
-        }
+        this.getToken(res)
       }).catch(() => {
         uni.hideLoading()
       })
+
     } else {
       if (process.env.NODE_ENV === 'development') {
         console.log('寮�鍙戠幆澧�');
@@ -331,6 +334,19 @@
     this.canReset = true
   },
   methods: {
+    getToken(res) {
+      this.count++
+      if (this.count >= this.end) {
+        uni.hideLoading()
+      }
+      this.token = res.token.accessToken
+      uni.setStorageSync(ACCESSTOKEN, res.token.accessToken)
+      uni.setStorageSync('IS_NEW', res.isNew)
+      this.isNew = res.isNew
+      if (!res.isNew) {
+        this.getUserInfo()
+      }
+    },
     radioChange(e, item) {
       this.bordShow = false
       this.payWay = item
@@ -364,7 +380,10 @@
             res.logo_image = ''
           }
         }
+        uni.setStorageSync('SHOP_INFO', res)
         this.shopInfo = res
+        this.cardInfo.name = res.shop_name
+        this.cardInfo1.name = res.shop_name
       }).catch(() => {
         uni.hideLoading()
       })
@@ -528,27 +547,41 @@
     },
     //璺宠浆钀ラ攢椤甸潰
     toDiscount() {
-      let toDiscount = false
-      //涓嶆槸浼氬憳
-      if (this.isNew) toDiscount = false
-      //娌℃湁绉垎銆佹病鏈変紭鎯犲埜銆佹病鏈夊簵閾轰紭鎯�
-      if (this.integral == 0 && !this.couponInfo && this.discount.shopDiscount == 1) toDiscount = false
-      const shopInfo = encodeURIComponent(JSON.stringify(this.shopInfo))
-      //鏈夊簵閾轰紭鎯�
-      if (this.discount.shopDiscount != 1) {
-        toDiscount = true
-      }
-      if (this.payWay == 3 && (this.shopInfo.bank_pay_use_score_flag || this.shopInfo.bank_pay_use_coupon_flag)) { //閾惰鍗℃敮浠�
-        toDiscount = true
-      } else if ((this.shopInfo.use_score_flag && this.shopInfo.app_pay_use_score_flag) || (this.shopInfo.user_coupon_flag && this.shopInfo.app_pay_use_coupon_flag)) {
-        toDiscount = true
+      if (!this.isNew) { //鏄細鍛�
+        if (this.integral > 0 || this.couponInfo) { //鏈変紭鎯犲埜鎴栫Н鍒�
+          if (this.payWay == 3 && (this.shopInfo.bank_pay_use_score_flag || this.shopInfo
+              .bank_pay_use_coupon_flag)) { //閾惰鍗℃敮浠�
+
+            uni.navigateTo({
+              url: `/pages/pay/discountpay?integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else if ((this.shopInfo.use_score_flag && this.shopInfo.app_pay_use_score_flag) || (this
+              .shopInfo
+              .user_coupon_flag && this.shopInfo.app_pay_use_coupon_flag)) {
+            uni.navigateTo({
+              url: `/pages/pay/discountpay?integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else if (this.discount.shopDiscount != 1) {
+            uni.navigateTo({
+              url: `/pages/pay/discountpay?integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+            })
+            return false
+          } else {
+            return true
+          }
+        } else if (this.discount.shopDiscount != 1) {
+          uni.navigateTo({
+            url: `/pages/pay/discountpay?integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
+          })
+          return false
+        } else {
+          return true
+        }
       } else {
-        toDiscount = false
+        return true
       }
-      uni.navigateTo({
-        url: `/pages/pay/discountpay?shopInfo=${shopInfo}&integral=${this.integral}&scoreWorth=${this.scoreWorth}&money=${this.money}&payWay=${this.payWay}&bankCardId=${this.bankCardId}`
-      })
-      return toDiscount
     },
     //纭鏀粯
     pay() {
@@ -557,7 +590,7 @@
         return
       }
       this.bordShow = false
-      // return this.toDiscount() //鍒ゆ柇鏄惁闇�瑕佽烦杞惀閿�椤甸潰
+      //鍒ゆ柇鏄惁闇�瑕佽烦杞惀閿�椤甸潰
       if (this.toDiscount()) {
         // 閲戦 this.money
         uni.showLoading()
@@ -606,7 +639,7 @@
     },
     // 寰俊鏀粯
     wxPay(res) {
-      setTimeout(() => {
+      /*setTimeout(() => {
         wx.chooseWXPay({
           timestamp: res.timeStamp, // 鏀粯绛惧悕鏃堕棿鎴�
           nonceStr: res.nonceStr, // 鏀粯绛惧悕闅忔満涓诧紝涓嶉暱浜� 32 浣�
@@ -621,6 +654,28 @@
             })
           }
         });
+      }, 200)*/
+
+      setTimeout(() => {
+        WeixinJSBridge.invoke(
+            'getBrandWCPayRequest', {
+              "appId": res.appId, //鍏紬鍙稩D锛岀敱鍟嗘埛浼犲叆
+              "timeStamp": res.timeStamp, //鏃堕棿鎴筹紝鑷�1970骞翠互鏉ョ殑绉掓暟
+              "nonceStr": res.nonceStr, //闅忔満涓�
+              "package": res.package,
+              "signType": res.signType, //寰俊绛惧悕鏂瑰紡锛�
+              "paySign": res.paySign //寰俊绛惧悕
+            },
+            (res) => {
+              if (res.err_msg == "get_brand_wcpay_request:ok") {
+                // 浣跨敤浠ヤ笂鏂瑰紡鍒ゆ柇鍓嶇杩斿洖,寰俊鍥㈤槦閮戦噸鎻愮ず锛�
+                //res.err_msg灏嗗湪鐢ㄦ埛鏀粯鎴愬姛鍚庤繑鍥瀘k锛屼絾骞朵笉淇濊瘉瀹冪粷瀵瑰彲闈犮��
+                /*uni.navigateTo({
+                  url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
+                      .stringify(this.youHuiInfo)}`
+                })*/
+              }
+            });
       }, 200)
     },
     //鏀粯瀹濇敮浠�
@@ -629,10 +684,10 @@
         tradeNO: res.tradeNO
       }, (res) => {
         if (res.resultCode == 9000) {
-          uni.navigateTo({
+          /*uni.navigateTo({
             url: `/pages/pay/paySuccess?orderId=${this.orderId}&youHuiInfo=${JSON
-                .stringify(this.youHuiInfo)}`
-          })
+              .stringify(this.youHuiInfo)}`
+          })*/
           // 鏀粯鎴愬姛
         } else if (res.resultCode == 8000 || res.resultCode == 6001) {
           // 姝e湪澶勭悊涓� || 鍙栨秷
@@ -665,7 +720,7 @@
 };
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .page {
   height: calc(100vh - 0px);
   display: flex;
@@ -726,7 +781,6 @@
 .pay-icon {
   align-self: flex-start;
   width: 48rpx;
-  height: 48rpx;
   margin-right: 20rpx;
 }
 
@@ -835,7 +889,7 @@
 
 .btn {
   /* position: fixed;
-  bottom: 100rpx; */
+bottom: 100rpx; */
   margin: 0 auto;
   margin-top: 120rpx;
   position: relative;
@@ -848,4 +902,11 @@
   width: 680rpx;
   height: 100rpx;
 }
+
+.reg-url {
+  text-align: center;
+  font-size: 28rpx;
+  margin-top: 30rpx;
+  color: #de2d35;
+}
 </style>

--
Gitblit v1.9.1