培训文档,文档资料代码优化
This commit is contained in:
@ -34,6 +34,21 @@ export const myMixins = {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
goH5Detail(item){//h5传参到app文档资料,培训文档
|
||||
let data = {
|
||||
"action": "goTraining",
|
||||
"params": {
|
||||
"id": item.id,
|
||||
}
|
||||
};
|
||||
let u = navigator.userAgent;
|
||||
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("articleId=" + item.id);
|
||||
}
|
||||
},
|
||||
h5GoBack(){
|
||||
this.$router.back();
|
||||
},
|
||||
|
Reference in New Issue
Block a user