文档资料h5
This commit is contained in:
@ -79,16 +79,21 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
goH5Detail(item){
|
||||
// 定义要传递的参数
|
||||
let params = {
|
||||
id: item.id
|
||||
let data = {
|
||||
"action": "goTraining",
|
||||
"params": {
|
||||
"id": item.id,
|
||||
}
|
||||
};
|
||||
// 调用 App 提供的原生方法,并传递参数
|
||||
let u = navigator.userAgent;
|
||||
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if (window.MyAppBridge) {
|
||||
window.MyAppBridge.postMessage(JSON.stringify(params));
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.MyAppBridge.postMessage(JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
// let url = (process.env.NODE_ENV === 'production' ? 'http://crm1.sino-assist.com': 'http://www.sinoassist.com'),
|
||||
// console.log(item)
|
||||
// window.location.href = `http://crm1.sino-assist.com/res/training/training.html?id=${item.id}&source=supplierApp&supplierId=${this.supplierId}&userId=${this.userId}`;
|
||||
},
|
||||
onRefresh() {
|
||||
|
Reference in New Issue
Block a user