【uniapp】View protocol documents

agreement.vue

<template>
	<view class="agreement">
		<!-- 协议页面 ,只能在手机上看,模拟器无法查看-->
		<web-view :src="protocolUrl"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				protocolUrl: ''
			}
		},
		onLoad: function(options) {
			this.protocolUrl = decodeURIComponent(options.url);
		}
	}
</script>

Other pages jump to the agreement page

handleMZ() {
				uni.navigateTo({
					url: '/pages/login/agreement?url=' + 文件地址(是html格式的哦)
				})
			}

Note: You cannot view it on the WeChat simulator, you can only view it on your mobile phone.

Guess you like

Origin blog.csdn.net/Qxn530/article/details/133634665