Kaynağa Gözat

折扣价有固定字段控制;申请页需要等页面正常再处理

zweizhao 7 yıl önce
ebeveyn
işleme
0b5a95ca13
2 değiştirilmiş dosya ile 3 ekleme ve 11 silme
  1. 2 6
      pages/index/cert/freelancer.vue
  2. 1 5
      pages/index/cert/index.vue

+ 2 - 6
pages/index/cert/freelancer.vue

@@ -8,12 +8,12 @@
           ¥{{detail.real_price}}
           <sub class="sub">/次</sub>
         </span>
-        <span class="origin-price" v-if="shouldShowOriginPrice">原价¥{{detail.origin_price}}</span>
+        <span class="origin-price" v-if="detail.is_discount">原价¥{{detail.origin_price}}</span>
         <span
           class="vip-tag"
           v-if="detail.is_vip_discount"
           @click="clickVipPrice"
-        >开通会员低至¥{{detail.vip_price}}</span>
+        >{{`${detail.is_vip_discount ? '开通会员低至' : '会员'}¥${detail.vip_price}`}}</span>
       </section>
       <section class="cert-status">
         <button class="cer-ctrl death" v-if="isDeath">{{detail.btn_name}}</button>
@@ -70,10 +70,6 @@ export default {
     console.log(this.detail)
   },
   methods: {
-    shouldShowOriginPrice(item) {
-      let { real_price, origin_price } = this.detail
-      return real_price < origin_price && origin_price
-    },
     clickVipPrice() {
       window.open('/type/vip/')
     },

+ 1 - 5
pages/index/cert/index.vue

@@ -13,7 +13,7 @@
                 ¥{{item.real_price}}
                 <sub class="sub">/次</sub>
               </span>
-              <span v-if="shouldShowOriginPrice(item)" class="origin-price">原价¥{{item.origin_price}}</span>
+              <span v-if="item.is_discount" class="origin-price">原价¥{{item.origin_price}}</span>
               <span class="vip-tag" v-if="item.is_vip_discount">会员¥{{item.vip_price}}</span>
             </section>
             <section class="cert-status">
@@ -60,10 +60,6 @@ export default {
     this.getList()
   },
   methods: {
-    shouldShowOriginPrice(item) {
-      let { real_price, origin_price } = item
-      return real_price < origin_price && origin_price
-    },
     clickLancer({ id }) {
       this.$router.push({
         path: '/cert/freelancer',