123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- export const publishMoments = (workMoment) =>
- uni.$u?.http.post(
- "/office/work_moment/add",
- JSON.stringify({
- ...workMoment,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const deleteMoments = (workMomentID) =>
- uni.$u?.http.post(
- "/office/work_moment/del",
- JSON.stringify({
- workMomentID,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const getMomentsByID = (workMomentID) =>
- uni.$u?.http.post(
- "/office/work_moment/get",
- JSON.stringify({
- workMomentID,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const getUserMomentsSplit = (userID, pageNumber, showNumber = 20) =>
- uni.$u?.http.post(
- "/office/work_moment/find/send",
- JSON.stringify({
- userID,
- pagination: {
- showNumber,
- pageNumber,
- },
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const getSelfMomentsSplit = (pageNumber, showNumber = 20) =>
- uni.$u?.http.post(
- "/office/work_moment/find/recv",
- JSON.stringify({
- pagination: {
- showNumber,
- pageNumber,
- },
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const likeMoments = (workMomentID, like) =>
- uni.$u?.http.post(
- "/office/work_moment/like",
- JSON.stringify({
- workMomentID,
- like,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const commentMoments = (workMomentID, content, replyUserID) =>
- uni.$u?.http.post(
- "/office/work_moment/comment/add",
- JSON.stringify({
- workMomentID,
- content,
- replyUserID,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const deleteComment = (workMomentID, commentID) =>
- uni.$u?.http.post(
- "/office/work_moment/comment/del",
- JSON.stringify({
- workMomentID,
- commentID,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const getMomentUnreadCount = () =>
- uni.$u?.http.post(
- "/office/work_moment/unread/count",
- {},
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- // 1:未读数 2:消息列表 3:全部
- export const clearMomentUnreadCount = (type) =>
- uni.$u?.http.post(
- "/office/work_moment/unread/clear",
- JSON.stringify({
- type,
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
- export const getMomentLogs = (pageNumber, showNumber = 20) =>
- uni.$u?.http.post(
- "/office/work_moment/logs",
- JSON.stringify({
- pagination: {
- showNumber,
- pageNumber,
- },
- }),
- {
- header: {
- token: uni.getStorageSync("BusinessToken"),
- },
- },
- );
|