发布通告功能

This commit is contained in:
13405411873 2025-04-15 10:22:11 +08:00
parent 67a047c313
commit e8f94ff68e
5 changed files with 185 additions and 76 deletions

View File

@ -71,6 +71,14 @@ export function myNoticeList(params) {
params: params params: params
}) })
} }
// 通告主查询通告列表
export function myPublishNoticeList(params) {
return request({
url: '/busi/notice/myPublishNoticeList',
method: 'get',
params: params
})
}
// 发布通告 // 发布通告
export function saveNotice(data) { export function saveNotice(data) {
@ -81,6 +89,15 @@ export function saveNotice(data) {
}) })
} }
// 发布通告
export function publishTakeDown(data) {
return request({
url: '/busi/notice/publishTakeDown?noticeId=' + data.noticeId + '&publishTakeDown=' + data
.publishTakeDown,
method: 'post'
})
}
//平台意见反馈 //平台意见反馈
export function uniAddFeedBack(data) { export function uniAddFeedBack(data) {
return request({ return request({

View File

@ -1,6 +1,6 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
baseUrl: 'http://192.168.1.4:8080', baseUrl: 'http://192.168.1.31:8099',
// baseUrl: 'http://localhost:8080', // baseUrl: 'http://localhost:8080',
// 应用信息 // 应用信息
appInfo: { appInfo: {

View File

@ -1,6 +1,9 @@
<template> <template>
<view class="my-notice-item-box-tg"> <view>
<view class="notice-status">报名中</view>
<view class="my-notice-item-box-tg" v-for="(item,index) in dataList">
<view class="notice-status">{{item.reportStatusText}}</view>
<!-- 通告信息 --> <!-- 通告信息 -->
<view class="notice-main-box"> <view class="notice-main-box">
<notice-item :dataObj="item"></notice-item> <notice-item :dataObj="item"></notice-item>
@ -8,77 +11,57 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<view class="opt-button-box"> <view class="opt-button-box">
<!-- 状态为待审核和已审核的可以关闭 --> <!-- 状态为待审核和已审核的可以关闭 -->
<view class="opt-item" v-if="item.approvalStatus=='0' || item.approvalStatus=='1'">关闭</view> <view class="opt-item" v-if="item.approvalStatus!='2'" @click="updateStatus(0,item.id)">关闭</view>
<!-- 状态为已关闭的可以重启 --> <!-- 状态为已关闭的可以重启 -->
<view class="opt-item" v-if="item.approvalStatus=='2'">重启</view> <view class="opt-item" v-if="item.approvalStatus=='2'" @click="updateStatus(1,item.id)">重启</view>
<view class="opt-item" @click="goDetail(item.id)">查看详情</view> <view class="opt-item" @click="goDetail(item.id)">查看详情</view>
<view class="opt-item">发类似</view> <view class="opt-item" @click="publish(item)">发类似</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import noticeItem from '@/pages/components/notice-item.vue' import noticeItem from '@/pages/components/notice-item.vue'
import {
publishTakeDown
} from '@/api/business/notice.js'
export default { export default {
props: {
dataList: {
type: Array,
default: []
}
},
components: { components: {
noticeItem noticeItem
}, },
data() { data() {
return { return {
item: {
"creator": "1",
"createTime": "2025-03-28 15:41:18",
"updater": "1",
"updateTime": "2025-03-28 15:41:18",
"delFlag": "0",
"params": {},
"id": "4797bd2c87bd5c2a480e412f6adb2459",
"userId": 103,
"title": "找小红书达人种草【蓝月亮】洗衣液",
"platformCode": "xiaohongshu",
"province": "河北省",
"city": "唐山市",
"feeDown": 100.00,
"feeUp": null,
"isSelfPrice": 0,
"giftDetail": null,
"giftPrice": null,
"endDate": "2025-03-31",
"brand": "蓝月亮",
"isShowBrand": 1,
"needNum": 100,
"fansDown": 100,
"fansUp": 100000,
"isEligible": 0,
"pic": null,
"collect": null,
"detail": "<p>找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液找小红书达人种草【蓝月亮】洗衣液</p>",
"images": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154103A008.png,/profile/upload/2025/03/28/1_20250328154109A009.png,/profile/upload/2025/03/28/2_20250328154109A010.png,/profile/upload/2025/03/28/3_20250328154109A011.png,/profile/upload/2025/03/28/4_20250328154109A012.png,/profile/upload/2025/03/28/5_20250328154109A013.png",
"bloggerTypes": "洗护,美妆,食品",
"isShowTel": 1,
"wechat": null,
"tel": null,
"groupImage": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154059A007.png",
"isUseCoupon": 0,
"approvalStatus": "1",
"approvalUserId": null,
"approvalTime": null,
"approvalRemark": null,
"similarityIds": null,
"userNickName": "微信用户",
"avatar": "",
"platformName": null,
"isSuper": null,
"signStatus": null,
"mainImage": "/profile/upload/2025/03/28/0306359214743be86f4d8f6dea4e5d0_20250328154103A008.png",
"viewNum": 31,
"reportNum": 0,
"bloggerTypesText": "洗护 美妆 食品",
"approvalUserName": null
}
} }
}, },
methods: { methods: {
publish(item) {
this.$tab.navigateTo('/pages/notice/public-notice?sameId=' + item.id)
},
updateStatus(status, id) {
let data = {
publishTakeDown: status,
noticeId: id
}
publishTakeDown(data).then(res => {
uni.showToast({
icon: 'none',
duration: 1000,
title: '成功'
});
uni.$emit('updateList', {
msg: '页面更新'
})
})
},
/** /**
* 查看详情 * 查看详情
* @param {Object} id * @param {Object} id

View File

@ -26,11 +26,17 @@
</template> </template>
<script> <script>
import {
myPublishNoticeList
} from '@/api/business/notice.js'
import { import {
toast, toast,
hasRights hasRights
} from '@/utils/common.js' } from '@/utils/common.js'
import myNoticeItemTg from '@/pages/components/my-notice-item-tg.vue' import myNoticeItemTg from '@/pages/components/my-notice-item-tg.vue'
import {
getCatgByCode
} from '@/api/system/config.js'
export default { export default {
components: { components: {
myNoticeItemTg myNoticeItemTg
@ -39,8 +45,9 @@
return { return {
menus: ['进行中', '已关闭'], menus: ['进行中', '已关闭'],
menuIndex: 0, menuIndex: 0,
dataList: ['', ''], dataList: [],
queryParams: { queryParams: {
status: '进行中',
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
@ -49,7 +56,61 @@
isTriggered: false isTriggered: false
} }
}, },
mounted() {
this.initData("dl_platform", "platformList")
this.initData("dl_blogger_type", "bloggerTypeList")
this.selectDataList()
let that = this
uni.$on('updateList', function(data) {
that.selectDataList()
})
},
methods: { methods: {
/**
* 查询数据
*/
selectDataList() {
myPublishNoticeList(this.queryParams).then(res => {
this.isTriggered = false
if (res.code == 200) {
if (this.queryParams.pageNum == 1) {
this.dataList = res.data.records
} else {
this.dataList = this.dataList.concat(res.data.records)
}
this.total = res.data.total
}
}).catch((e) => {
this.isTriggered = false
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**
* 初始化数据
* @param {Object} code
* @param {Object} dataObj
*/
initData(code, dataObj) {
let that = this
getCatgByCode({
code: code
}).then(res => {
if (res.code == 200) {
this[dataObj] = res.data
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/** /**
* 菜单点击 * 菜单点击
* @param {Object} index * @param {Object} index
@ -58,7 +119,10 @@
itemClick(index, item) { itemClick(index, item) {
this.menuIndex = index this.menuIndex = index
// //
this.onRefresherrefresh() this.queryParams.status = item
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
}, },
/** /**
* 上滑加载数据 * 上滑加载数据
@ -71,6 +135,7 @@
} }
//+1, //+1,
this.queryParams.pageNum++ this.queryParams.pageNum++
this.selectDataList()
}, },
/** /**
* 下拉刷新数据 * 下拉刷新数据
@ -79,6 +144,7 @@
this.isTriggered = true this.isTriggered = true
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.total = 0 this.total = 0
this.selectDataList()
}, },
/** /**
/** /**

View File

@ -147,7 +147,7 @@
</view> </view>
<view class="item-value"> <view class="item-value">
<uni-data-picker placeholder="请选择" popup-title="请选择收件地址" :localdata="dataTree" <uni-data-picker placeholder="请选择" popup-title="请选择收件地址" :localdata="dataTree"
v-model="dataObj.city" @change="onchange" @nodeclick="onnodeclick" v-model="dataObj.cityId" @change="onchange" @nodeclick="onnodeclick"
@popupopened="onpopupopened" @popupclosed="onpopupclosed"> @popupopened="onpopupopened" @popupclosed="onpopupclosed">
</uni-data-picker> </uni-data-picker>
</view> </view>
@ -216,7 +216,7 @@
{{item}} {{item}}
</view> </view>
<view class="item-value"> <view class="item-value">
<input class="uni-input" type="text" placeholder="请输入" /> <input class="uni-input" disabled type="text" placeholder="请输入" />
</view> </view>
</view> </view>
</view> </view>
@ -258,7 +258,8 @@
treeCity treeCity
} from '@/api/business/base.js' } from '@/api/business/base.js'
import { import {
saveNotice saveNotice,
getNoticeDetail
} from '@/api/business/notice'; } from '@/api/business/notice';
export default { export default {
components: { components: {
@ -346,12 +347,54 @@
} }
}, },
onLoad() { onLoad(params) {
this.initData("dl_platform", 'platFormRange') this.initData("dl_platform", 'platFormRange')
this.initData("dl_blogger_type", "bloggerTypeList") this.initData("dl_blogger_type", "bloggerTypeList")
this.initAddress() this.initAddress()
if (params.sameId) {
this.getSameNotice(params.sameId)
}
}, },
methods: { methods: {
getSameNotice(sameId) {
getNoticeDetail({
noticeId: sameId
}).then(res => {
if (res.code == 200) {
this.dataObj = res.data.noticeDetail
this.dataObj.id = null
if (res.data.noticeDetail.bloggerTypes) {
this.dataObj.bloggerTypesList = res.data.noticeDetail.bloggerTypes.split(",")
}
//
if (this.dataObj.images) {
this.dataObj.images.split(',').forEach(it => {
this.fileList.push({
url: config.baseUrl + it
})
})
}
if (this.dataObj.groupImage) {
this.dataObj.groupImage.split(',').forEach(it => {
this.groupImageList.push({
url: config.baseUrl + it
})
})
}
if (this.dataObj.customForm) {
this.customFieldList = this.dataObj.customForm
}
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
validForm(data) { validForm(data) {
if (!data.title) { if (!data.title) {
uni.showToast({ uni.showToast({