64dfaf21 by simon

版本提交

1 parent 89352d16
...@@ -22,7 +22,8 @@ App({ ...@@ -22,7 +22,8 @@ App({
22 indexInfo: null, 22 indexInfo: null,
23 userInfo: null, 23 userInfo: null,
24 wxcode: store.getItem("wxcode"), 24 wxcode: store.getItem("wxcode"),
25 tlMemberCode: "" 25 tlMemberCode: "",
26 curCoupon: null
26 }, 27 },
27 // 获取用户基本信息 28 // 获取用户基本信息
28 queryIndex() { 29 queryIndex() {
......
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/index/index", 3 "pages/index/index",
4 "pages/register/register",
5 "pages/authorize/authorize", 4 "pages/authorize/authorize",
5 "pages/register/register",
6 "pages/wish/wish", 6 "pages/wish/wish",
7 "pages/create-wish/create-wish", 7 "pages/create-wish/create-wish",
8 "pages/question/question", 8 "pages/question/question",
9 "pages/new-welfare/new-welfare", 9 "pages/new-welfare/new-welfare",
10 "pages/user-table/user-table", 10 "pages/user-table/user-table",
11 "pages/coupon-detail/coupon-detail",
11 "pages/rank/rank", 12 "pages/rank/rank",
12 "pages/poster/poster", 13 "pages/poster/poster",
14 "pages/my-card/my-card",
13 "pages/coop/coop", 15 "pages/coop/coop",
14 "pages/example/example", 16 "pages/example/example",
15 "pages/more/more" 17 "pages/more/more"
......
1 Component({
2 properties: {
3 // 这里定义了innerText属性,属性值可以在组件使用时指定
4 innerText: {
5 type: String,
6 value: 'default value',
7 }
8 },
9 data: {
10 // 这里是一些组件内部数据
11 someData: {}
12 },
13 methods: {
14 // 这里是一个自定义方法
15 customMethod() {
16 this.triggerEvent('evtcomp', {
17 name: "_evt_custom"
18 })
19 },
20 // 隐藏蒙层
21 hideMask() {
22 this.triggerEvent('evtcomp', {
23 name: "_evt_hide_product_detail_mask"
24 });
25 }
26 }
27 })
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .comp-item {
5
6 @extend .fcc;
7
8 .notice {
9 width: 439px;
10 height: 235px;
11 }
12 }
1 <view class="comp-item">
2 <image class="notice" mode="widthFix" src="../../image/oss/coupon-detail/cd-c3.png" />
3 </view>
1 import {
2 getBindtapData
3 } from '../../utils/util';
4 import Date from '../../utils/date';
5 let app = getApp();
6 Page({
7 data: {
8 userInfo: {},
9 used: false, //优惠券已使用,另外的样式
10 couponInfo: {
11 "couponId": "20839",
12 "couponCode": "RLLL1IHG",
13 "rule": "RLLL1IHG",
14 "startDate": 1564479217000,
15 "endDate": 1567094399000,
16 "type": 4,
17 "name": "眼部护理体验券-7月24日",
18 "state": 0,
19 "endDateStr": "19-08-29"
20 }
21 },
22 onShareAppMessage() {},
23 onLoad(options) {
24 app.queryIndex().then((result) => {
25 let couponInfo = this.data.couponInfo;
26 couponInfo.startDateStr = new Date(couponInfo.startDate).toString("yyyy.MM.dd");
27 couponInfo.endDateStr = new Date(couponInfo.endDate).toString("yyyy.MM.dd");
28 this.setData({
29 userInfo: app.globalData.userInfo,
30 couponInfo: couponInfo
31 })
32 this.initData();
33 })
34
35 },
36 initData() {
37 // this.setData({
38 // couponInfo: app.globalData.curCoupon
39 // })
40 },
41 // 查看可用门店
42 onNearbyStoreHandler() {
43
44 },
45 // 子组件事件
46 evtcomp(evt) {
47 let {
48 name,
49 data
50 } = evt.detail;
51 switch (name) {
52
53 case "_evt_hide":
54 break;
55
56 default:
57 break;
58 }
59 },
60 })
1 {
2 "navigationBarTitleText": "券详情",
3 "usingComponents": {
4 "use-notice-comp": "../../component/use-notice-comp/use-notice-comp"
5 }
6 }
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .page {
5 padding-bottom: $pageBottom;
6 font-weight: 300;
7
8 .bgc {
9 background-color: #f8eeef;
10 }
11
12 .bg {}
13
14 .decoration {
15 position: relative;
16
17 .d1 {
18 position: absolute;
19 width: 92px;
20 height: 411px;
21 top: 0;
22 left: 0;
23 }
24
25 .d2 {
26 position: fixed;
27 width: 240px;
28 height: 181px;
29 right: 0;
30 bottom: 0;
31 }
32
33 .d3 {
34 position: absolute;
35 top: -20px;
36 right: -100px;
37 width: 553px;
38 height: 227px;
39 }
40 }
41
42 .main {
43 .top-space {
44 height: 52px;
45 }
46
47 .content {
48 position: relative;
49
50 // 奖品名
51 .tit {
52 text-align: center;
53 color: #bb3039;
54 font-size: 42px;
55 }
56
57 // 奖品
58 .prize {
59 position: relative;
60 margin: 32px auto 0;
61 width: 480px;
62 height: 642px;
63
64 .ebg {
65 position: absolute;
66 left: 0;
67 right: 0;
68 top: 0;
69 margin: 0 auto;
70 width: 480px;
71 height: 642px;
72 }
73
74 .cont {
75 position: relative;
76
77 .space1 {
78 height: 48px;
79 }
80
81 // 二维码
82 .qrcode {
83 width: 340px;
84 height: 340px;
85 background-color: wheat;
86 margin: 0 auto;
87 }
88
89 .code {
90 margin: 24px auto 0;
91 border-radius: 30px;
92 background-color: rgba($color: #f2f2f2, $alpha: 1);
93 @include btc(280px, 60px);
94 color: #666666;
95 font-size: 38px;
96 }
97
98 .info {
99 margin-top: 22px;
100 @extend .bb;
101 padding-left: 120px;
102
103 .c1 {
104 font-size: 22px;
105 color: #666666;
106 }
107 }
108 }
109
110 // 已使用
111 .used {
112 $alp: 0.3;
113
114 .qrcode {
115 opacity: $alp;
116 }
117
118 .info {
119 opacity: $alp;
120 }
121 }
122
123
124 }
125
126 // 使用说明
127 .use-notice {
128 margin-top: 28px;
129 }
130
131 .store-btn {
132 margin: 34px auto 0;
133 @include cb();
134 }
135 }
136
137 }
138 }
1 <view class="page">
2 <view class="app__bgc bgc"></view>
3 <view class="app__bg bg"></view>
4 <view class="decoration">
5 <image class="d1" src="../../image/oss/my-card/my-card-d1.png" mode="widthFix" />
6 <image class="d2" src="../../image/oss/my-card/my-card-d2.png" mode="widthFix" />
7 <image class="d3" src="../../image/oss/question/question-c1.png" mode="widthFix" />
8 </view>
9 <view class="app__content main">
10 <view class="top-space"></view>
11 <view class="content">
12 <!-- 奖品名 -->
13 <view class="tit">· {{couponInfo.name}} ·</view>
14 <!-- 奖品 -->
15 <view class="prize">
16 <image class="ebg" mode="widthFix" src="../../image/oss/coupon-detail/cd-c2.png" />
17 <view class="cont {{used?'used':''}}">
18 <view class="space1"></view>
19 <!-- 二维码 -->
20 <view class="qrcode"></view>
21 <view class="code">{{couponInfo.couponCode}}</view>
22 <view class="info">
23 <view class="c1">手机号:{{userInfo.mobile}}</view>
24 <view class="c1">派券日期:{{couponInfo.startDateStr}}</view>
25 <view class="c1">有效日期:{{couponInfo.endDateStr}}</view>
26 </view>
27 </view>
28 </view>
29 <!-- 使用说明 -->
30 <view class="use-notice">
31 <use-notice-comp></use-notice-comp>
32 </view>
33 <!-- 查看门店 -->
34 <view bindtap="onNearbyStoreHandler" class="store-btn">查看可用门店</view>
35 </view>
36 </view>
37 </view>
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
52 wishBillCode 52 wishBillCode
53 } = indexInfo; 53 } = indexInfo;
54 // 未登陆 出注册弹窗提示 54 // 未登陆 出注册弹窗提示
55 // isCrmLogin = 1; 55 isCrmLogin = 1;
56 if (isCrmLogin == 0) { 56 if (isCrmLogin == 0) {
57 this.setData({ 57 this.setData({
58 tipsRegisterVisible: true 58 tipsRegisterVisible: true
......
1 import {
2 getBindtapData
3 } from '../../utils/util';
4 let app = getApp();
5 Page({
6 data: {
7 prizeInfo: []
8 },
9 onShareAppMessage() {},
10 onLoad(options) {
11 this.initData();
12 },
13 initData() {
14 app.post({
15 url: app.api.fishPrize,
16 data: {}
17 }).then((result) => {
18 let prizeInfo = result;
19 prizeInfo.forEach(element => {
20 element.endDateStr = new Date(element.endDate).toString("yy-MM-dd");
21 });
22 this.setData({
23 prizeInfo: prizeInfo
24 })
25 console.log("prizeInfo:", this.data.prizeInfo);
26 })
27 },
28 /**
29 * 显示券的详情
30 */
31 onShowDetailHandler(evt) {
32 let curData = getBindtapData(evt);
33 app.globalData.curCoupon = curData;
34 app.router.push({
35 path: "couponDetail"
36 })
37 console.log("curData:", curData);
38 console.log(JSON.stringify(curData));
39 },
40 // 子组件事件
41 evtcomp(evt) {
42 let {
43 name,
44 data
45 } = evt.detail;
46 switch (name) {
47
48 case "_evt_hide":
49 break;
50
51 default:
52 break;
53 }
54 },
55 })
1 {
2 "navigationBarTitleText": "我的卡券"
3 }
1 @import '../../assets/scss/mixins';
2 @import '../../assets/scss/utils';
3
4 .page {
5 .bgc {
6 background-color: #f8eeef;
7 }
8
9 .bg {}
10
11 .decoration {
12 position: relative;
13
14 .d1 {
15 position: absolute;
16 width: 92px;
17 height: 411px;
18 top: 0;
19 left: 0;
20 }
21
22 .d2 {
23 position: fixed;
24 width: 240px;
25 height: 181px;
26 right: 0;
27 bottom: 0;
28 }
29
30 .d3 {
31 position: absolute;
32 top: -20px;
33 right: -100px;
34 width: 553px;
35 height: 227px;
36 }
37 }
38
39 .main {
40 .top-space {
41 height: 100px;
42 }
43
44 .content {
45 position: relative;
46
47 // 优惠券
48 .coupon {
49 position: relative;
50 margin-top: 18px;
51
52 &-item {
53 position: relative;
54 width: 578px;
55 height: 198px;
56 margin: 0 auto 12px;
57
58 .ebg {
59 left: 0;
60 top: 0;
61 position: absolute;
62 width: 578px;
63 height: 198px;
64 }
65
66 .cont {
67 position: relative;
68
69 .name {
70 position: absolute;
71 left: 40px;
72 top: 40px;
73 color: #ffffff;
74 font-size: 32px;
75 }
76
77 .detail {
78 position: absolute;
79 border-radius: 24px;
80 font-size: 24px;
81 border: solid 1px rgba($color: #ffffff, $alpha: 0.8);
82 color: rgba($color: #ffffff, $alpha: 0.8);
83 @include btc(140px, 48px);
84 top: 40px;
85 right: 26px;
86 }
87
88 .card-info {
89 position: absolute;
90 top: 146px;
91 color: #fbe4c9;
92 font-size: 24px;
93 }
94
95 .card-no {
96 left: 28px;
97 }
98
99 .card-date {
100 right: 28px;
101 }
102 }
103 }
104
105 &-item2 {
106 .name {
107 color: #653d0d;
108 }
109
110 .card-info {
111 color: #fce6c2;
112 }
113 }
114 }
115 }
116
117 .store-btn {
118 position: absolute;
119 top: 24px;
120 right: 0;
121 @include border-left-radius(30px);
122 @include btc(220px, 60px);
123 font-size: 30px;
124 color: #bf0221;
125 box-shadow: 7.4px 8.2px 27px 0 rgba(228, 78, 96, 0.86);
126 background-image: linear-gradient(to right, #fbddd5, #f9efed 51%, #ffded9 99%), linear-gradient(to bottom, #000000, #000000);
127
128 .c1 {
129 padding-left: 12px;
130 }
131 }
132 }
133 }
1 <view class="page">
2 <view class="app__bgc bgc"></view>
3 <view class="app__bg bg"></view>
4 <view class="decoration">
5 <image class="d1" src="../../image/oss/my-card/my-card-d1.png" mode="widthFix" />
6 <image class="d2" src="../../image/oss/my-card/my-card-d2.png" mode="widthFix" />
7 <image class="d3" src="../../image/oss/question/question-c1.png" mode="widthFix" />
8 </view>
9 <view class="app__content main">
10 <view class="top-space"></view>
11 <view class="content">
12 <view class="coupon">
13 <view wx:for="{{prizeInfo}}" wx:key="{{index}}" class="coupon-item {{item.type==4?'coupon-item2':''}}">
14 <image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-1.png" />
15 <view class="cont">
16 <view class="name">{{item.name}}</view>
17 <view bindtap="onShowDetailHandler" data-data="{{item}}" class="detail">查看详情</view>
18 <view class="card-info card-no">劵码:{{item.couponCode}}</view>
19 <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view>
20 </view>
21 </view>
22 </view>
23 </view>
24 <view class="store-btn" bindtap="onNearbyStoreHandler">
25 <span class="c1">附近门店查询</span>
26 </view>
27 </view>
28 </view>
...@@ -177,8 +177,10 @@ ...@@ -177,8 +177,10 @@
177 177
178 // 优惠券 178 // 优惠券
179 .coupon { 179 .coupon {
180 width: 578px;
180 position: relative; 181 position: relative;
181 margin-top: 18px; 182 // margin: 18px;
183 margin: 0 auto;
182 184
183 &-item { 185 &-item {
184 position: relative; 186 position: relative;
...@@ -202,7 +204,7 @@ ...@@ -202,7 +204,7 @@
202 left: 40px; 204 left: 40px;
203 top: 40px; 205 top: 40px;
204 color: #ffffff; 206 color: #ffffff;
205 font-size: 34px; 207 font-size: 32px;
206 } 208 }
207 209
208 .detail { 210 .detail {
......
...@@ -51,15 +51,6 @@ ...@@ -51,15 +51,6 @@
51 <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view> 51 <view class="card-info card-date">有效期:即日起至{{item.endDateStr}}</view>
52 </view> 52 </view>
53 </view> 53 </view>
54 <!-- <view class="coupon-item coupon-item2">
55 <image class="ebg" mode="widthFix" src="../../image/oss/coupon/coupon-2.png" />
56 <view class="cont">
57 <view class="name">眼部保养劵</view>
58 <view class="detail">查看详情</view>
59 <view class="card-info card-no">劵码:ABCD 1234</view>
60 <view class="card-info card-date">有效期:即日起至19.10.31</view>
61 </view>
62 </view> -->
63 </view> 54 </view>
64 </view> 55 </view>
65 <view bindtap="onCreateWishHandler" class="create-wish-btn">去创建心愿单</view> 56 <view bindtap="onCreateWishHandler" class="create-wish-btn">去创建心愿单</view>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
23 } 23 }
24 24
25 .d2 { 25 .d2 {
26 position: fixed; 26 position: absolute;
27 width: 145px; 27 width: 145px;
28 height: 368px; 28 height: 368px;
29 right: 0; 29 right: 0;
......
...@@ -25,6 +25,12 @@ Page({ ...@@ -25,6 +25,12 @@ Page({
25 tipsRuleVisible: true 25 tipsRuleVisible: true
26 }) 26 })
27 }, 27 },
28 // 显示我的卡券
29 onMyCardHandler() {
30 app.router.push({
31 path: "myCard"
32 })
33 },
28 // 显示海报图 34 // 显示海报图
29 onCreatePosterHandler() { 35 onCreatePosterHandler() {
30 app.router.push({ 36 app.router.push({
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 <span class="t1">{{item.elasticValue}}</span> 39 <span class="t1">{{item.elasticValue}}</span>
40 弹力值! 40 弹力值!
41 </view> 41 </view>
42 <view class="empty" wx:if="{{helperInfo.helpers.length <= 0}}">这里空空如也~</view> 42 <view class="empty" wx:if="{{helperInfo.helpers.length <= 0}}">还没有好友助力,马上让她们帮你实现愿望吧!</view>
43 </scroll-view> 43 </scroll-view>
44 </view> 44 </view>
45 <view class="btn-wrap"> 45 <view class="btn-wrap">
......
...@@ -6,6 +6,8 @@ const routerPath = { ...@@ -6,6 +6,8 @@ const routerPath = {
6 userTable: '/pages/user-table/user-table', // 用户表单 6 userTable: '/pages/user-table/user-table', // 用户表单
7 rank: '/pages/rank/rank', // 排行榜 7 rank: '/pages/rank/rank', // 排行榜
8 poster: '/pages/poster/poster', // 海报页 8 poster: '/pages/poster/poster', // 海报页
9 myCard: '/pages/my-card/my-card', // 我的卡券
10 couponDetail: '/pages/coupon-detail/coupon-detail', // 券详情
9 coop: '/pages/coop/coop', // 协作页/好友查看 11 coop: '/pages/coop/coop', // 协作页/好友查看
10 register: '/pages/register/register', // 注册 12 register: '/pages/register/register', // 注册
11 authorize: '/pages/authorize/authorize', // 授权 13 authorize: '/pages/authorize/authorize', // 授权
......