2022-09-08 10:58:17 +00:00
|
|
|
<template>
|
2022-09-09 00:35:24 +00:00
|
|
|
<view class="">
|
2022-09-09 01:06:21 +00:00
|
|
|
<u-parse :html="agreementContent"></u-parse>
|
2022-09-08 10:58:17 +00:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
2022-09-09 00:35:24 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { reactive, ref } from 'vue'
|
2022-09-09 01:06:21 +00:00
|
|
|
import { onLoad } from "@dcloudio/uni-app";
|
2022-09-09 00:35:24 +00:00
|
|
|
import { AgreementEnum } from '@/enums/agreementEnums'
|
2022-09-09 01:06:21 +00:00
|
|
|
import { getPolicy } from '@/api/app'
|
2022-09-09 00:35:24 +00:00
|
|
|
|
2022-09-09 01:06:21 +00:00
|
|
|
let agreementType = ref('') // 协议类型
|
|
|
|
|
let agreementContent = ref('') // 协议内容
|
|
|
|
|
|
|
|
|
|
const getData = async (type) => {
|
|
|
|
|
let res = await getPolicy({ type })
|
|
|
|
|
console.log(res, 'res')
|
|
|
|
|
|
|
|
|
|
agreementContent.value = res.content
|
|
|
|
|
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: res.name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onLoad((options: any) => {
|
2022-09-09 01:18:31 +00:00
|
|
|
if(options.type) {
|
|
|
|
|
agreementType = options.type
|
|
|
|
|
getData(agreementType)
|
|
|
|
|
}
|
2022-09-09 01:06:21 +00:00
|
|
|
})
|
2022-09-08 10:58:17 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
</style>
|