init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<view class="pages">
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
let url = ref('http://8.136.55.200:1080/#/pages/index/user_agreement');
|
||||
let title = ref('用户协议');
|
||||
// 显示原生导航栏
|
||||
onLoad(async (e) => {
|
||||
if (e.type == 1) {
|
||||
url.value = 'http://8.136.55.200:1080/#/pages/index/user_agreement';
|
||||
title.value = '用户协议';
|
||||
} else {
|
||||
url.value = 'http://8.136.55.200:1080/#/pages/index/privacy_agreement';
|
||||
title.value = '隐私政策';
|
||||
}
|
||||
uni.setNavigationBarTitle({ title: title.value });
|
||||
console.log(url.value);
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.pages {
|
||||
margin-top: -100rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user