Merge branch 'feature/yoho-gain' into 'master'
Feature/yoho gain See merge request !1779
Showing
8 changed files
with
77 additions
and
219 deletions
@@ -3,7 +3,7 @@ const haveGainModel = require('../models/have-gain'); | @@ -3,7 +3,7 @@ const haveGainModel = require('../models/have-gain'); | ||
3 | const headerModel = require('../../../doraemon/models/header'); | 3 | const headerModel = require('../../../doraemon/models/header'); |
4 | 4 | ||
5 | /** | 5 | /** |
6 | - * 有货-有赚 | 6 | + * 有货-推手 |
7 | */ | 7 | */ |
8 | class HaveGain { | 8 | class HaveGain { |
9 | // 列表 | 9 | // 列表 |
@@ -16,10 +16,10 @@ class HaveGain { | @@ -16,10 +16,10 @@ class HaveGain { | ||
16 | page: 'have-gain-index', | 16 | page: 'have-gain-index', |
17 | width750: true, | 17 | width750: true, |
18 | localCss: true, | 18 | localCss: true, |
19 | - title: '有货有赚', | 19 | + title: '有货推手', |
20 | gainList, | 20 | gainList, |
21 | pageHeader: !req.yoho.isApp && headerModel.setNav({ | 21 | pageHeader: !req.yoho.isApp && headerModel.setNav({ |
22 | - navTitle: '有货有赚', | 22 | + navTitle: '有货推手', |
23 | navBtn: false | 23 | navBtn: false |
24 | }), | 24 | }), |
25 | }); | 25 | }); |
@@ -46,7 +46,7 @@ class HaveGain { | @@ -46,7 +46,7 @@ class HaveGain { | ||
46 | 46 | ||
47 | const apply = true; | 47 | const apply = true; |
48 | 48 | ||
49 | - return req.ctx(haveGainModel).checkApply({uid}, apply).then(result => { | 49 | + return req.ctx(haveGainModel).checkApply({uid}, apply).then(([result, images]) => { |
50 | let checkUrl = result.data && result.data.checkUrl || ''; | 50 | let checkUrl = result.data && result.data.checkUrl || ''; |
51 | 51 | ||
52 | if (checkUrl.indexOf('activity/have-gain/apply') === -1) { | 52 | if (checkUrl.indexOf('activity/have-gain/apply') === -1) { |
@@ -57,11 +57,12 @@ class HaveGain { | @@ -57,11 +57,12 @@ class HaveGain { | ||
57 | page: 'have-gain-apply', | 57 | page: 'have-gain-apply', |
58 | needJump: true, | 58 | needJump: true, |
59 | jumpUrl: checkUrl, | 59 | jumpUrl: checkUrl, |
60 | + images, | ||
60 | width750: true, | 61 | width750: true, |
61 | localCss: true, | 62 | localCss: true, |
62 | - title: '有货有赚', | 63 | + title: '有货推手', |
63 | pageHeader: !req.yoho.isApp && headerModel.setNav({ | 64 | pageHeader: !req.yoho.isApp && headerModel.setNav({ |
64 | - navTitle: '有货有赚', | 65 | + navTitle: '有货推手', |
65 | navBtn: false | 66 | navBtn: false |
66 | }), | 67 | }), |
67 | }); | 68 | }); |
@@ -72,14 +73,15 @@ class HaveGain { | @@ -72,14 +73,15 @@ class HaveGain { | ||
72 | page: 'have-gain-apply', | 73 | page: 'have-gain-apply', |
73 | width750: true, | 74 | width750: true, |
74 | localCss: true, | 75 | localCss: true, |
75 | - title: '有货有赚', | 76 | + title: '有货推手', |
76 | agreementUrl: 'https://activity.yoho.cn/feature/2609.html?openby:yohobuy={"action":"go.h5","params":{"url":"https://activity.yoho.cn/feature/2609.html"}}', | 77 | agreementUrl: 'https://activity.yoho.cn/feature/2609.html?openby:yohobuy={"action":"go.h5","params":{"url":"https://activity.yoho.cn/feature/2609.html"}}', |
77 | socialMediaList: socialMediaList, | 78 | socialMediaList: socialMediaList, |
78 | pageHeader: !req.yoho.isApp && headerModel.setNav({ | 79 | pageHeader: !req.yoho.isApp && headerModel.setNav({ |
79 | - navTitle: '有货有赚', | 80 | + navTitle: '有货推手', |
80 | navBtn: false | 81 | navBtn: false |
81 | }), | 82 | }), |
82 | - wechatShare: true | 83 | + wechatShare: true, |
84 | + images | ||
83 | }); | 85 | }); |
84 | }).catch(next); | 86 | }).catch(next); |
85 | } | 87 | } |
@@ -91,10 +93,10 @@ class HaveGain { | @@ -91,10 +93,10 @@ class HaveGain { | ||
91 | page: 'have-gain-verify', | 93 | page: 'have-gain-verify', |
92 | width750: true, | 94 | width750: true, |
93 | localCss: true, | 95 | localCss: true, |
94 | - title: '有货有赚', | 96 | + title: '有货推手', |
95 | isApp: req.yoho.isApp, | 97 | isApp: req.yoho.isApp, |
96 | pageHeader: !req.yoho.isApp && headerModel.setNav({ | 98 | pageHeader: !req.yoho.isApp && headerModel.setNav({ |
97 | - navTitle: '有货有赚', | 99 | + navTitle: '有货推手', |
98 | navBtn: false | 100 | navBtn: false |
99 | }), | 101 | }), |
100 | }); | 102 | }); |
@@ -107,9 +109,9 @@ class HaveGain { | @@ -107,9 +109,9 @@ class HaveGain { | ||
107 | page: 'have-gain-fail', | 109 | page: 'have-gain-fail', |
108 | width750: true, | 110 | width750: true, |
109 | localCss: true, | 111 | localCss: true, |
110 | - title: '有货有赚', | 112 | + title: '有货推手', |
111 | pageHeader: !req.yoho.isApp && headerModel.setNav({ | 113 | pageHeader: !req.yoho.isApp && headerModel.setNav({ |
112 | - navTitle: '有货有赚', | 114 | + navTitle: '有货推手', |
113 | navBtn: false | 115 | navBtn: false |
114 | }), | 116 | }), |
115 | }); | 117 | }); |
@@ -54,31 +54,46 @@ module.exports = class extends global.yoho.BaseModel { | @@ -54,31 +54,46 @@ module.exports = class extends global.yoho.BaseModel { | ||
54 | * @return {[type]} [{}] | 54 | * @return {[type]} [{}] |
55 | */ | 55 | */ |
56 | checkApply(params, apply) { | 56 | checkApply(params, apply) { |
57 | - return this.get({ | ||
58 | - data: Object.assign({ | ||
59 | - method: 'app.union.shareOrder.checkApply' | ||
60 | - }, params) | ||
61 | - }).then(res => { | ||
62 | - let checkStatus = _.get(res, 'data.status', 0); | 57 | + return Promise.all([ |
58 | + this.get({ | ||
59 | + data: Object.assign({ | ||
60 | + method: 'app.union.shareOrder.checkApply' | ||
61 | + }, params) | ||
62 | + }).then(res => { | ||
63 | + let checkStatus = _.get(res, 'data.status', 0); | ||
63 | 64 | ||
64 | - let checkUrl = 'https://activity.yoho.cn/feature/2601.html?&title=有货有赚&openby:yohobuy={"action":"go.h5","params":{"title":"有货有赚","url":"https://activity.yoho.cn/feature/2601.html"}}'; // 中间页 | 65 | + let checkUrl = 'https://activity.yoho.cn/feature/2601.html?&title=有货推手&openby:yohobuy={"action":"go.h5","params":{"title":"有货推手","url":"https://activity.yoho.cn/feature/2601.html"}}'; // 中间页 |
65 | 66 | ||
66 | - if (apply) { | ||
67 | - checkUrl = helpers.urlFormat('/activity/have-gain/apply', {}); // 未申请 | ||
68 | - } | 67 | + if (apply) { |
68 | + checkUrl = helpers.urlFormat('/activity/have-gain/apply', {}); // 未申请 | ||
69 | + } | ||
69 | 70 | ||
70 | - if (checkStatus === 1) { // 审核中 | ||
71 | - checkUrl = helpers.urlFormat('/activity/have-gain/verify', {}); | ||
72 | - } else if (checkStatus === 2) { // 审核成功 | ||
73 | - checkUrl = helpers.urlFormat('') + '?title=有货有赚&openby:yohobuy={"action":"go.minealliance","params":{"type": "myAlliance", "title":"有货有赚"}}' // eslint-disable-line | ||
74 | - } else if (checkStatus === 3) { // 申请拒绝 | ||
75 | - checkUrl = helpers.urlFormat('/activity/have-gain/fail', {}); | ||
76 | - } | 71 | + if (checkStatus === 1) { // 审核中 |
72 | + checkUrl = helpers.urlFormat('/activity/have-gain/verify', {}); | ||
73 | + } else if (checkStatus === 2) { // 审核成功 | ||
74 | + checkUrl = helpers.urlFormat('') + '?title=有货推手&openby:yohobuy={"action":"go.minealliance","params":{"type": "myAlliance", "title":"有货推手"}}' // eslint-disable-line | ||
75 | + } else if (checkStatus === 3) { // 申请拒绝 | ||
76 | + checkUrl = helpers.urlFormat('/activity/have-gain/fail', {}); | ||
77 | + } | ||
77 | 78 | ||
78 | - _.set(res, 'data.checkUrl', checkUrl); | 79 | + _.set(res, 'data.checkUrl', checkUrl); |
79 | 80 | ||
80 | - return res; | ||
81 | - }); | 81 | + return res; |
82 | + }), | ||
83 | + this.get({ | ||
84 | + api: global.yoho.ServiceAPI, | ||
85 | + url: 'operations/api/v5/resource/get', | ||
86 | + data: { | ||
87 | + content_code: 'e5d5bcd09770a49341eaa16282cea7e5', | ||
88 | + }, | ||
89 | + param: { | ||
90 | + cache: true, | ||
91 | + code: 200 | ||
92 | + } | ||
93 | + }).then(result => { | ||
94 | + return _.get(result, 'data', []).map((i) => i.data.src); | ||
95 | + }) | ||
96 | + ]); | ||
82 | } | 97 | } |
83 | 98 | ||
84 | /** | 99 | /** |
@@ -348,18 +348,18 @@ router.get('/grade/droit', auth, grade.droit); // 权益说明 | @@ -348,18 +348,18 @@ router.get('/grade/droit', auth, grade.droit); // 权益说明 | ||
348 | 348 | ||
349 | router.get('/grouth-new/init', auth, grouthNew.grouthInit); // 成长值初始化 | 349 | router.get('/grouth-new/init', auth, grouthNew.grouthInit); // 成长值初始化 |
350 | 350 | ||
351 | -router.get('/have-gain/index', auth, haveGain.index); // 有货有赚列表 | ||
352 | -router.get('/have-gain/apply', auth, haveGain.apply); // 有货有赚申请 | ||
353 | -router.get('/have-gain/verify', haveGain.verify); // 有货有赚审核 | ||
354 | -router.get('/have-gain/fail', auth, haveGain.fail); // 有货有赚审核不通过 | ||
355 | -router.post('/have-gain/resetApply', auth, haveGain.resetApply); // 有货有赚审核不通过,重新申请API | ||
356 | -router.post('/have-gain/submitApply', auth, haveGain.submitApply); // 有货有赚-申请开通 | 351 | +router.get('/have-gain/index', auth, haveGain.index); // 有货推手列表 |
352 | +router.get('/have-gain/apply', auth, haveGain.apply); // 有货推手申请 | ||
353 | +router.get('/have-gain/verify', haveGain.verify); // 有货推手审核 | ||
354 | +router.get('/have-gain/fail', auth, haveGain.fail); // 有货推手审核不通过 | ||
355 | +router.post('/have-gain/resetApply', auth, haveGain.resetApply); // 有货推手审核不通过,重新申请API | ||
356 | +router.post('/have-gain/submitApply', auth, haveGain.submitApply); // 有货推手-申请开通 | ||
357 | 357 | ||
358 | router.get('/red-envelope/index', redPack.redbagPage); // 微信客服领红包 | 358 | router.get('/red-envelope/index', redPack.redbagPage); // 微信客服领红包 |
359 | router.post('/red-envelope/receive', auth, redPack.receiveRedBag); | 359 | router.post('/red-envelope/receive', auth, redPack.receiveRedBag); |
360 | router.post('/red-envelope/submitWxCode', auth, redPack.submitWxCode); | 360 | router.post('/red-envelope/submitWxCode', auth, redPack.submitWxCode); |
361 | 361 | ||
362 | -// 有货有赚推广活动 | 362 | +// 有货推手推广活动 |
363 | router.get('/have-gain/promo/:id.html', haveGain.promoDetail); | 363 | router.get('/have-gain/promo/:id.html', haveGain.promoDetail); |
364 | router.post('/have-gain/promo/:id', auth, haveGain.promoSubmit); | 364 | router.post('/have-gain/promo/:id', auth, haveGain.promoSubmit); |
365 | 365 |
1 | <div class="have-gain-apply" data-jump="{{needJump}}" data-url="{{jumpUrl}}"> | 1 | <div class="have-gain-apply" data-jump="{{needJump}}" data-url="{{jumpUrl}}"> |
2 | {{#unless needJump}} | 2 | {{#unless needJump}} |
3 | <div class="section"> | 3 | <div class="section"> |
4 | - <div class="apply-title">基本信息</div> | ||
5 | - <ul class="section-ul"> | ||
6 | - <li> | ||
7 | - <div class="label">姓名</div> | ||
8 | - <div class="text"> | ||
9 | - <input type="text" class="name" placeholder="请输入姓名" /> | ||
10 | - </div> | ||
11 | - </li> | ||
12 | - <li> | ||
13 | - <div class="label">手机号码</div> | ||
14 | - <div class="text"> | ||
15 | - <input type="number" class="mobile" placeholder="请输入手机号码" /> | ||
16 | - </div> | ||
17 | - </li> | ||
18 | - <li> | ||
19 | - <div class="label">微信号</div> | ||
20 | - <div class="text"> | ||
21 | - <input type="text" class="wechat" placeholder="请输入微信号(选填)" /> | ||
22 | - </div> | ||
23 | - </li> | ||
24 | - </ul> | ||
25 | - <p class="other">提供微信号,方便邀您加入达人微信群,赚钱秘籍、特殊福利享不停!<br/>添加关注公众号“有货有赚”,申请状态、高佣活动早知道。<em class="added">点击添加</em></p> | 4 | + {{#images}} |
5 | + <img src="{{image2 . w=1000 h=1000 q=80}}" alt=""> | ||
6 | + {{/images}} | ||
26 | </div> | 7 | </div> |
27 | <div class="agreement-section"> | 8 | <div class="agreement-section"> |
28 | <div class="agreement"> | 9 | <div class="agreement"> |
29 | - 我已阅读并同意<a href='{{agreementUrl}}'>《有货有赚推广协议》</a> | 10 | + 我已阅读并同意<a href='{{agreementUrl}}'>《有货推手推广协议》</a> |
30 | </div> | 11 | </div> |
31 | - <div class="apply-btn disable">申请开通</div> | 12 | + <div class="apply-btn">申请开通</div> |
32 | </div> | 13 | </div> |
33 | {{/unless}} | 14 | {{/unless}} |
34 | </div> | 15 | </div> |
@@ -6,6 +6,6 @@ | @@ -6,6 +6,6 @@ | ||
6 | </div> | 6 | </div> |
7 | <div class="review-bg {{#if isApp}}app{{/if}}"></div> | 7 | <div class="review-bg {{#if isApp}}app{{/if}}"></div> |
8 | <div class="esp-go"> | 8 | <div class="esp-go"> |
9 | - <div class="add-btn">关注“有货有赚”公众号,了解申请进度</div> | 9 | + <div class="add-btn">关注“有货推手”公众号,了解申请进度</div> |
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
1 | { | 1 | { |
2 | "name": "yohobuywap-node", | 2 | "name": "yohobuywap-node", |
3 | - "version": "6.9.9-8", | 3 | + "version": "6.9.9-9", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "A New Yohobuy Project With Express", | 5 | "description": "A New Yohobuy Project With Express", |
6 | "repository": { | 6 | "repository": { |
@@ -3,10 +3,8 @@ import Page from 'js/yoho-page'; | @@ -3,10 +3,8 @@ import Page from 'js/yoho-page'; | ||
3 | import $ from 'yoho-jquery'; | 3 | import $ from 'yoho-jquery'; |
4 | import tip from 'js/plugin/tip'; | 4 | import tip from 'js/plugin/tip'; |
5 | import dialog from 'js/plugin/dialog'; | 5 | import dialog from 'js/plugin/dialog'; |
6 | -import fillInHbs from 'hbs/activity/have-gain/fill-in.hbs'; | ||
7 | import yoho from 'js/yoho-app'; | 6 | import yoho from 'js/yoho-app'; |
8 | import parse from 'yoho-qs/parse'; | 7 | import parse from 'yoho-qs/parse'; |
9 | -import Clipboard from 'clipboard'; | ||
10 | import cookie from 'yoho-cookie'; | 8 | import cookie from 'yoho-cookie'; |
11 | import linkTo from '../../../utils/linkTo'; | 9 | import linkTo from '../../../utils/linkTo'; |
12 | 10 | ||
@@ -17,11 +15,6 @@ class HaveGainApplyPage extends Page { | @@ -17,11 +15,6 @@ class HaveGainApplyPage extends Page { | ||
17 | this.selector = { | 15 | this.selector = { |
18 | isFlag: false, | 16 | isFlag: false, |
19 | $apply: $('.have-gain-apply'), | 17 | $apply: $('.have-gain-apply'), |
20 | - $nameInput: $('.section .name'), | ||
21 | - $mobileInput: $('.section .mobile'), | ||
22 | - $wxInput: $('.section .wechat'), | ||
23 | - $fillIn: $('.party-icon-item .fill-in'), | ||
24 | - $added: $('.other .added'), | ||
25 | $agreement: $('.agreement-section .agreement'), | 18 | $agreement: $('.agreement-section .agreement'), |
26 | $applyBtn: $('.apply-btn'), | 19 | $applyBtn: $('.apply-btn'), |
27 | }; | 20 | }; |
@@ -30,61 +23,13 @@ class HaveGainApplyPage extends Page { | @@ -30,61 +23,13 @@ class HaveGainApplyPage extends Page { | ||
30 | } | 23 | } |
31 | 24 | ||
32 | init() { | 25 | init() { |
33 | - let that = this; | ||
34 | - let clipboard = new Clipboard('.added', { | ||
35 | - text: function() { | ||
36 | - return '有货有赚'; | ||
37 | - } | ||
38 | - }); | ||
39 | - | ||
40 | - new Clipboard('.apply-btn', { | ||
41 | - text: function() { | ||
42 | - return '有货有赚'; | ||
43 | - } | ||
44 | - }); | ||
45 | - | ||
46 | - clipboard.on('success', function(e) { | ||
47 | - that.copyDialog(); | ||
48 | - e.clearSelection(); | ||
49 | - }); | ||
50 | - | ||
51 | - clipboard.on('error', function() { | ||
52 | - that.copyDialog(); | ||
53 | - }); | ||
54 | - | ||
55 | this.bindEvents(); | 26 | this.bindEvents(); |
56 | } | 27 | } |
57 | 28 | ||
58 | - copyDialog() { | ||
59 | - let ua = navigator.userAgent.toLowerCase(); | ||
60 | - let isWeixin = ua.indexOf('micromessenger') !== -1; | ||
61 | - let hasFooter = { | ||
62 | - leftBtnText: '取消', | ||
63 | - rightBtnText: '去添加' | ||
64 | - }; | ||
65 | - | ||
66 | - if (isWeixin) { | ||
67 | - hasFooter = { | ||
68 | - centerBtnText: '确认' | ||
69 | - }; | ||
70 | - } | ||
71 | - | ||
72 | - dialog.showDialog({ | ||
73 | - dialogText: '“有货有赚”服务号已经复制,请去微信搜索添加', | ||
74 | - hasClass: 'dialog-text-apply', | ||
75 | - hasFooter: hasFooter | ||
76 | - }, function() { | ||
77 | - window.location.href = 'weixin://'; | ||
78 | - }); | ||
79 | - } | ||
80 | - | ||
81 | bindEvents() { | 29 | bindEvents() { |
82 | let that = this; | 30 | let that = this; |
83 | 31 | ||
84 | this.jumpVerify(); | 32 | this.jumpVerify(); |
85 | - this.selector.$nameInput.on('input', this.changeBtnStatus.bind(this)); | ||
86 | - this.selector.$mobileInput.on('input', this.changeBtnStatus.bind(this)); | ||
87 | - this.selector.$fillIn.on('click', that.tapFillIn.bind(this)); | ||
88 | this.selector.$agreement.on('click', that.tapAgreement); | 33 | this.selector.$agreement.on('click', that.tapAgreement); |
89 | this.selector.$applyBtn.on('click', this.apply.bind(this)); | 34 | this.selector.$applyBtn.on('click', this.apply.bind(this)); |
90 | } | 35 | } |
@@ -126,72 +71,6 @@ class HaveGainApplyPage extends Page { | @@ -126,72 +71,6 @@ class HaveGainApplyPage extends Page { | ||
126 | } | 71 | } |
127 | } | 72 | } |
128 | 73 | ||
129 | - changeBtnStatus() { | ||
130 | - let errStatus = 0; | ||
131 | - let name = $.trim(this.selector.$nameInput.val()); | ||
132 | - let mobile = $.trim(this.selector.$mobileInput.val()); | ||
133 | - | ||
134 | - if (name === '') { | ||
135 | - errStatus = 1; | ||
136 | - } else if (mobile === '') { | ||
137 | - errStatus = 2; | ||
138 | - } else if (!/^1[0-9]{10}$/.test(mobile)) { | ||
139 | - errStatus = 21; | ||
140 | - } | ||
141 | - | ||
142 | - if (errStatus) { | ||
143 | - this.selector.$applyBtn.addClass('disable'); | ||
144 | - return errStatus; | ||
145 | - } | ||
146 | - | ||
147 | - this.selector.$applyBtn.removeClass('disable'); | ||
148 | - | ||
149 | - return errStatus; | ||
150 | - } | ||
151 | - | ||
152 | - tapFillIn(event) { | ||
153 | - let _this = this; | ||
154 | - let $event = $(event.target); | ||
155 | - | ||
156 | - if ($event.hasClass('disable')) { | ||
157 | - return false; | ||
158 | - } | ||
159 | - | ||
160 | - let $accountName = $event.closest('.party-icon-item').find('.account-name'); | ||
161 | - | ||
162 | - dialog.showDialog({ | ||
163 | - hasHeader: '填写信息', | ||
164 | - hasClass: 'dialog-fill-apply', | ||
165 | - dialogText: fillInHbs({ | ||
166 | - account: $accountName.find('em').eq(0).text() || '', | ||
167 | - fans: $accountName.find('em').eq(1).data('fans') || '' | ||
168 | - }), | ||
169 | - hasFooter: { | ||
170 | - leftBtnText: '取消', | ||
171 | - rightBtnText: '确定' | ||
172 | - } | ||
173 | - }, function() { | ||
174 | - let account = $.trim($('.dialog-fill-apply .account').val() || ''); | ||
175 | - let fans = $.trim($('.dialog-fill-apply .fans').val() || ''); | ||
176 | - let fansFix = Math.round((fans / 10000) * 100) / 100; // 保留二个小数 | ||
177 | - | ||
178 | - if (!account) { | ||
179 | - return tip.show('请输入账号昵称'); | ||
180 | - } | ||
181 | - | ||
182 | - if (fans === '') { | ||
183 | - return tip.show('请输入粉丝数量'); | ||
184 | - } | ||
185 | - | ||
186 | - fansFix = fansFix >= 10 ? fansFix + '万' : fans; | ||
187 | - | ||
188 | - $accountName.html(`账号:<em>${account}</em> 粉丝:<em data-fans="${fans}">${fansFix}</em>`); // eslint-disable-line | ||
189 | - dialog.hideDialog(); | ||
190 | - _this.changeBtnStatus(); | ||
191 | - $event.text('已填写').addClass('disable'); | ||
192 | - }); | ||
193 | - } | ||
194 | - | ||
195 | tapAgreement(event) { | 74 | tapAgreement(event) { |
196 | let $event = $(event.target); | 75 | let $event = $(event.target); |
197 | 76 | ||
@@ -199,7 +78,11 @@ class HaveGainApplyPage extends Page { | @@ -199,7 +78,11 @@ class HaveGainApplyPage extends Page { | ||
199 | return true; | 78 | return true; |
200 | } | 79 | } |
201 | 80 | ||
202 | - $event.hasClass('activate') ? $event.removeClass('activate') : $event.addClass('activate'); | 81 | + if ($event.hasClass('activate')) { |
82 | + $event.removeClass('activate'); | ||
83 | + } else { | ||
84 | + $event.addClass('activate'); | ||
85 | + } | ||
203 | } | 86 | } |
204 | clickFun() { | 87 | clickFun() { |
205 | let env = linkTo.getEnv(); | 88 | let env = linkTo.getEnv(); |
@@ -216,37 +99,14 @@ class HaveGainApplyPage extends Page { | @@ -216,37 +99,14 @@ class HaveGainApplyPage extends Page { | ||
216 | } | 99 | } |
217 | } | 100 | } |
218 | apply() { | 101 | apply() { |
219 | - let errStatus = this.changeBtnStatus(); | ||
220 | let socialMediaList = []; | 102 | let socialMediaList = []; |
221 | 103 | ||
222 | let union = linkTo.getQueryObj(); | 104 | let union = linkTo.getQueryObj(); |
223 | 105 | ||
224 | - if (errStatus === 1) { | ||
225 | - tip.show('请输入姓名'); | ||
226 | - } else if (errStatus === 2) { | ||
227 | - tip.show('请输入手机号'); | ||
228 | - } else if (errStatus === 21) { | ||
229 | - tip.show('请输入正确的手机号'); | ||
230 | - } | ||
231 | - | ||
232 | - if (errStatus) { | ||
233 | - $('html,body').animate({scrollTop: 0}, 'slow'); | ||
234 | - return false; | ||
235 | - } | ||
236 | - | ||
237 | if (!this.selector.$agreement.hasClass('activate')) { | 106 | if (!this.selector.$agreement.hasClass('activate')) { |
238 | return tip.show('请勾选《我已阅读并同意》'); | 107 | return tip.show('请勾选《我已阅读并同意》'); |
239 | } | 108 | } |
240 | 109 | ||
241 | - let wxAccount = $.trim(this.selector.$wxInput.val()); | ||
242 | - | ||
243 | - if (wxAccount) { | ||
244 | - socialMediaList.push({ | ||
245 | - type: 1, | ||
246 | - account: wxAccount | ||
247 | - }); | ||
248 | - } | ||
249 | - | ||
250 | let unionTypeYas = cookie.get('unionTypeYas'); | 110 | let unionTypeYas = cookie.get('unionTypeYas'); |
251 | 111 | ||
252 | if (unionTypeYas) { | 112 | if (unionTypeYas) { |
@@ -266,10 +126,7 @@ class HaveGainApplyPage extends Page { | @@ -266,10 +126,7 @@ class HaveGainApplyPage extends Page { | ||
266 | return this.ajax({ | 126 | return this.ajax({ |
267 | type: 'post', | 127 | type: 'post', |
268 | url: `/activity/have-gain/submitApply${window.location.search}`, | 128 | url: `/activity/have-gain/submitApply${window.location.search}`, |
269 | - data: Object.assign({ | ||
270 | - name: $.trim(this.selector.$nameInput.val()), | ||
271 | - mobile: $.trim(this.selector.$mobileInput.val()) | ||
272 | - }, union) | 129 | + data: union |
273 | }).then(res => { | 130 | }).then(res => { |
274 | this.selector.isFlag = false; | 131 | this.selector.isFlag = false; |
275 | 132 |
@@ -9,8 +9,11 @@ body { | @@ -9,8 +9,11 @@ body { | ||
9 | 9 | ||
10 | .section { | 10 | .section { |
11 | background-color: #fff; | 11 | background-color: #fff; |
12 | - padding: 0 30px; | ||
13 | - margin-bottom: 30px; | 12 | + margin-bottom: 220px; |
13 | + | ||
14 | + img { | ||
15 | + width: 100%; | ||
16 | + } | ||
14 | 17 | ||
15 | .apply-title { | 18 | .apply-title { |
16 | font-family: PingFang-SC-Medium, sans-serif; | 19 | font-family: PingFang-SC-Medium, sans-serif; |
@@ -136,8 +139,8 @@ body { | @@ -136,8 +139,8 @@ body { | ||
136 | bottom: 0; | 139 | bottom: 0; |
137 | left: 0; | 140 | left: 0; |
138 | right: 0; | 141 | right: 0; |
139 | - margin: 30px 30px 0; | ||
140 | - padding-bottom: 30px; | 142 | + padding: 30px; |
143 | + background-color: white; | ||
141 | 144 | ||
142 | .agreement { | 145 | .agreement { |
143 | margin-bottom: 28px; | 146 | margin-bottom: 28px; |
-
Please register or login to post a comment