Authored by lea guo

yohood原价购

@@ -33,7 +33,7 @@ Component({ @@ -33,7 +33,7 @@ Component({
33 type: Number, 33 type: Number,
34 value: 0, 34 value: 0,
35 }, 35 },
36 - actPrizeId: { 36 + actId: {
37 type: Number, 37 type: Number,
38 value: 0, 38 value: 0,
39 }, 39 },
@@ -108,16 +108,17 @@ Component({ @@ -108,16 +108,17 @@ Component({
108 mask: true, 108 mask: true,
109 }); 109 });
110 event.emit('user-is-login', { 110 event.emit('user-is-login', {
111 - logged: this.logged.bind(this), 111 + logged: this.getCode.bind(this),
112 loginSuccess: function() {}, 112 loginSuccess: function() {},
113 }); 113 });
114 }, 114 },
115 - logged(userInfo) { 115 +
  116 + getCode(userInfo) {
116 this.service 117 this.service
117 .fetchCode({ 118 .fetchCode({
118 shareUid: this.properties.shareUid, 119 shareUid: this.properties.shareUid,
119 uid: app.getUid(), 120 uid: app.getUid(),
120 - actPrizeId: this.properties.actPrizeId, 121 + actPrizeId: this.properties.actId,
121 userThumb: userInfo.avatarUrl, 122 userThumb: userInfo.avatarUrl,
122 userName: userInfo.nickName, 123 userName: userInfo.nickName,
123 }) 124 })
@@ -128,7 +129,7 @@ Component({ @@ -128,7 +129,7 @@ Component({
128 show: true, 129 show: true,
129 code: result.data.prizeCode, 130 code: result.data.prizeCode,
130 }); 131 });
131 - this.triggerEvent('gaincodesuccess', this.properties.actPrizeId); 132 + this.triggerEvent('gaincodesuccess', this.properties.actId);
132 } else { 133 } else {
133 this.setData({ 134 this.setData({
134 error: true, 135 error: true,
1 @import '../action-bar.wxss'; 1 @import '../action-bar.wxss';
2 2
  3 +/* page/subPackage/pages/zeroSell/components/action-bar.wxss */
  4 +
  5 +
  6 +.action-bar {
  7 + display: flex;
  8 + width: 100%;
  9 + height: 100rpx;
  10 +}
  11 +
  12 +.action-item {
  13 + flex: 1;
  14 + color: white;
  15 + text-align: center;
  16 + font-size: 32rpx;
  17 + height: 100rpx;
  18 + line-height: 100rpx;
  19 + background-color: white;
  20 + border-radius: unset
  21 +}
  22 +
  23 +.action-list {
  24 + flex: 0;
  25 + position: relative;
  26 + flex-basis: 150rpx;
  27 +}
  28 +
  29 +.action-image {
  30 + width: 46rpx;
  31 + height: 42rpx;
  32 + position: absolute;
  33 + top: 50%;
  34 + left: 50%;
  35 + /* transform: translateY(-50%); */
  36 + transform: translate(-50%, -50%);
  37 +
  38 +}
  39 +
  40 +.over {
  41 + background-color: #B0B0B0;
  42 +}
  43 +
  44 +.code-alert {
  45 + text-align: center;
  46 + color: black;
  47 + margin-top: -400rpx;
  48 + display: flex;
  49 + flex-direction: column;
  50 + align-items: center;
  51 +}
  52 +
  53 +.code-title {
  54 + margin-top: -10rpx;
  55 +}
  56 +
  57 +.code-bg {
  58 + margin-top: 80rpx;
  59 + display: flex;
  60 + flex-direction: row;
  61 + align-items: center;
  62 + justify-content: center;
  63 +}
  64 +
  65 +.title {
  66 + font-size: 28rpx;
  67 + color: #444444;
  68 +}
  69 +
  70 +.code {
  71 + min-width: 192rpx;
  72 + height: 50rpx;
  73 + font-size: 28rpx;
  74 + font-weight: bolder;
  75 + line-height: 50rpx;
  76 + text-align: center;
  77 + border: 1rpx solid black;
  78 + margin-left: 20rpx;
  79 +}
  80 +
  81 +.share {
  82 + font-size: 28rpx;
  83 + color: #FFFFFF;
  84 + background: #64ad88;
  85 + border-radius: 28px;
  86 + width: 460rpx;
  87 + height: 80rpx;
  88 + line-height: 80rpx;
  89 + margin-top: 50rpx;
  90 + vertical-align: center;
  91 +}
  92 +
  93 +.share-desc {
  94 + font-size: 20rpx;
  95 + color: #B0B0B0;
  96 + font-family: PingFangSC-Medium;
  97 + margin-top: 10rpx;
  98 +}
  99 +
  100 +.foot {
  101 + display: flex;
  102 + position: absolute;
  103 + box-sizing: border-box;
  104 + bottom: 0;
  105 + width: 100%;
  106 + height: 90rpx;
  107 + line-height: 90rpx;
  108 + font-size: 28rpx;
  109 + font-weight: bolder;
  110 + text-align: center;
  111 + border-top: 1rpx solid #E0E0E0;
  112 +}
  113 +
  114 +.foot-item {
  115 + flex: 1;
  116 + text-align: center;
  117 + font-size: 32rpx;
  118 + height: 90rpx;
  119 + line-height: 90rpx;
  120 + color: black;
  121 + border: none !important;
  122 + border-radius: unset;
  123 +}
  124 +
  125 +.foot-item + .foot-item {
  126 + border-left: 1rpx solid #E0E0E0 !important;
  127 +}
  128 +
  129 +.info {
  130 + color: #D0021B !important;
  131 +}
  132 +
  133 +.error-alert {
  134 + text-align: center;
  135 + color: black;
  136 + margin-top: 40rpx;
  137 +}
  138 +
  139 +.error-title {
  140 + font-size: 40rpx;
  141 + color: #D0021B ;
  142 + margin-bottom: 30rpx;
  143 +}
  144 +
  145 +.error-content {
  146 + font-size: 30rpx;
  147 + padding: 0 100rpx;
  148 +}
  149 +
  150 +
3 .ok, 151 .ok,
4 .confirm { 152 .confirm {
5 background-color: #132f48; 153 background-color: #132f48;
@@ -9,10 +157,3 @@ @@ -9,10 +157,3 @@
9 width: 140rpx; 157 width: 140rpx;
10 display: inline-block; 158 display: inline-block;
11 } 159 }
12 -  
13 -.share {  
14 - background-color: #64ad88;  
15 -}  
16 -.action-item {  
17 - border-radius: unset;  
18 -}  
@@ -338,7 +338,7 @@ Page( @@ -338,7 +338,7 @@ Page(
338 338
339 let qrcode = this.service.getQrCode({ 339 let qrcode = this.service.getQrCode({
340 shareUid: app.getUid(), 340 shareUid: app.getUid(),
341 - actPrizeId: this.data.actPrizeId, 341 + actPrizeId: this.data.actPrizeId || product.id || '',
342 }); 342 });
343 343
344 let snapData = { 344 let snapData = {
@@ -350,6 +350,7 @@ Page( @@ -350,6 +350,7 @@ Page(
350 350
351 this.setData({ 351 this.setData({
352 product: product, 352 product: product,
  353 + actPrizeId: this.data.actPrizeId || product.id || '',
353 avatars: (r2.code === 200 ? r2.data : []).map(i => { 354 avatars: (r2.code === 200 ? r2.data : []).map(i => {
354 i.user_name = wrapperName(i.user_name); 355 i.user_name = wrapperName(i.user_name);
355 i.user_thumb = formatImageUrl(i.user_thumb, 200, 200); 356 i.user_thumb = formatImageUrl(i.user_thumb, 200, 200);
1 -<view class="header {{shareFlag || 'mt-header'}}"> 1 +<view class="header {{shareFlag || notice.content && product.status >= 3 ? 'mt-header': ''}}">
2 <product-header product="{{product}}" shareFlag="{{shareFlag}}" bindchangeStatus="changeActionStatus" avatars="{{avatars}}"></product-header> 2 <product-header product="{{product}}" shareFlag="{{shareFlag}}" bindchangeStatus="changeActionStatus" avatars="{{avatars}}"></product-header>
3 </view> 3 </view>
4 <view class="lottery-info"> 4 <view class="lottery-info">
@@ -30,17 +30,17 @@ @@ -30,17 +30,17 @@
30 </view> 30 </view>
31 </view> 31 </view>
32 <view class="fellow-bar" wx:if="{{product.status && !shareFlag}}"> 32 <view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">
33 - <block wx:if="{{product.status === 3 || product.status === 4 || product.status === 5}}"> 33 + <block wx:if="{{product.status >= 3}}">
34 <view class="endTip"> 34 <view class="endTip">
35 <text>{{notice.content || '本场活动已结束,请关注开奖消息通知'}}</text> 35 <text>{{notice.content || '本场活动已结束,请关注开奖消息通知'}}</text>
36 </view> 36 </view>
37 </block> 37 </block>
38 - <block wx:else> 38 + <block wx:elif="{{notice.content}}">
39 <fellow-bar notice="{{notice}}"></fellow-bar> 39 <fellow-bar notice="{{notice}}"></fellow-bar>
40 </block> 40 </block>
41 </view> 41 </view>
42 <view class="action-bar"> 42 <view class="action-bar">
43 - <action-bar activity-status="{{product.status}}" start-time="{{product.end_time}}" is-login="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" act-prize-id="{{actPrizeId}}" bindchangeStatus="changeActionStatus" bindshare="share" copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}" bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"></action-bar> 43 + <action-bar activity-status="{{product.status}}" start-time="{{product.end_time}}" is-login="{{isLogin}}" status="{{actionStatus}}" num="{{myPrizeCount}}" share-uid="{{shareUid}}" act-id="{{actPrizeId}}" bindchangeStatus="changeActionStatus" bindshare="share" copyText="{{lottery.miniappCopy}}" text="{{lottery.miniappTip}}" bindgaincodesuccess="reportSuccess" type="{{lottery.miniappType}}"></action-bar>
44 </view> 44 </view>
45 <view class="foot"></view> 45 <view class="foot"></view>
46 <import src="../../vendors/zanui/actionsheet/index.wxml" /> 46 <import src="../../vendors/zanui/actionsheet/index.wxml" />