石广澎
2025-11-30 18b45638fe3aac07e65aeb5b1da337d4e4bdc87c
pages/pay/scanpay.vue
@@ -1,7 +1,7 @@
<!-- 扫码支付 -->
<template>
   <view class="page">
      <u-alert type="warning" closable description="安全提醒:请谨慎核对商家、订单信息,保护自己资金安全!"></u-alert>
    <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>
@@ -24,7 +24,7 @@
         <view class="u-font-28 color-666 u-m-t-60">选择支付方式</view>
         <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 src="@/static/imgs/pay-union.png" class="pay-icon"></image>
          <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>
@@ -39,10 +39,10 @@
              parseFloat((couponInfo.thresholdValue / 100).toFixed(2))
            }}元减{{ parseFloat((couponInfo.discount / 100).toFixed(2)) }}元
               </view>
               <u-radio @change="radioChange($event,15)" :name="15" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }"></u-radio>
          <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" mode="widthFix"></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>
@@ -57,10 +57,10 @@
              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" mode="widthFix"></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>
@@ -75,19 +75,26 @@
              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>
            <view  class="u-border-bottom u-p-v-20 u-flex u-row-between">
               <image src="@/static/zjjg/yue.png" class="pay-icon" mode="widthFix"></image>
          <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">¥{{ integral }}</text>
              <text class="color-red">¥{{ cardInfo.amount }}</text>
                  </text>
               </view>
               <u-radio @change="radioChange($event,14)" :name="14" 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">
@@ -119,13 +126,13 @@
               </u-radio>
            </view>-->
         </u-radio-group>
      <navigator :url="`/pages/pay/vipEwm?cardInfo=${encodeURIComponent(JSON.stringify(cardInfo))}`" class="u-border-bottom u-p-v-20 u-flex u-row-between">
          <image src="@/static/zjjg/cika.png" class="pay-icon" mode="widthFix"></image>
      <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">{{ cardInfo.times }}次</text>
            <text class="color-red">{{ cardInfo1.times }}次</text>
            </text>
          </view>
      </navigator>
@@ -143,19 +150,22 @@
            <u-radio disabled activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }">
            </u-radio>
         </navigator>-->
         <navigator v-if="isNew" class="reg-btn" :url="'/pages/pay/register?cid='+cid">
      <!--         <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>
      <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" mode="widthFix"></image>
                     <view>
@@ -164,20 +174,20 @@
                        </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">
@@ -189,7 +199,7 @@
               <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>
@@ -197,36 +207,25 @@
</template>
<script>
   import {
      config,
      cardType,
      ACCESSTOKEN
   } from '@/common/config.js';
   import {
      headBand,
      bankCardStyle,
      myBankCard,
      queryShop,
      queryMyDiscount,
      getScoreWorth,
      userLogin,
      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 {
        cardInfo:{
      cardInfo1: {
          type: 1,
          name: '',
          amount: 0,
        score: 0,
        times: 12
      },
      cardInfo: {
        type: 0,
        name: '',
        amount: 200,
          score: 0,
          times: 12
        },
@@ -383,6 +382,8 @@
               }
               uni.setStorageSync('SHOP_INFO', res)
               this.shopInfo = res
        this.cardInfo.name = res.shop_name
        this.cardInfo1.name = res.shop_name
            }).catch(() => {
               uni.hideLoading()
            })
@@ -719,7 +720,7 @@
   };
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
   .page {
      height: calc(100vh - 0px);
      display: flex;
@@ -901,4 +902,11 @@
      width: 680rpx;
      height: 100rpx;
   }
.reg-url {
  text-align: center;
  font-size: 28rpx;
  margin-top: 30rpx;
  color: #de2d35;
}
</style>