Showing
5 changed files
with
90 additions
and
27 deletions
@@ -7,33 +7,77 @@ | @@ -7,33 +7,77 @@ | ||
7 | const headerModel = require('../../../doraemon/models/header'); // 头部model | 7 | const headerModel = require('../../../doraemon/models/header'); // 头部model |
8 | 8 | ||
9 | const privacy = (req, res) => { | 9 | const privacy = (req, res) => { |
10 | - res.render('agreement/privacy', { | 10 | + let parameter = {}; |
11 | + | ||
12 | + if (!req.yoho.isApp) { | ||
13 | + parameter = { | ||
14 | + pageHeader: headerModel.setNav({ | ||
15 | + navTitle: '隐私条款' | ||
16 | + }) | ||
17 | + }; | ||
18 | + } | ||
19 | + | ||
20 | + res.render('agreement/privacy', Object.assign({ | ||
11 | title: '隐私条款', | 21 | title: '隐私条款', |
12 | width750: true | 22 | width750: true |
13 | - }); | 23 | + }, parameter)); |
14 | }; | 24 | }; |
15 | 25 | ||
16 | const newpower = (req, res) => { | 26 | const newpower = (req, res) => { |
17 | - res.render('agreement/newpower', { | 27 | + let parameter = {}; |
28 | + | ||
29 | + if (!req.yoho.isApp) { | ||
30 | + parameter = { | ||
31 | + pageHeader: headerModel.setNav({ | ||
32 | + navTitle: '关于新力传媒' | ||
33 | + }) | ||
34 | + }; | ||
35 | + } | ||
36 | + | ||
37 | + res.render('agreement/newpower', Object.assign({ | ||
18 | title: '关于新力传媒', | 38 | title: '关于新力传媒', |
19 | width750: true | 39 | width750: true |
20 | - }); | 40 | + }, parameter)); |
21 | }; | 41 | }; |
22 | 42 | ||
23 | const aboutYoho = (req, res) => { | 43 | const aboutYoho = (req, res) => { |
24 | - res.render('agreement/yohobuy', { | 44 | + let parameter = {}; |
45 | + | ||
46 | + if (!req.yoho.isApp) { | ||
47 | + parameter = { | ||
48 | + pageHeader: headerModel.setNav({ | ||
49 | + navTitle: '关于YOHO!BUY有货' | ||
50 | + }) | ||
51 | + }; | ||
52 | + } | ||
53 | + | ||
54 | + res.render('agreement/yohobuy', Object.assign({ | ||
25 | title: '关于YOHO!BUY有货', | 55 | title: '关于YOHO!BUY有货', |
26 | width750: true | 56 | width750: true |
27 | - }); | 57 | + }, parameter)); |
28 | }; | 58 | }; |
29 | 59 | ||
30 | const agreement = (req, res) => { | 60 | const agreement = (req, res) => { |
31 | - res.render('agreement/agreement', { | 61 | + let parameter = {}; |
62 | + | ||
63 | + if (!req.yoho.isApp) { | ||
64 | + parameter = { | ||
65 | + pageHeader: headerModel.setNav({ | ||
66 | + navTitle: 'YOHO!BUY有货app服务条款' | ||
67 | + }), | ||
68 | + }; | ||
69 | + } else { | ||
70 | + parameter = { | ||
71 | + app_version: '1' | ||
72 | + }; | ||
73 | + } | ||
74 | + | ||
75 | + res.render('agreement/agreement', Object.assign({ | ||
32 | module: 'passport', | 76 | module: 'passport', |
33 | - title: 'YOHO!BUY有货app服务条款', | ||
34 | page: 'agreement', | 77 | page: 'agreement', |
78 | + title: 'YOHO!BUY有货app服务条款', | ||
35 | width750: true | 79 | width750: true |
36 | - }); | 80 | + }, parameter)); |
37 | }; | 81 | }; |
38 | 82 | ||
39 | module.exports = { | 83 | module.exports = { |
@@ -140,4 +140,6 @@ | @@ -140,4 +140,6 @@ | ||
140 | <span><i class="iconfont pitch select"></i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span> | 140 | <span><i class="iconfont pitch select"></i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span> |
141 | <div class="submit-btn">提 交</div> | 141 | <div class="submit-btn">提 交</div> |
142 | </div> | 142 | </div> |
143 | + | ||
144 | + <input type="hidden" name="app_version" value="{{appVersion}}"> | ||
143 | </div> | 145 | </div> |
1 | +/** | ||
2 | + * 服务协议 | ||
3 | + * @author: zxr | ||
4 | + * @date: 2016/10/27 | ||
5 | + */ | ||
1 | var $ = require('yoho-jquery'); | 6 | var $ = require('yoho-jquery'); |
7 | +var appVersion = $('input[name="app_version"]').val(); | ||
2 | 8 | ||
3 | $('.pitch').on('click', function() { | 9 | $('.pitch').on('click', function() { |
4 | - if ($('.pitch').hasClass('secect')) { | ||
5 | - $(this).removeClass('secect'); | 10 | + if ($('.pitch').hasClass('select')) { |
11 | + console.log('123') | ||
12 | + $(this).removeClass('select'); | ||
6 | $(this).html(''); | 13 | $(this).html(''); |
7 | } else { | 14 | } else { |
8 | - $(this).addClass('secect'); | 15 | + $(this).addClass('select'); |
9 | $(this).html(''); | 16 | $(this).html(''); |
10 | } | 17 | } |
11 | }); | 18 | }); |
12 | 19 | ||
13 | $('.submit-btn').on('click', function() { | 20 | $('.submit-btn').on('click', function() { |
14 | - if ($('.pitch').hasClass('secect')) { | ||
15 | - // location.href = '//m.yohobuy.com/passport/agreement'; | ||
16 | - } else { | 21 | + if ($('.pitch').hasClass('select')) { |
17 | 22 | ||
23 | + if(appVersion === '1') { | ||
24 | + location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy={"action":"go.serviceClause","params":{"selected":"Y"}}'; | ||
25 | + }else { | ||
26 | + location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search +'&selected=Y'; | ||
27 | + } | ||
28 | + } else { | ||
29 | + if(appVersion === '1') { | ||
30 | + location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy={"action":"go.serviceClause","params":{"selected":"N"}}'; | ||
31 | + } else { | ||
32 | + location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search +'&selected=N'; | ||
33 | + } | ||
18 | } | 34 | } |
19 | }); | 35 | }); |
@@ -14,6 +14,10 @@ var tip = require('../../plugin/tip'); | @@ -14,6 +14,10 @@ var tip = require('../../plugin/tip'); | ||
14 | var trim = $.trim; | 14 | var trim = $.trim; |
15 | var showErrTip = tip.show; | 15 | var showErrTip = tip.show; |
16 | 16 | ||
17 | +var qs; | ||
18 | + | ||
19 | +require('../../common'); | ||
20 | + | ||
17 | api.bindEyesEvt({ | 21 | api.bindEyesEvt({ |
18 | status: 'open' // 默认眼睛打开 | 22 | status: 'open' // 默认眼睛打开 |
19 | }); | 23 | }); |
@@ -26,6 +30,12 @@ $pwd.bind('input', function() { | @@ -26,6 +30,12 @@ $pwd.bind('input', function() { | ||
26 | } | 30 | } |
27 | }); | 31 | }); |
28 | 32 | ||
33 | +qs = window.queryString; | ||
34 | + | ||
35 | +if (qs.selected && qs.selected === 'N') { | ||
36 | + $('.pitch').removeClass('select').html(''); | ||
37 | +} | ||
38 | + | ||
29 | $('.pitch').on('click', function() { | 39 | $('.pitch').on('click', function() { |
30 | if ($('.pitch').hasClass('select')) { | 40 | if ($('.pitch').hasClass('select')) { |
31 | $(this).removeClass('select'); | 41 | $(this).removeClass('select'); |
@@ -43,19 +53,9 @@ $btnSure.on('touchstart', function() { | @@ -43,19 +53,9 @@ $btnSure.on('touchstart', function() { | ||
43 | return; | 53 | return; |
44 | } | 54 | } |
45 | 55 | ||
46 | - // if (!$('.pitch').hasClass('secect')) { | ||
47 | - // $('.prompt').show(); | ||
48 | - | ||
49 | - // if($('.ensure').on('click', function() { | ||
50 | - | ||
51 | - // })) | ||
52 | - // return; | ||
53 | - // } | ||
54 | - | ||
55 | if (api.pwdValidate(pwd) === false) { | 56 | if (api.pwdValidate(pwd) === false) { |
56 | showErrTip('密码6-20位,请重新输入'); | 57 | showErrTip('密码6-20位,请重新输入'); |
57 | } else { | 58 | } else { |
58 | - console.log(!$('.pitch').hasClass('secect')); | ||
59 | 59 | ||
60 | if ($('.pitch').hasClass('secect')) { | 60 | if ($('.pitch').hasClass('secect')) { |
61 | $.ajax({ | 61 | $.ajax({ |
@@ -109,7 +109,8 @@ $btnSure.on('touchstart', function() { | @@ -109,7 +109,8 @@ $btnSure.on('touchstart', function() { | ||
109 | }); | 109 | }); |
110 | 110 | ||
111 | $('.deny').on('click', function() { | 111 | $('.deny').on('click', function() { |
112 | - location.href = '//m.yohobuy.com/passport/agreement'; | 112 | + //console.log('//m.yohobuy.com/passport/agreement' + window.location.search) |
113 | + location.href = '//m.yohobuy.com/passport/agreement' + window.location.search; | ||
113 | }); | 114 | }); |
114 | } | 115 | } |
115 | } | 116 | } |
-
Please register or login to post a comment