Authored by QC-L

修改首页及获取抽奖码后的页面效果 review by 黄敬囿

... ... @@ -86,6 +86,11 @@ Component({
},
goShare() {
this.triggerEvent('share');
this.setData({
show: false,
error: false,
fellow: false
});
},
goMyList() {
... ... @@ -116,6 +121,15 @@ Component({
});
},
hiddenAlert(e) {
this.setData({
show: false,
error: false,
fellow: false
});
console.log('隐藏');
},
submitFormId(e) {
return this.commonService.addWechatFormId({
formId: e.detail.formId,
... ...
... ... @@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"zero-alert": "./alert",
"new-lucky-alert": "./new-lucky-alert",
"fellow-alert": "./fellow-alert"
}
}
\ No newline at end of file
... ...
... ... @@ -16,12 +16,12 @@
</block>
<block wx:elif="{{status === 3}}">
<view class="action-item confirm" bindtap="goMyList">
<!-- <view class="action-item confirm" bindtap="goMyList">
我的抽奖码({{num}})
</view>
</view> -->
<view class="action-item ok" bindtap="goShare">
获取更多抽奖码
分享得更多抽奖码,增加中奖率
</view>
</block>
... ... @@ -46,23 +46,29 @@
</block>
</view>
<zero-alert wx:if="{{show}}">
<new-lucky-alert wx:if="{{show}}" bindhiddenalert="hiddenAlert">
<view class="code-alert">
<view class="title">你的抽奖码是</view>
<view class="code">{{code}}</view>
<view class="share">分享可以获得更多抽奖码,中奖几率up!</view>
<text class="code-title">参加抽奖成功</text>
<view class="code-bg">
<view class="title">你的抽奖码是</view>
<view class="code">{{code}}</view>
</view>
<form bindsubmit='submitFormId' report-submit='true'>
<button class="share" form-type="submit" bindtap="goShare">分享一下,中奖概率马上 double!</button>
</form>
<view class="share-desc">1个好友参加=1个抽奖码=中奖几率UP!</view>
</view>
<form bindsubmit='submitFormId' report-submit='true'>
<!-- <form bindsubmit='submitFormId' report-submit='true'>
<view class="foot">
<button class="foot-item info" plain="true" hover-class="none" form-type="submit" bindtap="goShare">去分享</button>
<button class="foot-item" plain="true" hover-class="none" form-type="submit" bindtap="cancelAlert">取消</button>
</view>
</form>
</form> -->
<!-- <view class="foot-item info" bindtap="goShare">去分享</view>
<view class="foot-item" bindtap="cancelAlert">取消</view> -->
</zero-alert>
</new-lucky-alert>
<zero-alert wx:if="{{error}}">
<view class="error-alert">
... ...
... ... @@ -47,34 +47,62 @@
}
.code-alert {
text-align: center;
color: black;
margin-top: 40rpx;
margin-top: -400rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.code-title {
margin-top: 30rpx;
}
.code-bg {
margin-top: 80rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.title {
font-size: 28rpx;
color: #B0B0B0;
margin-bottom: 30rpx;
color: #444444;
}
.code {
display: inline-block;
min-width: 260rpx;
height: 72rpx;
font-size: 40rpx;
min-width: 192rpx;
height: 50rpx;
font-size: 28rpx;
font-weight: bolder;
line-height: 72rpx;
line-height: 50rpx;
text-align: center;
border: 1rpx solid black;
margin-bottom: 30rpx;
padding: 0 20rpx;
margin-left: 20rpx;
}
.share {
font-size: 28rpx;
color: #444444;
color: #FFFFFF;
background: #FF4C00;
border-radius: 28px;
width: 460rpx;
height: 80rpx;
line-height: 80rpx;
margin-top: 90rpx;
vertical-align: center;
}
.share-desc {
font-size: 20rpx;
color: #B0B0B0;
font-family: PingFangSC-Medium;
margin-top: 10rpx;
}
.foot {
... ...
... ... @@ -15,9 +15,8 @@
.modal-dialog {
height: 380rpx;
width: 540rpx;
overflow: hidden;
position: fixed;
top: 40%;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
... ...
<swiper wx:if="{{list.length !== 0}}" indicator-dots="{{indicatorDots}}"
autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="{{true}}" class="swiper" circular="{{true}}">
<block wx:for="{{list}}">
... ...
// pages/zeroSell/components/new-lucky-alert.js.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
hidenMask(e) {
this.triggerEvent('hiddenalert')
}
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class="modal-mask" catchtap="hidenMask"></view>
<view class="modal-dialog">
<image class="modal-dialog-bg" src="/images/alert_bg@3x.png"></image>
<slot></slot>
</view>
\ No newline at end of file
... ...
/* pages/zeroSell/components/new-lucky-alert.js.wxss */
.modal-mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.5;
overflow: hidden;
z-index: 9000;
}
.modal-dialog {
height: 380rpx;
width: 550rpx;
position: fixed;
top: 40%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
z-index: 9999;
border-radius: 10rpx;
overflow: visible;
display: flex;
flex-direction: column;
}
.modal-dialog-bg {
width: 550rpx;
height: 800rpx;
}
\ No newline at end of file
... ...
... ... @@ -14,14 +14,13 @@
font-weight: bold;
word-break:break-all;
color: #444444;
text-align: left;
}
.product_lucky_bg {
display: flex;
flex-direction: row;
align-items: baseline;
justify-content: space-between;
justify-content: center;
margin-left: 32rpx;
margin-right: 32rpx;
}
... ... @@ -31,6 +30,7 @@
font-size: 36rpx;
font-weight: bold;
margin-left: 30rpx;
text-decoration: line-through;
}
.product_time {
... ...
... ... @@ -89,7 +89,7 @@ Page(Object.assign({
image_src: '../../images/share_wechat@2x.png',
},
{
name: '分享到朋友圈',
name: '生成海报分享',
className: 'action-class',
loading: false,
image_src: '../../images/share_wxpeng@2x.png'
... ... @@ -241,6 +241,7 @@ Page(Object.assign({
recommends: r2.code === 200 ? r2.data : [],
avatars: (r3.code === 200 ? r3.data : []).map(i => {
i.user_name = wrapperName(i.user_name);
i.user_thumb = formatImageUrl(i.user_thumb, 200, 200);
return i;
}),
... ...
... ... @@ -40,7 +40,7 @@ Page(Object.assign({
image_src: '../../images/share_wechat@2x.png',
},
{
name: '分享到朋友圈',
name: '生成海报分享',
className: 'action-class',
loading: false,
image_src: '../../images/share_wxpeng@2x.png'
... ...