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