Commit b53ba1678e25126a5b4d6efe423eaa5cc5a73c2b
1 parent
b7135675
根据生产环境数据优化~
Showing
5 changed files
with
41 additions
and
8 deletions
src/components/iconsCom/iconsCom.less
src/pages/mall2/mall2.less
| ... | ... | @@ -45,10 +45,32 @@ |
| 45 | 45 | .header-img-box { |
| 46 | 46 | width: 100%; |
| 47 | 47 | height: 100%; |
| 48 | - .header-img { | |
| 49 | - display: block; | |
| 50 | - width: 100%; | |
| 51 | - height: 100%; | |
| 48 | + .img-box { | |
| 49 | + position: relative; | |
| 50 | + .header-img { | |
| 51 | + display: block; | |
| 52 | + width: 100%; | |
| 53 | + height: 100%; | |
| 54 | + } | |
| 55 | + .title-box { | |
| 56 | + position: absolute; | |
| 57 | + top: 0; | |
| 58 | + left: 0; | |
| 59 | + z-index: 1; | |
| 60 | + margin: 0 auto; | |
| 61 | + width: 100%; | |
| 62 | + height: 160px; | |
| 63 | + .title { | |
| 64 | + display: flex; | |
| 65 | + justify-content: flex-start; | |
| 66 | + align-items: center; | |
| 67 | + margin: 0 auto; | |
| 68 | + color: #777777; | |
| 69 | + font-size: 34px; | |
| 70 | + width: 90%; | |
| 71 | + height: 100%; | |
| 72 | + } | |
| 73 | + } | |
| 52 | 74 | } |
| 53 | 75 | } |
| 54 | 76 | .list-box { | ... | ... |
src/pages/mall2/mall2.vue
| ... | ... | @@ -40,12 +40,19 @@ |
| 40 | 40 | <!-- 上拉加载 --> |
| 41 | 41 | <van-list v-model="shopListsPage.loading" :finished="shopListsPage.finished" finished-text="没有更多了" @load="loadMore"> |
| 42 | 42 | |
| 43 | - <div class="section shop-list" v-for="(items, index) in shopLists" :key="index" @click="toShop(items)"> | |
| 43 | + <div class="section shop-list" v-if="items.goods && items.goods.length" v-for="(items, index) in shopLists" :key="index" @click="toShop(items)"> | |
| 44 | 44 | |
| 45 | 45 | <!-- 头图 --> |
| 46 | 46 | <div class="header-img-box"> |
| 47 | - <img :src="items.img + SIGN.BIG" class="header-img" v-if="items.img" /> | |
| 48 | - <img src="static/img/header_img_default.png" class="header-img" v-else /> | |
| 47 | + <div class="img-box" v-if="items.img"> | |
| 48 | + <img :src="items.img + SIGN.BIG" class="header-img" /> | |
| 49 | + </div> | |
| 50 | + <div class="img-box" v-else> | |
| 51 | + <img src="static/img/header_img_default.jpg" class="header-img" /> | |
| 52 | + <div class="title-box"> | |
| 53 | + <div class="title">{{items.title}}</div> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 49 | 56 | </div> |
| 50 | 57 | |
| 51 | 58 | <!-- 商品列表 --> | ... | ... |
src/pages/optimization2/optimization2.vue
| ... | ... | @@ -43,7 +43,7 @@ |
| 43 | 43 | pid="4"> |
| 44 | 44 | |
| 45 | 45 | <!-- 折扣角标 --> |
| 46 | - <div class="discount-flag" slot="flag" v-if="item.price < item.prices"> | |
| 46 | + <div class="discount-flag" slot="flag" v-if="parseFloat(item.price) < parseFloat(item.prices)"> | |
| 47 | 47 | {{getDiscount(item.price, item.prices)}}折 |
| 48 | 48 | </div> |
| 49 | 49 | </goods-item-2> | ... | ... |
static/img/header_img_default.jpg
0 → 100644
6.1 KB