From 85a72609ad318f2dfc5c4cad24c1f7ce7277f7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cgrape=E2=80=9D?= <18746553572@163.com> Date: Wed, 28 Dec 2022 11:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9B=B8=E5=85=B3api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/api/ms-system/system.api.ts | 8 ++++++- src/views/workbench/modifyInfo.vue | 27 ++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/constants/api/ms-system/system.api.ts b/src/constants/api/ms-system/system.api.ts index f53af4d..d9d6073 100644 --- a/src/constants/api/ms-system/system.api.ts +++ b/src/constants/api/ms-system/system.api.ts @@ -128,9 +128,15 @@ const systemApi = { }, //获å–ä¸ªäººä¿¡æ¯ getSysCustInfoById: { - url: prefix + "/sys-cust-info/getSysCustInfoById", + url: prefix + "/sys-cust-info/detail-by-id", methodType: MethodType.GET.code, headerType: HeaderType.AUTH.code, }, + //æ›´æ–°ä¸ªäººä¿¡æ¯ + updateSysCustInfoById: { + url: prefix + "/sys-cust-info/update-by-id", + methodType: MethodType.GET.code, + headerType: HeaderType.AUTH.code, + }, }; export default systemApi; diff --git a/src/views/workbench/modifyInfo.vue b/src/views/workbench/modifyInfo.vue index 4d19675..d16248f 100644 --- a/src/views/workbench/modifyInfo.vue +++ b/src/views/workbench/modifyInfo.vue @@ -74,6 +74,7 @@ import systemApi from "@/constants/api/ms-system/system.api"; import { Code } from "@/constants/enum/general/code.enum"; import { RestfulResponse } from "@/model/domain/RestfulResponse"; import apiService from "@/services/api.service"; +import { Toast } from "vant"; import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator"; @@ -100,7 +101,30 @@ export default class PersonLod extends Vue { this.getInfo(); } + + modifyInfo(){ + let custInfo: any = sessionStorage.getItem("sysCustInfo"); + custInfo = JSON.parse(custInfo); + let id = custInfo.id; + + let query = { + + } + let param = { + id: custInfo.id, + phone: this.phone, + address: this.liveAdress, + } + apiService.general(systemApi.getSysCustInfoById, query, param, undefined).then((response: RestfulResponse) => { + if (response.code == Code.SUCCESS.code) { + this.name = response.data.records.custName; + this.IdCard = response.data.records.idcard; + this.phone = response.data.records.phone; + this.liveAdress = response.data.records.address; + } + Toast(response.msg + ""); + }); @@ -108,7 +132,7 @@ export default class PersonLod extends Vue { } getInfo(){ - let custInfo: any = sessionStorage.getItem("sysCustInfo"); + let custInfo: any = sessionStorage.getItem("sysCustInfo"); custInfo = JSON.parse(custInfo); let id = custInfo.id; console.log(id); @@ -126,6 +150,7 @@ export default class PersonLod extends Vue { this.phone = response.data.records.phone; this.liveAdress = response.data.records.address; } + Toast(response.msg + ""); }); } -- 2.22.0