瀏覽代碼

Merge branch 'master' into feature/v1.5.4

123456 3 年之前
父節點
當前提交
37ec928b79
共有 2 個文件被更改,包括 23 次插入0 次删除
  1. 2 0
      src/components/coupon/CouponCardList.vue
  2. 21 0
      src/views/vipsubscribe/Buy.vue

+ 2 - 0
src/components/coupon/CouponCardList.vue

@@ -239,9 +239,11 @@ export default {
   border-bottom-right-radius: 6px;
   .spec-time {
     color: #686868;
+    white-space: nowrap;
   }
   .spec-right {
     margin-left: 10px;
+    white-space: nowrap;
   }
   .spec-available {
     color: #999;

+ 21 - 0
src/views/vipsubscribe/Buy.vue

@@ -310,6 +310,26 @@ export default {
         this.getUserBuyInfo()
       }
     },
+    getInitSpec () {
+      const { cycle, count } = this.$route.query
+      const passCycleArr = ['0', '1', '2']
+      const passCountArr = ['1', '-1']
+      // 设置周期
+      if (passCycleArr.includes(cycle)) {
+        this.specIdActive = this.specList[cycle].id
+      }
+      // 设置省份数量(仅支持1个或者全国)
+      if (passCountArr.includes(count)) {
+        if (count === '1') {
+          this.selectInfo.area = { 安徽: [] }
+          this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
+        } else if (count === '-1') {
+          this.selectInfo.area = {}
+          this.$refs.areaSelector.content.setCitySelected(this.selectInfo.area)
+        }
+        this.calcSpecPrice(this.selectedCount)
+      }
+    },
     init () {
       if (this.buyType === 'upgrade') {
         // this.specChange(this.specList[2])
@@ -321,6 +341,7 @@ export default {
         this.specIdActive = this.specList[2].id
       }
       this.calcSpecPrice(1)
+      this.getInitSpec()
     },
     async getGoodsPrice () {
       const priceInfo = await getGoodsPrice()