对接公告以及详情接口
This commit is contained in:
@@ -5,25 +5,22 @@
|
||||
<!-- 文章标题 -->
|
||||
<view class="article-header">
|
||||
<view class="article-title">
|
||||
以实干担当不断开创中国特色大国外交新局面
|
||||
{{noticeDetail.noticeTitle}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 作者和日期 -->
|
||||
<view class="notice-meta">
|
||||
<view class="notice-author">
|
||||
<text class="author-name">张三</text>
|
||||
<text class="author-name">{{noticeDetail.author}}</text>
|
||||
<text class="separator">·</text>
|
||||
<text class="publish-time">2026.3.6</text>
|
||||
<text class="publish-time">{{noticeDetail.publishTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 文章内容 -->
|
||||
<view class="article-content">
|
||||
<view class="paragraph">
|
||||
学习贯彻习近平新时代中国特色社会主义思想主题教育开展以来,外交外事战线认真学习贯彻习近平总书记重要讲话精神和党中央部署要求,
|
||||
全面准确把握目标要求,紧密联系实际,精心组织、周密部署,紧密结合外交中心工作开展主题教育,
|
||||
坚持学思用贯通、知信行统一,把习近平新时代中国特色社会主义思想转化为坚定理想、锤炼党性和指导实践、
|
||||
推动工作的强大力量,以实干担当不断开创中国特色大国外交新局面。
|
||||
{{noticeDetail.noticeContent}}
|
||||
</view>
|
||||
<view class="articleimg">
|
||||
<image src="http://47.104.199.163:9090/images/home/notice-1.png" mode="" style="width: 100%;height: 100%;border-radius: 20rpx;"></image>
|
||||
@@ -76,13 +73,44 @@
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import {getNoticeDetails} from '../api/api.js'
|
||||
|
||||
const isLoading = ref(false)
|
||||
const noticeDetail = ref({})
|
||||
const currentNoticeId = ref('') // 接收公告跳转的id
|
||||
|
||||
// =====方法====
|
||||
onLoad((options) =>{
|
||||
console.log('options',options.id)
|
||||
currentNoticeId.value = options?.id
|
||||
// console.log('currentNoticeId',currentNoticeId.value)
|
||||
if(currentNoticeId.value){
|
||||
getDetailsData(currentNoticeId.value)
|
||||
}
|
||||
|
||||
// console.log('currentNoticeId',currentNoticeId.value)
|
||||
})
|
||||
// 获取详情数据
|
||||
const getDetailsData = async (noticeId) =>{
|
||||
|
||||
try{
|
||||
const res = await getNoticeDetails(noticeId)
|
||||
if(res.code === 200){
|
||||
noticeDetail.value = res.data || {}
|
||||
uni.$emit('noticeRead',{
|
||||
noticeId:noticeId,
|
||||
readStatus:noticeDetail.value.readStatus
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}catch(err){
|
||||
uni.showToast({
|
||||
title:"加载失败",
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user