48 lines
1.1 KiB
Vue
48 lines
1.1 KiB
Vue
<template>
|
|
<view class="pages">
|
|
<view v-html="content"></view>
|
|
</view>
|
|
<!-- <s-pages :title="title" class="c0">
|
|
<view v-html="content"></view>
|
|
</s-pages> -->
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ref } from 'vue';
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
import * as api from '@/sheep/api/index/index';
|
|
let title = ref('协议');
|
|
let apiUrl = ref(api.getuseragreement);
|
|
let content = ref();
|
|
let id = ref(0);
|
|
const getData = async () => {
|
|
let res = await apiUrl.value({ id: id.value });
|
|
if (res.code === 0) {
|
|
content.value = res.data.content;
|
|
title.value = res.data.title;
|
|
uni.setNavigationBarTitle({ title: title.value });
|
|
}
|
|
};
|
|
// 显示原生导航栏
|
|
onLoad(async (e) => {
|
|
console.log(e.type);
|
|
id.value = e.type;
|
|
switch (parseInt(e.type)) {
|
|
case 1:
|
|
apiUrl.value = api.getpolicy;
|
|
break;
|
|
case 2:
|
|
apiUrl.value = api.getpolicy;
|
|
break;
|
|
case 4:
|
|
apiUrl.value = api.getpolicy;
|
|
break;
|
|
}
|
|
|
|
getData();
|
|
});
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.pages {
|
|
}
|
|
</style>
|