Authored by ccbikai

add goSetAvatar

... ... @@ -250,6 +250,23 @@ const yoho = {
},
/**
* 跳转到设置头像
* @param args {""}
* @param success
* @param fail
*/
goSetAvatar(args, success, fail) {
if (this.isApp) {
window.yohoInterface.triggerEvent(success || function() {}, fail || function() {}, {
method: 'go.setAvatar',
arguments: args
});
} else {
tip(tipInfo);
}
},
/**
* 原生调用 JS 方法
* @param name 方法名
* @param callback 回调
... ...
... ... @@ -13,6 +13,7 @@
<button class="button" @click='yoho.goShare({"title":"标题","des":"描述","img":"http://7xwj52.com1.z0.glb.clouddn.com/brandbg.jpg","url":"http://m.yohoblk.com"})'>分享</button>
<button class="button" @click='yoho.goSearch()'>搜索</button>
<button class="button" @click='yoho.goSetting()'>设置</button>
<button class="button" @click='yoho.goSetAvatar()'>toux</button>
</template>
<style>
body {
... ...