Browse Source

auto commit

gcz 3 years ago
parent
commit
894603b416
2 changed files with 8 additions and 2 deletions
  1. 3 0
      src/components/login/index.vue
  2. 5 2
      src/components/search-user/index.vue

+ 3 - 0
src/components/login/index.vue

@@ -26,6 +26,9 @@ export default {
   },
   created() {
     console.log("this.$route.query", this.$route.query);
+    if(this.$route.query.from){
+      sessionStorage.setItem("from",this.$route.query.from)
+    }
     this.UserID = this.$route.query.inviterId;
     if (this.UserID) {
       this.handleLogin();

+ 5 - 2
src/components/search-user/index.vue

@@ -111,7 +111,9 @@ export default {
   },
   methods: {
     getmemberinfo() {
-      if(this.$route.query.from=='company'){//如果是企业端则读取退役军人信息
+      let form = sessionStorage.getItem('from');
+      if(form=='company'){//如果是企业端则读取退役军人信息
+      // console.log('form company',form);
         memberinfo({ veteMemberId: this.searchInput }).then((res) => {
           if (res.data.code == "200") {
             this.veteMemberName = res.data?.data?.data?.veteName;
@@ -122,7 +124,8 @@ export default {
           // console.log("this.veteMemberName", this.veteMemberName);
           // console.log("getmemberinfo", res.data.data.data.veteName);
         });
-      }else if(this.$route.query.from=='veterans'){//如果是企业端则读取退役军人信息
+      }else if(form=='veterans'){//如果是企业端则读取退役军人信息
+      // console.log('form veterans',form);
         companyInfo({ companyId: this.searchInput }).then((res) => {
           if (res.data.code == "200") {
             this.veteMemberName = res.data?.data?.data?.companyName;