需要开发 IM
This commit is contained in:
38
components/app-article-detail/app-article-detail.vue
Normal file
38
components/app-article-detail/app-article-detail.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<script setup>
|
||||
import { getArticleDetail } from '@/api'
|
||||
import { onMounted, ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
/** 文章类型
|
||||
* user_rights: 用户权益
|
||||
* privacy_policy: 隐私政策
|
||||
* company_info: 公司介绍
|
||||
*/
|
||||
type: {
|
||||
type: String,
|
||||
default: 'user_rights'
|
||||
}
|
||||
})
|
||||
|
||||
const articleDetails = ref('')
|
||||
const getData = async () => {
|
||||
const res = await getArticleDetail(props.type)
|
||||
articleDetails.value = res.data.articleDetails
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getData()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="app-article-detail">
|
||||
<mp-html :content="articleDetails"></mp-html>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-article-detail {
|
||||
padding: 32rpx 24rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user