| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- //我的相关:
- const {
- http
- } = uni.$u
- //测试接口
- export const login = (params, config = {}) => http.post('/auth/mini_program', params, config)
- export const getUserInfo = (params, config = {}) => http.get('/user/info', params, config)
- export const updateUserInfo = (params, config = {}) => http.post('/user/update', params, config)
- export const getTuijian = (params, config = {}) => http.get('/user/myShare', params, config)
- export const getChargeRecord = (params, config = {}) => http.get('/user/myOrderList', params, config)
- export const getConsumerRecord = (params, config = {}) => http.get('/user/myConsumeList', params, config)
- // export const getJingxuan = (params, config = {}) => http.get('/getHandpick', params, config)
- export const getJingxuan = (params, config = {}) => {
- let apiUrl = '/getHandpick'
- 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 getRoleparmas = (params, config = {}) => http.get('/user/myRoleList', params, config)
- export const postTask = (params, config = {}) => http.post('/ai/submitTask', params, config)
- // export const getGenRes = (params, config = {}) => http.get('/ai/getTaskDetail', params, config)
- export const getGenRes = (params, config = {}) => {
- let apiUrl = '/ai/getTaskDetail'
- 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 getbanner = (params, config = {}) => http.get('/banner', params, config)
- export const getyonghu = (params, config = {}) => http.get('/agreement', params, config)
- export const getyinsi = (params, config = {}) => http.get('/privacy', params, config)
- // 暂无接口--隐私协议
- export const getabout = (params, config = {}) => http.get('/privacy', params, config)
- // export const genPdf = (params, config = {}) => http.post('/ai/generate_pdf', params, config)
- export const genPdf = (params, config = {}) => {
- let apiUrl = '/ai/downloadPdf'
- 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 postZhaomu = (params, config = {}) => http.post('/user/applyShare', params, config)
- export const payConfig = (params, config = {}) => http.get('/payConfig', params, config)
- // 下单接口待实现
- export const submitOrder = (params, config = {}) => http.post('/user/recharge/create/order', params, config)
- export const getTeam = (params, config = {}) => http.get('/user/myTeam', params, config)
- export const getYongjinList = (params, config = {}) => http.get('/user/myGiveaway', params, config)
- export const userWithdraw = (params, config = {}) => http.post('/user/userWithdraw', params, config)
- export const cashList = (params, config = {}) => http.get('/user/userWithdrawList', params, config)
- export const getKefu = (params, config = {}) => http.get('/getServiceConfig', params, config)
- export const addTeam = (params, config = {}) => http.post('/user/userWithdraw', params, config)
- export const getCode = (params, config = {}) => http.get('/user/getUserRqCode', params, config)
- export const getPosterBg = (params, config = {}) => {
- let apiUrl = '/getConfigByKey'
- 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)
- }
|