Sfoglia il codice sorgente

Merge branch 'master' of http://git.cc-lotus.info/smart-jobs/web-portal

xiejiacheng 5 anni fa
parent
commit
b83452084f

+ 1 - 1
public/index.html

@@ -5,7 +5,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-    <title>长春工业大学</title>
+    <title>加载中...</title>
   </head>
   <body>
     <noscript>

+ 1 - 1
src/components/to-login.vue

@@ -101,7 +101,7 @@ export default {
     async submit(wxtoken, loginType) {
       let data = JSON.parse(JSON.stringify(this.form));
       if (loginType === 0) {
-        data.account = `${data.account}@999991`;
+        data.account = `${data.account}@${this.$site}`;
       } else {
         data = { wxtoken: wxtoken };
       }

+ 5 - 5
src/store.js

@@ -55,10 +55,10 @@ const api = {
   // stucorplist: `/adminapi${process.env.NODE_ENV === 'development' ? '' : ' / jobs'}/studentcorp`,
   // stucorpupdate: `/adminapi${process.env.NODE_ENV === 'development' ? '' : ' / jobs'}/studentcorp`,
   // stucorpdelete: `/adminapi${process.env.NODE_ENV === 'development' ? '' : ' / jobs'}/studentcorp/{id}`,
-  stucorp: `/api/stud/studentcorp`,
-  stucorpsearch: '/api/stud/studentcorp',
-  stucorplist: '/api/stud/studentcorp',
-  stucorpdelete: '/api/stud/studentcorp/{id}',
+  // stucorp: `/api/stud/studentcorp`,
+  stucorp: '/api/jobs/studentcorp',
+  stucorplist: '/api/jobs/studentcorp',
+  stucorpdelete: '/api/jobs/studentcorp/{id}',
   //测试前缀${process.env.NODE_ENV === 'development' ? '/adminapi' : '${process.env.NODE_ENV === 'development' ? '/adminapi' : '/api/cms'}'}
   //审核过的企业(主站用)
   getCorps: `/api/corp/corps/`,
@@ -369,7 +369,7 @@ export default new Vuex.Store({
       }
       if (type === 'search') {
         let { id, studid, corpid } = data;
-        result = await this.$axios.$get(api.stucorpsearch, {}, { studid: studid, corpid: corpid });
+        result = await this.$axios.$get(api.stucorp, { id: id }, { studid: studid, corpid: corpid });
       }
       if (type === 'update') {
         let { info, id } = data;

+ 9 - 7
src/views/corp/index.vue

@@ -110,11 +110,18 @@ export default {
   }),
   created() {
     this.search();
-    if (this.user.id) this.ticketSearch();
+    // if (this.user.id) this.ticketSearch();
   },
   computed: {
     ...mapState(['user']),
   },
+  watch: {
+    user: {
+      handler(val) {
+        if (val.id) this.ticketSearch();
+      },
+    },
+  },
   methods: {
     ...mapActions(['corpOperation', 'postOperation', 'userOperation', 'stucorpOperation']),
     async search() {
@@ -128,7 +135,6 @@ export default {
       }
     },
     async searchJobs(query) {
-      console.log(query);
       let result = await this.postOperation({ type: 'list', data: { corpid: this.$route.query.id, ...query } });
       if (`${result.errcode}` === '0') {
         this.$set(this, `jobList`, result);
@@ -143,15 +149,11 @@ export default {
         this.guanzhu = true;
       }
     },
-    async getTicket() {
+    async guanzhuAdd() {
       if (!this.user.id) {
         this.loginDialog = true;
         return false;
-      } else {
-        this.ticketSearch();
       }
-    },
-    async guanzhuAdd() {
       if (this.guanzhu) {
         let query = {};
         let result = await this.userOperation({ type: 'search', data: { studid: this.user.id } });

+ 17 - 9
src/views/index/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div id="request">
-    <el-row v-if="user !== 'master'">
+    <el-row>
+      <!-- v-if="user !== 'master'" -->
       <pages-one
         v-if="!loading"
         :topInfo="site"
@@ -24,7 +25,7 @@
         </template>
       </pages-one>
     </el-row>
-    <el-row v-else>
+    <!-- <el-row v-else>
       <master
         v-if="!loading"
         :topinfo="site"
@@ -56,8 +57,7 @@
           <self-calendars></self-calendars>
         </template>
       </master>
-      <!--  :companylist="companylist" -->
-    </el-row>
+    </el-row> -->
   </div>
 </template>
 
@@ -79,8 +79,8 @@ export default {
     pagesOne,
     topMenu,
     selfCalendar,
-    selfCalendars,
-    master,
+    // selfCalendars,
+    // master,
   },
   data: () => ({
     user: 'master',
@@ -106,7 +106,13 @@ export default {
     //master数据
     master: { ...masterInfo },
     corpList: [],
+    siteTitle: '',
   }),
+  metaInfo() {
+    return {
+      title: this.siteTitle ? this.siteTitle : '就业信息网',
+    };
+  },
   async created() {
     await this.checkUser();
     await this.getSite();
@@ -150,10 +156,12 @@ export default {
             this.getfloating(item);
           }
           this.$set(this, `site`, result.data);
+          this.$set(this, `siteTitle`, this.site.name);
         }
       } else {
         // console.log(JSON.parse(site));
         this.$set(this, `site`, JSON.parse(site));
+        this.$set(this, `siteTitle`, this.site.name);
         let arr = this.site;
         if (arr.custom) {
           let item = arr.custom;
@@ -211,7 +219,7 @@ export default {
           //item为模块信息,拿着模块信息去查该模块下有什么栏目
           if (`${item.is_use}` === '0') {
             item = await this.getColumn(item);
-            this.makeList(item);
+            await this.makeList(item);
           } // console.log(item);
         }
       }
@@ -242,14 +250,14 @@ export default {
       data.parent_id = news_type === '1' ? item.id : item.content_id;
       let res = await this.newsOperation({ type: 'list', data: data });
       if (`${res.errcode}` === '0') {
-        res.data.forEach(async val => {
+        for (const val of res.data) {
           let result = await this.newsOperation({ type: 'search', data: { id: val.id } });
           if (`${result.errcode}` === '0') {
             val.content = result.data.content;
           } else {
             this.$message.error(result.errmsg ? result.errmsg : 'error');
           }
-        });
+        }
         return res.data;
       } else {
         this.$message.error(res.errmsg ? res.errmsg : 'error');

+ 1 - 1
src/views/jobfair/detail.vue

@@ -134,7 +134,7 @@ export default {
       result = await this.ticketsOperation({ type: 'add', data: { query: query, body: body } });
       this.$message({
         type: `${result.errcode}` === '0' ? 'success' : 'error',
-        message: `${result.errcode}` === '0' ? '成功领到门票' : result.errmsg === '数据已存在' ? '已领取过门票,不能重复领取' : result.errmsg,
+        message: `${result.errcode}` === '0' ? '成功领到门票' : result.errmsg,
       });
     },
   },