Authored by zhangxiaoru

跳转

... ... @@ -138,7 +138,7 @@
<div class="select-btn">
<span><i class="iconfont pitch select">&#xe60a;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span>
<div class="submit-btn">&nbsp;</div>
<a class="submit-btn" href="">&nbsp;</a>
</div>
<input type="hidden" name="app_version" value="{{appVersion}}">
... ...
... ... @@ -6,6 +6,10 @@
var $ = require('yoho-jquery');
var appVersion = $('input[name="app_version"]').val();
require('../common');
var yoho = require('../yoho-app');
$('.pitch').on('click', function() {
if ($('.pitch').hasClass('select')) {
$(this).removeClass('select');
... ... @@ -18,28 +22,16 @@ $('.pitch').on('click', function() {
$('.submit-btn').on('click', function() {
if ($('.pitch').hasClass('select')) {
if (appVersion === '1') {
var param = {
action: 'go.serviceClause',
params: {selected: 'Y'}
};
yoho.goH5('//m.yohobuy.com/passport/reg/password', JSON.stringify(param)
//location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy=' + encodeURIComponent(JSON.stringify(param));
$(this).attr('href','//m.yohobuy.com/passport/reg/password?openby:yohobuy={"action":"go.productDetail","params":{"selected":"Y"}}');
} else {
location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=Y';
$(this).attr('href','//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=Y');
}
} else {
if (appVersion === '1') {
var param = {
action: 'go.serviceClause',
params: {selected: 'N'}
};
yoho.goH5('//m.yohobuy.com/passport/reg/password', JSON.stringify(param)
$(this).attr('href','//m.yohobuy.com/passport/reg/password?openby:yohobuy={"action":"go.productDetail","params":{"selected":"N"}}');
} else {
location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=N';
$(this).attr('href','//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=N');
}
}
});
... ...
... ... @@ -57,7 +57,7 @@ $btnSure.on('touchstart', function() {
showErrTip('密码6-20位,请重新输入');
} else {
if ($('.pitch').hasClass('secect')) {
if ($('.pitch').hasClass('select')) {
$.ajax({
type: 'POST',
url: '/passport/reg/setpassword',
... ... @@ -69,6 +69,7 @@ $btnSure.on('touchstart', function() {
},
success: function(data) {
var res = data.data;
console.log(data.message)
if (data.code === 200) {
showErrTip('注册成功');
... ...
... ... @@ -108,6 +108,7 @@
line-height: 86px;
color: #fff;
border-radius: 6px;
display: block;
}
}
}
... ...