From 2b257a59cd200a2d9b2dfc60e2a4d8bc79833ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=8A=E9=87=8C?= <1227971437@qq.com> Date: Thu, 15 Apr 2021 21:29:38 +0800 Subject: [PATCH] open banner --- pages/grid/grid.vue | 14 +++++++------- pages/list/detail.vue | 4 ++-- .../components/uni-popup-share/uni-popup-share.vue | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pages/grid/grid.vue b/pages/grid/grid.vue index 279d4d7..1f0f3c9 100644 --- a/pages/grid/grid.vue +++ b/pages/grid/grid.vue @@ -170,13 +170,13 @@ */ clickBannerItem(item) { // 有外部链接-跳转url - if (item.open_url) { - //#ifdef APP-PLUS - plus.runtime.openWeb(item.open_url); - //#endif - //#ifdef H5 - window.open(item.open_url) - //#endif + if (item.open_url) { + uni.navigateTo({ + url: '/pages/common/webview/webview?url='+item.open_url+'&title='+item.title, + success: res => {}, + fail: () => {}, + complete: () => {} + }); } // 其余业务处理 }, diff --git a/pages/list/detail.vue b/pages/list/detail.vue index 16873a2..a42a29e 100644 --- a/pages/list/detail.vue +++ b/pages/list/detail.vue @@ -157,7 +157,7 @@ //#ifdef APP-PLUS if(item.name == 'more'){ - // "其他"选项 + // "复制链接"选项 uni.setClipboardData({ data: 'http://uniapp.dcloud.io/', success: function () { @@ -169,7 +169,7 @@ }); } else { uni.share({ - provider: "weixin", + provider: item.name, scene: "WXSceneSession", type: 0, href: "http://uniapp.dcloud.io/", diff --git a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue index dbd3fbf..7383a5c 100644 --- a/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue +++ b/uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue @@ -31,7 +31,7 @@ bottomData: [{ text: '微信', icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png', - name: 'wx' + name: 'weixin' }, { text: 'QQ', @@ -41,12 +41,12 @@ { text: '新浪', icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png', - name: 'sina' + name: 'sinaweibo' }, { text: '复制链接', icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png', - name: 'more' + name: 'copy' } ] } -- GitLab