<web-view src='{{src}}'></web-view>
src: `https://XXXXXX,
onLoad(options) {
this.srcFun(options)
},
srcFun(options){
if (options.urlPathNew) {
let url=`https://XXX/caseOrder?classicId=${options.urlPathNew}`
this.setData({
src:url
})
}
},
onShareAppMessage(options) {
const h5Url = options.webViewUrl;
const matchResult = h5Url.match(/classicId=(\d+)/);
let srcPath='/pages/caseH5/case'
if (matchResult && matchResult.length > 1) {
classicIdValue = matchResult[1];
srcPath=`/pages/caseH5/case?urlPathNew=${classicIdValue}`
} else {
console.log("未找到 classicId");
}
return{
title: "分享成功",
path: srcPath,
imageUrl:'/assets/share.png'
}
}