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')
		})
	},
			
相关推荐
std860213 天前
微软升级Copilot Actions,可对本地文件执行操作
microsoft·copilot
硬汉嵌入式7 天前
专为 MATLAB 优化的 AI 助手MATLAB Copilot
人工智能·matlab·copilot
MicrosoftReactor9 天前
技术速递|GitHub Copilot 和 AI Agent 如何拯救传统系统
人工智能·github·copilot·agent
500佰10 天前
Copilot、Codeium 软件开发领域的代表性工具背后的技术
人工智能·github·gpt-3·copilot·个人开发·xcode
Blossom.11811 天前
AI Agent记忆系统深度实现:从短期记忆到长期人格的演进
人工智能·python·深度学习·算法·决策树·机器学习·copilot
mrsyf19 天前
VSCode中Copilot的询问、编辑、代理有啥区别?
ide·vscode·copilot
诗水人间19 天前
可替代Github Copilot的插件分享CodeGeeX
copilot·ai工具·codegeex
稚麟20 天前
GitHub Copilot CLI: How to get started
github·copilot
wwlsm_zql24 天前
微软Copilot+企业版亮相:GPT-5赋能,效率激增47%,多模态操控金融级安全
人工智能·gpt·microsoft·copilot
不老刘1 个月前
Microsoft 365 Copilot 扩展至应用和工作流构建功能
microsoft·copilot·ai编程