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')
		})
	},
			
相关推荐
copilot中国版12 小时前
Copilot + Excel鱼骨图:让根因分析从“凭经验”变成“有依据”
人工智能·excel·copilot
迅易科技15 小时前
微软Copilot最新升级解读:哪些变化真正影响企业数字化建设?
人工智能·microsoft·copilot
xhy_07072 天前
AI 编程工具怎么选?Cursor、Copilot、Claude Code、Trae、WES Code 理解代码库的三条技术路线
人工智能·机器学习·copilot·知识图谱·ai编程·wes code
leoZ2313 天前
第 34 篇 Copilot 与嵌入式 AI:把能力缝进工作流
人工智能·大模型·copilot·agent
可乐ea3 天前
用 /create-canvas 给 Copilot 搭一块共享画布:自定义工作流实战
copilot·ai智能体·人机协作·agent开发·githubcopilot·工作流自动化
@呱呱爱学习3 天前
2026年09月28日 | 呱呱AI日报】GitHub 发布 Copilot WSL 教程,介绍在 Ubuntu 中运行编程 Agent
人工智能·github·copilot
MicrosoftReactor9 天前
技术速递|GitHub Copilot App 入门指南:使用 Diff、终端和浏览器
ai·copilot·agent
copilot中国版10 天前
copilot PPT「一键复刻旧模板」如何使用
copilot
Web极客码11 天前
抵御隐蔽的慢速连接攻击:我用 Claude 编写 nftables 规则,精准压制 HTTP Slo
服务器·copilot
copilot中国版14 天前
Word Copilot|一键提取文档关键信息,告别逐字阅读
word·copilot