develoop
fwb 2 months ago
parent f6465a8fb4
commit f5727c361c
  1. 2
      src/api/user/news.js
  2. 2
      src/views/message/components/sendMessage.vue
  3. 2
      src/views/message/index.vue
  4. 26
      src/views/news/components/newsContentManage.vue
  5. 7
      src/views/news/index.vue

@ -32,10 +32,12 @@ export function queryEssay(category_id) {
return request.get(`/api/cms-essay/query?category_id=${category_id}`);
}
//添加新闻文章
// export function addEssay(params){
// const str = parseParams(params)
// return request.post(`/api/cms-essay/add${str}`)
// }
export function addEssay(params) {
return request.post(`/api/cms-essay/add`, params);
}

@ -23,7 +23,7 @@
<div class="message-content" @click="handleClick(item)">
<h2 class="message-title">{{item.title}}</h2>
<div class="message-details">
<div>收件人:<span class="sender" v-for="o in item.receiveUsers" :key="o.id">{{o.receiverName}}</span></div>
<div>收件人:<span class="sender" v-for="receive in item.receiveUsers" :key="receive.id">{{receive.receiverName}}</span></div>
<span class="read-status">阅读人数{{item.readUserNum}}</span>
</div>
<div class="message-time">发送时间{{item.sendTime}}</div>

@ -160,7 +160,7 @@ const deleteMessage = async (id: any) => {
}
//
const readMessage = async (id:any) =>{
console.log(id,userStore.data.id,'dddddd')
// console.log(id,userStore.data.id,'dddddd')
await readMessagesBatch({
messageIds:id,
userId:userStore.data.id

@ -47,7 +47,7 @@
<el-card class="container">
<template #header>
<div class="card-header">
<span>栏目添加新闻信息</span>
<span>添加当前栏目新闻信息</span>
</div>
</template>
<!-- 栏目内添加新闻-->
@ -60,7 +60,7 @@
</el-form-item>
<el-form-item label="文章内容" label-width="120px">
<textarea style="width: 100%;
height:320px;
height:375px;
border: 2px solid #d3d3d3;"
v-model="newsForm.content"
></textarea>
@ -75,9 +75,9 @@
<!-- <el-form-item label="发布时间" label-width="140px">-->
<!-- <el-input v-model="newsForm.publishTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="浏览次数" label-width="120px">
<el-input v-model="newsForm.readingNumber" autocomplete="off" />
</el-form-item>
<!-- <el-form-item label="浏览次数" label-width="120px">-->
<!-- <el-input v-model="newsForm.readingNumber" autocomplete="off" />-->
<!-- </el-form-item>-->
<el-form-item label="发布状态" label-width="120px">
<el-input v-model="newsForm.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
</el-form-item>
@ -88,7 +88,8 @@
<!-- <el-input v-model="newsForm.updateTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="当前用户id" label-width="120px">
<el-input v-model="newsForm.userId" autocomplete="off" readonly disabled/>
<!-- <el-input v-model="newsForm.userId" autocomplete="off" readonly disabled/>-->
<el-input v-model="newsForm.userId" autocomplete="off" readonly/>
</el-form-item>
</el-form>
<template #footer>
@ -166,7 +167,7 @@
<el-input v-model="nowTimeNewsData.categoryId" autocomplete="off" readonly disabled/>
</el-form-item>
<el-form-item label="文章内容" label-width="140px">
<textarea style="width: 100%;height: 300px" v-model="nowTimeNewsData.content"></textarea>
<textarea style="width: 100%;height: 450px;border: 1px solid #d3d3d3;" v-model="nowTimeNewsData.content"></textarea>
<!-- <el-input class="brief_text" type="textarea" /> -->
</el-form-item>
<!-- <el-form-item label="文章文件" label-width="140px">-->
@ -181,9 +182,9 @@
<!-- <el-form-item label="发布时间" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.publishTime" autocomplete="off" type="date"/>-->
<!-- </el-form-item>-->
<el-form-item label="浏览次数" label-width="140px">
<el-input v-model="nowTimeNewsData.readingNumber" autocomplete="off" />
</el-form-item>
<!-- <el-form-item label="浏览次数" label-width="140px">-->
<!-- <el-input v-model="nowTimeNewsData.readingNumber" autocomplete="off" />-->
<!-- </el-form-item>-->
<el-form-item label="发布状态" label-width="140px">
<el-input v-model="nowTimeNewsData.status" placeholder="1:已发布 2:未发布" autocomplete="off" />
</el-form-item>
@ -256,7 +257,7 @@ const addNewsButton = (item)=>{
nowCategoryName.value = item.categoryName
}
const nowTimeNewsData = ref({})
console.log(userStore.data,'当前用户数据')
//
const newViews = (listObject)=> {
nowTimeNewsData.value = { ...listObject }
@ -380,6 +381,7 @@ const newsForm = ref({
title:'',
updateTime:'',
userId:userStore.data.id,
nickName:userStore.data.nickName
})
//
const addNewsContentConfirm = async (id)=>{
@ -408,7 +410,7 @@ const aboutContent = async (essay_id)=>{
aboutContentDrawer.value = true
const responseEssay = await queryEssayById('1')
aboutEssay.value = responseEssay.data
console.log(aboutEssay.value,'关于我们文章')
// console.log(aboutEssay.value,'')
}
//
const editConfirm =async ()=>{

@ -15,7 +15,7 @@
<template #dropdown>
<el-dropdown-menu>
<ul>
<li class="flex-container" @click="newViews(listObject)" v-for="listObject in essay" style="margin-bottom: 15px">
<li class="flex-container" @click="newViews(listObject)" v-for="listObject in essay">
<el-dropdown-item>
<el-tag type="info" size="large" style="height: 30px;font-size: 15px">
<p >{{listObject.title}}</p>
@ -41,7 +41,7 @@
<el-card shadow="hover">
<div class="news-flex-container">
<p>发布人{{ nowTimeNewsData.userId }}</p>
<p>阅读数量{{ nowTimeNewsData.readingNumber }}</p>
<!-- <p>阅读数量{{ nowTimeNewsData.readingNumber }}</p>-->
<p>发布日期{{ nowTimeNewsData.publishTime }}</p>
<p>更新时间{{nowTimeNewsData.updateTime}}</p>
</div>
@ -74,7 +74,6 @@ const column =ref([])
const CategoryList = async () => {
const res = await queryCategory()
column.value = res.data
console.log('栏目数组长度:',column.value.length)
//
if (column.value.length > 0) {
await EssayList(column.value[0].id);
@ -88,7 +87,7 @@ onMounted(() => {
})
const essay = ref([])
const nowTimeNewsData = ref({})
console.log(nowTimeNewsData,'dsdsd')
//
const EssayList = async (id)=>{
const response = await queryEssay(id)

Loading…
Cancel
Save