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

添加个人信息相关api

上级 050f33e5
......@@ -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;
......@@ -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 + "");
});
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册