فهرست منبع

更新 'src/pages/details.vue'

panhui 4 سال پیش
والد
کامیت
ab0d65a12a
1فایلهای تغییر یافته به همراه25 افزوده شده و 4 حذف شده
  1. 25 4
      src/pages/details.vue

+ 25 - 4
src/pages/details.vue

@@ -69,13 +69,19 @@
             </div>
             <div class="box-footer-con">
                 <div class="box-footer-left">
-                    <div>
+                      <div class="contact">
                         <img src="../static/imgs/icon_kefu@3x.png" alt="" />
                         <p>客服</p>
+                        <button open-type="contact" />
                     </div>
-                    <div class="box-follow">
-                        <img src="../static/imgs/icon_guanzhu@3x.png" alt="" />
-                        <p>关注</p>
+                    <div class="box-follow" :class="{ active: isCollection }" @click="collect">
+                        <van-icon
+                            :custom-class="animate ? 'iconAnimate' : ''"
+                            :name="`like${isCollection ? '' : '-o'}`"
+                            :size="24"
+                            :color="isCollection ? $colors.prim : '#000'"
+                        />
+                        <p>{{ isCollection ? '已关注' : '关注' }}</p>
                     </div>
                 </div>
                 <div class="box-footer-right">
@@ -95,8 +101,10 @@
 </template>
 <script>
 import CardCase from '../components/CardCase';
+import collection from '../mixins/collection';
 import dayjs from 'dayjs';
 export default {
+    mixins: [collection],
     components: {
         CardCase
     },
@@ -374,10 +382,23 @@ export default {
                     font-weight: 400;
                     color: #1a1a1a;
                     line-height: 14px;
+                    white-space: nowrap;
                 }
                 .box-follow {
                     margin-left: 30px;
                 }
+  
+                .contact {
+                    position: relative;
+                    button {
+                        position: absolute;
+                        left: 0;
+                        top: 0;
+                        right: 0;
+                        bottom: 0;
+                        opacity: 0;
+                    }
+                }
             }
             .box-footer-right {
                 margin-left: 46px;