yuanyuan 3 лет назад
Родитель
Сommit
15274de620

+ 7 - 2
src/components/product/SaleInfo.vue

@@ -56,9 +56,14 @@
                     alt=""
                     class="product-info_img"
                     @click="onAddCart(item)"
-                    v-if="item.inCart == false"
+                    v-if="!item.inCart && item.salable"
+                />
+                <img
+                    :src="require('@assets/yijiaru@3x.png')"
+                    alt=""
+                    class="product-info_img"
+                    v-else-if="item.inCart && item.salable"
                 />
-                <img :src="require('@assets/yijiaru@3x.png')" alt="" class="product-info_img" v-else />
             </div>
         </van-list>
     </van-action-sheet>

+ 1 - 1
src/components/product/productInfo.vue

@@ -67,7 +67,7 @@
             </div>
             <div class="sold" v-else-if="isSold" style="color: #ff4f50">即将售罄</div>
         </div>
-        <img :src="require('@assets/yijiaruliebiao@3x.png')" alt="" class="product_img" v-if="info.inCart == true" />
+        <!-- <img :src="require('@assets/yijiaruliebiao@3x.png')" alt="" class="product_img" v-if="info.inCart == true" /> -->
     </div>
 </template>
 

+ 14 - 1
src/views/product/Detail.vue

@@ -570,7 +570,9 @@
                                     </div>
                                     <div v-if="info.couponPayment" @click="buy" class="status-texts">立即兑换</div>
                                     <div v-else class="add_to_cart_btn_right">
-                                        <div class="add_to_cart_btn_right_cart" @click="addCart">加入购物车</div>
+                                        <div class="add_to_cart_btn_right_cart" @click="addCart">
+                                            {{ info.inCart ? '已加入购物车' : '加入购物车' }}
+                                        </div>
                                         <div class="add_to_cart_btn_right_buy" @click="buy">立即购买</div>
                                     </div>
                                 </div>
@@ -805,6 +807,7 @@ export default {
             sr: '',
             u: '',
             windowVertical: true,
+            timeId: 0,
             riskStatement:
                 '风险提示:法律许可范围内,最终解释权归RAEX绿洲宇宙平台所有,RAEX绿洲宇宙平台有权对宣传内容进行修改、调整,敬请留意最新宣传资料或公告通知。华储艺术品中心(深圳)有限公司进行拍卖的数字艺术品及RAEX绿洲宇宙平台发售的数字艺术品仅具备收藏欣赏、版权价值。RAEX绿洲宇宙发售的数字艺术品首发价格为官方指导价,版权市场拍卖价格均为数字艺术品持有者自行决定,平台不干涉拍卖价格,对发行的艺术品二手市场价格不构成任何指导建议。平台严禁未满22周岁以及超过55周岁的用户注册平台账号及使用相关功能,请各位探索者理性消费,仔细阅读相关权益,切勿盲从、轻信他人谣言,杜绝恶意炒作,远离一切非法行为,切实维护自身财产安全,共同营造健康数字艺术品生态。'
         };
@@ -875,6 +878,13 @@ export default {
     methods: {
         fatherMethod() {
             this.getCartNum();
+            if (this.timeId) {
+                clearTimeout(this.timeId);
+                this.timeId = 0;
+            }
+            this.timeId = setTimeout(() => {
+                this.getProduct(true);
+            }, 500);
         },
         goSearch() {
             this.setKeeps(['productSearch'], false);
@@ -1104,6 +1114,9 @@ export default {
         },
         addCart() {
             this.checkLogin().then(() => {
+                if (this.info.inCart == true) {
+                    return;
+                }
                 if (this.info.source == 'OFFICIAL') {
                     this.$toast('官方藏品不能加入购物车');
                     return;