纸通宝小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

52 lines
2.5 KiB

/**
* Copyright © 2020-present LiuDanYang. All rights Reserved.
*/
import { mGet, mPost } from "./request"
const app = getApp()
const mconfig = {
baseUrl: app.release ? `https://api-client-ztb.qniao.cn` : `http://47.113.118.47:9000`
}
// *******************************************************************账户业务***********************************************************
// /article/save/Article 发文章
const postMoment = (params) => mPost(`/information-center/article/save/Article`, params, mconfig)
// /article/update/Article/{id} 编辑文章
const updateMoment = (id, params) => mPost(`/information-center/article/update/Article/${id}`, params, mconfig)
// /article/get/Article-list/文章列表
const getPreferList = (params) => mGet(`/information-center/article/get/Article-list/`, params, mconfig)
// /article/get/Article-view-list 浏览文章历史列表
const getViewedList = (params) => mGet(`/information-center/article/get/Article-view-list`, params, mconfig)
// /article/delete/Article删除文章
const deleteMoment = (params) => mPost(`/information-center/article/delete/Article`, params, mconfig)
// /article/get/my-Article-list 我的文章列表
const getMyList = (params) => mGet(`/information-center/article/get/my-Article-list`, params, mconfig)
// /article/get/Article-detail/{id} 文章详情
const getMomentDetail = (id) => mGet(`/information-center/article/get/Article-detail/${id}`, null, mconfig)
// /article-reply/get/my-reply-list 我的评论列表
const getReplyList = (params) => mGet(`/information-center/article-reply/get/my-reply-list`, params, mconfig)
// /article-reply/get/reply-list/in/{articleId} 帖子评论列表
const getCommentList = (id, params) => mGet(`/information-center/article-reply/get/reply-list/in/${id}`, params, mconfig)
// /article-reply/like-or-cancel/article 点赞文章
const likeMoment = (params) => mPost(`/information-center/article-reply/like-or-cancel/article`, params, mconfig)
// /article-reply/like-or-cancel/reply 点赞评论
const likeComment = (params) => mPost(`/information-center/article-reply/like-or-cancel/reply`, params, mconfig)
// /article-reply/reply 评论
const commentMoment = (params) => mPost(`/information-center/article-reply/reply`, params, mconfig)
const getCategoryPrice = (params) => mGet(`/information-center/getPaperCategoryPrice`, params, mconfig)
export {
mconfig,
getPreferList,
postMoment,
updateMoment,
getViewedList,
deleteMoment,
getMyList,
getMomentDetail,
getReplyList,
getCommentList,
likeMoment,
likeComment,
commentMoment,
getCategoryPrice
}