修复页面布局错误的问题,添加占位符优化页面 review by 黄敬囿
Showing
7 changed files
with
122 additions
and
14 deletions
@@ -11,8 +11,8 @@ | @@ -11,8 +11,8 @@ | ||
11 | <view class="group-product-name">{{group_product.product_name}}</view> | 11 | <view class="group-product-name">{{group_product.product_name}}</view> |
12 | <view class="group-price"> | 12 | <view class="group-price"> |
13 | <view class="group-prict-bg"> | 13 | <view class="group-prict-bg"> |
14 | - <text class="group-price-market">{{group_product.market_price_str}}</text> | ||
15 | - <text class="group-price-collage">{{group_product.collage_price_str}}</text> | 14 | + <text class="group-price-market">¥{{group_product.market_price}}</text> |
15 | + <text class="group-price-collage">¥{{group_product.collage_price}}</text> | ||
16 | </view> | 16 | </view> |
17 | <image class="group-free-post" src="{{free_post}}"></image> | 17 | <image class="group-free-post" src="{{free_post}}"></image> |
18 | </view> | 18 | </view> |
@@ -53,11 +53,14 @@ | @@ -53,11 +53,14 @@ | ||
53 | .group-price-collage { | 53 | .group-price-collage { |
54 | font-size: 32rpx; | 54 | font-size: 32rpx; |
55 | color: #D0021B; | 55 | color: #D0021B; |
56 | + margin-left: 20rpx; | ||
57 | + letter-spacing: 2rpx; | ||
56 | } | 58 | } |
57 | 59 | ||
58 | .group-prict-bg { | 60 | .group-prict-bg { |
59 | font-size: 22rpx; | 61 | font-size: 22rpx; |
60 | color: #444444; | 62 | color: #444444; |
63 | + font-family: SanFranciscoText-Medium; | ||
61 | } | 64 | } |
62 | 65 | ||
63 | .group-free-post { | 66 | .group-free-post { |
@@ -4,9 +4,9 @@ | @@ -4,9 +4,9 @@ | ||
4 | display: flex; | 4 | display: flex; |
5 | flex-direction: row; | 5 | flex-direction: row; |
6 | flex-wrap: wrap; | 6 | flex-wrap: wrap; |
7 | - justify-content: space-around; | ||
8 | - margin-left: 20rpx; | ||
9 | - margin-right: 20rpx; | 7 | + justify-content: space-between; |
8 | + margin-left: 40rpx; | ||
9 | + margin-right: 40rpx; | ||
10 | } | 10 | } |
11 | 11 | ||
12 | .space-line { | 12 | .space-line { |
@@ -17,7 +17,7 @@ import { | @@ -17,7 +17,7 @@ import { | ||
17 | import {formatImageUrl} from '../../utils/util' | 17 | import {formatImageUrl} from '../../utils/util' |
18 | 18 | ||
19 | import { | 19 | import { |
20 | - Toast | 20 | + Toast, Actionsheet |
21 | } from '../../vendors/zanui/index'; | 21 | } from '../../vendors/zanui/index'; |
22 | import router from './router/router'; | 22 | import router from './router/router'; |
23 | import { jumpByUrl } from '../../libs/urlRoute'; | 23 | import { jumpByUrl } from '../../libs/urlRoute'; |
@@ -57,7 +57,28 @@ Page(Object.assign({ | @@ -57,7 +57,28 @@ Page(Object.assign({ | ||
57 | dialogUrl: null, | 57 | dialogUrl: null, |
58 | bannerSrc: null, | 58 | bannerSrc: null, |
59 | bannerUrl: null, | 59 | bannerUrl: null, |
60 | - openType: 'getUserInfo' | 60 | + openType: 'getUserInfo', |
61 | + actionsheet: { | ||
62 | + componentId: 'shareActionSheet', | ||
63 | + show: false, | ||
64 | + closeOnClickOverlay: true, | ||
65 | + cancelText: '取消', | ||
66 | + isNewShareStyle: true, | ||
67 | + unionUserImageUrl: 'http://img12.static.yhbimg.com/sns/2018/08/02/15/029b6acc4f8bc0620ecd7ec2133fcf900c.png', | ||
68 | + actions: [{ | ||
69 | + name: '分享给好友', | ||
70 | + className: 'action-class', | ||
71 | + loading: false, | ||
72 | + openType: 'share', | ||
73 | + image_src: '../../images/share_wechat@2x.png', | ||
74 | + }, | ||
75 | + { | ||
76 | + name: '生成海报分享', | ||
77 | + className: 'action-class', | ||
78 | + loading: false, | ||
79 | + image_src: '../../images/share_wxpeng@2x.png' | ||
80 | + }] | ||
81 | + }, | ||
61 | }, | 82 | }, |
62 | 83 | ||
63 | onLoad(options) { | 84 | onLoad(options) { |
@@ -87,7 +108,9 @@ Page(Object.assign({ | @@ -87,7 +108,9 @@ Page(Object.assign({ | ||
87 | this._init(); | 108 | this._init(); |
88 | } | 109 | } |
89 | new app.WeToast(); | 110 | new app.WeToast(); |
90 | - if(!(options && +options.reload === 0)) { | 111 | + console.log(options.reload); |
112 | + if(options && (Number(options.reload) !== 0)) { | ||
113 | + console.log('执行了'); | ||
91 | this._getResouceCode() | 114 | this._getResouceCode() |
92 | } | 115 | } |
93 | this._getBottomBanner() | 116 | this._getBottomBanner() |
@@ -470,4 +493,71 @@ Page(Object.assign({ | @@ -470,4 +493,71 @@ Page(Object.assign({ | ||
470 | }); | 493 | }); |
471 | }, | 494 | }, |
472 | 495 | ||
473 | -}, Toast)); | ||
496 | + share({ detail }) { | ||
497 | + this.setData({ | ||
498 | + 'actionsheet.show': true, | ||
499 | + 'shareProduct': detail | ||
500 | + }) | ||
501 | + }, | ||
502 | + | ||
503 | + handleZanActionsheetCancel({ componentId }) { | ||
504 | + this.setData({ | ||
505 | + 'actionsheet.show': false | ||
506 | + }) | ||
507 | + }, | ||
508 | + | ||
509 | + handleZanActionsheetClick({ componentId, index }) { | ||
510 | + this.setData({ | ||
511 | + 'actionsheet.show': false | ||
512 | + }); | ||
513 | + | ||
514 | + let qrcode = this.service.getQrCode({ | ||
515 | + shareUid: app.getUid(), | ||
516 | + actPrizeId: this.data.shareProduct.act_prize_id | ||
517 | + }); | ||
518 | + | ||
519 | + if (index === 1) { | ||
520 | + if (this.data.shareProduct.name) { | ||
521 | + router.go('snapShare', { | ||
522 | + product_name: this.data.shareProduct.name, | ||
523 | + default_image: this.data.shareProduct.cover_img, | ||
524 | + product_price: this.data.shareProduct.price, | ||
525 | + product_qrCode: qrcode | ||
526 | + }); | ||
527 | + } | ||
528 | + }; | ||
529 | + }, | ||
530 | + onShareAppMessage(res) { | ||
531 | + let params = { | ||
532 | + TITLE: `【0元抽奖】点一下,免费拿走${this.data.shareProduct.name}`, | ||
533 | + DESC: '我在YO!LUCK发现一个不错的商品赶快来看看吧!' | ||
534 | + }; | ||
535 | + | ||
536 | + if (res.from === 'menu') { | ||
537 | + // 用户点击右上角分享 | ||
538 | + return { | ||
539 | + title: params.TITLE, // 分享标题 | ||
540 | + desc: params.DESC, // 分享描述 | ||
541 | + path: `pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}`, | ||
542 | + imageUrl: this.data.shareProduct.cover_img, | ||
543 | + success: function () { | ||
544 | + }, | ||
545 | + fail: function () { | ||
546 | + } | ||
547 | + }; | ||
548 | + } else if (res.from === 'button') { | ||
549 | + // 用户点击分享按钮 | ||
550 | + | ||
551 | + return { | ||
552 | + title: params.TITLE, // 分享标题 | ||
553 | + desc: params.DESC, // 分享描述 | ||
554 | + path: `/pages/zeroSell/detail?actPrizeId=${this.data.shareProduct.act_prize_id}&shareUid=${app.getUid()}`, | ||
555 | + imageUrl: this.data.shareProduct.cover_img, | ||
556 | + success: function () { | ||
557 | + }, | ||
558 | + fail: function () { | ||
559 | + } | ||
560 | + }; | ||
561 | + } | ||
562 | + } | ||
563 | +}, Toast, Actionsheet)); |
@@ -32,15 +32,27 @@ | @@ -32,15 +32,27 @@ | ||
32 | <view class="space-line"></view> | 32 | <view class="space-line"></view> |
33 | <text class="title">进行中</text> | 33 | <text class="title">进行中</text> |
34 | </view> | 34 | </view> |
35 | - <block wx:for="{{my_zero_list[0].data}}"> | ||
36 | - <prize-item item="{{item}}" bindshare="share"></prize-item> | 35 | + <block wx:if="{{my_zero_list[0].data && my_zero_list[0].data.length === 0}}"> |
36 | + <view class="list-foot-blank">您还没有参与的抽奖,赶紧去参加吧 | ||
37 | +</view> | ||
38 | + </block> | ||
39 | + <block wx:else> | ||
40 | + <block wx:for="{{my_zero_list[0].data}}"> | ||
41 | + <prize-item item="{{item}}" bindshare="share"></prize-item> | ||
42 | + </block> | ||
37 | </block> | 43 | </block> |
38 | <view class="title-view"> | 44 | <view class="title-view"> |
39 | <view class="space-line"></view> | 45 | <view class="space-line"></view> |
40 | <text class="title">已公布</text> | 46 | <text class="title">已公布</text> |
41 | </view> | 47 | </view> |
42 | - <block wx:for="{{my_zero_list[1].data}}"> | ||
43 | - <prize-item item="{{item}}" bindshare="share"></prize-item> | 48 | + <block wx:if="{{my_zero_list[1].data && my_zero_list[1].data.length === 0}}"> |
49 | + <view class="list-foot-blank">暂无已公布活动,请继续参加活动 | ||
50 | +</view> | ||
51 | + </block> | ||
52 | + <block wx:else> | ||
53 | + <block wx:for="{{my_zero_list[1].data}}"> | ||
54 | + <prize-item item="{{item}}" bindshare="share"></prize-item> | ||
55 | + </block> | ||
44 | </block> | 56 | </block> |
45 | </block> | 57 | </block> |
46 | <block wx:else> | 58 | <block wx:else> |
@@ -82,4 +94,6 @@ id='dialog' | @@ -82,4 +94,6 @@ id='dialog' | ||
82 | src="{{dialogSrc}}" | 94 | src="{{dialogSrc}}" |
83 | url="{{dialogUrl}}" | 95 | url="{{dialogUrl}}" |
84 | ></dialog> | 96 | ></dialog> |
97 | +<import src="../../vendors/zanui/actionsheet/index.wxml" /> | ||
98 | +<template is="zan-actionsheet" data="{{...actionsheet}}" /> | ||
85 | <!-- <quickNavigation id="quickNavigation" isShowIndicator="{{false}}" isShowShopCart="{{false}}" marginBottom="{{190}}"></quickNavigation> --> | 99 | <!-- <quickNavigation id="quickNavigation" isShowIndicator="{{false}}" isShowShopCart="{{false}}" marginBottom="{{190}}"></quickNavigation> --> |
-
Please register or login to post a comment