Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop
Showing
3 changed files
with
10 additions
and
6 deletions
@@ -162,7 +162,11 @@ const yoho = { | @@ -162,7 +162,11 @@ const yoho = { | ||
162 | * @param fail 调用失败的回调方法 | 162 | * @param fail 调用失败的回调方法 |
163 | */ | 163 | */ |
164 | goNewPage(args, success, fail) { | 164 | goNewPage(args, success, fail) { |
165 | - if (this.isApp && window.yohoInterface) { | 165 | + if (this.isApp) { |
166 | + if (!window.yohoInterface) { | ||
167 | + return false; | ||
168 | + } | ||
169 | + | ||
166 | window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { | 170 | window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
167 | method: 'go.newPage', | 171 | method: 'go.newPage', |
168 | arguments: args | 172 | arguments: args |
@@ -300,7 +304,7 @@ const yoho = { | @@ -300,7 +304,7 @@ const yoho = { | ||
300 | * @param fail | 304 | * @param fail |
301 | */ | 305 | */ |
302 | updateNavigationBar(args, success, fail) { | 306 | updateNavigationBar(args, success, fail) { |
303 | - if (this.isApp) { | 307 | + if (this.isApp && window.yohoInterface) { |
304 | window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { | 308 | window.yohoInterface.triggerEvent(success || nullFun, fail || nullFun, { |
305 | method: 'update.navigationBarStyle', | 309 | method: 'update.navigationBarStyle', |
306 | arguments: args | 310 | arguments: args |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | </label> | 9 | </label> |
10 | </li> | 10 | </li> |
11 | <li> | 11 | <li> |
12 | - <label>昵称<input class="nickname" v-model='nickname' @input="setNickname" @change="checkNickname"></label> | 12 | + <label>昵称<input class="nickname" v-model='nickname' maxlength="20" @input="setNickname" @change="checkNickname"></label> |
13 | </li> | 13 | </li> |
14 | <li> | 14 | <li> |
15 | <label @click="setAender">性别 | 15 | <label @click="setAender">性别 |
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | yoho.goSetAvatar(); | 54 | yoho.goSetAvatar(); |
55 | }, | 55 | }, |
56 | checkNickname: function() { | 56 | checkNickname: function() { |
57 | - if (!this.nickname) { | 57 | + if (!(this.nickname.trim())) { |
58 | tip('昵称不能为空'); | 58 | tip('昵称不能为空'); |
59 | this.nickname = this.currentval; | 59 | this.nickname = this.currentval; |
60 | return false; | 60 | return false; |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | this.currentval = this.nickname; | 62 | this.currentval = this.nickname; |
63 | }, | 63 | }, |
64 | setNickname: function() { | 64 | setNickname: function() { |
65 | - if (!this.nickname || this.currentval === this.nickname) { | 65 | + if (!(this.nickname.trim()) || this.currentval === this.nickname) { |
66 | return false; | 66 | return false; |
67 | } | 67 | } |
68 | 68 |
@@ -100,7 +100,7 @@ | @@ -100,7 +100,7 @@ | ||
100 | const header = $.extend({}, interceptClick.defaultTitleMap[2]); | 100 | const header = $.extend({}, interceptClick.defaultTitleMap[2]); |
101 | 101 | ||
102 | header.title.des = '订单详情'; | 102 | header.title.des = '订单详情'; |
103 | - yoho.updateNavigationBar({ | 103 | + yohoAPI.updateNavigationBar({ |
104 | header: header | 104 | header: header |
105 | }); | 105 | }); |
106 | }, | 106 | }, |
-
Please register or login to post a comment