a616f0f9 by simon

no message

1 parent 3a17532c
{
"pages": [
"pages/prize-detail/prize-detail",
"pages/user-table/user-table",
"pages/index/index",
"pages/authorize/authorize",
......
......@@ -24,7 +24,7 @@
</view>
</view>
<!-- 摇后结果 -->
<view class="result-wrap">
<view wx:else class="result-wrap">
<view class="result">
<image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c3.png" />
<view class="space1"></view>
......
import {
getBindtapData
} from '../../utils/util';
import Date from '../../utils/date';
let app = getApp();
Page({
data: {
userInfo: {},
used: false, //优惠券已使用,另外的样式
couponInfo: {
"couponId": "20839",
"couponCode": "RLLL1IHG",
"rule": "RLLL1IHG",
"startDate": 1564479217000,
"endDate": 1567094399000,
"type": 4,
"name": "眼部护理体验券-7月24日",
"state": 0,
"endDateStr": "19-08-29"
}
},
onShareAppMessage() {},
onLoad(options) {
app.queryIndex().then((result) => {
let couponInfo = this.data.couponInfo;
couponInfo.startDateStr = new Date(couponInfo.startDate).toString("yyyy.MM.dd");
couponInfo.endDateStr = new Date(couponInfo.endDate).toString("yyyy.MM.dd");
this.setData({
userInfo: app.globalData.userInfo,
couponInfo: couponInfo
})
this.initData();
})
},
initData() {
// this.setData({
// couponInfo: app.globalData.curCoupon
// })
},
// 查看可用门店
onNearbyStoreHandler() {
},
// 子组件事件
evtcomp(evt) {
let {
name,
data
} = evt.detail;
switch (name) {
case "_evt_hide":
break;
default:
break;
}
},
})
{
"navigationBarTitleText": "卡券详情",
"usingComponents": {
"use-notice-comp": "../../component/use-notice-comp/use-notice-comp"
}
}
@import '../../assets/scss/mixins';
@import '../../assets/scss/utils';
.page {
padding-bottom: $pageBottom;
font-weight: 300;
.bgc {
background-color: #f8eeef;
}
.bg {}
.decoration {
position: relative;
.d1 {
position: absolute;
width: 92px;
height: 411px;
top: 0;
left: 0;
}
.d2 {
position: fixed;
width: 240px;
height: 181px;
right: 0;
bottom: 0;
}
.d3 {
position: absolute;
top: -20px;
right: -100px;
width: 553px;
height: 227px;
}
}
.main {
.top-space {
height: 52px;
}
.content {
position: relative;
// 奖品名
.tit {
text-align: center;
color: #bb3039;
font-size: 42px;
}
// 奖品
.prize {
position: relative;
margin: 32px auto 0;
width: 620px;
height: 722px;
.ebg {
position: absolute;
left: 0;
right: 0;
top: 0;
margin: 0 auto;
width: 620px;
height: 722px;
}
.cont {
position: relative;
.space1 {
height: 48px;
}
// 二维码
.qrcode {
width: 340px;
height: 340px;
background-color: wheat;
margin: 0 auto;
}
.code {
margin: 24px auto 0;
border-radius: 30px;
background-color: rgba($color: #f2f2f2, $alpha: 1);
@include btc(280px, 60px);
color: #666666;
font-size: 38px;
}
.top {
display: flex;
margin: 0 auto 36px;
justify-content: center;
}
.display {
position: relative;
width: 140px;
height: 140px;
border-radius: 70px;
background-image: radial-gradient(circle at 0 0, #ffffff, #f2e6e6);
@extend .fcc;
.prod {
max-width: 200px;
max-height: 200px;
margin-bottom: 10px;
}
.close {
width: 30px;
height: 30px;
position: absolute;
bottom: 0;
right: 0;
}
}
.info {
@extend .bb;
padding-left: 20px;
.name {
font-size: 28px;
color: #333333;
}
.c1 {
font-size: 22px;
color: #666666;
}
}
}
// 已使用
.used {
$alp: 0.3;
.qrcode {
opacity: $alp;
}
.info {
opacity: $alp;
}
}
}
// 使用说明
.use-notice {
margin-top: 28px;
}
.store-btn {
margin: 34px auto 0;
@include cb();
}
}
}
}
<view class="page">
<view class="app__bgc bgc"></view>
<view class="app__bg bg"></view>
<view class="decoration">
<image class="d1" src="../../image/oss/my-card/my-card-d1.png" mode="widthFix" />
<image class="d2" src="../../image/oss/my-card/my-card-d2.png" mode="widthFix" />
<image class="d3" src="../../image/oss/question/question-c1.png" mode="widthFix" />
</view>
<view class="app__content main">
<view class="top-space"></view>
<view class="content">
<!-- 奖品 -->
<view class="prize">
<image class="ebg" mode="widthFix" src="../../image/oss/coupon-detail/cd-c1.png" />
<view class="cont {{used?'used':''}}">
<view class="space1"></view>
<view class="top">
<view class="display">
<image class="prod" mode="aspectFit" src="../../image/prize/prize-1.png" />
</view>
<view class="info">
<view class="name">{{couponInfo.name}}</view>
<view class="c1">手机号:{{userInfo.mobile}}</view>
<view class="c1">派券日期:{{couponInfo.startDateStr}}</view>
<view class="c1">有效日期:{{couponInfo.endDateStr}}</view>
</view>
</view>
<!-- 二维码 -->
<view class="qrcode"></view>
<view class="code">{{couponInfo.couponCode}}</view>
</view>
</view>
<!-- 使用说明 -->
<view class="use-notice">
<use-notice-comp></use-notice-comp>
</view>
<!-- 查看门店 -->
<view bindtap="onNearbyStoreHandler" class="store-btn">查看可用门店</view>
</view>
</view>
</view>
......@@ -8,6 +8,7 @@ const routerPath = {
poster: '/pages/poster/poster', // 海报页
myCard: '/pages/my-card/my-card', // 我的卡券
couponDetail: '/pages/coupon-detail/coupon-detail', // 券详情
prizeDetail: '/pages/prize-detail/prize-detail', // 券详情
coop: '/pages/coop/coop', // 协作页/好友查看
register: '/pages/register/register', // 注册
authorize: '/pages/authorize/authorize', // 授权
......