|
@@ -25,7 +25,8 @@ export default class Index extends Vue {
|
|
|
appid:'wx98622dc60a8a6abb',
|
|
|
show: 1,
|
|
|
bannerlist:'',
|
|
|
- id_card: null
|
|
|
+ id_card: null,
|
|
|
+ is_town: true
|
|
|
};
|
|
|
private citycode = localStorage.getItem("citycode");
|
|
|
private cityname = localStorage.getItem("cityname");
|
|
@@ -38,11 +39,13 @@ export default class Index extends Vue {
|
|
|
this.data.bannerlist = resbanner.data;
|
|
|
this.citycode = res.data.social_city as string;
|
|
|
this.cityname = res.data.city_name as string;
|
|
|
+ this.data.is_town = res.data.is_town
|
|
|
localStorage.setItem("citycode", this.citycode);
|
|
|
localStorage.setItem("cityname", this.cityname);
|
|
|
localStorage.setItem('mobile',res.data.mobile);
|
|
|
localStorage.setItem("social_type", res.data.social_type);
|
|
|
localStorage.setItem("social_name", res.data.social_name);
|
|
|
+ localStorage.setItem("is_town", res.data.is_town);
|
|
|
if(res.data.is_first == 0){
|
|
|
this.data.markShow = true
|
|
|
let ress = await Http.getInstance().setFirstLogin();
|
|
@@ -139,10 +142,10 @@ export default class Index extends Vue {
|
|
|
// 获取本地信息
|
|
|
let name = localStorage.getItem('realname')
|
|
|
let socialType = localStorage.getItem('token_type')
|
|
|
- if (name === '' || socialType === '' || this.data.id_card === '') {
|
|
|
- this.$router.push('/user/info')
|
|
|
- } else {
|
|
|
+ if (name !== null && socialType !== null && this.data.id_card !== null) {
|
|
|
this.$router.push('/social?is_fund=1')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/user/info')
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -159,10 +162,10 @@ export default class Index extends Vue {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if (name === '' || socialType === '' || this.data.id_card === '') {
|
|
|
- this.$router.push('/user/info')
|
|
|
- } else {
|
|
|
+ if (name !== null && socialType !== null && this.data.id_card !== null) {
|
|
|
this.$router.push('/social?is_fund=0')
|
|
|
+ } else {
|
|
|
+ this.$router.push('/user/info')
|
|
|
}
|
|
|
}
|
|
|
|