yuany 3 лет назад
Родитель
Сommit
8d5ce8d56b
1 измененных файлов с 20 добавлено и 7 удалено
  1. 20 7
      src/views/product/Detail.vue

+ 20 - 7
src/views/product/Detail.vue

@@ -341,7 +341,7 @@
                             <div class="author_details_two">{{ info.collectionWorks }}</div>
                         </div>
                     </div>
-                    <div class="collection_author_right" @click="follow">{{ info.follow ? '已关注' : '关注' }}</div>
+                    <div :class="info.follow ?'followedtwo':'collection_author_right'" @click="follow">{{ info.follow ? '已关注' : '关注' }}</div>
                 </div>
             </div>
             <div class="appointment_process" v-if="info.hasSubscribe">
@@ -801,7 +801,7 @@ export default {
             this.limit = res;
         });
         this.getProduct();
-        
+
         // if (this.isLogin) {
         //     this.$http
         //         .post(
@@ -906,13 +906,13 @@ export default {
                 return;
             }
             if (!this.info.follow) {
-                this.$http.get(`/user/${this.info.id}/follow`).then(res => {
-                    this.getInfo();
+                this.$http.get(`/user/${this.info.minterId}/follow`).then(res => {
+                    this.getProduct();
                     this.$toast.success('关注成功');
                 });
             } else {
-                this.$http.get(`/user/${this.info.id}/unfollow`).then(() => {
-                    this.getInfo();
+                this.$http.get(`/user/${this.info.minterId}/unfollow`).then(() => {
+                    this.getProduct();
                     this.$toast.success('取消关注');
                 });
             }
@@ -1003,7 +1003,7 @@ export default {
                     } else if (res.subscribeStatus == 'ON_SALE') {
                         this.active = 3;
                     }
-                    
+
                     //优惠券
                     if (res.couponPayment) {
                         this.getCouponList();
@@ -1387,6 +1387,19 @@ export default {
                     line-height: 30px;
                     text-align: center;
                 }
+                .followedtwo {
+                    margin-top: 5px;
+                    width: 72px;
+                    height: 30px;
+                    border: 1px solid #222630 !important;
+                    box-sizing: border-box;
+                    font-size: 14px;
+                    font-family: PingFangSC-Regular, PingFang SC;
+                    font-weight: 400;
+                    color: rgba(255, 255, 255, 0.3);
+                    line-height: 28px;
+                    text-align: center;
+                }
             }
         }
         .appointment_process {