Răsfoiți Sursa

兑换优惠券

zaijin 2 ani în urmă
părinte
comite
9b1be00c0d

+ 1 - 0
components/coupon-swiper-list-item/coupon-swiper-list-item.vue

@@ -155,6 +155,7 @@ export default {
 /* 注意:父节点需要固定高度,z-paging的height:100%才会生效 */
 .content {
   height: 100%;
+  padding-top: 30rpx;
 }
 .coupon-list-item {
   background-color: #fff;

+ 1 - 1
pages/center/coupon/myCoupon/myCoupon.scss

@@ -11,7 +11,7 @@ page {
   background-color: #f9f9f9;
 }
 .content {
-	height: calc(100% - 74px);
+	height: calc(100% - 25px);
 }
 .search-part {
   display: flex;

+ 16 - 3
pages/center/coupon/myCoupon/myCoupon.vue

@@ -15,10 +15,10 @@
       <z-tabs ref="tabs" slot="top" :list="tabList" :current="current" barWidth="90rpx" @change="tabsChange"> </z-tabs>
       <swiper class="swiper" :current="current" @transition="swiperTransition" @animationfinish="swiperAnimationfinish">
         <swiper-item class="swiper-item" v-for="(item, index) in tabList" :key="index">
-          <view class="search-part" v-if="current === 0">
+          <!-- <view class="search-part" v-if="current === 0">
             <u-input class="search-part-input" v-model="form.exchangeCode" placeholder="请输入兑换码" />
             <u-button class="search-part-btn" type="primary" shape="circle" size="medium" @click.stop="handleExchange">兑换</u-button>
-          </view>
+          </view> -->
           <coupon-swiper-list-item :tabIndex="index" :currentIndex="current" ref="swiperListItem" />
         </swiper-item>
       </swiper>
@@ -95,7 +95,10 @@ export default {
       form: {
         exchangeCode: '',
         source: 1,
-        vehicleNo: ''
+        vehicleNo: '',
+        merchantCode: '',
+        qrcodeNo: '',
+        couponId: ''
       },
       // 绑定车牌
       bindVehiclePop: {
@@ -134,6 +137,16 @@ export default {
       }
     };
   },
+  onLoad(options) {
+    const { merchantCode, qrcodeNo, couponId } = options;
+    if (merchantCode && qrcodeNo && couponId) {
+      this.form.merchantCode = merchantCode;
+      this.form.couponId = couponId;
+      this.form.qrcodeNo = qrcodeNo;
+      this.bindVehiclePop.showChangeVehicleNo = true;
+      this.getCarsList();
+    }
+  },
   methods: {
     // tabs通知swiper切换
     tabsChange(index) {