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>
其他页面跳转到到协议页面
- handleMZ() {
- uni.navigateTo({
- url: '/pages/login/agreement?url=' + 文件地址(是html格式的哦)
- })
- }
注意:在微信模拟器上看,是看不到的,只能在手机上看