uniapp 微信小程序 内嵌H5网页办法

uniapp 微信小程序 内嵌H5网页办法

如图所示

1.新建webView页面

html 复制代码
<template>
	<web-view v-if='httpUrl' :src='httpUrl'></web-view>
</template>

<script>
	export default {
		data() {
			return {
				httpUrl: "",
			};
		},
		onLoad(options) {
			options.httpUrl = decodeURIComponent(options.httpUrl);
			this.httpUrl = options.httpUrl;
		},
		methods: {},
	};
</script>

<style>
</style>

2.跳转页面

javascript 复制代码
// 页面跳转
	toPage(url) {
		uni.navigateTo({
			url: '/pages/PageWebview?httpUrl=' + encodeURIComponent('https://www.baidu.com')
		})
	},
			
相关推荐
老胖闲聊1 小时前
Python Copilot【代码辅助工具】 简介
开发语言·python·copilot
宝桥南山15 小时前
Microsoft Copilot Studio - 尝试一下Agent
microsoft·ai·微软·copilot·rpa·low-code
sooth200816 小时前
Mac版Visual Studio Code Copilot 无法使用的解决方法
copilot
MarkHD1 天前
AI编程助手入门指南:GitHub Copilot、Cursor与Claude的安装与基础使用
github·copilot·ai编程
Leinwin4 天前
微软Build 2025:Copilot Studio升级,解锁多智能体协作未来
microsoft·copilot
蚂蚁数据AntData4 天前
⼤模型驱动的DeepInsight Copilot在蚂蚁的技术实践
大数据·人工智能·数据分析·copilot·数据库架构
jmsail4 天前
Dynamics 365 Business Central AI Sales Order Agent Copilot
人工智能·microsoft·copilot·dynamics 365·d365 bc erp
金木讲编程9 天前
GitHub Copilot 使用手册与原理解析
github·copilot·ai编程
不老刘14 天前
左手腾讯CodeBuddy 、华为通义灵码,右手微软Copilot,旁边还有个Cursor,程序员幸福指数越来越高了
copilot·cursor·codebuddy
星释14 天前
阿里云 OS Copilot 使用指南
阿里云·云计算·copilot