no message
Showing
23 changed files
with
183 additions
and
130 deletions
... | @@ -73,7 +73,8 @@ | ... | @@ -73,7 +73,8 @@ |
73 | position: relative; | 73 | position: relative; |
74 | margin: 0 auto 0; | 74 | margin: 0 auto 0; |
75 | display: flex; | 75 | display: flex; |
76 | justify-content: space-between; | 76 | // justify-content: space-between; |
77 | justify-content: center; | ||
77 | @extend .bb; | 78 | @extend .bb; |
78 | // padding-top: 116px; | 79 | // padding-top: 116px; |
79 | padding: 56px 80px 0; | 80 | padding: 56px 80px 0; | ... | ... |
... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
4 | .comp-item { | 4 | .comp-item { |
5 | position: relative; | 5 | position: relative; |
6 | width: 654px; | 6 | width: 654px; |
7 | height: 1598px; | 7 | height: 1000px; |
8 | 8 | ||
9 | // background-color: wheat; | 9 | // background-color: wheat; |
10 | .bg { | 10 | .bg { |
... | @@ -23,7 +23,8 @@ | ... | @@ -23,7 +23,8 @@ |
23 | position: absolute; | 23 | position: absolute; |
24 | left: 0; | 24 | left: 0; |
25 | right: 0; | 25 | right: 0; |
26 | bottom: 100px; | 26 | top: 1420px; |
27 | // bottom: 100px; | ||
27 | margin: 0 auto; | 28 | margin: 0 auto; |
28 | } | 29 | } |
29 | } | 30 | } | ... | ... |
1 | <view class="comp-item"> | 1 | <scroll-view scroll-y="{{true}}" class="comp-item"> |
2 | <image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" /> | 2 | <image class="bg" src="../../image/oss/rule/rule-c1.png" mode="widthFix" /> |
3 | <view class="space1"></view> | 3 | <view class="space1"></view> |
4 | <view bindtap="hideMask" class="btn">我知道了</view> | 4 | <view bindtap="hideMask" class="btn">我知道了</view> |
5 | </view> | 5 | </scroll-view> | ... | ... |
... | @@ -62,6 +62,9 @@ | ... | @@ -62,6 +62,9 @@ |
62 | line-height: 1.6; | 62 | line-height: 1.6; |
63 | height: 140px; | 63 | height: 140px; |
64 | @include ellipsis(3); | 64 | @include ellipsis(3); |
65 | .t1{ | ||
66 | color: #bb3039; | ||
67 | } | ||
65 | } | 68 | } |
66 | 69 | ||
67 | // 心愿 | 70 | // 心愿 |
... | @@ -69,7 +72,7 @@ | ... | @@ -69,7 +72,7 @@ |
69 | position: relative; | 72 | position: relative; |
70 | margin: 450px auto 0; | 73 | margin: 450px auto 0; |
71 | display: flex; | 74 | display: flex; |
72 | // justify-content: center; | 75 | justify-content: center; |
73 | @extend .bb; | 76 | @extend .bb; |
74 | min-height: 238px; | 77 | min-height: 238px; |
75 | width: 630px; | 78 | width: 630px; |
... | @@ -329,7 +332,7 @@ | ... | @@ -329,7 +332,7 @@ |
329 | 332 | ||
330 | .play-too-btn { | 333 | .play-too-btn { |
331 | @include cb(234px, 64px); | 334 | @include cb(234px, 64px); |
332 | margin: 24px auto 0; | 335 | margin: 48px auto 0; |
333 | } | 336 | } |
334 | } | 337 | } |
335 | } | 338 | } | ... | ... |
... | @@ -13,7 +13,12 @@ | ... | @@ -13,7 +13,12 @@ |
13 | <image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c2.png" /> | 13 | <image class="ebg" mode="widthFix" src="../../image/oss/coop/coop-c2.png" /> |
14 | <view class="space1"></view> | 14 | <view class="space1"></view> |
15 | <view class="cont"> | 15 | <view class="cont"> |
16 | <view class="tips">你的好友{{wishInfo.member.nickname}}的心愿单需要你的帮助哦!拿起手机摇一摇,即可为ta贡献弹力值!</view> | 16 | <view class="tips"> |
17 | <!-- 你的好友 | ||
18 | <span class="t1">{{wishInfo.member.nickname}}</span> | ||
19 | 的心愿单需要你的帮助哦!拿起手机摇一摇,即可为ta贡献弹力值! --> | ||
20 | 亲爱的好友,我的丸美心愿单需要你的帮助,拿起手机摇一摇,为我的心愿注入弹力值~ | ||
21 | </view> | ||
17 | <view class="wish"> | 22 | <view class="wish"> |
18 | <view wx:for="{{wishList}}" wx:key="{{index}}" class="wish-item"> | 23 | <view wx:for="{{wishList}}" wx:key="{{index}}" class="wish-item"> |
19 | <view class="display"> | 24 | <view class="display"> | ... | ... |
... | @@ -38,6 +38,6 @@ | ... | @@ -38,6 +38,6 @@ |
38 | </view> | 38 | </view> |
39 | </view> | 39 | </view> |
40 | </view> | 40 | </view> |
41 | <van-popup show="{{ nearbyStoreVisible }}" position="bottom" bind:click-overlay="hideMask"> | 41 | <van-popup show="{{ nearbyStoreVisible }}" position="bottom" bind:click-overlay="hideMask" safe-area-inset-bottom="{{false}}"> |
42 | <tips-nearby-store-comp id="nearbyStoreComp" bind:evtcomp="evtcomp" wish-info="{{wishInfo}}" location="{{location}}" selectedMode="{{false}}"></tips-nearby-store-comp> | 42 | <tips-nearby-store-comp id="nearbyStoreComp" bind:evtcomp="evtcomp" wish-info="{{wishInfo}}" location="{{location}}" selectedMode="{{false}}"></tips-nearby-store-comp> |
43 | </van-popup> | 43 | </van-popup> | ... | ... |
... | @@ -335,7 +335,7 @@ Page({ | ... | @@ -335,7 +335,7 @@ Page({ |
335 | }) | 335 | }) |
336 | if (uni) { | 336 | if (uni) { |
337 | this.setData({ | 337 | this.setData({ |
338 | tipsInnerText: "心愿重复啦~\n换个其他心愿试试!", | 338 | tipsInnerText: "这个心愿已记录过噢~\n每款产品只可以加入1次心愿单,换其它试试!", |
339 | tipsCommonVisible: true | 339 | tipsCommonVisible: true |
340 | }) | 340 | }) |
341 | return; | 341 | return; | ... | ... |
... | @@ -4,12 +4,14 @@ | ... | @@ -4,12 +4,14 @@ |
4 | <!-- 场景 --> | 4 | <!-- 场景 --> |
5 | <view class="sence"> | 5 | <view class="sence"> |
6 | <!-- 第一幕 --> | 6 | <!-- 第一幕 --> |
7 | <view class="view view1"> | 7 | <view wx:if="{{curStatus==1}}" class="view view1"> |
8 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="scaleToFill" /> | 8 | <image class="ebg" src="{{'../../image/oss/create-wish/create-wish-1.png'}}" mode="scaleToFill" /> |
9 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 9 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000002" class="point point1" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
10 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 10 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000003" class="point point2" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
11 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> | 11 | <image bindtap="onShowTipsBorderHandler" data-index="P000000000000000000000000000001" class="point point3" mode="widthFix" src="../../image/oss/create-wish/cw-point.png" /> |
12 | </view> | 12 | </view> |
13 | <view wx:if="{{curStatus==2}}" class="view view2">场景待确认2</view> | ||
14 | <view wx:if="{{curStatus==3}}" class="view view3">场景待确认3</view> | ||
13 | <!-- 详情 --> | 15 | <!-- 详情 --> |
14 | <view wx:if="{{tipsBorderVisible}}" class="tips-border" style="top:{{curWish.point.top+curWish.tips.point.fixTop}}rpx;left:{{curWish.point.left+curWish.tips.point.fixLeft}}rpx;"> | 16 | <view wx:if="{{tipsBorderVisible}}" class="tips-border" style="top:{{curWish.point.top+curWish.tips.point.fixTop}}rpx;left:{{curWish.point.left+curWish.tips.point.fixLeft}}rpx;"> |
15 | <view class="rel"> | 17 | <view class="rel"> |
... | @@ -27,10 +29,10 @@ | ... | @@ -27,10 +29,10 @@ |
27 | <view class="content"> | 29 | <view class="content"> |
28 | <!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> --> | 30 | <!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> --> |
29 | <!-- 换一批按钮 --> | 31 | <!-- 换一批按钮 --> |
30 | <!-- <view class="change-btn" bindtap="onChangeStatusHandler"> | 32 | <view class="change-btn" bindtap="onChangeStatusHandler"> |
31 | <image class="icon" src="../../image/oss/create-wish/cw-exchange-btn.png" mode="widthFix" /> | 33 | <image class="icon" src="../../image/oss/create-wish/cw-exchange-btn.png" mode="widthFix" /> |
32 | 换一批 | 34 | 换一批 |
33 | </view> --> | 35 | </view> |
34 | <!-- 心愿单 --> | 36 | <!-- 心愿单 --> |
35 | <view class="wish-container"> | 37 | <view class="wish-container"> |
36 | <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" /> | 38 | <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" /> | ... | ... |
... | @@ -13,16 +13,23 @@ Page({ | ... | @@ -13,16 +13,23 @@ Page({ |
13 | }) | 13 | }) |
14 | }, | 14 | }, |
15 | onLoad(options) { | 15 | onLoad(options) { |
16 | // app.post({ | 16 | app.queryIndex({ |
17 | // url: app.api.member, | 17 | auth: false |
18 | // data: {} | 18 | }).then((result) => { |
19 | // }).then((result) => { | 19 | this.setData({ |
20 | // console.log("result:",result); | 20 | indexInfo: app.globalData.indexInfo |
21 | // resolve(); | 21 | }) |
22 | // }) | 22 | let { |
23 | }, | 23 | wishBillCode |
24 | initData() { | 24 | } = app.globalData.indexInfo; |
25 | if (wishBillCode) { | ||
26 | app.router.push({ | ||
27 | path: "wish" | ||
28 | }) | ||
29 | } | ||
30 | }) | ||
25 | }, | 31 | }, |
32 | initData() {}, | ||
26 | // 开始互动游戏 判断是否会员 | 33 | // 开始互动游戏 判断是否会员 |
27 | onStartHandler() { | 34 | onStartHandler() { |
28 | app.queryIndex({ | 35 | app.queryIndex({ |
... | @@ -39,7 +46,7 @@ Page({ | ... | @@ -39,7 +46,7 @@ Page({ |
39 | if (wishBillCode) { | 46 | if (wishBillCode) { |
40 | path = "wish" | 47 | path = "wish" |
41 | } | 48 | } |
42 | console.log("path:",path); | 49 | console.log("path:", path); |
43 | app.router.push({ | 50 | app.router.push({ |
44 | path: path | 51 | path: path |
45 | }) | 52 | }) | ... | ... |
... | @@ -30,6 +30,6 @@ | ... | @@ -30,6 +30,6 @@ |
30 | <van-popup show="{{ authorizeVisible }}" > | 30 | <van-popup show="{{ authorizeVisible }}" > |
31 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 31 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
32 | </van-popup> | 32 | </van-popup> |
33 | <van-popup show="{{ tipsRuleVisible }}" bind:click-overlay="hideMask"> | 33 | <van-popup show="{{ tipsRuleVisible }}" > |
34 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> | 34 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> |
35 | </van-popup> | 35 | </van-popup> | ... | ... |
... | @@ -186,6 +186,10 @@ Page({ | ... | @@ -186,6 +186,10 @@ Page({ |
186 | this.showLog("请输入正确的手机号码"); | 186 | this.showLog("请输入正确的手机号码"); |
187 | return | 187 | return |
188 | } | 188 | } |
189 | if (!this.data.isPlzAuth) { | ||
190 | this.showLog("请完成拼图验证"); | ||
191 | return | ||
192 | } | ||
189 | this.getAuthCode(); | 193 | this.getAuthCode(); |
190 | app.post({ | 194 | app.post({ |
191 | url: app.api.mobileVerifyCode, | 195 | url: app.api.mobileVerifyCode, | ... | ... |
... | @@ -90,7 +90,7 @@ $formWidth:560px; | ... | @@ -90,7 +90,7 @@ $formWidth:560px; |
90 | 90 | ||
91 | // 拼图 | 91 | // 拼图 |
92 | .puzzle { | 92 | .puzzle { |
93 | margin-top: 32px; | 93 | margin: 20px auto 20px; |
94 | $borderRadius: 32px; | 94 | $borderRadius: 32px; |
95 | width: $formWidth; | 95 | width: $formWidth; |
96 | border-radius: $borderRadius; | 96 | border-radius: $borderRadius; | ... | ... |
... | @@ -18,6 +18,25 @@ | ... | @@ -18,6 +18,25 @@ |
18 | </view> | 18 | </view> |
19 | <input value="{{mobile}}" bindinput="bindMobileInput" class="ipt-input" placeholder="手机号" placeholder-class="placeholder" /> | 19 | <input value="{{mobile}}" bindinput="bindMobileInput" class="ipt-input" placeholder="手机号" placeholder-class="placeholder" /> |
20 | </view> | 20 | </view> |
21 | <!-- 滑动拼图 --> | ||
22 | <view class="puzzle"> | ||
23 | <view class="plz"> | ||
24 | <image class="ebg" src="../../image/oss/register/plz-cont.png" mode="widthFix" /> | ||
25 | <block wx:if="{{!isPlzAuth}}"> | ||
26 | <image class="block shadow" mode="widthFix" src="../../image/oss/register/plz-block.png?ver=1" /> | ||
27 | <image style="left:{{thumbX}}rpx;" class="block thumb" mode="widthFix" src="../../image/oss/register/plz-block-inline.png?ver=1" /> | ||
28 | </block> | ||
29 | </view> | ||
30 | <view class="slider"> | ||
31 | <movable-area class="slider-bar"> | ||
32 | <view wx:if="{{!isPlzAuth}}" class="tips tips-wait">拖动左侧滑块,完成上方拼图验证</view> | ||
33 | <view wx:else class="tips tips-authorized">验证成功</view> | ||
34 | <movable-view wx:if="{{!isPlzAuth}}" x="{{movableViewX}}" bindchange="onThumbChangeHandler" direction="horizontal"> | ||
35 | <image bindtouchend="onTouchEndHandler" class="slider-bar-thumb" mode="widthFix" src="../../image/oss/register/slider-block.png" /> | ||
36 | </movable-view> | ||
37 | </movable-area> | ||
38 | </view> | ||
39 | </view> | ||
21 | <!-- 验证码 --> | 40 | <!-- 验证码 --> |
22 | <view class="ipt"> | 41 | <view class="ipt"> |
23 | <view class="ipt-icon"> | 42 | <view class="ipt-icon"> |
... | @@ -29,25 +48,6 @@ | ... | @@ -29,25 +48,6 @@ |
29 | </view> | 48 | </view> |
30 | </view> | 49 | </view> |
31 | </view> | 50 | </view> |
32 | <!-- 滑动拼图 --> | ||
33 | <view class="puzzle"> | ||
34 | <view class="plz"> | ||
35 | <image class="ebg" src="../../image/oss/register/plz-cont.png" mode="widthFix" /> | ||
36 | <block wx:if="{{!isPlzAuth}}"> | ||
37 | <image class="block shadow" mode="widthFix" src="../../image/oss/register/plz-block.png?ver=1" /> | ||
38 | <image style="left:{{thumbX}}rpx;" class="block thumb" mode="widthFix" src="../../image/oss/register/plz-block-inline.png?ver=1" /> | ||
39 | </block> | ||
40 | </view> | ||
41 | <view class="slider"> | ||
42 | <movable-area class="slider-bar"> | ||
43 | <view wx:if="{{!isPlzAuth}}" class="tips tips-wait">拖动左侧滑块,完成上方拼图验证</view> | ||
44 | <view wx:else class="tips tips-authorized">验证成功</view> | ||
45 | <movable-view wx:if="{{!isPlzAuth}}" x="{{movableViewX}}" bindchange="onThumbChangeHandler" direction="horizontal"> | ||
46 | <image bindtouchend="onTouchEndHandler" class="slider-bar-thumb" mode="widthFix" src="../../image/oss/register/slider-block.png" /> | ||
47 | </movable-view> | ||
48 | </movable-area> | ||
49 | </view> | ||
50 | </view> | ||
51 | <!-- 条款/政策 --> | 51 | <!-- 条款/政策 --> |
52 | <!-- <view class="policy"> | 52 | <!-- <view class="policy"> |
53 | <span bindtap="onTermsHandler" class="check"> | 53 | <span bindtap="onTermsHandler" class="check"> | ... | ... |
... | @@ -2,32 +2,27 @@ import Poster from '../../miniprogram_dist/poster/poster'; | ... | @@ -2,32 +2,27 @@ import Poster from '../../miniprogram_dist/poster/poster'; |
2 | let app = getApp(); | 2 | let app = getApp(); |
3 | Page({ | 3 | Page({ |
4 | data: { | 4 | data: { |
5 | // isOverShare: false, | 5 | isOverShare: true, |
6 | imageUrl: "", // 海报图片 | 6 | imageUrl: "", // 海报图片 |
7 | wxShareTitle: "", // 分享标题 | 7 | wxShareTitle: "", // 分享标题 |
8 | wxCodePath: "", // 微信二维码参数地址,分享链接公用 | 8 | wxCodePath: "", // 微信二维码参数地址,分享链接公用 |
9 | wxCodeUrl: "", // 微信二维码图片地址 | 9 | wxCodeUrl: "", // 微信二维码图片地址 |
10 | wishList: [], | 10 | wishList: [], |
11 | }, | 11 | }, |
12 | onShareAppMessage() { | 12 | onShareAppMessage(res) { |
13 | // if (res.from === 'button') { | 13 | if (res.from === 'button') { |
14 | // // 来自页面内转发按钮 | 14 | // 来自页面内转发按钮 |
15 | // console.log(res.target) | 15 | } |
16 | // } | 16 | let userInfo = app.globalData.userInfo; |
17 | // let title = this.data.wxShareTitle; | 17 | let billCode = app.globalData.indexInfo.wishBillCode; |
18 | // let path = this.data.wxCodePath; | 18 | let title = `${userInfo.nickname}正在参加丸美眼霜节心愿单活动,需要你的倾情相助!`; |
19 | // let imageUrl = this.data.imageUrl; | 19 | let path = `/pages/coop/coop?code=${billCode}&s=share` |
20 | // console.log("title:", title); | 20 | return { |
21 | // console.log("path:", path); | 21 | title, |
22 | // console.log("imageUrl:", imageUrl); | 22 | path |
23 | // return { | 23 | } |
24 | // title, | ||
25 | // path, | ||
26 | // imageUrl | ||
27 | // } | ||
28 | }, | 24 | }, |
29 | onLoad(options) { | 25 | onLoad(options) { |
30 | |||
31 | // this.setData({ | 26 | // this.setData({ |
32 | // wishList: wishList | 27 | // wishList: wishList |
33 | // }) | 28 | // }) |
... | @@ -209,12 +204,22 @@ Page({ | ... | @@ -209,12 +204,22 @@ Page({ |
209 | y: 160, | 204 | y: 160, |
210 | } | 205 | } |
211 | 206 | ||
207 | // 产品居中修正 | ||
208 | let productLength = posterWishList.length; | ||
209 | let productSpace = 215; | ||
210 | if (productLength == 1) { | ||
211 | originPoint.x = (700 - 165) / 2 | ||
212 | } else if (productLength == 2) { | ||
213 | productSpace = 250; | ||
214 | originPoint.x = (700 - (200 * 2)) / 2 | ||
215 | } | ||
216 | |||
212 | posterWishList.forEach((element, index) => { | 217 | posterWishList.forEach((element, index) => { |
213 | // 产品背景 | 218 | // 产品背景 |
214 | let egb = { | 219 | let egb = { |
215 | width: 165, | 220 | width: 165, |
216 | height: 165, | 221 | height: 165, |
217 | x: originPoint.x + (215 * index), | 222 | x: originPoint.x + (productSpace * index), |
218 | y: originPoint.y, | 223 | y: originPoint.y, |
219 | url: '../../image/draw/draw-c2.png', | 224 | url: '../../image/draw/draw-c2.png', |
220 | } | 225 | } |
... | @@ -223,13 +228,13 @@ Page({ | ... | @@ -223,13 +228,13 @@ Page({ |
223 | let product = { | 228 | let product = { |
224 | width: 165, | 229 | width: 165, |
225 | height: 165, | 230 | height: 165, |
226 | x: originPoint.x + (215 * index), | 231 | x: originPoint.x + (productSpace * index), |
227 | y: originPoint.y, | 232 | y: originPoint.y, |
228 | url: '../../image/prize/prize-' + element.tag + '.png', | 233 | url: '../../image/prize/prize-' + element.tag + '.png', |
229 | } | 234 | } |
230 | 235 | ||
231 | let productDesc = { | 236 | let productDesc = { |
232 | x: originPoint.x + (215 * index), | 237 | x: originPoint.x + (productSpace * index), |
233 | y: originPoint.y + 165 + 12, | 238 | y: originPoint.y + 165 + 12, |
234 | width: 165, | 239 | width: 165, |
235 | fontSize: 24, | 240 | fontSize: 24, | ... | ... |
... | @@ -64,6 +64,6 @@ | ... | @@ -64,6 +64,6 @@ |
64 | </view> | 64 | </view> |
65 | </view> | 65 | </view> |
66 | </view> | 66 | </view> |
67 | <van-popup show="{{ nearbyStoreVisible }}" position="bottom" bind:click-overlay="hideMask"> | 67 | <van-popup show="{{ nearbyStoreVisible }}" position="bottom" bind:click-overlay="hideMask" safe-area-inset-bottom="{{false}}"> |
68 | <tips-nearby-store-comp id="nearbyStoreComp" bind:evtcomp="evtcomp" wish-info="{{wishInfo}}" location="{{location}}" selectedMode="{{true}}"></tips-nearby-store-comp> | 68 | <tips-nearby-store-comp id="nearbyStoreComp" bind:evtcomp="evtcomp" wish-info="{{wishInfo}}" location="{{location}}" selectedMode="{{true}}"></tips-nearby-store-comp> |
69 | </van-popup> | 69 | </van-popup> | ... | ... |
... | @@ -5,7 +5,7 @@ import Date from '../../utils/date'; | ... | @@ -5,7 +5,7 @@ import Date from '../../utils/date'; |
5 | let app = getApp(); | 5 | let app = getApp(); |
6 | Page({ | 6 | Page({ |
7 | data: { | 7 | data: { |
8 | hadAnswer:false, | 8 | hadAnswer: false, |
9 | questionList: [], // 题目列表 | 9 | questionList: [], // 题目列表 |
10 | questionResult: {}, | 10 | questionResult: {}, |
11 | // 答题结果 | 11 | // 答题结果 |
... | @@ -13,8 +13,7 @@ Page({ | ... | @@ -13,8 +13,7 @@ Page({ |
13 | myAnswer: [], //我的答案 | 13 | myAnswer: [], //我的答案 |
14 | }, | 14 | }, |
15 | onShareAppMessage() {}, | 15 | onShareAppMessage() {}, |
16 | onShow(){ | 16 | onShow() {}, |
17 | }, | ||
18 | onLoad(options) { | 17 | onLoad(options) { |
19 | this.initData(); | 18 | this.initData(); |
20 | }, | 19 | }, |
... | @@ -68,33 +67,30 @@ Page({ | ... | @@ -68,33 +67,30 @@ Page({ |
68 | let myAnswer = this.data.myAnswer; | 67 | let myAnswer = this.data.myAnswer; |
69 | 68 | ||
70 | if (isComplete) { | 69 | if (isComplete) { |
71 | wx.showModal({ | 70 | app.post({ |
72 | content: "确认提交?", | 71 | url: app.api.answerSubmit, |
73 | confirmText: "确认", | 72 | data: myAnswer |
74 | success(res) { | 73 | }).then((result) => { |
75 | app.post({ | 74 | let questionResult = result; |
76 | url: app.api.answerSubmit, | 75 | questionResult.coupons.forEach(element => { |
77 | data: myAnswer | 76 | element.endDateStr = new Date(element.endDate).toString("yy-MM-dd"); |
78 | }).then((result) => { | 77 | }); |
79 | let questionResult = result; | 78 | _this.setData({ |
80 | questionResult.coupons.forEach(element => { | 79 | hadAnswer: true, |
81 | element.endDateStr = new Date(element.endDate).toString("yy-MM-dd"); | 80 | questionResult: questionResult |
82 | }); | 81 | }) |
83 | _this.setData({ | 82 | console.log("answerSubmit:", _this.data.questionResult); |
84 | hadAnswer:true, | ||
85 | questionResult:questionResult | ||
86 | }) | ||
87 | console.log("answerSubmit:", _this.data.questionResult); | ||
88 | }) | ||
89 | } | ||
90 | }) | 83 | }) |
91 | } else { | 84 | } else { |
92 | wx.showModal({ | 85 | // wx.showModal({ |
93 | content: "答题未完成", | 86 | // content: "答题未完成", |
94 | confirmText: "继续答题", | 87 | // confirmText: "继续答题", |
95 | showCancel: false, | 88 | // showCancel: false, |
96 | success(res) { | 89 | // success(res) {} |
97 | } | 90 | // }) |
91 | wx.showToast({ | ||
92 | title: "答题未完成", | ||
93 | icon: "none" | ||
98 | }) | 94 | }) |
99 | } | 95 | } |
100 | }, | 96 | }, | ... | ... |
... | @@ -66,8 +66,9 @@ | ... | @@ -66,8 +66,9 @@ |
66 | 66 | ||
67 | &-item { | 67 | &-item { |
68 | display: flex; | 68 | display: flex; |
69 | width: 312px; | 69 | // width: 312px; |
70 | padding: 20px 10px; | 70 | width: 100%; |
71 | padding: 20px 32px; | ||
71 | border-radius: 36px; | 72 | border-radius: 36px; |
72 | border: solid 1px #999999; | 73 | border: solid 1px #999999; |
73 | @extend .bb; | 74 | @extend .bb; |
... | @@ -76,6 +77,12 @@ | ... | @@ -76,6 +77,12 @@ |
76 | margin-bottom: 28px; | 77 | margin-bottom: 28px; |
77 | } | 78 | } |
78 | 79 | ||
80 | .no{ | ||
81 | // @extend .bb; | ||
82 | // padding-right: 4 | ||
83 | margin-right: 4px; | ||
84 | } | ||
85 | |||
79 | .selected { | 86 | .selected { |
80 | border: solid 2px #ac0521; | 87 | border: solid 2px #ac0521; |
81 | color: #ac0521; | 88 | color: #ac0521; | ... | ... |
... | @@ -18,7 +18,7 @@ | ... | @@ -18,7 +18,7 @@ |
18 | </view> | 18 | </view> |
19 | <view class="answer"> | 19 | <view class="answer"> |
20 | <view bindtap="onSelectAnswerHandler" data-pdata="{{item}}" data-pindex="{{index}}" data-data="{{item2}}" data-index="{{index2}}" wx:for="{{item.answers}}" wx:key="index2" wx:for-index="index2" wx:for-item="item2" class="answer-item {{item2.selected ? 'selected':''}} {{item2.rightAnswer == 1 && hadAnswer ? 'right' :''}} "> | 20 | <view bindtap="onSelectAnswerHandler" data-pdata="{{item}}" data-pindex="{{index}}" data-data="{{item2}}" data-index="{{index2}}" wx:for="{{item.answers}}" wx:key="index2" wx:for-index="index2" wx:for-item="item2" class="answer-item {{item2.selected ? 'selected':''}} {{item2.rightAnswer == 1 && hadAnswer ? 'right' :''}} "> |
21 | <view>{{questionNumList[index2]}}.</view> | 21 | <view class="no">{{questionNumList[index2]}}.</view> |
22 | <view>{{item2.answer}}</view> | 22 | <view>{{item2.answer}}</view> |
23 | </view> | 23 | </view> |
24 | </view> | 24 | </view> | ... | ... |
... | @@ -36,6 +36,8 @@ Page({ | ... | @@ -36,6 +36,8 @@ Page({ |
36 | auth_time: 0, | 36 | auth_time: 0, |
37 | sendAuthCode: true, | 37 | sendAuthCode: true, |
38 | /*布尔值,通过v-show控制显示‘获取按钮’还是‘倒计时’ */ | 38 | /*布尔值,通过v-show控制显示‘获取按钮’还是‘倒计时’ */ |
39 | startTime: "", | ||
40 | endTime: "", | ||
39 | }, | 41 | }, |
40 | onShareAppMessage() {}, | 42 | onShareAppMessage() {}, |
41 | onLoad(options) { | 43 | onLoad(options) { |
... | @@ -51,10 +53,23 @@ Page({ | ... | @@ -51,10 +53,23 @@ Page({ |
51 | redirect | 53 | redirect |
52 | }) | 54 | }) |
53 | } | 55 | } |
54 | |||
55 | this.initData(); | 56 | this.initData(); |
56 | }, | 57 | }, |
57 | initData() {}, | 58 | initData() { |
59 | let curDate = new Date(); | ||
60 | let startYear = curDate.getFullYear() - 80; | ||
61 | let endYear = curDate.getFullYear() - 15; | ||
62 | let mouth = curDate.getMonth() + 1; | ||
63 | let day = curDate.getDate(); | ||
64 | if (mouth < 10) mouth = "0" + mouth; | ||
65 | if (day < 10) day = "0" + day; | ||
66 | let startTime = startYear + "-" + mouth + "-" + day; | ||
67 | let endTime = endYear + "-" + mouth + "-" + day; | ||
68 | this.setData({ | ||
69 | startTime, | ||
70 | endTime | ||
71 | }) | ||
72 | }, | ||
58 | showLog(msg) { | 73 | showLog(msg) { |
59 | wx.showToast({ | 74 | wx.showToast({ |
60 | title: msg, | 75 | title: msg, |
... | @@ -159,6 +174,11 @@ Page({ | ... | @@ -159,6 +174,11 @@ Page({ |
159 | this.showLog("请输入正确的手机号码"); | 174 | this.showLog("请输入正确的手机号码"); |
160 | return | 175 | return |
161 | } | 176 | } |
177 | if (!this.data.isPlzAuth) { | ||
178 | this.showLog("请完成拼图验证"); | ||
179 | return | ||
180 | } | ||
181 | |||
162 | this.getAuthCode(); | 182 | this.getAuthCode(); |
163 | app.post({ | 183 | app.post({ |
164 | url: app.api.mobileVerifyCode, | 184 | url: app.api.mobileVerifyCode, | ... | ... |
... | @@ -92,7 +92,7 @@ $formWidth:560px; | ... | @@ -92,7 +92,7 @@ $formWidth:560px; |
92 | 92 | ||
93 | // 拼图 | 93 | // 拼图 |
94 | .puzzle { | 94 | .puzzle { |
95 | margin-top: 32px; | 95 | margin: 20px auto 20px; |
96 | $borderRadius: 32px; | 96 | $borderRadius: 32px; |
97 | width: $formWidth; | 97 | width: $formWidth; |
98 | border-radius: $borderRadius; | 98 | border-radius: $borderRadius; | ... | ... |
... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
26 | <input value="{{name}}" bindinput="bindNameInput" class="ipt-input" placeholder="姓名" placeholder-class="placeholder" /> | 26 | <input value="{{name}}" bindinput="bindNameInput" class="ipt-input" placeholder="姓名" placeholder-class="placeholder" /> |
27 | </view> | 27 | </view> |
28 | <!-- 生日 --> | 28 | <!-- 生日 --> |
29 | <picker mode="date" value="{{birthday}}" bindchange="bindBirthdayChange"> | 29 | <picker mode="date" start="{{startTime}}" end="{{endTime}}" value="{{birthday}}" bindchange="bindBirthdayChange"> |
30 | <view class="ipt"> | 30 | <view class="ipt"> |
31 | <view class="ipt-icon"> | 31 | <view class="ipt-icon"> |
32 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-birthday.png" /> | 32 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-birthday.png" /> |
... | @@ -41,6 +41,25 @@ | ... | @@ -41,6 +41,25 @@ |
41 | </view> | 41 | </view> |
42 | <input password="{{true}}" value="{{password}}" bindinput="bindPasswordInput" class="ipt-input" placeholder="登陆密码" placeholder-class="placeholder" /> | 42 | <input password="{{true}}" value="{{password}}" bindinput="bindPasswordInput" class="ipt-input" placeholder="登陆密码" placeholder-class="placeholder" /> |
43 | </view> | 43 | </view> |
44 | <!-- 滑动拼图 --> | ||
45 | <view class="puzzle"> | ||
46 | <view class="plz"> | ||
47 | <image class="ebg" src="../../image/oss/register/plz-cont.png" mode="widthFix" /> | ||
48 | <block wx:if="{{!isPlzAuth}}"> | ||
49 | <image class="block shadow" mode="widthFix" src="../../image/oss/register/plz-block.png?ver=1" /> | ||
50 | <image style="left:{{thumbX}}rpx;" class="block thumb" mode="widthFix" src="../../image/oss/register/plz-block-inline.png?ver=1" /> | ||
51 | </block> | ||
52 | </view> | ||
53 | <view class="slider"> | ||
54 | <movable-area class="slider-bar"> | ||
55 | <view wx:if="{{!isPlzAuth}}" class="tips tips-wait">拖动左侧滑块,完成上方拼图验证</view> | ||
56 | <view wx:else class="tips tips-authorized">验证成功</view> | ||
57 | <movable-view wx:if="{{!isPlzAuth}}" x="{{movableViewX}}" bindchange="onThumbChangeHandler" direction="horizontal"> | ||
58 | <image bindtouchend="onTouchEndHandler" class="slider-bar-thumb" mode="widthFix" src="../../image/oss/register/slider-block.png" /> | ||
59 | </movable-view> | ||
60 | </movable-area> | ||
61 | </view> | ||
62 | </view> | ||
44 | <!-- 验证码 --> | 63 | <!-- 验证码 --> |
45 | <view class="ipt"> | 64 | <view class="ipt"> |
46 | <view class="ipt-icon"> | 65 | <view class="ipt-icon"> |
... | @@ -59,25 +78,6 @@ | ... | @@ -59,25 +78,6 @@ |
59 | </label> | 78 | </label> |
60 | </radio-group> | 79 | </radio-group> |
61 | </view> | 80 | </view> |
62 | <!-- 滑动拼图 --> | ||
63 | <view class="puzzle"> | ||
64 | <view class="plz"> | ||
65 | <image class="ebg" src="../../image/oss/register/plz-cont.png" mode="widthFix" /> | ||
66 | <block wx:if="{{!isPlzAuth}}"> | ||
67 | <image class="block shadow" mode="widthFix" src="../../image/oss/register/plz-block.png?ver=1" /> | ||
68 | <image style="left:{{thumbX}}rpx;" class="block thumb" mode="widthFix" src="../../image/oss/register/plz-block-inline.png?ver=1" /> | ||
69 | </block> | ||
70 | </view> | ||
71 | <view class="slider"> | ||
72 | <movable-area class="slider-bar"> | ||
73 | <view wx:if="{{!isPlzAuth}}" class="tips tips-wait">拖动左侧滑块,完成上方拼图验证</view> | ||
74 | <view wx:else class="tips tips-authorized">验证成功</view> | ||
75 | <movable-view wx:if="{{!isPlzAuth}}" x="{{movableViewX}}" bindchange="onThumbChangeHandler" direction="horizontal"> | ||
76 | <image bindtouchend="onTouchEndHandler" class="slider-bar-thumb" mode="widthFix" src="../../image/oss/register/slider-block.png" /> | ||
77 | </movable-view> | ||
78 | </movable-area> | ||
79 | </view> | ||
80 | </view> | ||
81 | <!-- 条款/政策 --> | 81 | <!-- 条款/政策 --> |
82 | <view class="policy"> | 82 | <view class="policy"> |
83 | <span bindtap="onTermsHandler" class="check"> | 83 | <span bindtap="onTermsHandler" class="check"> | ... | ... |
... | @@ -86,12 +86,13 @@ | ... | @@ -86,12 +86,13 @@ |
86 | } | 86 | } |
87 | 87 | ||
88 | .mycard { | 88 | .mycard { |
89 | @include cb(160px, 48px); | ||
89 | margin: 16px auto; | 90 | margin: 16px auto; |
90 | border-radius: 24px; | 91 | // border-radius: 24px; |
91 | box-shadow: 0px 2px 9px 0 rgba(0, 0, 0, 0.1); | 92 | // box-shadow: 0px 2px 9px 0 rgba(0, 0, 0, 0.1); |
92 | background-color: #ffffff; | 93 | // background-color: #ffffff; |
93 | color: #bb3039; | 94 | // color: #bb3039; |
94 | @include btc(160px, 48px); | 95 | // @include btc(160px, 48px); |
95 | font-size: 24px; | 96 | font-size: 24px; |
96 | 97 | ||
97 | } | 98 | } |
... | @@ -153,7 +154,7 @@ | ... | @@ -153,7 +154,7 @@ |
153 | .flag { | 154 | .flag { |
154 | position: absolute; | 155 | position: absolute; |
155 | left: 0px; | 156 | left: 0px; |
156 | bottom: 6px; | 157 | bottom: 10px; |
157 | color: #a97a4b; | 158 | color: #a97a4b; |
158 | font-size: 16px; | 159 | font-size: 16px; |
159 | width: 51px; | 160 | width: 51px; |
... | @@ -174,14 +175,16 @@ | ... | @@ -174,14 +175,16 @@ |
174 | } | 175 | } |
175 | 176 | ||
176 | .line { | 177 | .line { |
178 | $progressHeight: 8px; | ||
177 | width: $proWidth; | 179 | width: $proWidth; |
178 | height: 4px; | 180 | height: $progressHeight; |
179 | background-color: #dcdcdc; | 181 | background-color: #dcdcdc; |
180 | 182 | ||
181 | &-thumb { | 183 | &-thumb { |
182 | // width: $proWidth; | 184 | width: 0%; |
183 | height: 4px; | 185 | height: $progressHeight; |
184 | background-color: #ba3038; | 186 | background-color: #ba3038; |
187 | transition: width 4s; | ||
185 | } | 188 | } |
186 | } | 189 | } |
187 | } | 190 | } | ... | ... |
-
Please register or sign in to post a comment