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

2023/1/3

上级 85a72609
...@@ -17,9 +17,9 @@ VUE_APP_API_PREFIX = /api/v1 ...@@ -17,9 +17,9 @@ VUE_APP_API_PREFIX = /api/v1
//////////////// local //////////////// 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_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 //////////////// serve
......
...@@ -4,7 +4,7 @@ import { HeaderType } from "@/constants/enum/general/header-type.enum"; ...@@ -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; // const prefix = process.env.VUE_APP_MS_GATEWAY_API + process.env.VUE_APP_AUTH_API;
//local //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 = { const systemApi = {
// 通用请求地址 // 通用请求地址
commonRq: { commonRq: {
...@@ -129,14 +129,14 @@ const systemApi = { ...@@ -129,14 +129,14 @@ const systemApi = {
//获取个人信息 //获取个人信息
getSysCustInfoById: { getSysCustInfoById: {
url: prefix + "/sys-cust-info/detail-by-id", url: prefix + "/sys-cust-info/detail-by-id",
methodType: MethodType.GET.code, method: MethodType.GET.code,
headerType: HeaderType.AUTH.code, header: HeaderType.AUTH.code,
}, },
//更新个人信息 //更新个人信息
updateSysCustInfoById: { updateSysCustInfoById: {
url: prefix + "/sys-cust-info/update-by-id", url: prefix + "/sys-cust-info/update-by-id",
methodType: MethodType.GET.code, method: MethodType.PUT.code,
headerType: HeaderType.AUTH.code, header: HeaderType.AUTH.code,
}, },
}; };
export default systemApi; export default systemApi;
...@@ -197,7 +197,12 @@ class ApiService { ...@@ -197,7 +197,12 @@ class ApiService {
} }
put(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any { put(path: string, params: any, query: Query | undefined, requestConfig: AxiosRequestConfig): any {
path = query != null ? this.urlQueryConvert(path, query) : path; 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 { delete(path: string, query: Query | undefined, requestConfig: AxiosRequestConfig): any {
......
...@@ -258,6 +258,7 @@ export default class LoginView extends Vue { ...@@ -258,6 +258,7 @@ export default class LoginView extends Vue {
//密码 //密码
credential: this.password credential: this.password
} }
apiService.general(loginApi.loginSystem, undefined, param, undefined).then((response: RestfulResponse) => { apiService.general(loginApi.loginSystem, undefined, param, undefined).then((response: RestfulResponse) => {
console.log(response); console.log(response);
//发送请求就保存账号 账号:18746555531 密码:123456 //发送请求就保存账号 账号:18746555531 密码:123456
......
...@@ -91,6 +91,11 @@ ...@@ -91,6 +91,11 @@
</template> </template>
<script lang="ts"> <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"; import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
/* /*
* title * title
...@@ -100,13 +105,46 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator"; ...@@ -100,13 +105,46 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
}) })
export default class PersonLod extends Vue { export default class PersonLod extends Vue {
tatleName="个人信息"//个人信息 tatleName="个人信息"//个人信息
name: string = "任佳昊"//姓名 name: string = ""//姓名
IdCard: string = "420101200405063701"//身份证号 IdCard: string = ""//身份证号
phone: string = "15537986003"//手机号 phone: string = ""//手机号
liveAdress: string = "云南省昆明市盘龙区鼓楼街道"//居住地址 liveAdress: string = ""//居住地址
password : String =""//原始密码 password : String =""//原始密码
newPassword : 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(){ modifyInfo(){
this.$router.push({ this.$router.push({
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import commonApi from "@/constants/api/login/common.api";
import systemApi from "@/constants/api/ms-system/system.api"; 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";
...@@ -84,7 +85,7 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator"; ...@@ -84,7 +85,7 @@ import { Component, Vue, Prop, Watch, Emit } from "vue-property-decorator";
@Component({ @Component({
name: "modifyInfo" name: "modifyInfo"
}) })
export default class PersonLod extends Vue { export default class modifyInfo extends Vue {
tatleName="修改信息"//个人信息 tatleName="修改信息"//个人信息
name: string = ""//姓名 name: string = ""//姓名
IdCard: string = ""//身份证号 IdCard: string = ""//身份证号
...@@ -94,65 +95,47 @@ export default class PersonLod extends Vue { ...@@ -94,65 +95,47 @@ export default class PersonLod extends Vue {
newPassword : String =""//原始密码 newPassword : String =""//原始密码
mounted() { mounted() {
// this.name = this.$route.params.name; this.name = this.$route.params.name;
// this.IdCard = this.$route.params.IdCard; this.IdCard = this.$route.params.IdCard;
// this.phone = this.$route.params.phone; this.phone = this.$route.params.phone;
// this.liveAdress = this.$route.params.liveAdress; this.liveAdress = this.$route.params.liveAdress;
this.getInfo();
} }
modifyInfo(){ async modifyInfo(){
let custInfo: any = sessionStorage.getItem("sysCustInfo"); let custInfo: any = sessionStorage.getItem("sysCustInfo");
custInfo = JSON.parse(custInfo); custInfo = JSON.parse(custInfo);
let id = custInfo.id; let id = custInfo.id;
let query = { let query = {
} };
let param = { let param = {
id: custInfo.id, id: custInfo.id,
phone: this.phone, phone: this.phone,
address: this.liveAdress, 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) { if (response.code == Code.SUCCESS.code) {
this.name = response.data.records.custName; console.log(55);
this.IdCard = response.data.records.idcard; Toast(response.msg +"");
this.phone = response.data.records.phone; this.$router.back();
this.liveAdress = response.data.records.address;
}
Toast(response.msg + "");
});
}else{
// this.$router.back(); Toast(response.msg +"");
} }
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 + "");
});
// this.$router.back();
} }
} }
</script> </script>
......
...@@ -25,4 +25,15 @@ module.exports = { ...@@ -25,4 +25,15 @@ module.exports = {
"Access-Control-Allow-Origin": "*", "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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册