Browse Source

feat: leave-source移除接口模拟

cuiyalong 2 weeks ago
parent
commit
53bff7d4d7
2 changed files with 25 additions and 25 deletions
  1. 23 23
      plugins/leave-source/src/api/api.js
  2. 2 2
      plugins/leave-source/vite.config.js

+ 23 - 23
plugins/leave-source/src/api/api.js

@@ -2,24 +2,24 @@
 import request from './index'
 
 export function requestBehaviorClues(data = {}) {
-  return new Promise((resolve) => {
-    request({
-      url: '/salesLeads/behaviorClues',
-      method: 'post',
-      data
-    }).finally(() => {
-      resolve({
-        error_code: 0,
-        data: {
-          name: '专属客服',
-          remark: '专属客服',
-          phone: '18888888888',
-          wxer: 'https://cdn-ali2.jianyu360.cn/qmxupload/2024/06/20/202406201338370067907a438.png'
-        },
-        message: 'success'
-      })
-    })
-  })
+  // return new Promise((resolve) => {
+  //   request({
+  //     url: '/salesLeads/behaviorClues',
+  //     method: 'post',
+  //     data
+  //   }).finally(() => {
+  //     resolve({
+  //       error_code: 0,
+  //       data: {
+  //         name: '专属客服',
+  //         remark: '专属客服',
+  //         phone: '18888888888',
+  //         wxer: 'https://cdn-ali2.jianyu360.cn/qmxupload/2024/06/20/202406201338370067907a438.png'
+  //       },
+  //       message: 'success'
+  //     })
+  //   })
+  // })
   // return Promise.resolve({
   //   error_code: 0,
   //   data: {
@@ -29,11 +29,11 @@ export function requestBehaviorClues(data = {}) {
   //   },
   //   message: 'success'
   // })
-  // return request({
-  //   url: '/salesLeads/behaviorClues',
-  //   method: 'post',
-  //   data
-  // })
+  return request({
+    url: '/salesLeads/behaviorClues',
+    method: 'post',
+    data
+  })
 }
 
 export function requestRetainedCapital(data = {}) {

+ 2 - 2
plugins/leave-source/vite.config.js

@@ -83,12 +83,12 @@ export default defineConfig(({ mode, command }) => {
       host: '0.0.0.0',
       proxy: {
         '/jyapi': {
-          target: 'https://jybx-webtest.jydev.jianyu360.com',
+          target: 'https://jybx3-webtest.jydev.jianyu360.com',
           changeOrigin: true,
           rewrite: path => path.replace(/^\/jyapi/, '')
         },
         '/api': {
-          target: 'https://jybx-webtest.jydev.jianyu360.com',
+          target: 'https://jybx3-webtest.jydev.jianyu360.com',
           changeOrigin: true,
           rewrite: path => path.replace(/^\/api/, '')
         }