|
@@ -147,10 +147,14 @@ export default class Index extends Vue {
|
|
|
}
|
|
|
|
|
|
// 点击五险一金
|
|
|
- hFiveSocial() {
|
|
|
+ async hFiveSocial() {
|
|
|
+ let result = await Http.getInstance().userinfo();
|
|
|
+ if (result && result.data) {
|
|
|
+ localStorage.setItem("realname", result.data.realname);
|
|
|
+ }
|
|
|
// 获取本地信息
|
|
|
let name = localStorage.getItem('realname')
|
|
|
- let socialType = localStorage.getItem('token_type')
|
|
|
+ let socialType = localStorage.getItem('social_type')
|
|
|
if (name !== null && socialType !== null && this.data.id_card !== '') {
|
|
|
this.$router.push('/social?is_fund=1')
|
|
|
} else {
|
|
@@ -159,8 +163,13 @@ export default class Index extends Vue {
|
|
|
}
|
|
|
|
|
|
// 点击社保
|
|
|
- hSocialInsurance () {
|
|
|
+ async hSocialInsurance () {
|
|
|
+ let result = await Http.getInstance().userinfo();
|
|
|
+ if (result && result.data) {
|
|
|
+ localStorage.setItem("realname", result.data.realname);
|
|
|
+ }
|
|
|
let name = localStorage.getItem('realname')
|
|
|
+ let socialType = localStorage.getItem('social_type')
|
|
|
// 获取本地社保类型
|
|
|
let is_town = localStorage.getItem('is_town')
|
|
|
console.log(is_town);
|
|
@@ -170,7 +179,7 @@ export default class Index extends Vue {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if (name !== null && this.data.id_card !== '') {
|
|
|
+ if (name !== null && this.data.id_card !== '' && socialType !== null) {
|
|
|
this.$router.push('/social?is_fund=0')
|
|
|
} else {
|
|
|
this.$router.push('/user/info')
|