石广澎
2024-06-04 14a52315c4bdcd7d04208f41696ffd3771dd8183
pages/pay/scanpay.vue
@@ -27,8 +27,7 @@
          <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 +38,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 @change="radioChange($event,5)" :name="5" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }"></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>
          <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,48 +56,42 @@
              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 @change="radioChange($event,2)" :name="2" activeColor="#D41F28" :customStyle="{ marginLeft: '10rpx' }">
          </u-radio>
        </view>
        <navigator v-if="shuaka&&token&&bankCard!=-1" class="shuka" url="/pages/pay/shuaKa/shuaKa">
            <!-- <navigator v-if="shuaka&&token&&bankCard!=-1" class="shuka" url="/pages/pay/shuaKa/shuaKa">
          <image src="/static/shuaka/shuaka.png" mode=""></image>
        </navigator>
            </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 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 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">
               <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, bankCard.id)" :name="3" activeColor="#D41F28"
                   :customStyle="{ marginLeft: '10rpx' }">
               <u-radio @change="radioChange($event,3, bankCard.id)" :name="3" 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">
         <!-- <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">
         <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">
@@ -110,7 +101,7 @@
        </view>
        <u-radio disabled activeColor="#D41F28" :customStyle="{ marginLeft: '30rpx' }">
        </u-radio>
      </navigator>
         </navigator> -->
      <navigator v-if="isNew" class="reg-btn" :url="'/pages/pay/register?cid='+cid">
        <image src="/static/register-btn.png" mode=""></image>
      </navigator>
@@ -154,8 +145,7 @@
        <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>
@@ -299,8 +289,8 @@
      if (this.count >= this.end) {
        uni.hideLoading()
      }
      this.token = res.token.accessToken
      uni.setStorageSync(ACCESSTOKEN, res.token.accessToken)
            this.token = res.token
            uni.setStorageSync(ACCESSTOKEN, res.token)
      uni.setStorageSync('IS_NEW', res.isNew)
      this.isNew = res.isNew
      if (!res.isNew) {
@@ -323,7 +313,7 @@
      this.bordShow = true;
    },
    init() {
      this.end += 5
            this.end += 1
      //获取商铺信息
      queryShop({
        params: {
@@ -347,6 +337,10 @@
      }).catch(() => {
        uni.hideLoading()
      })
         },
         //查询营销信息
         getMarketing(){
            this.end += 4
      // 刷卡有礼
      activityInfo().then(res => {
        this.count++
@@ -421,11 +415,10 @@
          uni.hideLoading()
        })
      }
    },
    // 获取会员相关信息
    getUserInfo() {
      this.end += 4
            this.end += 2
      queryMyDiscount({
        shopId: this.shopInfo.id
@@ -443,7 +436,7 @@
          uni.hideLoading()
        }
      })
      //获取用户银行卡
            /* //获取用户银行卡
      myBankCard().then(res => {
        this.count++
        if (this.count >= this.end) {
@@ -476,7 +469,7 @@
        if (this.count >= this.end) {
          uni.hideLoading()
        }
      })
            }) */
      //获取用户优惠券
      queryMyUseSweepPayMaxCoupon({
        params: {