提交 85a72609 编写于 作者: “grape”'s avatar “grape”

添加个人信息相关api

上级 050f33e5
...@@ -128,7 +128,13 @@ const systemApi = { ...@@ -128,7 +128,13 @@ const systemApi = {
}, },
//获取个人信息 //获取个人信息
getSysCustInfoById: { 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, methodType: MethodType.GET.code,
headerType: HeaderType.AUTH.code, headerType: HeaderType.AUTH.code,
}, },
......
...@@ -74,6 +74,7 @@ import systemApi from "@/constants/api/ms-system/system.api"; ...@@ -74,6 +74,7 @@ import systemApi from "@/constants/api/ms-system/system.api";
import { Code } from "@/constants/enum/general/code.enum"; import { Code } from "@/constants/enum/general/code.enum";
import { RestfulResponse } from "@/model/domain/RestfulResponse"; import { RestfulResponse } from "@/model/domain/RestfulResponse";
import apiService from "@/services/api.service"; import apiService from "@/services/api.service";
import { Toast } from "vant";
import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator"; import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
...@@ -100,7 +101,30 @@ export default class PersonLod extends Vue { ...@@ -100,7 +101,30 @@ export default class PersonLod extends Vue {
this.getInfo(); this.getInfo();
} }
modifyInfo(){ 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 + "");
});
...@@ -126,6 +150,7 @@ export default class PersonLod extends Vue { ...@@ -126,6 +150,7 @@ export default class PersonLod extends Vue {
this.phone = response.data.records.phone; this.phone = response.data.records.phone;
this.liveAdress = response.data.records.address; this.liveAdress = response.data.records.address;
} }
Toast(response.msg + "");
}); });
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册