# Conflicts:
#	config.js
This commit is contained in:
PQZ 2025-04-15 10:32:12 +08:00
commit 3ce0c6034a
4 changed files with 183 additions and 74 deletions

View File

@ -71,6 +71,14 @@ export function myNoticeList(params) {
params: params
})
}
// 通告主查询通告列表
export function myPublishNoticeList(params) {
return request({
url: '/busi/notice/myPublishNoticeList',
method: 'get',
params: params
})
}
// 发布通告
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) {
return request({
@ -97,4 +114,4 @@ export function feedbackList(params) {
method: 'get',
params: params
})
}
}

View File

@ -1,84 +1,67 @@
<template>
<view class="my-notice-item-box-tg">
<view class="notice-status">报名中</view>
<!-- 通告信息 -->
<view class="notice-main-box">
<notice-item :dataObj="item"></notice-item>
</view>
<!-- 操作按钮 -->
<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'">重启</view>
<view class="opt-item" @click="goDetail(item.id)">查看详情</view>
<view class="opt-item">发类似</view>
<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">
<notice-item :dataObj="item"></notice-item>
</view>
<!-- 操作按钮 -->
<view class="opt-button-box">
<!-- 状态为待审核和已审核的可以关闭 -->
<view class="opt-item" v-if="item.approvalStatus!='2'" @click="updateStatus(0,item.id)">关闭</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="publish(item)">发类似</view>
</view>
</view>
</view>
</template>
<script>
import noticeItem from '@/pages/components/notice-item.vue'
import {
publishTakeDown
} from '@/api/business/notice.js'
export default {
props: {
dataList: {
type: Array,
default: []
}
},
components: {
noticeItem
},
data() {
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: {
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
@ -167,4 +150,4 @@
}
}
}
</style>
</style>

View File

@ -26,11 +26,17 @@
</template>
<script>
import {
myPublishNoticeList
} from '@/api/business/notice.js'
import {
toast,
hasRights
} from '@/utils/common.js'
import myNoticeItemTg from '@/pages/components/my-notice-item-tg.vue'
import {
getCatgByCode
} from '@/api/system/config.js'
export default {
components: {
myNoticeItemTg
@ -39,8 +45,9 @@
return {
menus: ['进行中', '已关闭'],
menuIndex: 0,
dataList: ['', ''],
dataList: [],
queryParams: {
status: '进行中',
pageNum: 1,
pageSize: 10,
},
@ -49,7 +56,61 @@
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: {
/**
* 查询数据
*/
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
@ -58,7 +119,10 @@
itemClick(index, item) {
this.menuIndex = index
//
this.onRefresherrefresh()
this.queryParams.status = item
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
/**
* 上滑加载数据
@ -71,6 +135,7 @@
}
//+1,
this.queryParams.pageNum++
this.selectDataList()
},
/**
* 下拉刷新数据
@ -79,6 +144,7 @@
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
this.selectDataList()
},
/**
/**
@ -155,4 +221,4 @@
}
}
}
</style>
</style>

View File

@ -147,7 +147,7 @@
</view>
<view class="item-value">
<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">
</uni-data-picker>
</view>
@ -216,7 +216,7 @@
{{item}}
</view>
<view class="item-value">
<input class="uni-input" type="text" placeholder="请输入" />
<input class="uni-input" disabled type="text" placeholder="请输入" />
</view>
</view>
</view>
@ -258,7 +258,8 @@
treeCity
} from '@/api/business/base.js'
import {
saveNotice
saveNotice,
getNoticeDetail
} from '@/api/business/notice';
export default {
components: {
@ -346,12 +347,54 @@
}
},
onLoad() {
onLoad(params) {
this.initData("dl_platform", 'platFormRange')
this.initData("dl_blogger_type", "bloggerTypeList")
this.initAddress()
if (params.sameId) {
this.getSameNotice(params.sameId)
}
},
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) {
if (!data.title) {
uni.showToast({