feat: 优化消息互动中心与首页Banner呈现,同步全量业务数据与高清图标
这个提交包含在:
@@ -5,12 +5,46 @@
|
||||
import { get, post } from '../utils/request.js'
|
||||
|
||||
export const messageApi = {
|
||||
/** 消息列表(type: system / interact) */
|
||||
/**
|
||||
* 消息列表
|
||||
* @param {Object} params { type?: string, page?: number, size?: number }
|
||||
* @returns {Promise<Object>} 分页列表数据
|
||||
*/
|
||||
list: (params = {}) => get('/message/list', params, { silent: true }),
|
||||
/** 未读消息数(首页角标) → { count } */
|
||||
|
||||
/**
|
||||
* 未读消息数(首页角标)
|
||||
* @returns {Promise<Object>} { count: number }
|
||||
*/
|
||||
unreadCount: () => get('/message/unread-count', {}, { silent: true }),
|
||||
/** 标记已读 */
|
||||
|
||||
/**
|
||||
* 标记单条已读
|
||||
* @param {number|string} id 消息ID
|
||||
* @returns {Promise<Object>} { read: boolean }
|
||||
*/
|
||||
read: (id) => post(`/message/${id}/read`, {}, { silent: true }),
|
||||
|
||||
/**
|
||||
* 一键全部已读
|
||||
* @param {Object} params { type?: string }
|
||||
* @returns {Promise<Object>} { success: boolean, affected: number }
|
||||
*/
|
||||
readAll: (params = {}) => post('/message/read-all', params),
|
||||
|
||||
/**
|
||||
* 一键清理消息
|
||||
* @param {Object} params { type?: string }
|
||||
* @returns {Promise<Object>} { success: boolean, affected: number }
|
||||
*/
|
||||
clear: (params = {}) => post('/message/clear', params),
|
||||
|
||||
/**
|
||||
* 删除单条消息
|
||||
* @param {number|string} id 消息ID
|
||||
* @returns {Promise<Object>} { success: boolean }
|
||||
*/
|
||||
delete: (id) => post(`/message/${id}/delete`, {}),
|
||||
}
|
||||
|
||||
export default messageApi
|
||||
|
||||
@@ -14,9 +14,9 @@ export const BANNER_ART = ['banner-art-1.png', 'banner-art-2.png', 'banner-art-3
|
||||
|
||||
/** 内置生态绿渐变(1/2/3 号,取自 uni.scss 主色家族),后台未配置颜色时按位置取用 */
|
||||
export const BANNER_BG = [
|
||||
'linear-gradient(105deg, #00e070 0%, #00c860 42%, #046b3b 100%)',
|
||||
'linear-gradient(105deg, #00d96c 0%, #00b85c 40%, #023a21 100%)',
|
||||
'linear-gradient(105deg, #00e878 0%, #049e52 45%, #045c34 100%)',
|
||||
'linear-gradient(105deg, #00d26a 0%, #10b981 50%, #34d399 100%)',
|
||||
'linear-gradient(105deg, #10b981 0%, #34d399 50%, #6ee7b7 100%)',
|
||||
'linear-gradient(105deg, #059669 0%, #10b981 50%, #34d399 100%)',
|
||||
]
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,9 +24,9 @@ export const datasets = {
|
||||
|
||||
/** 首页轮播广告位(color 为生态绿家族渐变,image 为空时前端用「绿底 + 白色插画」内置配图) */
|
||||
banners: [
|
||||
{ id: 1, title: '同城好物节 · 二手直降', image: '', link: '/pages/category/channel?categoryId=3', color: 'linear-gradient(105deg, #00e070 0%, #00c860 42%, #046b3b 100%)' },
|
||||
{ id: 2, title: '招聘旺季 · 免费发布', image: '', link: '/pages/post/create', color: 'linear-gradient(105deg, #00d96c 0%, #00b85c 40%, #023a21 100%)' },
|
||||
{ id: 3, title: '本地服务 · 上门更省心', image: '', link: '/pages/category/channel?categoryId=5', color: 'linear-gradient(105deg, #00e878 0%, #049e52 45%, #045c34 100%)' },
|
||||
{ id: 1, title: '同城好物节 · 二手直降', image: '/static/banners/banner-1.png', link: '/pages/category/channel?categoryId=3', color: 'linear-gradient(105deg, #10b981 0%, #34d399 50%, #a7f3d0 100%)' },
|
||||
{ id: 2, title: '招聘旺季 · 免费发布', image: '/static/banners/banner-2.png', link: '/pages/post/create', color: 'linear-gradient(105deg, #059669 0%, #10b981 50%, #6ee7b7 100%)' },
|
||||
{ id: 3, title: '本地服务 · 上门更省心', image: '/static/banners/banner-3.png', link: '/pages/category/channel?categoryId=5', color: 'linear-gradient(105deg, #00d26a 0%, #34d399 50%, #bbf7d0 100%)' },
|
||||
],
|
||||
|
||||
/** 分类导航 */
|
||||
|
||||
在新工单中引用
屏蔽一个用户