No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- <template>
- <view class="agreement-page">
- <!-- #ifdef H5 -->
- <view class="txt" v-html="detail.content"></view>
- <!-- #endif -->
- <!-- #ifndef H5 -->
- <rich-text class="txt" :nodes="detail.content || ''"></rich-text>
- <!-- #endif -->
- </view>
- </template>
-
- <script setup>
- import { ref } from 'vue'
- import { onLoad } from '@dcloudio/uni-app'
- import { commonApi } from '@/api/index.js'
-
- const detail = ref({})
-
- onLoad((options) => {
- getHtmlInfo(options.key)
- })
-
- async function getHtmlInfo(key) {
- try {
- const res = await commonApi.getHtml({ key })
- detail.value = res.data || {}
- if (res.data && res.data.title) {
- uni.setNavigationBarTitle({ title: res.data.title })
- }
- } catch (e) {
- // 忽略
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .agreement-page {
- padding: 30rpx;
- .txt {
- line-height: 1.6;
- font-size: 28rpx;
- color: $ai-text;
- }
- }
- </style>
|