Commit 13ff720d by 展昭

修改method中对参数不灵活的BUG

parent 71b1baac
...@@ -44,7 +44,7 @@ class EmployeeService implements EmployeeInterface { ...@@ -44,7 +44,7 @@ class EmployeeService implements EmployeeInterface {
*/ */
public async getUserInfo(params: any): Promise<any> { public async getUserInfo(params: any): Promise<any> {
const url = urls.userInfoUrl + `/userAuthDetails`; const url = urls.userInfoUrl + `/userAuthDetails`;
return request.post(url, params, this.header) return request.post(url, params, this.header, true)
} }
/** /**
......
...@@ -26,9 +26,9 @@ class Request { ...@@ -26,9 +26,9 @@ class Request {
* @param params 请求参数 * @param params 请求参数
* @param headers 请求头信息 * @param headers 请求头信息
*/ */
public post(url: string, params: any = {}, headers: any = {}) { public post(url: string, params: any = {}, headers: any = {}, special: boolean = false) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(http.post(`${url}?${GetCommonPms()}`, params, { headers: headers })); resolve(http.post(`${url}?${GetCommonPms(special)}`, params, { headers: headers }));
}) })
} }
...@@ -42,7 +42,7 @@ class Request { ...@@ -42,7 +42,7 @@ class Request {
*/ */
public put(url: string, params: any = {}, headers: any = {}) { public put(url: string, params: any = {}, headers: any = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
resolve(http.put(`${url}?${GetCommonPms()}`, params, {headers: headers})); resolve(http.put(`${url}?${GetCommonPms()}`, params, { headers: headers }));
}) })
} }
......
...@@ -43,15 +43,18 @@ export default class SelectIdentity extends Vue { ...@@ -43,15 +43,18 @@ export default class SelectIdentity extends Vue {
} }
async created() { async created() {
await this.$server.EmployeeService.getUserInfo({}).then(res => { await this.$server.EmployeeService.getUserInfo({})
if (res.data && res.data.uthStatus && res.data.uthStatus > 0) { .then(res => {
this.id_no = res.data.personalIdCardNo; if (res.data && res.data.uthStatus && res.data.uthStatus > 0) {
} else { this.id_no = res.data.personalIdCardNo;
//TODO: 跳转到实名认证 console.log("this.id_no=", this.id_no);
} } else {
}).catch(err=>{ //TODO: 跳转到实名认证
console.log('err=',err); }
}); })
.catch(err => {
console.log("err=", err);
});
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment