const { http } = uni.$u export const buildPic = (params, config = {}) => http.post('/api/buildPicTrue', params, config) export const getImage = (params, config = {}) => http.post('/api/getImage', params, config) // 微信授权登陆 export const wxAuthLoginReq = (params, config = {}) => http.post('/api/auth/mnplogin', params, config) // export const pushFile = (params, config = {}) => http.post('/api/checkAndUploadImg', params, config) // 创建任务 export const createTask = (params, config = {}) => http.post('/api/createTask', params, config) // 任务列表 export const taskList = (params, config = {}) => http.get('/api/getTaskList', params, config) export const getUserInfo = (params, config = {}) => http.get('/api/getUserInfo', params, config) // 获取AI模型 // export const getAiModal = (params, config = {}) => http.get('/api/getUserInfo', params, config) // export const getAiModel = (params, config = {}) => http.get('/api/getAiModel', params, config) export const getAiModel = (params, config = {}) => { let apiUrl = '/api/getAiModel' 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) }