|
@@ -248,8 +248,18 @@ export default class Social extends Vue {
|
|
|
|
|
|
}
|
|
|
// 微信快捷进入,登陆之后才可进入
|
|
|
- @Watch('$route', {immediate: true}) isUserInfo(newVal: any, oldVal: any) {
|
|
|
- // this.data.social_type.value == null || this.data.id_card.value == null
|
|
|
+ @Watch('$route', {immediate: true}) async isUserInfo(newVal: any, oldVal: any) {
|
|
|
+ if(localStorage.getItem('access_token')){
|
|
|
+ let res = await Http.getInstance().userinfo();
|
|
|
+ console.log('token', res);
|
|
|
+ localStorage.setItem("social_type", res.data.social_type);
|
|
|
+ }
|
|
|
+ let result = await Http.getInstance().userinfo();
|
|
|
+ console.log('result',result);
|
|
|
+ if (result && result.data) {
|
|
|
+ localStorage.setItem("realname", result.data.realname);
|
|
|
+ localStorage.setItem("id_card", result.data.id_card);
|
|
|
+ }
|
|
|
// 真实姓名
|
|
|
const realname = localStorage.getItem('realname')
|
|
|
const social_type = localStorage.getItem('social_type')
|