const baseUrl = require('../base').allBaseUrl.GDEnvs.host import { httpRequest } from '../../utils/request' import { wxInfo, mpInfo, miniProgramVersion } from '../../utils/getUserInfo' // 获取首页数据 export const apiGetHome = () => { return httpRequest.post(`${baseUrl}/lt-web/xs/xcx/yj/wxUser/index`, {}) } // 去借款 export const apiGoBorrow = (data: any) => { return httpRequest.post(`${baseUrl}/lt-web/xs/xcx/common/wxUser/goBorrow`, data) } // 查询多账号用户列表 export const apiActIsMulPhones = (data: any) => { return httpRequest.post(`${baseUrl}/lt-web/xs/app/act/isMulPhones`, data) } // 确认切换账号为主号 export const apiActChangeAccount = (data: any) => { return httpRequest.post(`${baseUrl}/lt-web/xs/app/act/changeAccount`, data) } // 排查问题log export const apiProblemLog = (data: object) => { try { const user_info = wx.getStorageSync('user_info') if (user_info.phone) { Object.assign(data, { userName: user_info.phone }) } Object.assign(data, { osVersion: wxInfo.version, // 操作系统版本 opt: mpInfo.miniProgram.envVersion, // 操作 appVersion: miniProgramVersion // app版本 }) } catch (e) { console.log('获取首页接口catch:', e) } return httpRequest.post(`${baseUrl}/lt-web/xs/user/front/problem`, data) }