修改活动详情分享功能接入原生方法

This commit is contained in:
chenruiye
2025-05-28 11:48:11 +08:00
parent 5feb4f305e
commit 86bad54e90

View File

@@ -253,7 +253,14 @@ function genLink(){
hideLoading(layerIndex); hideLoading(layerIndex);
if (res.code == 200) { if (res.code == 200) {
let text = res.data; let text = res.data;
copyText(text); if (browser.ios) {
window.webkit.messageHandlers.showShareAction.postMessage(text);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.showShareAction(text);
}
}
// copyText(text);
// if (navigator.clipboard) { // if (navigator.clipboard) {
// console.log('使用 navigator.clipboard API') // console.log('使用 navigator.clipboard API')
// // 使用 navigator.clipboard API // // 使用 navigator.clipboard API