Commit 3db4339a authored by mengcuiguang's avatar mengcuiguang

代码优化

parent b1889043
...@@ -39,28 +39,7 @@ ...@@ -39,28 +39,7 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
} }
,{ ],
"path": "uni_modules/uni-pay/pages/success/success",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "支付成功"
}
}
,{
"path": "uni_modules/uni-pay/pages/ad-interactive-webview/ad-interactive-webview",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "ad"
}
}
,{
"path": "uni_modules/uni-pay/pages/pay-desk/pay-desk",
"style": {
"backgroundColor": "#F8F8F8",
"navigationBarTitleText": "收银台"
}
}
],
// 分包配置 // 分包配置
"subPackages": [{ "subPackages": [{
"root": "pagesA", "root": "pagesA",
...@@ -232,7 +211,7 @@ ...@@ -232,7 +211,7 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
}, { }, {
"path": "alipay/alipay", "path": "h5alipay/h5alipay",
"style": { "style": {
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarTitleText": "支付宝支付", "navigationBarTitleText": "支付宝支付",
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
pid: vipBean.pid pid: vipBean.pid
}).then(data => { }).then(data => {
// openUrl(data.params.params) // openUrl(data.params.params)
navigateTo(`/pagesD/alipay/alipay?url=`+data.params.params) navigateTo(`/pagesD/h5alipay/h5alipay?url=`+data.params.params)
}) })
.catch((err) => { .catch((err) => {
message.notify(err) message.notify(err)
......
<template>
<view class="container">
<!-- 使用 web-view 组件加载包含表单的 HTML 内容 -->
<web-view :src="formUrl" @message="handleWebViewMessage"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
formUrl: ''
};
},
onLoad(options) {
// 将 HTML 内容转换为 base64 编码的 URL
const base64Html = btoa(unescape(encodeURIComponent(options.url)));
this.formUrl = `data:text/html;base64,${base64Html}`;
},
methods: {
handleWebViewMessage(e) {
// 处理 web-view 传递过来的消息,可根据实际需求添加逻辑
console.log('Received message from web-view:', e.detail.data);
}
}
};
</script>
<style scoped>
.container {
width: 100%;
height: 100%;
}
web-view {
width: 100%;
height: 100%;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment