提交 02b80a2d 编写于 作者: “grape”'s avatar “grape”

2023/1/3

上级 85a72609
......@@ -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
......
......@@ -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;
......@@ -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 {
......
......@@ -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
......
......@@ -91,6 +91,11 @@
</template>
<script lang="ts">
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";
/*
* title
......@@ -100,13 +105,46 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
})
export default class PersonLod extends Vue {
tatleName="个人信息"//个人信息
name: string = "任佳昊"//姓名
IdCard: string = "420101200405063701"//身份证号
phone: string = "15537986003"//手机号
liveAdress: string = "云南省昆明市盘龙区鼓楼街道"//居住地址
name: string = ""//姓名
IdCard: string = ""//身份证号
phone: string = ""//手机号
liveAdress: string = ""//居住地址
password : String =""//原始密码
newPassword : String =""//原始密码
mounted(){
this.getInfo();
}
getInfo(){
let custInfo: any = sessionStorage.getItem("sysCustInfo");
custInfo = JSON.parse(custInfo);
let id = custInfo.id;
// console.log(id);
let query = {
id: custInfo.id,
};
let param = {
};
// console.log(query)
// console.log(systemApi.getSysCustInfoById.url)
apiService.general(systemApi.getSysCustInfoById, query, undefined,undefined).then((response: RestfulResponse) => {
if (response.code == Code.SUCCESS.code) {
this.name = response.data.custName;
this.IdCard = response.data.idcard;
this.phone = response.data.phone;
this.liveAdress = response.data.address;
Toast(response.msg + "");
// console.log(response.data)
}else{
Toast(response.msg + "");
}
});
}
modifyInfo(){
this.$router.push({
......
......@@ -70,6 +70,7 @@
</template>
<script lang="ts">
import commonApi from "@/constants/api/login/common.api";
import systemApi from "@/constants/api/ms-system/system.api";
import { Code } from "@/constants/enum/general/code.enum";
import { RestfulResponse } from "@/model/domain/RestfulResponse";
......@@ -84,7 +85,7 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
@Component({
name: "modifyInfo"
})
export default class PersonLod extends Vue {
export default class modifyInfo extends Vue {
tatleName="修改信息"//个人信息
name: string = ""//姓名
IdCard: string = ""//身份证号
......@@ -94,66 +95,48 @@ export default class PersonLod extends Vue {
newPassword : String =""//原始密码
mounted() {
// this.name = this.$route.params.name;
// this.IdCard = this.$route.params.IdCard;
// this.phone = this.$route.params.phone;
// this.liveAdress = this.$route.params.liveAdress;
this.getInfo();
this.name = this.$route.params.name;
this.IdCard = this.$route.params.IdCard;
this.phone = this.$route.params.phone;
this.liveAdress = this.$route.params.liveAdress;
}
modifyInfo(){
async 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) => {
};
console.log(param);
// console.log(typeof param);
// console.log(commonApi.getPicCode.url);
// console.log(systemApi.updateSysCustInfoById.url);
apiService.general(systemApi.updateSysCustInfoById, undefined, param, undefined).then((response: RestfulResponse) => {
console.log(response);
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;
console.log(55);
Toast(response.msg +"");
this.$router.back();
}else{
Toast(response.msg +"");
}
Toast(response.msg + "");
});
// this.$router.back();
}
getInfo(){
let custInfo: any = sessionStorage.getItem("sysCustInfo");
custInfo = JSON.parse(custInfo);
let id = custInfo.id;
console.log(id);
let query = {
id: custInfo.id,
}
let param = {
}
apiService.general(systemApi.getSysCustInfoById, query, query, 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 + "");
});
}
}
</script>
<style scoped lang="scss">
......
......@@ -25,4 +25,15 @@ module.exports = {
"Access-Control-Allow-Origin": "*",
},
},
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
performance: {
//入口起点的最大体积
maxEntrypointSize: 50000000,
//生成文件的最大体积
maxAssetSize: 30000000,
}
}
};
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册