Authored by zhangxiaoru

跳转

@@ -138,7 +138,7 @@ @@ -138,7 +138,7 @@
138 138
139 <div class="select-btn"> 139 <div class="select-btn">
140 <span><i class="iconfont pitch select">&#xe60a;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span> 140 <span><i class="iconfont pitch select">&#xe60a;</i>我已阅读并同意遵守YOHO!BUY有货app服务条款</span>
141 - <div class="submit-btn">&nbsp;</div> 141 + <a class="submit-btn" href="">&nbsp;</a>
142 </div> 142 </div>
143 143
144 <input type="hidden" name="app_version" value="{{appVersion}}"> 144 <input type="hidden" name="app_version" value="{{appVersion}}">
@@ -6,6 +6,10 @@ @@ -6,6 +6,10 @@
6 var $ = require('yoho-jquery'); 6 var $ = require('yoho-jquery');
7 var appVersion = $('input[name="app_version"]').val(); 7 var appVersion = $('input[name="app_version"]').val();
8 8
  9 +require('../common');
  10 +var yoho = require('../yoho-app');
  11 +
  12 +
9 $('.pitch').on('click', function() { 13 $('.pitch').on('click', function() {
10 if ($('.pitch').hasClass('select')) { 14 if ($('.pitch').hasClass('select')) {
11 $(this).removeClass('select'); 15 $(this).removeClass('select');
@@ -18,28 +22,16 @@ $('.pitch').on('click', function() { @@ -18,28 +22,16 @@ $('.pitch').on('click', function() {
18 22
19 $('.submit-btn').on('click', function() { 23 $('.submit-btn').on('click', function() {
20 if ($('.pitch').hasClass('select')) { 24 if ($('.pitch').hasClass('select')) {
21 -  
22 if (appVersion === '1') { 25 if (appVersion === '1') {
23 - var param = {  
24 - action: 'go.serviceClause',  
25 - params: {selected: 'Y'}  
26 - };  
27 -  
28 - yoho.goH5('//m.yohobuy.com/passport/reg/password', JSON.stringify(param)  
29 - //location.href = '//m.yohobuy.com/passport/reg/password' + '?openby:yohobuy=' + encodeURIComponent(JSON.stringify(param)); 26 + $(this).attr('href','//m.yohobuy.com/passport/reg/password?openby:yohobuy={"action":"go.productDetail","params":{"selected":"Y"}}');
30 } else { 27 } else {
31 - location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=Y'; 28 + $(this).attr('href','//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=Y');
32 } 29 }
33 } else { 30 } else {
34 if (appVersion === '1') { 31 if (appVersion === '1') {
35 - var param = {  
36 - action: 'go.serviceClause',  
37 - params: {selected: 'N'}  
38 - };  
39 -  
40 - yoho.goH5('//m.yohobuy.com/passport/reg/password', JSON.stringify(param) 32 + $(this).attr('href','//m.yohobuy.com/passport/reg/password?openby:yohobuy={"action":"go.productDetail","params":{"selected":"N"}}');
41 } else { 33 } else {
42 - location.href = '//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=N'; 34 + $(this).attr('href','//m.yohobuy.com/passport/reg/password' + window.location.search + '&selected=N');
43 } 35 }
44 } 36 }
45 }); 37 });
@@ -57,7 +57,7 @@ $btnSure.on('touchstart', function() { @@ -57,7 +57,7 @@ $btnSure.on('touchstart', function() {
57 showErrTip('密码6-20位,请重新输入'); 57 showErrTip('密码6-20位,请重新输入');
58 } else { 58 } else {
59 59
60 - if ($('.pitch').hasClass('secect')) { 60 + if ($('.pitch').hasClass('select')) {
61 $.ajax({ 61 $.ajax({
62 type: 'POST', 62 type: 'POST',
63 url: '/passport/reg/setpassword', 63 url: '/passport/reg/setpassword',
@@ -69,6 +69,7 @@ $btnSure.on('touchstart', function() { @@ -69,6 +69,7 @@ $btnSure.on('touchstart', function() {
69 }, 69 },
70 success: function(data) { 70 success: function(data) {
71 var res = data.data; 71 var res = data.data;
  72 + console.log(data.message)
72 73
73 if (data.code === 200) { 74 if (data.code === 200) {
74 showErrTip('注册成功'); 75 showErrTip('注册成功');
@@ -108,6 +108,7 @@ @@ -108,6 +108,7 @@
108 line-height: 86px; 108 line-height: 86px;
109 color: #fff; 109 color: #fff;
110 border-radius: 6px; 110 border-radius: 6px;
  111 + display: block;
111 } 112 }
112 } 113 }
113 } 114 }