石广澎
2024-09-14 5629e254508fecd923ebe878263e83d98149012e
pay/scanpay.vue
@@ -94,6 +94,9 @@
          已选择优惠券1张,共抵扣¥{{ parseFloat((checkCoupon.discount / 100).toFixed(2)) }}
        </view>
        <scroll-view scroll-y class="u-p-30 coupon-list">
          <u-loadmore v-if="!couponList" status="loading" />
          <u-empty v-else-if="couponList.length===0" mode="coupon" icon="/static/no_coupon.png" text="暂无优惠券可用!"></u-empty>
          <block v-else>
          <view @click="clickCoupon(item)" class="u-m-b-24 u-flex coupon" v-for="(item, index) in couponList" :key="index">
            <view style="color: #D31F28;" class="u-p-h-28">
              <view class="font-bold">
@@ -114,9 +117,11 @@
              </u-icon>
            </view>
          </view>
          </block>
        </scroll-view>
        <view @click="getCoupon" class="coupon-btn">确定</view>
      </u-popup>
      <!--   备注弹窗   -->
      <u-modal showCancelButton :show="showRemark" title="备注" confirmColor="#D31F28" @close="showRemark = false" @cancel="showRemark = false" @confirm="showRemark = false">
        <view style="border: 1rpx solid #eee;width: 100%">
          <u--textarea v-model="buyerNote" placeholder="请输入备注内容" maxlength="100" none count></u--textarea>
@@ -178,7 +183,7 @@
      isNew: false, // 是否新用户,新用户查询不到积分和银行卡
      canReset: false,
      couponShow: false, // 优惠券弹窗
      couponList: [], // 优惠券
      couponList: null, // 优惠券
      couponInfo: {
        id: '',
        discount: 0,
@@ -305,7 +310,7 @@
      uni.setStorageSync('IS_NEW', res.isNew)
      this.isNew = res.isNew
      if (!res.isNew && !uni.$u.test.isEmpty(this.money)) {
        this.showCoupon()
        this.queryUseSweepPayCoupon()
      }
    },
    /*授权unionid*/
@@ -402,7 +407,15 @@
          uni.$u.toast('请输入金额!')
          return
        }
        this.couponList = null
        this.couponShow = true
        this.queryUseSweepPayCoupon()
      } else {
        this.toRegister()
      }
    },
        //获取用户优惠券
    queryUseSweepPayCoupon(){
        queryUseSweepPayCoupon({
          params: {
            applyPayWayStr: this.payWay,
@@ -411,12 +424,7 @@
          }
        }).then(res => {
          this.couponList = res
          this.couponShow = true
        })
      } else {
        this.toRegister()
      }
    },
    //选择优惠券
    clickCoupon(item) {
@@ -738,7 +746,7 @@
.coupon-list {
  box-sizing: border-box;
  height: calc(50vh - 44px);
  height: calc(80vh - 44px);
}