8 changed files with 120 additions and 36 deletions
Unified View
Diff Options
-
20pages/api/article.js
-
50pages/api/moment.js
-
2pages/api/user.js
-
20pages/api/ztb.js
-
2pages/article/list/index.js
-
16pages/home/index/index.js
-
24pages/index/index.js
-
22pages/login/index.js
@ -1,20 +0,0 @@ |
|||||
/** |
|
||||
* Copyright © 2020-present LiuDanYang. All rights Reserved. |
|
||||
*/ |
|
||||
import { mGet, mPost } from "./request" |
|
||||
const app = getApp() |
|
||||
|
|
||||
const aconfig = { |
|
||||
baseUrl: app.release ? `https://psc.qniao.cn` : `http://psc-dev.qniao.cn` |
|
||||
} |
|
||||
// *******************************************************************账户业务***********************************************************
|
|
||||
// /credit/get/self-enterprise-credit-by-enterprise-id查看个人的采购额度
|
|
||||
const getCreditInfo = (params) => mGet(`/payment-settlement-center/credit/get/self-enterprise-credit-by-enterprise-id`, params, aconfig) |
|
||||
|
|
||||
const paymentInfo = (params) => mPost(`/payment-settlement-center/pay`, params, aconfig) |
|
||||
|
|
||||
export { |
|
||||
aconfig, |
|
||||
getCreditInfo, |
|
||||
paymentInfo |
|
||||
} |
|
||||
@ -0,0 +1,50 @@ |
|||||
|
/** |
||||
|
* Copyright © 2020-present LiuDanYang. All rights Reserved. |
||||
|
*/ |
||||
|
import { mGet, mPost } from "./request" |
||||
|
const app = getApp() |
||||
|
|
||||
|
const mconfig = { |
||||
|
baseUrl: app.release ? `https://psc.qniao.cn` : `http://psc-dev.qniao.cn` |
||||
|
} |
||||
|
// *******************************************************************账户业务***********************************************************
|
||||
|
// /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}`, params, 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) => 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) |
||||
|
|
||||
|
export { |
||||
|
mconfig, |
||||
|
getPreferList, |
||||
|
postMoment, |
||||
|
updateMoment, |
||||
|
getViewedList, |
||||
|
deleteMoment, |
||||
|
getMyList, |
||||
|
getMomentDetail, |
||||
|
getReplyList, |
||||
|
getCommentList, |
||||
|
likeMoment, |
||||
|
likeComment, |
||||
|
commentMoment |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
/** |
||||
|
* Copyright © 2020-present LiuDanYang. All rights Reserved. |
||||
|
*/ |
||||
|
import { mGet, mPost } from "./request" |
||||
|
const app = getApp() |
||||
|
|
||||
|
const zconfig = { |
||||
|
baseUrl: app.release ? `https://api-client-ztb.qniao.cn` : `https://api-client-ztb-dev.qniao.cn` |
||||
|
} |
||||
|
// *******************************************************************账户业务***********************************************************
|
||||
|
// /authorize/get/product-line-token/by/login-token通过登录token获取产品线token
|
||||
|
const loginToken = (params) => mPost(`/recycle-user-center/authorize/get/product-line-token/by/login-token`, params, zconfig) |
||||
|
///user/get/base-info基本信息
|
||||
|
const getBaseInfo = () => mGet(`/recycle-user-center/user/get/base-info`, null, zconfig) |
||||
|
|
||||
|
export { |
||||
|
zconfig, |
||||
|
loginToken, |
||||
|
getBaseInfo |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save