<template> <view class="flex-col page"> <text class="self-center text">预约须知</text> <view class="flex-col self-stretch group"> <rich-text :nodes="noticeRichText"></rich-text> </view> <view @click="closeBookingTips" class="flex-col justify-start items-center self-stretch text-wrapper"> <text class="text_2">我知道了</text> </view> </view> </template> <script setup> import emitter from '../../../utils/emitter'; import { onLoad,onShow } from "@dcloudio/uni-app"; import { getFonts } from '../../../common/globalFont'; import { baseUrl } from '../../../api/request'; import { onMounted,ref } from 'vue'; const cookie = wx.getStorageSync('cookie') const noticeRichText = ref('') onMounted(()=>{ getNotice() }) onShow(()=>{ getNotice() }) onLoad(() => { getFonts() }) const getNotice = async () => { const res = await uni.request({ url: baseUrl + '/global/query/notice', method: 'GET', header: { cookie } }) // console.log('富文本--->',res.data.data); if(res.data.code === 1) { noticeRichText.value = res.data.data } } const closeBookingTips = () => { emitter.emit('closeBookingTips') } </script> <style scoped lang="scss"> .page { padding: 41.67rpx 62.5rpx; background-color: #ffffff; border-radius: 41.1rpx; box-shadow: 0rpx 8.33rpx 8.33rpx #32323261; width: 100%; overflow-y: auto; overflow-x: hidden; height: 100%; } .text { color: #323232; font-size: 37.5rpx; font-family: FangZhengFonts; line-height: 34.42rpx; } .group { margin-top: 33.33rpx; } .font { font-size: 29.17rpx; font-family: FangZhengFonts; line-height: 35.42rpx; color: #323232; } .text-wrapper { margin: 50rpx 20.83rpx 0 4.17rpx; padding: 25rpx 0; background-color: #e79ea1; border-radius: 83.33rpx; } .text_2 { color: #ffffff; font-size: 33.33rpx; font-family: FangZhengFonts; line-height: 32.17rpx; } @import url(../../../common/css/global.css); </style>