版本提交
Showing
104 changed files
with
1003 additions
and
46 deletions
... | @@ -23,5 +23,20 @@ App({ | ... | @@ -23,5 +23,20 @@ App({ |
23 | userInfo: null, | 23 | userInfo: null, |
24 | wxcode: store.getItem("wxcode"), | 24 | wxcode: store.getItem("wxcode"), |
25 | tlMemberCode: "" | 25 | tlMemberCode: "" |
26 | }, | ||
27 | // 获取用户基本信息 | ||
28 | queryIndex() { | ||
29 | return new Promise((resolve, reject) => { | ||
30 | this.post({ | ||
31 | url: this.api.index, | ||
32 | data: {}, | ||
33 | loading: true, | ||
34 | }).then((result) => { | ||
35 | this.globalData.indexInfo = result; | ||
36 | resolve(result) | ||
37 | }).catch((err) => { | ||
38 | reject(); | ||
39 | }); | ||
40 | }); | ||
26 | } | 41 | } |
27 | }) | 42 | }) | ... | ... |
... | @@ -203,3 +203,38 @@ | ... | @@ -203,3 +203,38 @@ |
203 | } | 203 | } |
204 | 204 | ||
205 | 205 | ||
206 | |||
207 | .bis { | ||
208 | background-repeat: no-repeat; | ||
209 | background-size: 100% 100%; | ||
210 | } | ||
211 | |||
212 | |||
213 | //flex 布局和 子元素 对其方式 | ||
214 | .fl { | ||
215 | display: flex; | ||
216 | } | ||
217 | |||
218 | .fj { | ||
219 | display: flex; | ||
220 | justify-content: space-between; | ||
221 | } | ||
222 | |||
223 | //水平和垂直居中 | ||
224 | .fcc { | ||
225 | display: flex; | ||
226 | justify-content: center; | ||
227 | align-items: center; | ||
228 | } | ||
229 | |||
230 | // 为元素设定的宽度和高度决定了元素的边框盒。 | ||
231 | .bb { | ||
232 | box-sizing: border-box; | ||
233 | } | ||
234 | |||
235 | // 满屏 | ||
236 | .fullp { | ||
237 | width: 100%; | ||
238 | height: 100%; | ||
239 | } | ||
240 | ... | ... |
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_mask" | ||
24 | }); | ||
25 | } | ||
26 | } | ||
27 | }) |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | .comp-item { | ||
5 | position: relative; | ||
6 | width: 654px; | ||
7 | height: 588px; | ||
8 | |||
9 | // background-color: wheat; | ||
10 | .bg { | ||
11 | position: absolute; | ||
12 | width: 654px; | ||
13 | height: 588px; | ||
14 | } | ||
15 | |||
16 | .space1 { | ||
17 | height: 400px; | ||
18 | } | ||
19 | |||
20 | .btn { | ||
21 | position: relative; | ||
22 | margin: 0 auto; | ||
23 | @include cb(300px, 80px); | ||
24 | } | ||
25 | } |
src/component/tips-new-comp/tips-new-comp.js
0 → 100755
1 | let app = getApp(); | ||
2 | Component({ | ||
3 | properties: { | ||
4 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
5 | innerText: { | ||
6 | type: String, | ||
7 | value: 'default value', | ||
8 | } | ||
9 | }, | ||
10 | data: { | ||
11 | // 这里是一些组件内部数据 | ||
12 | someData: {} | ||
13 | }, | ||
14 | methods: { | ||
15 | // 这里是一个自定义方法 | ||
16 | customMethod() { | ||
17 | this.triggerEvent('evtcomp', { | ||
18 | name: "_evt_custom" | ||
19 | }) | ||
20 | }, | ||
21 | // 隐藏蒙层 | ||
22 | toQeustionHandler() { | ||
23 | app.router.push({ | ||
24 | path:"question" | ||
25 | }) | ||
26 | } | ||
27 | } | ||
28 | }) |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | .comp-item { | ||
5 | position: relative; | ||
6 | width: 654px; | ||
7 | height: 666px; | ||
8 | |||
9 | // background-color: wheat; | ||
10 | .bg { | ||
11 | position: absolute; | ||
12 | width: 654px; | ||
13 | height: 666px; | ||
14 | } | ||
15 | |||
16 | .space1 { | ||
17 | height: 420px; | ||
18 | } | ||
19 | |||
20 | .btn { | ||
21 | position: relative; | ||
22 | margin: 0 auto; | ||
23 | @include cb(300px, 80px); | ||
24 | } | ||
25 | } |
1 | let app = getApp(); | ||
2 | Component({ | ||
3 | properties: { | ||
4 | // 这里定义了innerText属性,属性值可以在组件使用时指定 | ||
5 | innerText: { | ||
6 | type: String, | ||
7 | value: 'default value', | ||
8 | } | ||
9 | }, | ||
10 | data: { | ||
11 | // 这里是一些组件内部数据 | ||
12 | someData: {} | ||
13 | }, | ||
14 | methods: { | ||
15 | // 这里是一个自定义方法 | ||
16 | customMethod() { | ||
17 | this.triggerEvent('evtcomp', { | ||
18 | name: "_evt_custom" | ||
19 | }) | ||
20 | }, | ||
21 | // 去注册页面 | ||
22 | toRegister() { | ||
23 | app.router.push({ | ||
24 | path: "register" | ||
25 | }) | ||
26 | } | ||
27 | } | ||
28 | }) |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | .comp-item { | ||
5 | position: relative; | ||
6 | width: 654px; | ||
7 | height: 645px; | ||
8 | |||
9 | // background-color: wheat; | ||
10 | .bg { | ||
11 | position: absolute; | ||
12 | width: 654px; | ||
13 | height: 645px; | ||
14 | } | ||
15 | |||
16 | .space1 { | ||
17 | height: 472px; | ||
18 | } | ||
19 | |||
20 | .btn { | ||
21 | position: relative; | ||
22 | margin: 0 auto; | ||
23 | @include cb(300px, 80px); | ||
24 | } | ||
25 | } |
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_mask" | ||
24 | }); | ||
25 | } | ||
26 | } | ||
27 | }) |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | .comp-item { | ||
5 | position: relative; | ||
6 | width: 654px; | ||
7 | height: 578px; | ||
8 | |||
9 | // background-color: wheat; | ||
10 | .bg { | ||
11 | position: absolute; | ||
12 | width: 654px; | ||
13 | height: 578px; | ||
14 | } | ||
15 | |||
16 | .space1 { | ||
17 | height: 392px; | ||
18 | } | ||
19 | |||
20 | .btn { | ||
21 | position: relative; | ||
22 | margin: 0 auto; | ||
23 | @include cb(300px, 80px); | ||
24 | } | ||
25 | } |
File moved
File moved
File moved
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_mask" | ||
24 | }); | ||
25 | } | ||
26 | } | ||
27 | }) |
1 | @import '../../assets/scss/mixins'; | ||
2 | @import '../../assets/scss/utils'; | ||
3 | |||
4 | .comp-item { | ||
5 | position: relative; | ||
6 | width: 654px; | ||
7 | height: 588px; | ||
8 | |||
9 | // background-color: wheat; | ||
10 | .bg { | ||
11 | position: absolute; | ||
12 | width: 654px; | ||
13 | height: 588px; | ||
14 | } | ||
15 | |||
16 | .space1 { | ||
17 | height: 400px; | ||
18 | } | ||
19 | |||
20 | .btn { | ||
21 | position: relative; | ||
22 | margin: 0 auto; | ||
23 | @include cb(300px, 80px); | ||
24 | } | ||
25 | } |
... | @@ -49,7 +49,7 @@ function checkSessionId() { | ... | @@ -49,7 +49,7 @@ function checkSessionId() { |
49 | } | 49 | } |
50 | 50 | ||
51 | const fetch = function ({ | 51 | const fetch = function ({ |
52 | loading = false, | 52 | loading = true, |
53 | toast = true, | 53 | toast = true, |
54 | sid = true, | 54 | sid = true, |
55 | auth = true, | 55 | auth = true, | ... | ... |
src/image/oss/coop/coop-bg-1.png
0 → 100644
295 KB
src/image/oss/coop/coop-bg-2.png
0 → 100644
321 KB
src/image/oss/coop/coop-bg.png
0 → 100644
8.92 KB
src/image/oss/coop/coop-c2.png
0 → 100644
106 KB
src/image/oss/coop/coop-c3.png
0 → 100644
22.7 KB
src/image/oss/coop/coop-d1.png
0 → 100644
40.3 KB
src/image/oss/coop/coop-light.png
0 → 100644
381 Bytes
src/image/oss/coop/progress_rect.png
0 → 100644
168 Bytes
src/image/oss/coupon/coupon-1.png
0 → 100644
69.4 KB
src/image/oss/coupon/coupon-2.png
0 → 100644
67.4 KB
src/image/oss/create-wish/create-wish-1.png
0 → 100644
174 KB
src/image/oss/create-wish/cw-border.png
0 → 100644
27.1 KB
src/image/oss/create-wish/cw-close-btn.png
0 → 100644
574 Bytes
716 Bytes
src/image/oss/create-wish/cw-light.png
0 → 100644
320 Bytes
src/image/oss/create-wish/cw-point.png
0 → 100644
978 Bytes
src/image/oss/create-wish/tips-down-left.png
0 → 100644
2.18 KB
2.14 KB
src/image/oss/create-wish/tips-top-left.png
0 → 100644
2.17 KB
src/image/oss/create-wish/tips-top-right.png
0 → 100644
2.04 KB
src/image/oss/prize/prize_1.png
0 → 100644
22.1 KB
src/image/oss/prize/prize_2.png
0 → 100644
16.3 KB
src/image/oss/prize/prize_3.png
0 → 100644
20.4 KB
src/image/oss/prize/prize_s_1.png
0 → 100644
14.5 KB
src/image/oss/prize/prize_s_2.png
0 → 100644
15.2 KB
src/image/oss/prize/prize_s_3.png
0 → 100644
12.5 KB
src/image/oss/question/question-c1.png
0 → 100644
18.2 KB
src/image/oss/question/question-d1.png
0 → 100644
34.4 KB
src/image/oss/question/question-d2.png
0 → 100644
19.3 KB
src/image/oss/question/question-light.png
0 → 100644
520 Bytes
src/image/oss/rank/rank-c1.png
0 → 100644
429 KB
src/image/oss/rank/rank-d1.png
0 → 100644
42.8 KB
src/image/oss/rank/rank-d2.png
0 → 100644
33 KB
src/image/oss/rank/rank-d3.png
0 → 100644
28 KB
src/image/oss/register/check-c1.png
0 → 100644
277 Bytes
src/image/oss/register/check-selected.png
0 → 100644
833 Bytes
src/image/oss/register/check.png
0 → 100644
446 Bytes
src/image/oss/register/logo.png
0 → 100644
14.9 KB
src/image/oss/register/plz-block.png
0 → 100644
1.98 KB
src/image/oss/register/plz-cont.png
0 → 100644
153 KB
src/image/oss/register/reg-icon-birthday.png
0 → 100644
442 Bytes
src/image/oss/register/reg-icon-mobile.png
0 → 100644
312 Bytes
src/image/oss/register/reg-icon-user.png
0 → 100644
962 Bytes
src/image/oss/register/reg-icon-verify.png
0 → 100644
479 Bytes
src/image/oss/register/slider-block.png
0 → 100644
2.52 KB
src/image/oss/tips/tips-border-big.png
0 → 100644
39.9 KB
src/image/oss/tips/tips-border-small.png
0 → 100644
39 KB
src/image/oss/tips/tips-group-member.png
0 → 100644
58.9 KB
src/image/oss/tips/tips-login.png
0 → 100644
66.6 KB
src/image/oss/tips/tips-new.png
0 → 100644
67.8 KB
src/image/oss/tips/tips-register-ed.png
0 → 100644
54.1 KB
src/image/oss/tips/tips-rule.png
0 → 100644
111 KB
src/image/oss/tips/tips-shake.png
0 → 100644
88.7 KB
src/image/oss/user-table/user-table-c1.png
0 → 100644
10.7 KB
src/image/oss/user-table/user-table-c2.png
0 → 100644
59.2 KB
src/image/oss/user-table/user-table-d1.png
0 → 100644
141 KB
src/image/oss/user-table/user-table-d2.png
0 → 100644
22.1 KB
1 | let app = getApp(); | 1 | let app = getApp(); |
2 | Page({ | 2 | Page({ |
3 | data: { | 3 | data: { |
4 | // ruleTipsVisible: true, | 4 | tipsRegisterVisible: false, |
5 | curStatus: 1, // 当前场景 | ||
5 | }, | 6 | }, |
6 | onShareAppMessage() {}, | 7 | onShareAppMessage() {}, |
7 | onLoad(options) {}, | 8 | onLoad(options) { |
9 | this.initData(); | ||
10 | }, | ||
11 | initData() { | ||
12 | app.queryIndex().then((result) => {}); | ||
13 | }, | ||
14 | /** | ||
15 | * 点击提交心愿单按钮 | ||
16 | * 首先要根据自身状态判断 | ||
17 | */ | ||
18 | onSubmitHandler() { | ||
19 | this.checkSubmit().then((result) => { | ||
20 | |||
21 | }).catch((err) => { | ||
22 | |||
23 | });; | ||
24 | }, | ||
25 | /** | ||
26 | * 提交前判断状态 | ||
27 | * 判断顺序 | ||
28 | * 1.crm登陆 | ||
29 | * 2.黑名单 (团购会员) | ||
30 | * 3.新会员 | ||
31 | * | ||
32 | */ | ||
33 | checkSubmit() { | ||
34 | return new Promise((resolve, reject) => { | ||
35 | let indexInfo = app.globalData.indexInfo; | ||
36 | console.log("indexInfo:", indexInfo); | ||
37 | let { | ||
38 | isCrmLogin, | ||
39 | isNewMember, | ||
40 | isBlackList, | ||
41 | newMemberJudge, | ||
42 | oldMemberJudge, | ||
43 | wishBillCode | ||
44 | } = indexInfo; | ||
45 | // 未登陆 出注册弹窗提示 | ||
46 | if (isCrmLogin == 0) { | ||
47 | // app.router.push({ | ||
48 | // path: 'register' | ||
49 | // }); | ||
50 | this.setData({ | ||
51 | tipsRegisterVisible: true | ||
52 | }) | ||
53 | reject(); | ||
54 | return; | ||
55 | } | ||
56 | // 黑名单 | ||
57 | if (isBlackList == 1) { | ||
58 | reject(); | ||
59 | return; | ||
60 | } | ||
61 | // 新老会员 | ||
62 | // isNewMember | ||
63 | // if(isNewMember == 1){ | ||
64 | // }else{ | ||
65 | // } | ||
66 | resolve(); | ||
67 | }); | ||
68 | |||
69 | }, | ||
70 | // 换一批 | ||
71 | onChangeStatusHandler() { | ||
72 | let curStatus = this.data.curStatus; | ||
73 | curStatus++; | ||
74 | if (curStatus > 3) { | ||
75 | curStatus = 1; | ||
76 | } | ||
77 | this.setData({ | ||
78 | curStatus | ||
79 | }) | ||
80 | }, | ||
8 | // 子组件事件 | 81 | // 子组件事件 |
9 | evtcomp(evt) { | 82 | evtcomp(evt) { |
10 | let { | 83 | let { |
... | @@ -23,8 +96,4 @@ Page({ | ... | @@ -23,8 +96,4 @@ Page({ |
23 | break; | 96 | break; |
24 | } | 97 | } |
25 | }, | 98 | }, |
26 | // 提交心愿单 | ||
27 | onWishHandler() { | ||
28 | |||
29 | } | ||
30 | }) | 99 | }) | ... | ... |
1 | { | 1 | { |
2 | "navigationBarTitleText": "丸美心愿单", | 2 | "navigationBarTitleText": "丸美心愿单", |
3 | "usingComponents": { | 3 | "usingComponents": { |
4 | "rule-tips-comp": "../../component/rule-tips-comp/rule-tips-comp", | 4 | "tips-register-comp": "../../component/tips-register-comp/tips-register-comp", |
5 | "van-popup": "../../ui/vant-weapp/popup/index" | 5 | "van-popup": "../../ui/vant-weapp/popup/index" |
6 | } | 6 | } |
7 | } | 7 | } | ... | ... |
... | @@ -2,20 +2,130 @@ | ... | @@ -2,20 +2,130 @@ |
2 | @import '../../assets/scss/utils'; | 2 | @import '../../assets/scss/utils'; |
3 | 3 | ||
4 | .page { | 4 | .page { |
5 | .bgc { | 5 | .bgc {} |
6 | background-color: wheat; | 6 | |
7 | // 场景1背景 | ||
8 | .bgc1 { | ||
9 | background-color: #ffd5da; | ||
7 | } | 10 | } |
8 | 11 | ||
9 | .bg {} | 12 | |
13 | .bg { | ||
14 | image { | ||
15 | position: absolute; | ||
16 | width: 750px; | ||
17 | height: 1303px; | ||
18 | } | ||
19 | } | ||
10 | 20 | ||
11 | .main { | 21 | .main { |
12 | .top-space { | 22 | .top-space { |
13 | height: 0px; | 23 | height: 610px; |
14 | } | 24 | } |
15 | 25 | ||
16 | .content { | 26 | .content { |
17 | position: relative; | 27 | position: relative; |
18 | 28 | ||
29 | // 换一批按钮 | ||
30 | .change-btn { | ||
31 | margin-left: 48px; | ||
32 | box-shadow: 0px 6px 30px 0 rgba(126, 40, 40, 0.5); | ||
33 | background-color: #ffffff; | ||
34 | @include btc(160px, 54px); | ||
35 | border-radius: 27px; | ||
36 | font-size: 28px; | ||
37 | font-weight: 300; | ||
38 | color: #ba3039; | ||
39 | @extend .fcc; | ||
40 | |||
41 | .icon { | ||
42 | margin-right: 12px; | ||
43 | width: 29px; | ||
44 | height: 29px; | ||
45 | } | ||
46 | } | ||
47 | |||
48 | // 许愿单 | ||
49 | .wish-container { | ||
50 | position: relative; | ||
51 | |||
52 | // 背景图 | ||
53 | .ebg { | ||
54 | width: 746px; | ||
55 | height: 539px; | ||
56 | position: absolute; | ||
57 | left: 0; | ||
58 | right: 0; | ||
59 | top: 0; | ||
60 | margin: 0 auto; | ||
61 | } | ||
62 | |||
63 | // 心愿 | ||
64 | .wish { | ||
65 | position: relative; | ||
66 | margin: 0 auto 0; | ||
67 | display: flex; | ||
68 | justify-content: space-between; | ||
69 | @extend .bb; | ||
70 | // padding-top: 116px; | ||
71 | padding: 116px 90px 0; | ||
72 | |||
73 | &-item { | ||
74 | position: relative; | ||
75 | text-align: center; | ||
76 | |||
77 | .display { | ||
78 | position: relative; | ||
79 | width: 140px; | ||
80 | height: 140px; | ||
81 | border-radius: 70px; | ||
82 | background-image: radial-gradient(circle at 0 0, #ffffff, #f2e6e6); | ||
83 | |||
84 | .prod { | ||
85 | max-width: 100px; | ||
86 | max-height: 120px; | ||
87 | } | ||
88 | |||
89 | .close { | ||
90 | width: 30px; | ||
91 | height: 30px; | ||
92 | position: absolute; | ||
93 | bottom: 0; | ||
94 | right: 0; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | .name { | ||
99 | width: 160px; | ||
100 | margin: 8px auto 0; | ||
101 | color: #333333; | ||
102 | font-size: 20px; | ||
103 | // font-weight: 300; | ||
104 | } | ||
105 | |||
106 | .val { | ||
107 | @extend .fcc; | ||
108 | color: #b93138; | ||
109 | font-size: 20px; | ||
110 | |||
111 | .icon { | ||
112 | margin-left: 6px; | ||
113 | width: 11px; | ||
114 | height: 18px; | ||
115 | } | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | |||
120 | // 提交心愿按钮 | ||
121 | .submit-btn { | ||
122 | margin: 48px auto 0; | ||
123 | width: 234px; | ||
124 | height: 64px; | ||
125 | line-height: 64px; | ||
126 | } | ||
127 | } | ||
128 | |||
19 | .btn { | 129 | .btn { |
20 | @include cb; | 130 | @include cb; |
21 | } | 131 | } | ... | ... |
1 | <view class="page"> | 1 | <view class="page"> |
2 | <view class="app__bgc bgc"></view> | 2 | <view class="app__bgc bgc {{curStatus==1?'bgc1':''}}"></view> |
3 | <view class="app__bg bg"></view> | 3 | <view class="app__bg bg"> |
4 | <image src="{{'../../image/oss/create-wish/create-wish-'+curStatus+'.png'}}" mode="scaleToFill" /> | ||
5 | </view> | ||
4 | <view class="app__content main"> | 6 | <view class="app__content main"> |
5 | <view class="top-space"></view> | 7 | <view class="top-space"></view> |
6 | <view class="content"> | 8 | <view class="content"> |
7 | <view class="btn" bindtap="onWishHandler" >提交心愿单</view> | 9 | <!-- <view class="btn" bindtap="onWishHandler">提交心愿单</view> --> |
10 | <!-- 换一批按钮 --> | ||
11 | <view class="change-btn" bindtap="onChangeStatusHandler"> | ||
12 | <image class="icon" src="../../image/oss/create-wish/cw-exchange-btn.png" mode="widthFix" /> | ||
13 | 换一批 | ||
14 | </view> | ||
15 | <!-- 心愿单 --> | ||
16 | <view class="wish-container"> | ||
17 | <image class="ebg" mode="widthFix" src="../../image/oss/create-wish/cw-border.png" /> | ||
18 | <!-- 心愿容器 --> | ||
19 | <view class="wish"> | ||
20 | <view class="wish-item"> | ||
21 | <view class="display"> | ||
22 | <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" /> | ||
23 | <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> | ||
24 | </view> | ||
25 | <view class="name">丸美弹力蛋白凝时紧致乳</view> | ||
26 | <view class="val"> | ||
27 | <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" /> | ||
28 | 需要弹力值5403 | ||
29 | </view> | ||
30 | </view> | ||
31 | <view class="wish-item"> | ||
32 | <view class="display"> | ||
33 | <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" /> | ||
34 | <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> | ||
35 | </view> | ||
36 | <view class="name">丸美弹力蛋白凝时紧致乳</view> | ||
37 | <view class="val"> | ||
38 | <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" /> | ||
39 | 需要弹力值5403 | ||
40 | </view> | ||
41 | </view> | ||
42 | <view class="wish-item"> | ||
43 | <view class="display"> | ||
44 | <image class="prod" mode="aspectFit" src="../../image/oss/prize/prize_3.png" /> | ||
45 | <image class="close" mode="widthFix" src="../../image/oss/create-wish/cw-close-btn.png" /> | ||
46 | </view> | ||
47 | <view class="name">丸美弹力蛋白凝时紧致乳</view> | ||
48 | <view class="val"> | ||
49 | <image class="icon" mode="widthFix" src="../../image/oss/create-wish/cw-light.png" /> | ||
50 | 需要弹力值5403 | ||
51 | </view> | ||
52 | </view> | ||
53 | </view> | ||
54 | <!-- 提交心愿单 --> | ||
55 | <view bindtap="onSubmitHandler" class="btn submit-btn">提交心愿单</view> | ||
56 | </view> | ||
8 | </view> | 57 | </view> |
9 | </view> | 58 | </view> |
10 | </view> | 59 | </view> |
11 | <van-popup show="{{ ruleTipsVisible }}"> | 60 | <van-popup show="{{ tipsRegisterVisible }}"> |
12 | <rule-tips-comp bind:evtcomp="evtcomp"></rule-tips-comp> | 61 | <tips-register-comp bind:evtcomp="evtcomp"></tips-register-comp> |
13 | </van-popup> | 62 | </van-popup> | ... | ... |
... | @@ -3,10 +3,30 @@ Page({ | ... | @@ -3,10 +3,30 @@ Page({ |
3 | data: { | 3 | data: { |
4 | authorized: true, | 4 | authorized: true, |
5 | canIUse: wx.canIUse('button.open-type.getUserInfo'), | 5 | canIUse: wx.canIUse('button.open-type.getUserInfo'), |
6 | ruleTipsVisible: false, | 6 | tipsRuleVisible: false, |
7 | }, | 7 | }, |
8 | onShareAppMessage() {}, | 8 | onShareAppMessage() {}, |
9 | onLoad(options) {}, | 9 | onLoad(options) { |
10 | this.initData(); | ||
11 | }, | ||
12 | initData() { | ||
13 | app.queryIndex().then((result) => { | ||
14 | console.log("result:", result); | ||
15 | }) | ||
16 | }, | ||
17 | // 开始互动游戏 | ||
18 | onStartHandler() { | ||
19 | let path = "createWish"; | ||
20 | app.router.push({ | ||
21 | path: "createWish" | ||
22 | }) | ||
23 | }, | ||
24 | // 显示规则页面 | ||
25 | onShowRuleHandler() { | ||
26 | this.setData({ | ||
27 | tipsRuleVisible: true | ||
28 | }) | ||
29 | }, | ||
10 | // 子组件事件 | 30 | // 子组件事件 |
11 | evtcomp(evt) { | 31 | evtcomp(evt) { |
12 | let { | 32 | let { |
... | @@ -17,7 +37,7 @@ Page({ | ... | @@ -17,7 +37,7 @@ Page({ |
17 | 37 | ||
18 | case "_evt_hide_rule_tips": | 38 | case "_evt_hide_rule_tips": |
19 | this.setData({ | 39 | this.setData({ |
20 | ruleTipsVisible: false | 40 | tipsRuleVisible: false |
21 | }) | 41 | }) |
22 | break; | 42 | break; |
23 | 43 | ||
... | @@ -25,17 +45,4 @@ Page({ | ... | @@ -25,17 +45,4 @@ Page({ |
25 | break; | 45 | break; |
26 | } | 46 | } |
27 | }, | 47 | }, |
28 | // 开始互动游戏 | ||
29 | onStartHandler() { | ||
30 | let path = "createWish"; | ||
31 | app.router.push({ | ||
32 | path: "createWish" | ||
33 | }) | ||
34 | }, | ||
35 | // 显示规则页面 | ||
36 | onShowRuleHandler() { | ||
37 | this.setData({ | ||
38 | ruleTipsVisible: true | ||
39 | }) | ||
40 | } | ||
41 | }) | 48 | }) | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | "navigationBarTitleText": "我的心愿单", | 2 | "navigationBarTitleText": "我的心愿单", |
3 | "usingComponents": { | 3 | "usingComponents": { |
4 | "authorize-comp": "../../component/authorize-comp/authorize-comp", | 4 | "authorize-comp": "../../component/authorize-comp/authorize-comp", |
5 | "rule-tips-comp": "../../component/rule-tips-comp/rule-tips-comp", | 5 | "tips-rule-comp": "../../component/tips-rule-comp/tips-rule-comp", |
6 | "van-popup": "../../ui/vant-weapp/popup/index" | 6 | "van-popup": "../../ui/vant-weapp/popup/index" |
7 | } | 7 | } |
8 | } | 8 | } | ... | ... |
... | @@ -56,7 +56,7 @@ | ... | @@ -56,7 +56,7 @@ |
56 | top: 24px; | 56 | top: 24px; |
57 | right: 0; | 57 | right: 0; |
58 | @include border-left-radius(30px); | 58 | @include border-left-radius(30px); |
59 | @include btn-center(162px, 60px); | 59 | @include btc(162px, 60px); |
60 | font-size: 30px; | 60 | font-size: 30px; |
61 | color: #bf0221; | 61 | color: #bf0221; |
62 | // border-radius: 30px; | 62 | // border-radius: 30px; | ... | ... |
... | @@ -25,6 +25,6 @@ | ... | @@ -25,6 +25,6 @@ |
25 | <!-- <van-popup show="{{ authorizeVisible }}" > | 25 | <!-- <van-popup show="{{ authorizeVisible }}" > |
26 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> | 26 | <authorize-comp bind:evtcomp="evtcomp"></authorize-comp> |
27 | </van-popup> --> | 27 | </van-popup> --> |
28 | <van-popup show="{{ ruleTipsVisible }}"> | 28 | <van-popup show="{{ tipsRuleVisible }}"> |
29 | <rule-tips-comp bind:evtcomp="evtcomp"></rule-tips-comp> | 29 | <tips-rule-comp bind:evtcomp="evtcomp"></tips-rule-comp> |
30 | </van-popup> | 30 | </van-popup> | ... | ... |
1 | let Date = require('../../utils/date.js'); | ||
2 | let Utils = require('../../utils/util.js'); | ||
3 | |||
1 | let app = getApp(); | 4 | let app = getApp(); |
2 | Page({ | 5 | Page({ |
3 | data: {}, | 6 | data: { |
7 | tipsRegisteredVisible: false, | ||
8 | // form start | ||
9 | name: "", | ||
10 | mobile: "", | ||
11 | verifyCode: "", | ||
12 | birthday: "", | ||
13 | password: "", | ||
14 | sex: 0, | ||
15 | isTerms: false, | ||
16 | // form end | ||
17 | auth_time: 0, | ||
18 | sendAuthCode: true, | ||
19 | /*布尔值,通过v-show控制显示‘获取按钮’还是‘倒计时’ */ | ||
20 | }, | ||
4 | onShareAppMessage() {}, | 21 | onShareAppMessage() {}, |
5 | onLoad(options) {}, | 22 | onLoad(options) { |
23 | this.initData(); | ||
24 | }, | ||
25 | initData() { | ||
26 | |||
27 | }, | ||
28 | showLog(msg) { | ||
29 | wx.showToast({ | ||
30 | title: msg, | ||
31 | icon: "none" | ||
32 | }) | ||
33 | }, | ||
34 | doRegister() { | ||
35 | this.checkForm().then((result) => { | ||
36 | // 注册 | ||
37 | let data = { | ||
38 | mobile: this.data.mobile, | ||
39 | name: this.data.name, | ||
40 | birthday: this.data.birthday, | ||
41 | verifyCode: this.data.verifyCode, | ||
42 | } | ||
43 | app.post({ | ||
44 | url: app.api.register, | ||
45 | data: data | ||
46 | }).then((result) => { | ||
47 | wx.showModal({ | ||
48 | title: "登陆成功", | ||
49 | content: "继续生成我的心愿单", | ||
50 | confirmText: "马上前往", | ||
51 | showCancel: false, | ||
52 | success(res) { | ||
53 | app.router.push({ | ||
54 | openType: "reLaunch", | ||
55 | path: "createWish" | ||
56 | }) | ||
57 | } | ||
58 | }) | ||
59 | }); | ||
60 | }) | ||
61 | }, | ||
62 | // 表单检查 | ||
63 | checkForm() { | ||
64 | return new Promise((resolve, reject) => { | ||
65 | if (!this.data.name) { | ||
66 | this.showLog("请输入姓名"); | ||
67 | reject(); | ||
68 | } else if (!this.data.mobile) { | ||
69 | this.showLog("请输入手机号码"); | ||
70 | reject(); | ||
71 | } else if (!Utils.checkMobile(this.data.mobile)) { | ||
72 | this.showLog("请输正确手机号码"); | ||
73 | reject(); | ||
74 | } else if (!this.data.verifyCode) { | ||
75 | this.showLog("请输入验证码"); | ||
76 | reject(); | ||
77 | } else if (!this.data.isTerms) { | ||
78 | this.showLog("请同意服务条款"); | ||
79 | reject(); | ||
80 | } else { | ||
81 | resolve(); | ||
82 | } | ||
83 | }); | ||
84 | }, | ||
85 | // 是否同意条款 | ||
86 | onTermsHandler() { | ||
87 | console.log("onTermsHandler"); | ||
88 | this.setData({ | ||
89 | isTerms: !this.data.isTerms | ||
90 | }) | ||
91 | }, | ||
92 | // 跳转至会员条款 | ||
93 | onPolicyHandler() { | ||
94 | |||
95 | }, | ||
96 | // 获取验证码 | ||
97 | reqGetSmsRequest() { | ||
98 | if (!this.data.sendAuthCode) return; | ||
99 | let mobile = this.data.mobile | ||
100 | if (!mobile || !Utils.checkMobile(mobile)) { | ||
101 | this.showLog("请输入正确的手机号码"); | ||
102 | return | ||
103 | } | ||
104 | this.getAuthCode(); | ||
105 | app.post({ | ||
106 | url: app.api.mobileVerifyCode, | ||
107 | data: { | ||
108 | mobile: mobile, | ||
109 | forRegister: 1 | ||
110 | } | ||
111 | }).then((result) => { | ||
112 | wx.showToast({ | ||
113 | title: "短信发送成功", | ||
114 | icon: "none" | ||
115 | }) | ||
116 | }); | ||
117 | }, | ||
118 | // 倒数 | ||
119 | getAuthCode() { | ||
120 | let _this = this; | ||
121 | _this.setData({ | ||
122 | sendAuthCode: false, | ||
123 | auth_time: 60 | ||
124 | }) | ||
125 | var auth_timetimer = setInterval(() => { | ||
126 | _this.setData({ | ||
127 | auth_time: _this.data.auth_time - 1 | ||
128 | }) | ||
129 | if (_this.data.auth_time <= 0) { | ||
130 | _this.setData({ | ||
131 | sendAuthCode: true | ||
132 | }); | ||
133 | clearInterval(auth_timetimer) | ||
134 | } | ||
135 | }, 1000) | ||
136 | }, | ||
137 | |||
138 | bindMobileInput(e) { | ||
139 | this.setData({ | ||
140 | "mobile": e.detail.value | ||
141 | }) | ||
142 | }, | ||
143 | bindNameInput(e) { | ||
144 | this.setData({ | ||
145 | "name": e.detail.value | ||
146 | }) | ||
147 | }, | ||
148 | bindBirthdayInput(e) { | ||
149 | this.setData({ | ||
150 | "birthday": e.detail.value | ||
151 | }) | ||
152 | }, | ||
153 | bindVerifyCodeInput(e) { | ||
154 | this.setData({ | ||
155 | "verifyCode": e.detail.value | ||
156 | }) | ||
157 | }, | ||
158 | bindBirthdayChange(e) { | ||
159 | this.setData({ | ||
160 | birthday: e.detail.value | ||
161 | }) | ||
162 | }, | ||
6 | // 子组件事件 | 163 | // 子组件事件 |
7 | evtcomp(evt) { | 164 | evtcomp(evt) { |
8 | let { | 165 | let { |
... | @@ -11,7 +168,10 @@ Page({ | ... | @@ -11,7 +168,10 @@ Page({ |
11 | } = evt.detail; | 168 | } = evt.detail; |
12 | switch (name) { | 169 | switch (name) { |
13 | 170 | ||
14 | case "_evt_hide": | 171 | case "_evt_hide_mask": |
172 | this.setData({ | ||
173 | tipsRegisteredVisible: false | ||
174 | }) | ||
15 | break; | 175 | break; |
16 | 176 | ||
17 | default: | 177 | default: | ... | ... |
1 | @import '../../assets/scss/mixins'; | 1 | @import '../../assets/scss/mixins'; |
2 | @import '../../assets/scss/utils'; | 2 | @import '../../assets/scss/utils'; |
3 | 3 | ||
4 | |||
5 | $formWidth:560px; | ||
6 | |||
4 | .page { | 7 | .page { |
5 | .bgc {} | 8 | .bgc { |
9 | background-color: #fff2ef; | ||
10 | } | ||
6 | 11 | ||
7 | .bg {} | 12 | .bg {} |
8 | 13 | ||
9 | .main { | 14 | .main { |
10 | .top-space { | 15 | .top-space { |
11 | height: 0px; | 16 | height: 74px; |
12 | } | 17 | } |
13 | 18 | ||
14 | .content { | 19 | .content { |
15 | position: relative; | 20 | position: relative; |
21 | |||
22 | // logo | ||
23 | .logo { | ||
24 | width: 235px; | ||
25 | height: 122px; | ||
26 | margin: 0 auto; | ||
27 | |||
28 | .img { | ||
29 | width: 235px; | ||
30 | height: 122px; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | // 表单 | ||
35 | .form { | ||
36 | width: $formWidth; | ||
37 | margin: 36px auto 0; | ||
38 | |||
39 | .table { | ||
40 | .ipt { | ||
41 | margin-bottom: 20px; | ||
42 | color: #ba3138; | ||
43 | width: $formWidth; | ||
44 | height: 80px; | ||
45 | border-radius: 40px; | ||
46 | border: solid 1px #db9a9d; | ||
47 | background-color: #ffffff; | ||
48 | display: flex; | ||
49 | justify-content: space-between; | ||
50 | |||
51 | &-icon { | ||
52 | width: 74px; | ||
53 | height: 80px; | ||
54 | @extend .fcc; | ||
55 | |||
56 | .icon { | ||
57 | width: 30px; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | &-input { | ||
62 | flex: 1; | ||
63 | @extend .bb; | ||
64 | height: 80px; | ||
65 | font-size: 28px; | ||
66 | padding-right: 24px; | ||
67 | } | ||
68 | |||
69 | &-verify { | ||
70 | @extend .fcc; | ||
71 | font-size: 30px; | ||
72 | padding: 0 32px; | ||
73 | } | ||
74 | |||
75 | |||
76 | } | ||
77 | } | ||
78 | |||
16 | } | 79 | } |
80 | |||
81 | // 拼图 | ||
82 | .puzzle { | ||
83 | $borderRadius: 32px; | ||
84 | width: $formWidth; | ||
85 | border-radius: $borderRadius; | ||
86 | border: solid 1px #db9a9d; | ||
87 | |||
88 | .plz { | ||
89 | @include border-top-radius($borderRadius); | ||
90 | width: $formWidth; | ||
91 | height: 183px; | ||
92 | |||
93 | image { | ||
94 | @include border-top-radius($borderRadius); | ||
95 | width: $formWidth; | ||
96 | height: 183px; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | .slider { | ||
101 | width: 560px; | ||
102 | height: 70px; | ||
103 | border-top: solid 1px #db9a9d; | ||
104 | background-color: #ffffff; | ||
105 | @include border-bottom-radius($borderRadius); | ||
106 | } | ||
107 | } | ||
108 | |||
109 | // 隐私条款 | ||
110 | .policy { | ||
111 | margin-left: 40px; | ||
112 | margin-top: 22px; | ||
113 | color: #333333; | ||
114 | font-size: 28px; | ||
115 | display: flex; | ||
116 | align-items: center; | ||
117 | |||
118 | .check { | ||
119 | width: 28px; | ||
120 | height: 28px; | ||
121 | margin-right: 12px; | ||
122 | background-color: #b83138; | ||
123 | border-radius: 14px; | ||
124 | @extend .fcc; | ||
125 | |||
126 | image { | ||
127 | width: 18px; | ||
128 | height: 13px; | ||
17 | } | 129 | } |
130 | } | ||
131 | |||
132 | .t1 {} | ||
133 | |||
134 | .t2 { | ||
135 | color: #b83138; | ||
136 | } | ||
137 | } | ||
138 | |||
139 | // 注册按钮 | ||
140 | .register-btn { | ||
141 | margin: 68px auto 0; | ||
142 | @include btc($formWidth, 100px); | ||
143 | color: #ffffff; | ||
144 | font-size: 36px; | ||
145 | border-radius: 50px; | ||
146 | background-image: linear-gradient(to right, #b83138, #f2234a 51%, #b83138); | ||
147 | } | ||
148 | } | ||
149 | } | ||
150 | } | ||
151 | |||
152 | .placeholder { | ||
153 | color: rgba(186, 49, 56, 0.5); | ||
18 | } | 154 | } | ... | ... |
1 | <view class="page"> | 1 | <view class="page"> |
2 | <view class="app__bgc bgc"></view> | 2 | <view class="app__bgc bgc"></view> |
3 | <view class="app__bg bg"></view> | 3 | <view class="app__bg bg"></view> |
4 | <!-- <view class="app__top-shadow"></view> --> | ||
5 | <view class="app__content main"> | 4 | <view class="app__content main"> |
6 | <view class="top-space"></view> | 5 | <view class="top-space"></view> |
7 | <view class="content"></view> | 6 | <view class="content"> |
7 | <!-- logo --> | ||
8 | <view class="logo"> | ||
9 | <image class="img" mode="widthFix" src="../../image/oss/register/logo.png" /> | ||
10 | </view> | ||
11 | <!-- 表单 --> | ||
12 | <view class="form"> | ||
13 | <view class="table"> | ||
14 | <!-- 手机号 --> | ||
15 | <view class="ipt"> | ||
16 | <view class="ipt-icon"> | ||
17 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-mobile.png" /> | ||
18 | </view> | ||
19 | <input value="{{mobile}}" bindinput="bindMobileInput" class="ipt-input" placeholder="手机号" placeholder-class="placeholder" /> | ||
20 | </view> | ||
21 | <!-- 名字 --> | ||
22 | <view class="ipt"> | ||
23 | <view class="ipt-icon"> | ||
24 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-user.png" /> | ||
25 | </view> | ||
26 | <input value="{{name}}" bindinput="bindNameInput" class="ipt-input" placeholder="姓名" placeholder-class="placeholder" /> | ||
27 | </view> | ||
28 | <!-- 生日 --> | ||
29 | <picker mode="date" value="{{birthday}}" bindchange="bindBirthdayChange"> | ||
30 | <view class="ipt"> | ||
31 | <view class="ipt-icon"> | ||
32 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-birthday.png" /> | ||
33 | </view> | ||
34 | <input value="{{birthday}}" disabled="{{true}}" class="ipt-input" placeholder="生日" placeholder-class="placeholder" /> | ||
35 | </view> | ||
36 | </picker> | ||
37 | <!-- 验证码 --> | ||
38 | <view class="ipt"> | ||
39 | <view class="ipt-icon"> | ||
40 | <image class="icon" mode="widthFix" src="../../image/oss/register/reg-icon-verify.png" /> | ||
41 | </view> | ||
42 | <input value="{{verifyCode}}" bindinput="bindVerifyCodeInput" class="ipt-input" placeholder="验证码" placeholder-class="placeholder" /> | ||
43 | <view bindtap="reqGetSmsRequest" class="ipt-verify"> | ||
44 | {{sendAuthCode ? "获取验证码": auth_time+"(s)"}} | ||
45 | </view> | ||
46 | </view> | ||
47 | </view> | ||
48 | <!-- 滑动拼图 --> | ||
49 | <view class="puzzle"> | ||
50 | <view class="plz"> | ||
51 | <image src="../../image/oss/register/plz-cont.png" mode="widthFix" /> | ||
52 | </view> | ||
53 | <view class="slider"></view> | ||
54 | </view> | ||
55 | <!-- 条款/政策 --> | ||
56 | <view class="policy"> | ||
57 | <span bindtap="onTermsHandler" class="check"> | ||
58 | <image wx:if="{{isTerms}}" mode="widthFix" src="../../image/oss/register/check-c1.png" /> | ||
59 | </span> | ||
60 | <span bindtap="onTermsHandler" class="t1">我同意</span> | ||
61 | <span bindtap="onPolicyHandler" class="t2">《丸美会员注册绑定条款》</span> | ||
62 | </view> | ||
63 | <!-- 注册按钮 --> | ||
64 | <view bindtap="doRegister" class="register-btn">注册</view> | ||
65 | </view> | ||
66 | </view> | ||
8 | </view> | 67 | </view> |
9 | </view> | 68 | </view> |
69 | <van-popup show="{{ tipsRegisteredVisible }}"> | ||
70 | <tips-register-ed-comp bind:evtcomp="evtcomp"></tips-register-ed-comp> | ||
71 | </van-popup> | ... | ... |
-
Please register or sign in to post a comment