Ver código fonte

perf(client): 优化代码

yizhiyang 10 meses atrás
pai
commit
0a4411697b

+ 3 - 3
src/pagesHome/productDetail/index.vue

@@ -80,7 +80,7 @@
     ></base-tabs>
 
     <view class="server-detail">
-      <view class="fl-text-title u-m-b-24">服务详情</view>
+      <view class="fl-text-title u-m-b-24">网友评价</view>
       <view class="detail">{{ goods.description }}</view>
     </view>
 
@@ -106,7 +106,7 @@
     </div>
 
     <view class="service-footer">
-      <ServiceFooter></ServiceFooter>
+      <ServiceFooter @collect="collect" @cart="handlerAddCart"></ServiceFooter>
     </view>
   </view>
 </template>
@@ -206,7 +206,7 @@ export default {
     },
 
     // 选择底部tab店铺收藏咨询
-    collect(item, index) {
+    collect(index) {
       switch (index) {
         case 0:
           uni.navigateBack(-1);

+ 14 - 5
src/pagesHome/productDetail/serviceFooter.vue

@@ -3,13 +3,13 @@
     <view class="footer-left">
       <view class="left-item" @click="collect(0)">
         <view class="item-img">
-          <image src="/static/home/icon_home_detail_shop.png" class="img"></image>
+          <image src="/static/pagesHome/detail_shop.png" class="img"></image>
         </view>
         <view class="item-text">店铺</view>
       </view>
       <view class="left-item" @click="collect(1)">
         <view class="item-img">
-          <image src="/static/home/icon_home_detail_comment.png" class="img"></image>
+          <image src="/static/pagesHome/detail_comment.png" class="img"></image>
         </view>
         <view class="item-text">咨询</view>
       </view>
@@ -19,8 +19,8 @@
         <image
           :src="
             goods.favorites
-              ? require('/static/home/icon_home_detail_heart.png')
-              : require('/static/home/icon_home_detail_heart2.png')
+              ? require('/static/pagesHome/detail_heart.png')
+              : require('/static/pagesHome/detail_heart-select.png.png')
           "
           class="img"
         ></image>
@@ -32,7 +32,16 @@
 </template>
 
 <script>
-export default {};
+export default {
+  methods: {
+    collect(data) {
+      this.$emit('collect', data);
+    },
+    handlerAddCart() {
+      this.$emit('cart');
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

BIN
src/static/home/icon_home_all.png


BIN
src/static/home/icon_home_detail_countdownbg.png


+ 0 - 0
src/static/home/icon_home_detail_comment.png → src/static/pagesHome/detail_comment.png


+ 0 - 0
src/static/home/icon_home_detail_heart2.png → src/static/pagesHome/detail_heart-select.png


+ 0 - 0
src/static/home/icon_home_detail_heart.png → src/static/pagesHome/detail_heart.png


+ 0 - 0
src/static/home/icon_home_detail_shop.png → src/static/pagesHome/detail_shop.png