diff --git a/.env.dev b/.env.dev index 0ee36b1ffa1f93f9defdb85190d042f60a77ed67..46fc3d55dc3f03b37bbac550f055398b550652b4 100644 --- a/.env.dev +++ b/.env.dev @@ -17,9 +17,9 @@ VUE_APP_API_PREFIX = /api/v1 //////////////// local // 网关服务 -VUE_APP_MS_GATEWAY_API = http://192.168.14.1:9140 +VUE_APP_MS_GATEWAY_API = http://localhost:9140 //VUE_APP_ONLINE_API = http://192.168.14.1:9155/ms-online/api/v1 -VUE_APP_SYSTEM_API = ms-system/api/v1/ +VUE_APP_SYSTEM_API = /ms-system/api/v1 //////////////// serve diff --git a/src/constants/api/ms-system/system.api.ts b/src/constants/api/ms-system/system.api.ts index d9d60738fdcc2ffbe925a2d4ae674e919f610a55..64f329e43158b5ee54c86a1191515341c4901740 100644 --- a/src/constants/api/ms-system/system.api.ts +++ b/src/constants/api/ms-system/system.api.ts @@ -4,7 +4,7 @@ import { HeaderType } from "@/constants/enum/general/header-type.enum"; //网关 // const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_AUTH_API; //local -const prefix = "http://192.168.14.1:9140" + process.env.VUE_APP_SYSTEM_API; +const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_SYSTEM_API; const systemApi = { // 通用请求地址 commonRq: { @@ -129,14 +129,14 @@ const systemApi = { //获取个人信息 getSysCustInfoById: { url: prefix + "/sys-cust-info/detail-by-id", - methodType: MethodType.GET.code, - headerType: HeaderType.AUTH.code, + method: MethodType.GET.code, + header: HeaderType.AUTH.code, }, //更新个人信息 updateSysCustInfoById: { - url: prefix + "/sys-cust-info/update-by-id", - methodType: MethodType.GET.code, - headerType: HeaderType.AUTH.code, + url: prefix + "/sys-cust-info/update-by-id", + method: MethodType.PUT.code, + header: HeaderType.AUTH.code, }, }; export default systemApi; diff --git a/src/services/api.service.ts b/src/services/api.service.ts index c4299d7a041b3adfdc9678f6fe321590a08d1bef..d57625cf528ac9992e944143cc4c056372c01732 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -197,7 +197,12 @@ class ApiService { } put(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any { path = query != null ? this.urlQueryConvert(path, query) : path; - return Vue.axios.put(`${path}`, params, requestConfig).then(this.createBusCodeHandler()).catch(this.createErrorHandler()); + // return Vue.axios.put(`${path}`, params, requestConfig).then(this.createBusCodeHandler()).catch(this.createErrorHandler()); + return Vue.axios.put(`${path}`, params, requestConfig).then(res=>{ + //TODO + return res.data + }); + } delete(path: string, query: Query | undefined, requestConfig: AxiosRequestConfig): any { diff --git a/src/views/authentication/LoginView.vue b/src/views/authentication/LoginView.vue index fd2607d0b8529a6c034eda100ca92c74188c2338..558e26996f3cb6f2e8ed5371753f637748d87f78 100644 --- a/src/views/authentication/LoginView.vue +++ b/src/views/authentication/LoginView.vue @@ -258,6 +258,7 @@ export default class LoginView extends Vue { //密码 credential: this.password } + apiService.general(loginApi.loginSystem, undefined, param, undefined).then((response: RestfulResponse) => { console.log(response); //发送请求就保存账号 账号:18746555531 密码:123456 diff --git a/src/views/workbench/PersonLod.vue b/src/views/workbench/PersonLod.vue index fecbf71370e7e40c7f13573d7a2955d805f12e53..c9512c9b13936b6d3b8c03e9bb77a6ec4951be5f 100644 --- a/src/views/workbench/PersonLod.vue +++ b/src/views/workbench/PersonLod.vue @@ -91,6 +91,11 @@