import useAxiosApi from '/@/utils/useAxiosApi'; import request from '/@/utils/request'; /** * 账号密码登录 * @returns UseAxiosReturn */ export function loginPassword() { return useAxiosApi(`/api/login`, { method: 'POST', data: { name: '123' }, }); } /** * 上传文件 * @returns UseAxiosReturn */ export const uploadFiles = (param) => useAxiosApi(`/service/sale/sale/upload/file`, { method: 'POST', formData: param, }); /** * 备报修 * @returns UseAxiosReturn */ export const cameraRepair = (param) => useAxiosApi(`/service/sale/customer/cameraRepair`, { method: 'POST', data: param, }); /** * 列表 * @returns UseAxiosReturn */ export function repairList(params) { return request({ url: '/service/sale/customer/getRepairByOpenId', method: 'get', data: params, params, }); } /** * 工单详情 * @returns UseAxiosReturn */ export const repairDetails = (repairId) => useAxiosApi(`/service/sale/repairInfo/details`, { method: 'GET', params: { repairId }, }); /** * 工单流程 * @returns UseAxiosReturn */ export const repairProcess = (repairId) => useAxiosApi(`/service/sale/repairInfo/process`, { method: 'GET', params: { repairId }, }); /** * 确认维修 * @returns UseAxiosReturn */ // export const confirmRepair = (param) => // useAxiosApi(`/service/sale/customer/confirmRepair`, { // method: 'POST', // data: param, // }); /** * 确认维修 * @returns UseAxiosReturn */ // export const commentApi = (param) => // useAxiosApi(`/service/sale/customer/comment`, { // method: 'POST', // data: param, // }); // 注册 export function confirmRepair(params) { return request({ url: '/service/sale/customer/confirmRepair', method: 'post', data: params, }); } // 注册 export function commentApi(params) { return request({ url: '/service/sale/customer/comment', method: 'post', data: params, }); } // 获取用户信息 export function getUserInfo() { return request({ url: '/user/get', method: 'get', }); } // 获取工单收货地址 export function getInvoiceAddress(repairId) { return request({ url: '/service/sale/customer/getInvoiceAddress', method: 'get', params: { repairId }, }); } // 申请开票 export function invoiceApply(params) { return request({ url: '/service/sale/customer/invoiceApply', method: 'post', data: params, }); } // 获取工单收货地址 export function wxLogin(code) { return request({ url: '/service/sale/customer/wxLogin', method: 'get', params: { code }, }); } export interface wxLoginRus { openid: number | string; }