Selaa lähdekoodia

Merge branch 'master' of http://face3d.4dage.com:7005/shaogen1995/YFYC-H5 into master

shaogen1995 2 vuotta sitten
vanhempi
commit
cff2f4106c

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 130
yfyc/src/assets/data/serve/data.js


+ 19 - 3
yfyc/src/views/Serve/FoodList.vue

@@ -31,7 +31,7 @@
       <!-- <div class="grid-sizer"></div> -->
       <article
         v-for="(item, index) in foodList"
-        :key="index"
+        :key="item.id"
         @click="onClickFoodItem(item)"
       >
         <div class="img-wrap">
@@ -111,6 +111,19 @@ export default {
       })
     }
   },
+  watch: {
+    foodList: {
+      handler() {
+        this.$nextTick(() => {
+          $('.card-list').masonry({
+            itemSelector: '.card-list > article',
+            percentPosition: true,
+          });
+        })
+      },
+      deep: true,
+    }
+  },
   methods: {
     onInputChange(v) {
       this.keyword = v
@@ -189,10 +202,13 @@ export default {
         }
         > .address {
           position: absolute;
-          left: 2vw;
-          bottom: 2vw;
+          left: 0;
+          bottom: 0;
+          width: 100%;
           font-size: 2.7vw;
           color: #FFFFFF;
+          background: linear-gradient(rgba(0, 0 ,0 ,0), rgba(0, 0, 0, 1));
+          padding: 8vw 2vw 2vw 2vw;
           > img.icon {
             width: 2.7vw;
             height: 3.6vw;

+ 5 - 2
yfyc/src/views/Serve/HotelList.vue

@@ -228,13 +228,16 @@ export default {
         }
         > .address {
           position: absolute;
-          left: 2vw;
-          bottom: 2vw;
+          left: 0;
+          bottom: 0;
+          width: 100%;
           font-size: 3.2vw;
           font-weight: 500;
           color: #FFFFFF;
           display: flex;
           align-items: center;
+          background: linear-gradient(rgba(0, 0 ,0 ,0), rgba(0, 0, 0, 1));
+          padding: 8vw 2vw 2vw 2vw;
           > img.icon {
             width: 2.7vw;
             height: 3.6vw;

+ 1 - 1
yfyc/src/views/Serve/RecommendedPathDetail.vue

@@ -17,7 +17,7 @@
       <img :src="require(`@/assets/img/service/path/${pathInfo.id}/${index + 1}.jpg`)" alt="" draggable="false">
       <h2>{{item.name}}</h2>
       <p>{{item.desc}}</p>
-      <div class="bottom-wrap">
+      <div class="bottom-wrap" v-if="item.address || item.phone">
         <div class="address-wrap" v-if="item.address">
           <img src="@/assets/img/service/address.png" alt="" draggable="false">
           <span>{{item.address}}</span>

+ 4 - 0
yfyc/src/views/Serve/index.vue

@@ -313,6 +313,7 @@ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
     height: 23.5vw;
     border-radius: 1.1vw;
     > .entry {
+      flex: 0 0 auto;
       width: 12.2vw;
       height: 12.2vw;
       display: flex;
@@ -323,6 +324,7 @@ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
       font-weight: bold;
       color: #535353;
       line-height: 1.1em;
+      white-space: pre;
       > img {
         width: 6.4vw;
         height: auto;
@@ -579,6 +581,7 @@ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
       height: 23.5vw;
       border-radius: 1.1vw;
       > .entry {
+        flex: 0 0 auto;
         width: 15vw;
         height: 15vw;
         display: flex;
@@ -589,6 +592,7 @@ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
         font-weight: bold;
         color: #535353;
         line-height: 1.1em;
+        white-space: pre;
         > img {
           height: 8vw;
           margin-bottom: 2.7vw;