Commit cfcc0aa6ddc932ab4dd8652b912925d3da825e71

Authored by sfmind
1 parent 6e685c48

充实商品静态页,增加empty图片

yudao-ui-app/pages/product/product.vue
... ... @@ -17,10 +17,92 @@
17 17 <u--text-price color="red" size="16" intSize="26" :text="product.price"></u--text-price>
18 18 </view>
19 19 </view>
20   - <view class="prod-collect">
21   - <u-icon name="heart" color="#2979ff" size="28"></u-icon>
  20 + <view class="prod-favor">
  21 + <u-icon name="star" color="#2979ff" size="28"></u-icon>
22 22 </view>
  23 +
  24 + </view>
  25 +
  26 + <u-gap height="8" bgColor="#f3f3f3"></u-gap>
  27 + <view class="info-box">
  28 + <text class="info-title">配送</text>
  29 +<!-- <text>快递配送</text>
  30 + <text>到店自提</text>-->
  31 + </view>
  32 +
  33 + <u-gap height="8" bgColor="#f3f3f3"></u-gap>
  34 + <view class="info-box" @click="showPromPopup">
  35 + <text class="info-title">促销</text>
  36 + </view>
  37 +
  38 + <view>
  39 + <u-popup :show="promotionPopup" :round="10" :closeable="true" :closeOnClickOverlay="false" @close="closePromPopup">
  40 + <view class="prom-popup-slot">
  41 + <view class="prom-title">促销信息</view>
  42 + <view class="prom-list">
  43 + <view class="prom-item">全场满500减100</view>
  44 + <view class="prom-item">全场满300减50</view>
  45 + <view class="prom-item">全场满200减20</view>
  46 + <view class="prom-item">全场满100减5</view>
  47 + </view>
  48 + </view>
  49 + </u-popup>
23 50 </view>
  51 +
  52 + <u-gap height="8" bgColor="#f3f3f3"></u-gap>
  53 + <view class="info-box">
  54 + <text class="info-title">领券</text>
  55 + </view>
  56 +
  57 + <u-gap height="8" bgColor="#f3f3f3"></u-gap>
  58 + <view class="info-box">
  59 + <text class="info-title">已选</text>
  60 + </view>
  61 +
  62 + <u-gap height="8" bgColor="#f3f3f3"></u-gap>
  63 + <view class="evaluation-box-wrap">
  64 + <view class="evaluation-box">
  65 + <view class="evaluation-title">评价</view>
  66 + <view class="evaluation-info">
  67 + <view class="evan-type-list">
  68 + <view class="evan-type-item" v-for="(item, index) in evanTypeList" :key="index" @click="handleEvanTypeClick(index)">
  69 + {{item.name}}({{item.count}})
  70 + </view>
  71 + </view>
  72 + <view class="comment-empty" v-if="true">
  73 + <u-empty mode="comment" icon="/static/images/empty/comment.png"></u-empty>
  74 + </view>
  75 + <view v-else class="comment-list" style="min-height: 50px">
  76 +
  77 + </view>
  78 + </view>
  79 + </view>
  80 + </view>
  81 +
  82 + <view class="fixed-btn-box">
  83 + <view class="btn-group">
  84 + <view class="btn-item">
  85 + <u-icon name="home" :size="24"></u-icon>
  86 + <view class="btn-text">首页</view>
  87 + </view>
  88 + <view class="btn-item">
  89 + <u-icon name="server-man" :size="24"></u-icon>
  90 + <view class="btn-text">客服</view>
  91 + </view>
  92 + <view class="btn-item">
  93 + <u-icon name="bag" :size="24"></u-icon>
  94 + <view class="btn-text">购物车</view>
  95 + </view>
  96 + <view style="width: 200rpx">
  97 + <u-button type="warning" shape="circle" size="small" text="加入购物车"></u-button>
  98 + </view>
  99 + <view style="width: 200rpx">
  100 + <u-button type="error" shape="circle" size="small" text="立即购买"></u-button>
  101 + </view>
  102 + </view>
  103 + </view>
  104 +
  105 +
24 106 </view>
25 107  
26 108 </template>
... ... @@ -37,7 +119,36 @@ export default {
37 119 title: '山不在高,有仙则名。水不在深,有龙则灵。斯是陋室,惟吾德馨。',
38 120 desc: '山不在于高,有了神仙就会有名气。水不在于深,有了龙就会有灵气。这是简陋的房子,只是我品德好就感觉不到简陋了。',
39 121 price: '13.00'
40   - }
  122 + },
  123 + promotionPopup: false,
  124 + currentEvanType: 0,
  125 + evanTypeList: [
  126 + {
  127 + id: '0',
  128 + name: '全部',
  129 + count: 0
  130 + },
  131 + {
  132 + id: '1',
  133 + name: '好评',
  134 + count: 0
  135 + },
  136 + {
  137 + id: '2',
  138 + name: '中评',
  139 + count: 0
  140 + },
  141 + {
  142 + id: '3',
  143 + name: '差评',
  144 + count: 0
  145 + },
  146 + {
  147 + id: '4',
  148 + name: '有图',
  149 + count: 0
  150 + },
  151 + ]
41 152 }
42 153 },
43 154 onLoad(e) {
... ... @@ -53,7 +164,16 @@ export default {
53 164 methods: {
54 165 loadProductData(){
55 166  
56   - }
  167 + },
  168 + showPromPopup() {
  169 + this.promotionPopup = true
  170 + },
  171 + closePromPopup(){
  172 + this.promotionPopup = false
  173 + },
  174 + handleEvanTypeClick(e) {
  175 + this.currentEvanType = e.index;
  176 + },
57 177  
58 178 },
59 179 computed: {
... ... @@ -92,11 +212,103 @@ export default {
92 212 justify-content: space-between;
93 213 }
94 214 }
95   - .prod-collect {
  215 + .prod-favor {
96 216 margin-top: 15rpx;
97 217 }
98 218 }
99 219  
  220 +.info-box {
  221 + padding: 15rpx 30rpx;
  222 + .info-title {
  223 + font-size: 30rpx;
  224 + }
  225 +}
  226 +
  227 +.prom-popup-slot {
  228 + width: 750rpx;
  229 + min-height: 500rpx;
  230 + .prom-title {
  231 + background: #f3f3f3;
  232 + line-height: 100rpx;
  233 + padding-left: 30rpx;
  234 + font-size: 36rpx;
  235 + border-radius: 10px 10px 0 0;
  236 + }
  237 + .prom-list{
  238 + padding: 30rpx;
  239 + .prom-item{
  240 + line-height: 40rpx;
  241 + font-size: 24rpx;
  242 + }
  243 + }
  244 +}
  245 +
  246 +.evaluation-box-wrap {
  247 + background: #f3f3f3;
  248 +
  249 + .evaluation-box {
  250 + border-radius: 20rpx 20rpx 0 0;
  251 + background: $custom-bg-color;
  252 + padding-bottom: 120rpx;
  253 +
  254 + .evaluation-title{
  255 + border-radius: 20rpx 20rpx 0 0;
  256 + padding: 20rpx 30rpx;
  257 + border-bottom: $custom-border-style;
  258 + font-size: 30rpx;
  259 + }
  260 +
  261 + .evaluation-info{
  262 +
  263 + }
  264 +
  265 + .evan-type-list{
  266 + padding: 20rpx;
  267 + display: flex;
  268 + align-items: center;
  269 + justify-content: space-around;
  270 +
  271 + .evan-type-item {
  272 + border-radius: 8rpx;
  273 + padding: 8rpx 12rpx;
  274 + background: #f3f3f3;
  275 + font-size: 12rpx;
  276 + text-align: center;
  277 + }
  278 + }
  279 +
  280 + .comment-empty {
  281 +
  282 + }
  283 + }
  284 +}
  285 +
  286 +.fixed-btn-box {
  287 + position: fixed;
  288 + bottom: 0;
  289 + left: 0;
  290 + .btn-group {
  291 + background: $custom-bg-color;
  292 + border-top: $custom-border-style;
  293 +
  294 + width: 750rpx;
  295 + display: flex;
  296 + align-items: center;
  297 + justify-content: space-around;
  298 + height: 100rpx;
  299 +
  300 + .btn-item {
  301 + width: 80rpx;
  302 + display: flex;
  303 + flex-direction: column;
  304 + align-items: center;
  305 + .btn-text {
  306 + font-size: 12rpx;
  307 + color: #666666;
  308 + }
  309 + }
  310 + }
  311 +}
100 312  
101 313  
102 314 </style>
... ...
yudao-ui-app/static/images/empty/address.png 0 → 100644

19 KB

yudao-ui-app/static/images/empty/cart.png 0 → 100644

27.9 KB

yudao-ui-app/static/images/empty/comment.png 0 → 100644

13.6 KB

yudao-ui-app/static/images/empty/coupon.png 0 → 100644

22.9 KB

yudao-ui-app/static/images/empty/data.png 0 → 100644

16.8 KB

yudao-ui-app/static/images/empty/favor.png 0 → 100644

16.3 KB

yudao-ui-app/static/images/empty/history.png 0 → 100644

26 KB

yudao-ui-app/static/images/empty/list.png 0 → 100644

17.2 KB

yudao-ui-app/static/images/empty/message.png 0 → 100644

16 KB

yudao-ui-app/static/images/empty/news.png 0 → 100644

16.3 KB

yudao-ui-app/static/images/empty/order.png 0 → 100644

15.8 KB

yudao-ui-app/static/images/empty/page.png 0 → 100644

27.6 KB

yudao-ui-app/static/images/empty/permission.png 0 → 100644

19.2 KB

yudao-ui-app/static/images/empty/search.png 0 → 100644

18.1 KB

yudao-ui-app/static/images/empty/wifi.png 0 → 100644

20.9 KB