Authored by zhangxiaoru

app

... ... @@ -7,33 +7,77 @@
const headerModel = require('../../../doraemon/models/header'); // 头部model
const privacy = (req, res) => {
res.render('agreement/privacy', {
let parameter = {};
if (!req.yoho.isApp) {
parameter = {
pageHeader: headerModel.setNav({
navTitle: '隐私条款'
})
};
}
res.render('agreement/privacy', Object.assign({
title: '隐私条款',
width750: true
});
}, parameter));
};
const newpower = (req, res) => {
res.render('agreement/newpower', {
let parameter = {};
if (!req.yoho.isApp) {
parameter = {
pageHeader: headerModel.setNav({
navTitle: '关于新力传媒'
})
};
}
res.render('agreement/newpower', Object.assign({
title: '关于新力传媒',
width750: true
});
}, parameter));
};
const aboutYoho = (req, res) => {
res.render('agreement/yohobuy', {
let parameter = {};
if (!req.yoho.isApp) {
parameter = {
pageHeader: headerModel.setNav({
navTitle: '关于YOHO!BUY有货'
})
};
}
res.render('agreement/yohobuy', Object.assign({
title: '关于YOHO!BUY有货',
width750: true
});
}, parameter));
};
const agreement = (req, res) => {
res.render('agreement/agreement', {
let parameter = {};
if (!req.yoho.isApp) {
parameter = {
pageHeader: headerModel.setNav({
navTitle: 'YOHO!BUY有货app服务条款'
}),
};
} else {
parameter = {
app_version: '1'
};
}
res.render('agreement/agreement', Object.assign({
module: 'passport',
title: 'YOHO!BUY有货app服务条款',
page: 'agreement',
title: 'YOHO!BUY有货app服务条款',
width750: true
});
}, parameter));
};
module.exports = {
... ...
... ... @@ -140,4 +140,6 @@
<span><i class="iconfont pitch select">&#xe60a;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span>
<div class="submit-btn">&nbsp;</div>
</div>
<input type="hidden" name="app_version" value="{{appVersion}}">
</div>
\ No newline at end of file
... ...
/**
* 服务协议
* @author: zxr
* @date: 2016/10/27
*/
var $ = require('yoho-jquery');
var appVersion = $('input[name="app_version"]').val();
$('.pitch').on('click', function() {
if ($('.pitch').hasClass('secect')) {
$(this).removeClass('secect');
if ($('.pitch').hasClass('select')) {
console.log('123')
$(this).removeClass('select');
$(this).html('&#xe648;');
} else {
$(this).addClass('secect');
$(this).addClass('select');
$(this).html('&#xe60a;');
}
});
$('.submit-btn').on('click', function() {
if ($('.pitch').hasClass('secect')) {
// location.href = '//m.yohobuy.com/passport/agreement';
} else {
if ($('.pitch').hasClass('select')) {
if(appVersion === '1') {
location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy={"action":"go.serviceClause","params":{"selected":"Y"}}';
}else {
location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search +'&selected=Y';
}
} else {
if(appVersion === '1') {
location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy={"action":"go.serviceClause","params":{"selected":"N"}}';
} else {
location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search +'&selected=N';
}
}
});
... ...
... ... @@ -14,6 +14,10 @@ var tip = require('../../plugin/tip');
var trim = $.trim;
var showErrTip = tip.show;
var qs;
require('../../common');
api.bindEyesEvt({
status: 'open' // 默认眼睛打开
});
... ... @@ -26,6 +30,12 @@ $pwd.bind('input', function() {
}
});
qs = window.queryString;
if (qs.selected && qs.selected === 'N') {
$('.pitch').removeClass('select').html('&#xe648;');
}
$('.pitch').on('click', function() {
if ($('.pitch').hasClass('select')) {
$(this).removeClass('select');
... ... @@ -43,19 +53,9 @@ $btnSure.on('touchstart', function() {
return;
}
// if (!$('.pitch').hasClass('secect')) {
// $('.prompt').show();
// if($('.ensure').on('click', function() {
// }))
// return;
// }
if (api.pwdValidate(pwd) === false) {
showErrTip('密码6-20位,请重新输入');
} else {
console.log(!$('.pitch').hasClass('secect'));
if ($('.pitch').hasClass('secect')) {
$.ajax({
... ... @@ -109,7 +109,8 @@ $btnSure.on('touchstart', function() {
});
$('.deny').on('click', function() {
location.href = '//m.yohobuy.com/passport/agreement';
//console.log('//m.yohobuy.com/passport/agreement' + window.location.search)
location.href = '//m.yohobuy.com/passport/agreement' + window.location.search;
});
}
}
... ...
... ... @@ -183,7 +183,7 @@ body.passport-body {
/*background: #fff;*/
i {
margin-right: 15px;
color: #000;
color: #292929;
}
}
... ...