Showing
2 changed files
with
18 additions
and
0 deletions
@@ -250,6 +250,23 @@ const yoho = { | @@ -250,6 +250,23 @@ const yoho = { | ||
250 | }, | 250 | }, |
251 | 251 | ||
252 | /** | 252 | /** |
253 | + * 跳转到设置头像 | ||
254 | + * @param args {""} | ||
255 | + * @param success | ||
256 | + * @param fail | ||
257 | + */ | ||
258 | + goSetAvatar(args, success, fail) { | ||
259 | + if (this.isApp) { | ||
260 | + window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, { | ||
261 | + method: 'go.setAvatar', | ||
262 | + arguments: args | ||
263 | + }); | ||
264 | + } else { | ||
265 | + tip(tipInfo); | ||
266 | + } | ||
267 | + }, | ||
268 | + | ||
269 | + /** | ||
253 | * 原生调用 JS 方法 | 270 | * 原生调用 JS 方法 |
254 | * @param name 方法名 | 271 | * @param name 方法名 |
255 | * @param callback 回调 | 272 | * @param callback 回调 |
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | <button class="button" @click='yoho.goShare({"title":"标题","des":"描述","img":"http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg","url":"http://m.yohoblk.com"})'>分享</button> | 13 | <button class="button" @click='yoho.goShare({"title":"标题","des":"描述","img":"http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg","url":"http://m.yohoblk.com"})'>分享</button> |
14 | <button class="button" @click='yoho.goSearch()'>搜索</button> | 14 | <button class="button" @click='yoho.goSearch()'>搜索</button> |
15 | <button class="button" @click='yoho.goSetting()'>设置</button> | 15 | <button class="button" @click='yoho.goSetting()'>设置</button> |
16 | + <button class="button" @click='yoho.goSetAvatar()'>toux</button> | ||
16 | </template> | 17 | </template> |
17 | <style> | 18 | <style> |
18 | body { | 19 | body { |
-
Please register or login to post a comment