浏览代码

feat: bug

tangning 2 年之前
父节点
当前提交
329a89afc6
共有 1 个文件被更改,包括 37 次插入38 次删除
  1. 37 38
      src/api/index.ts

+ 37 - 38
src/api/index.ts

@@ -1,5 +1,5 @@
 import useAxiosApi from '/@/utils/useAxiosApi';
-import request from "/@/utils/request";
+import request from '/@/utils/request';
 
 /**
  * 账号密码登录
@@ -16,8 +16,8 @@ export function loginPassword() {
  * 上传文件
  * @returns UseAxiosReturn
  */
- export const uploadFiles = (param) =>
-   useAxiosApi(`/service/sale/sale/upload/file`, {
+export const uploadFiles = (param) =>
+  useAxiosApi(`/service/sale/sale/upload/file`, {
     method: 'POST',
     formData: param,
   });
@@ -26,8 +26,8 @@ export function loginPassword() {
  * 备报修
  * @returns UseAxiosReturn
  */
- export const cameraRepair = (param) =>
-   useAxiosApi(`/service/sale/customer/cameraRepair`, {
+export const cameraRepair = (param) =>
+  useAxiosApi(`/service/sale/customer/cameraRepair`, {
     method: 'POST',
     data: param,
   });
@@ -38,59 +38,58 @@ export function loginPassword() {
  */
 export function repairList(params) {
   return request({
-    url: "/service/sale/customer/getRepairByOpenId",
-    method: "get",
+    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},
-});
+export const repairDetails = (repairId) =>
+  useAxiosApi(`/service/sale/repairInfo/details`, {
+    method: 'GET',
+    params: { repairId },
+  });
 
 /**
  * 工单流程
  * @returns UseAxiosReturn
  */
- export const repairProcess = (repairId) =>
-   useAxiosApi(`/service/sale/repairInfo/process`, {
+export const repairProcess = (repairId) =>
+  useAxiosApi(`/service/sale/repairInfo/process`, {
     method: 'GET',
-    params:{repairId},
+    params: { repairId },
   });
-  
+
 /**
  * 确认维修
  * @returns UseAxiosReturn
  */
 //  export const confirmRepair = (param) =>
 //  useAxiosApi(`/service/sale/customer/confirmRepair`, {
-//   method: 'POST',    
+//   method: 'POST',
 //   data: param,
 // });
 
-  
 /**
  * 确认维修
  * @returns UseAxiosReturn
  */
 //  export const commentApi = (param) =>
 //  useAxiosApi(`/service/sale/customer/comment`, {
-//   method: 'POST',    
+//   method: 'POST',
 //   data: param,
 // });
 
 // 注册
 export function confirmRepair(params) {
   return request({
-    url: "/service/sale/customer/confirmRepair",
-    method: "post",
+    url: '/service/sale/customer/confirmRepair',
+    method: 'post',
     data: params,
   });
 }
@@ -98,8 +97,8 @@ export function confirmRepair(params) {
 // 注册
 export function commentApi(params) {
   return request({
-    url: "/service/sale/customer/comment",
-    method: "post",
+    url: '/service/sale/customer/comment',
+    method: 'post',
     data: params,
   });
 }
@@ -107,36 +106,36 @@ export function commentApi(params) {
 // 获取用户信息
 export function getUserInfo() {
   return request({
-    url: "/user/get",
-    method: "get",
+    url: '/user/get',
+    method: 'get',
   });
 }
 
 // 获取工单收货地址
 export function getInvoiceAddress(repairId) {
   return request({
-    url: "/service/sale/customer/getInvoiceAddress",
-    method: "get",
-    params:{repairId},
-});
+    url: '/service/sale/customer/getInvoiceAddress',
+    method: 'get',
+    params: { repairId },
+  });
 }
 
 // 申请开票
 export function invoiceApply(params) {
   return request({
-    url: "/service/sale/customer/invoiceApply",
-    method: "post",
+    url: '/service/sale/customer/invoiceApply',
+    method: 'post',
     data: params,
   });
 }
 // 获取工单收货地址
-export function wxLogin(code)  {
+export function wxLogin(code) {
   return request<wxLoginRus>({
-    url: "/service/wxLoginRus/customer/wxLogin",
-    method: "get",
-    params:{code},
-});
+    url: '/service/sale/customer/wxLogin',
+    method: 'get',
+    params: { code },
+  });
 }
 export interface wxLoginRus {
-  openid: number|string;
+  openid: number | string;
 }