Authored by lea guo

yohood原价购

... ... @@ -33,7 +33,7 @@ Component({
type: Number,
value: 0,
},
actPrizeId: {
actId: {
type: Number,
value: 0,
},
... ... @@ -108,16 +108,17 @@ Component({
mask: true,
});
event.emit('user-is-login', {
logged: this.logged.bind(this),
logged: this.getCode.bind(this),
loginSuccess: function() {},
});
},
logged(userInfo) {
getCode(userInfo) {
this.service
.fetchCode({
shareUid: this.properties.shareUid,
uid: app.getUid(),
actPrizeId: this.properties.actPrizeId,
actPrizeId: this.properties.actId,
userThumb: userInfo.avatarUrl,
userName: userInfo.nickName,
})
... ... @@ -128,7 +129,7 @@ Component({
show: true,
code: result.data.prizeCode,
});
this.triggerEvent('gaincodesuccess', this.properties.actPrizeId);
this.triggerEvent('gaincodesuccess', this.properties.actId);
} else {
this.setData({
error: true,
... ...
@import '../action-bar.wxss';
/* page/subPackage/pages/zeroSell/components/action-bar.wxss */
.action-bar {
display: flex;
width: 100%;
height: 100rpx;
}
.action-item {
flex: 1;
color: white;
text-align: center;
font-size: 32rpx;
height: 100rpx;
line-height: 100rpx;
background-color: white;
border-radius: unset
}
.action-list {
flex: 0;
position: relative;
flex-basis: 150rpx;
}
.action-image {
width: 46rpx;
height: 42rpx;
position: absolute;
top: 50%;
left: 50%;
/* transform: translateY(-50%); */
transform: translate(-50%, -50%);
}
.over {
background-color: #B0B0B0;
}
.code-alert {
text-align: center;
color: black;
margin-top: -400rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.code-title {
margin-top: -10rpx;
}
.code-bg {
margin-top: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.title {
font-size: 28rpx;
color: #444444;
}
.code {
min-width: 192rpx;
height: 50rpx;
font-size: 28rpx;
font-weight: bolder;
line-height: 50rpx;
text-align: center;
border: 1rpx solid black;
margin-left: 20rpx;
}
.share {
font-size: 28rpx;
color: #FFFFFF;
background: #64ad88;
border-radius: 28px;
width: 460rpx;
height: 80rpx;
line-height: 80rpx;
margin-top: 50rpx;
vertical-align: center;
}
.share-desc {
font-size: 20rpx;
color: #B0B0B0;
font-family: PingFangSC-Medium;
margin-top: 10rpx;
}
.foot {
display: flex;
position: absolute;
box-sizing: border-box;
bottom: 0;
width: 100%;
height: 90rpx;
line-height: 90rpx;
font-size: 28rpx;
font-weight: bolder;
text-align: center;
border-top: 1rpx solid #E0E0E0;
}
.foot-item {
flex: 1;
text-align: center;
font-size: 32rpx;
height: 90rpx;
line-height: 90rpx;
color: black;
border: none !important;
border-radius: unset;
}
.foot-item + .foot-item {
border-left: 1rpx solid #E0E0E0 !important;
}
.info {
color: #D0021B !important;
}
.error-alert {
text-align: center;
color: black;
margin-top: 40rpx;
}
.error-title {
font-size: 40rpx;
color: #D0021B ;
margin-bottom: 30rpx;
}
.error-content {
font-size: 30rpx;
padding: 0 100rpx;
}
.ok,
.confirm {
background-color: #132f48;
... ... @@ -9,10 +157,3 @@
width: 140rpx;
display: inline-block;
}
.share {
background-color: #64ad88;
}
.action-item {
border-radius: unset;
}
... ...
... ... @@ -338,7 +338,7 @@ Page(
let qrcode = this.service.getQrCode({
shareUid: app.getUid(),
actPrizeId: this.data.actPrizeId,
actPrizeId: this.data.actPrizeId || product.id || '',
});
let snapData = {
... ... @@ -350,6 +350,7 @@ Page(
this.setData({
product: product,
actPrizeId: this.data.actPrizeId || product.id || '',
avatars: (r2.code === 200 ? r2.data : []).map(i => {
i.user_name = wrapperName(i.user_name);
i.user_thumb = formatImageUrl(i.user_thumb, 200, 200);
... ...
<view class="header {{shareFlag || 'mt-header'}}">
<view class="header {{shareFlag || notice.content && product.status >= 3 ? 'mt-header': ''}}">
<product-header product="{{product}}" shareFlag="{{shareFlag}}" bindchangeStatus="changeActionStatus" avatars="{{avatars}}"></product-header>
</view>
<view class="lottery-info">
... ... @@ -30,17 +30,17 @@
</view>
</view>
<view class="fellow-bar" wx:if="{{product.status && !shareFlag}}">
<block wx:if="{{product.status === 3 || product.status === 4 || product.status === 5}}">
<block wx:if="{{product.status >= 3}}">
<view class="endTip">
<text>{{notice.content || '本场活动已结束,请关注开奖消息通知'}}</text>
</view>
</block>
<block wx:else>
<block wx:elif="{{notice.content}}">
<fellow-bar notice="{{notice}}"></fellow-bar>
</block>
</view>
<view class="action-bar">
<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>
<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>
</view>
<view class="foot"></view>
<import src="../../vendors/zanui/actionsheet/index.wxml" />
... ...