From 6f358f85fc78226220c202d4e48a3d806c7dd84e Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Wed, 1 Nov 2023 11:24:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ewebview=20=E8=A7=86=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 8 ++++++++ pages/paySuccess/paySuccess.vue | 36 +++++++++++++++++++++++++++++---- pages/webview/webview.vue | 23 +++++++++++++++++++++ 3 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 pages/webview/webview.vue diff --git a/pages.json b/pages.json index a19fae3..a2ad930 100644 --- a/pages.json +++ b/pages.json @@ -151,6 +151,14 @@ "navigationBarTitleText" : "", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/webview/webview", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false + } } ], "globalStyle": { diff --git a/pages/paySuccess/paySuccess.vue b/pages/paySuccess/paySuccess.vue index d45ce10..8f6ed61 100644 --- a/pages/paySuccess/paySuccess.vue +++ b/pages/paySuccess/paySuccess.vue @@ -93,8 +93,23 @@ }, // 专网地址 zwdz(){ - const zwurl="http://10.24.4.14" - window.location.href=zwurl + let zwurl="http://10.24.4.14" + // 弹窗告诉用户去登录 + uni.showModal({ + title: '提示', + content: '即将打开链接:'+zwurl, + success: res => { + if(res.confirm){ + // uni.navigateTo({ + // url:zwurl + // }) + this.$navTo("pages/webview/webview?url="+zwurl) + // window.location.href=zwurl + } + + } + }) + //window.location.href=zwurl }, // 跳转到登录页 @@ -126,7 +141,8 @@ //下载 downapp(){ - const durl =""; + + let durl ="https://whreg.xingtongworld.com/"; //默认h5 //判断当前设备,切换到相应位置 var u = navigator.userAgent; if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机 @@ -138,8 +154,20 @@ } else if (u.indexOf('Windows Phone') > -1) {//winphone手机 //alert('这是 windows Phone') } + // 弹窗告诉用户 + uni.showModal({ + title: '提示', + content: '即将打开链接:'+durl, + // showCancel: false, + success: res => { + if (res.confirm) { + this.$navTo("pages/webview/webview?url="+durl) + } + } + }) + // this.$router.push(durl) // - window.location.href=durl + // window.location.href=durl }, //提交成功 diff --git a/pages/webview/webview.vue b/pages/webview/webview.vue new file mode 100644 index 0000000..81647d8 --- /dev/null +++ b/pages/webview/webview.vue @@ -0,0 +1,23 @@ + + + + +