123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- //我的相关:
- const {
- http
- } = uni.$u
- //用户相关
- export const getAfterSaleCon = (params, config = {}) => http.post('/api/users/bindingAfterSale', params, config)
- // 请求首页顶部轮播
- export const getIndexTopPics = (params, config = {}) => http.post('/api/users/bindingAfterSale', params, config)
- // 微信授权登陆
- export const wxAuthLoginReq = (params, config = {}) => http.post('/api/auth/mnplogin', params, config)
- // 获取用户信息
- export const getUserInfoReq = (params, config = {}) => http.get('/api/users/getUserInfo', params, config)
- // 获取用户信息
- export const getActivityDataReq = (params, config = {}) => http.get('/api/getActivityData', params, config)
- // 更新用户信息
- export const updateUserInfoReq = (params, config = {}) => http.post('/api/users/updateUserInfo', params, config)
- // 获取邀请详情页背景图
- export const getInviteDetailBg = (params, config = {}) => http.post('/api/invite/getSharePicTrue', params, config)
- // 更新用户信息
- export const getUserPhone = (params, config = {}) => http.post('/api/invite/getUserPhone', params, config)
- // 更新用户信息
- export const addAward = (params, config = {}) => http.post('/api/invite/addAward', params, config)
- // 首页相关
- // 获取首页配置
- export const getIndexConfigReq = (params, config = {}) => http.post('/api/getHomeData', params, config)
- // 获取首页配置2
- export const getHomeDataNextReq = (params, config = {}) => {
- let apiUrl = '/api/getHomeDataNext'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- export const getActivityDataDetailReq = (params, config = {}) => {
- let apiUrl = '/api/users/getActivityDataDetail'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 订单相关相关
- // 提交订单
- export const postOrderReq = (params, config = {}) => http.post('/api/order/submitOrder', params, config)
- // 获取订单详细
- export const getOrderDetailReq = (params, config = {}) => {
- let apiUrl = '/api/order/getOrderDetail'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 获取商城分类数据
- // export const getMallCatReq = (params, config = {}) => http.get('/api/goods/getClassifyData', params, config)
- export const getMallCatReq = (params, config = {}) => {
- let apiUrl = '/api/goods/getClassifyData'
- if (params) {
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- }
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 获取商城数据
- export const getMallReq = (params, config = {}) => {
- let apiUrl = '/api/goods/getGoodsData'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 获取商城分类数据
- export const getSerDocReq = (params, config = {}) => http.get('/api/server/getServerData', params, config)
- // 获取各个身份的价格百分比
- export const getPricePercentReq = (params, config = {}) => http.get('/api/common/getPriceConfig', params, config)
- // 获取我的售后保障
- export const getSerBackReq = (params, config = {}) => http.get('/api/users/getMyAfterSaleData', params, config)
- // 获取我的服务流程
- export const getSerStepReq = (params, config = {}) => http.get('/api/users/getMyServiceProcess', params, config)
- // 获取我的换新流程
- export const getChangeStepReq = (params, config = {}) => http.get('/api/users/getRenewFlow', params, config)
- // 获取我的售后商品
- export const getSerBackGoodsReq = (params, config = {}) => {
- let apiUrl = '/api/users/getMyAfterSaleGoods'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- //获取我的售后联系
- export const getSerBackConReq = (params, config = {}) => http.get('/api/users/getMyAfterSaleContact', params, config)
- // 提交邀请
- export const postInviteReq = (params, config = {}) => http.post('/api/invite/submitInviteData', params, config)
- //获取我的邀请
- export const getMyInviteReq = (params, config = {}) => {
- let apiUrl = '/api/invite/getMyInviteData'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 添加邀请
- export const addInviteReq = (params, config = {}) => http.post('/api/invite/addInvite', params, config)
- // 添加收藏
- export const addCollReq = (params, config = {}) => http.post('/api/users/addCollect', params, config)
- // 取消收藏
- export const cancelCollReq = (params, config = {}) => http.post('/api/users/cancelCollect', params, config)
- export const getGoodsPriceReq = (params, config = {}) => http.post('/api/goods/getGoodsPrice', params, config)
- //获取服务文档
- export const getServerDataReq = (params, config = {}) => http.get('/api/server/getServerData', params, config)
- // 提交反馈
- export const submitFeedbackReq = (params, config = {}) => http.post('/api/users/submitFeedback', params, config)
- //获取兑奖信息
- export const getAwardDataReq = (params, config = {}) => http.get('/api/users/getAwardData', params, config)
- export const getConfigTextByTypeReq = (params, config = {}) => {
- let apiUrl = '/api/common/getConfigTextByType'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- // 提交反馈
- export const getWxQrCodeReq = (params, config = {}) => http.post('/api/common/getWxQrCode', params, config)
- export const getConfigTextByIdReq = (params, config = {}) => {
- let apiUrl = '/api/common/getConfigTextById'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
- export const getMyGoodsDetailReq = (params, config = {}) => {
- let apiUrl = '/api/goods/getGoodsDetail'
- Object.keys(params).forEach((item, index) => {
- if (index == 0) {
- apiUrl += `?${item}=${params[item]}`
- } else {
- apiUrl += `&${item}=${params[item]}`
- }
- })
- console.log('处理后的apiUrl', apiUrl);
- return http.get(apiUrl, params, config)
- }
|