lushuncheng 5 yıl önce
ebeveyn
işleme
3e946a588d
2 değiştirilmiş dosya ile 392 ekleme ve 290 silme
  1. 18 12
      components/job/dealSeoFooter.js
  2. 374 278
      pages/job/index.vue

+ 18 - 12
components/job/dealSeoFooter.js

@@ -10,7 +10,9 @@ export default class DealSeoData {
     this.req = req
     this.app = app
     this.redirect = redirect
+    console.log('dealSeoFooter............', 'beforestore')
     this.store = store
+    console.log('dealSeoFooter............', 'afterstore')
     this.selected = {
       city: 0,
       direction: 0, //职业角色 大
@@ -32,7 +34,8 @@ export default class DealSeoData {
     this.typeList = typeList
 
     let list = [],
-      keys = []
+      keys = [];
+    console('dealseofooter................', 'dealdata', name);
     switch (name) {
       case "JobListSeoIndex":
       case "JobListSeoIndex_$":
@@ -46,22 +49,23 @@ export default class DealSeoData {
     }
     //3 * 3 * n的循环 n < 100
     list.forEach(item => {
-      keys.forEach(keys => {
-        typeList[keys].list.forEach(typeItem => {
+      keys.forEach(key => {
+        console.log('keyseach................', key);
+        typeList[key].list.forEach(typeItem => {
           if (typeItem.slug === item) {
-            this.selected[keys] = typeItem.id
-            this.selected[keys + 'Name'] = typeItem.name
-            this.selected[keys + 'Slug'] = typeItem.slug
-            if (keys === 'city') {
+            this.selected[key] = typeItem.id
+            this.selected[key + 'Name'] = typeItem.name
+            this.selected[key + 'Slug'] = typeItem.slug
+            if (key === 'city') {
               this.selected["provice"] = typeItem.prov_id
             }
-            if (keys === "direction" && typeItem.children && typeItem.children.length > 1) {
-              typeList[keys].smallList = typeItem.children
+            if (key === "direction" && typeItem.children && typeItem.children.length > 1) {
+              typeList[key].smallList = typeItem.children
               this.selected['directionSmall'] = 0
               this.selected['directionSmallName'] = "全部"
             }
           }
-          if (keys === "direction" && Array.isArray(typeItem.children)) { //查询是否在子分类
+          if (key === "direction" && Array.isArray(typeItem.children)) { //查询是否在子分类
             typeItem.children.forEach(child => {
               if (child.slug === item) {
                 this.selected['direction'] = typeItem.id
@@ -70,14 +74,14 @@ export default class DealSeoData {
                 this.selected['directionSmall'] = child.id
                 this.selected['directionSmallName'] = child.name
                 this.selected['directionSmallSlug'] = child.slug
-                typeList[keys].smallList = typeItem.children
+                typeList[key].smallList = typeItem.children
               }
             })
           }
         })
       })
     })
-
+    console.log('before get footer data...........................');
     return {
       footer: await this.getFooterData(),
     }
@@ -134,6 +138,7 @@ export default class DealSeoData {
       typeList.direction.list = [...res.data.data.direction]
       typeList.city.list = [...res.data.data.cities]
     }
+    console.log('gettypelist.......................')
     return typeList
   }
 
@@ -163,6 +168,7 @@ export default class DealSeoData {
     let jishuBaseUrl = this.store.state.domainConfig.jishuinUrl;
     let kaifainUrl = this.store.state.domainConfig.kaifainUrl;
     let jobUrl = this.store.state.domainConfig.jobUrl;
+    console.log('dealseofooter........', baseUrl, jishuBaseUrl, kaifainUrl, jobUrl)
     let footer = {
       baseLink: baseUrl,
       link: [{

+ 374 - 278
pages/job/index.vue

@@ -7,11 +7,18 @@
         </div>
         <div class="contentArea">
           <div class="selectArea" v-if="!isSeoList">
-            <div class="selectContent" v-for="(key, i) in Object.keys(typeList)" :key="i + 'selectContent'">
+            <div
+              class="selectContent"
+              v-for="(key, i) in Object.keys(typeList)"
+              :key="i + 'selectContent'"
+            >
               <div class="content">
-                <div class="left"><p>{{typeList[key].title}}</p></div>
+                <div class="left">
+                  <p>{{typeList[key].title}}</p>
+                </div>
                 <div class="right">
-                  <div class="cell"
+                  <div
+                    class="cell"
                     v-for="(item, ii) in typeList[key].list"
                     :class="{selected: item.id === selected[key], noneClick: !canSelectCity && key === 'city'}"
                     @click="changeIndexSeo(key, item)"
@@ -21,43 +28,52 @@
                     <p>{{item.name}}</p>
                   </div>
                 </div>
-                <div class="more" @click="changeExpansion(key)" v-if="typeList[key].list.length > 8">
-                  {{expansion[key] ? "收起" : "更多"}}
-                </div>
+                <div
+                  class="more"
+                  @click="changeExpansion(key)"
+                  v-if="typeList[key].list.length > 8"
+                >{{expansion[key] ? "收起" : "更多"}}</div>
               </div>
-              <div class="smallContent"
+              <div
+                class="smallContent"
                 v-if="key === 'direction' && typeList[key].smallList.length > 0"
               >
-                <div class="cell"
-                  v-for="(item) in typeList[key].smallList"
+                <div
+                  class="cell"
+                  v-for="(item,ii) in typeList[key].smallList"
                   :class="{selected: item.id === selected.directionSmall}"
                   @click="changeIndexSeo('directionSmall', item)"
+                  :key="ii+key+item.id"
                 >
                   <p>{{item.name}}</p>
                 </div>
               </div>
             </div>
           </div>
-          <div class="breadcrumb"  v-if="!page.keyword">
+          <div class="breadcrumb" v-if="!page.keyword">
             <a
               v-for="(item, index) in breadcrumbList"
               :key="'breadcrumb'+index"
               :href="item.url"
               :title="item.name"
             >
-              <p v-if="index!==breadcrumbList.length-1">{{item.name}} <span>&nbsp;>&nbsp;</span></p>
+              <p v-if="index!==breadcrumbList.length-1">
+                {{item.name}}
+                <span>&nbsp;>&nbsp;</span>
+              </p>
               <h1 v-else>{{item.name}}</h1>
             </a>
           </div>
-          <div class="breadcrumb"   v-else>
+          <div class="breadcrumb" v-else>
             <h1>搜索包含"{{page.keyword}}"的兼职招聘</h1>
           </div>
           <div class="listArea">
             <div class="list" v-loading="loading">
-              <nuxt-link class="cell"
+              <nuxt-link
+                class="cell"
                 v-for="item in dataList"
                 :key="item.id"
-                :to="`/job/detail/${item.hashId}`"
+                :to="`/d/${item.hashId}`"
                 target="_blank"
                 :title="item.name"
               >
@@ -67,15 +83,21 @@
                 </div>
                 <div class="workDesc">{{item.description}}</div>
                 <div class="labelList">
-                  <div class="label" v-for="skill in (item.skills || [])"><p>{{skill.name}}</p></div>
-                  <div class="label"><p>{{item.experienceName}}</p></div>
+                  <div class="label" v-for="skill in (item.skills || [])">
+                    <p>{{skill.name}}</p>
+                  </div>
+                  <div class="label">
+                    <p>{{item.experienceName}}</p>
+                  </div>
                 </div>
                 <div class="bottomArea">
                   <div class="companyInfo">
                     <div class="logo">
-                      <img :src="item.companyInfo.logo" alt=""/>
+                      <img :src="item.companyInfo.logo" alt />
                     </div>
-                    <div class="companyName">{{item.companyInfo.shortName || item.companyInfo.name }}</div>
+                    <div
+                      class="companyName"
+                    >{{item.companyInfo.shortName || item.companyInfo.name }}</div>
                   </div>
                   <div class="publishTime">{{item.createdAtFormat}}</div>
                 </div>
@@ -86,32 +108,49 @@
             </div>
           </div>
           <div class="pagination">
-            <el-pagination v-if="!isSeoList" background layout="prev, pager, next" :total="page.total"
-              :page-size="page.pageSize" @current-change="pageChange" :current-page="Number(page.current
-            )"></el-pagination>
+            <el-pagination
+              v-if="!isSeoList"
+              background
+              layout="prev, pager, next"
+              :total="page.total"
+              :page-size="page.pageSize"
+              @current-change="pageChange"
+              :current-page="Number(page.current
+            )"
+            ></el-pagination>
             <div v-else>
               <div class="list">
-                <nuxt-link v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
-                  :to="`/job/?page=${index+1}`"
+                <nuxt-link
+                  v-for="(item,index) in new Array(Math.ceil(page.total / page.size))"
+                  :to="`/?page=${index+1}`"
                   :key="(page)+index"
-                >
-                  {{index+1}}
-                </nuxt-link>
+                >{{index+1}}</nuxt-link>
               </div>
             </div>
           </div>
           <BottomBanner></BottomBanner>
         </div>
       </div>
-      <SeoFooter style="" :data="footer"/>
+      <SeoFooter style :data="footer" />
     </div>
     <div v-else class="jobListMobile">
       <div class="topSelect">
         <van-dropdown-menu>
           <!--方式-->
-          <van-dropdown-item v-model="selected['workType']" :options="typeList['workType'].list" key="workType" @change="changeIndex('workType')"/>
+          <van-dropdown-item
+            v-model="selected['workType']"
+            :options="typeList['workType'].list"
+            key="workType"
+            @change="changeIndex('workType')"
+          />
           <!--地区-->
-          <van-dropdown-item v-model="selected['city']" :options="typeList['city'].list" key="city"  @change="changeIndex('city')" :disabled="selected.workType===1"/>
+          <van-dropdown-item
+            v-model="selected['city']"
+            :options="typeList['city'].list"
+            key="city"
+            @change="changeIndex('city')"
+            :disabled="selected.workType===1"
+          />
           <!--职业-->
           <van-dropdown-item :title="calcName.text" key="direction" ref="directionSelect">
             <van-tree-select
@@ -124,7 +163,12 @@
         </van-dropdown-menu>
       </div>
       <h1>{{calcH1()}}</h1>
-      <van-pull-refresh v-model="refreshing" @refresh="onRefresh" class="listArea" :class="{noneInWx: !$deviceType.app}">
+      <van-pull-refresh
+        v-model="refreshing"
+        @refresh="onRefresh"
+        class="listArea"
+        :class="{noneInWx: !$deviceType.app}"
+      >
         <div style="text-align: center" v-if="firstLoading">
           <van-loading size="24px">加载中...</van-loading>
         </div>
@@ -137,10 +181,11 @@
           :immediate-check="false"
           class="list"
         >
-          <nuxt-link class="cell"
+          <nuxt-link
+            class="cell"
             v-for="item in dataList"
             :key="item.id"
-            :to="`/job/detail/${item.hashId}`"
+            :to="`/d/${item.hashId}`"
             target="_blank"
             :title="item.name"
           >
@@ -150,11 +195,13 @@
             </div>
             <div class="workDesc">{{item.description}}</div>
             <div class="labelList">
-              <div class="label" v-for="skill in (item.skills || [])"><p>{{skill.name}}</p></div>
+              <div class="label" v-for="skill in (item.skills || [])">
+                <p>{{skill.name}}</p>
+              </div>
             </div>
             <div class="companyInfo" @click.stop="jumpToCompanyInfo(item)">
               <div class="logo">
-                <img :src="item.companyInfo.logo" alt=""/>
+                <img :src="item.companyInfo.logo" alt />
               </div>
               <div class="companyName">{{item.companyInfo.shortName || item.companyInfo.name}}</div>
             </div>
@@ -166,275 +213,324 @@
 </template>
 
 <script>
-  import ConnectUs from "@/components/common/connectUs"
-  import BindMobile from "@/components/common/bindMobile"
-  import DealSeoData from "@/components/job/dealSeoIndex"
-  import DealSeoFooter from "@/components/job/dealSeoFooter"
-  import BottomBanner from "@/components/job/bottomBanner"
-  import SeoFooter from "@/components/SeoFooter"
-
-  export default {
-    name: "JobListSeoIndex",
-    // layout: "opacity_header",
-    showCommonFooter: false,
-    components: { ConnectUs, BindMobile, SeoFooter, BottomBanner },
-    head() {
-      const { title = "", keyword = "", descrption = "", h1 = "", canonical = "", metaLocation } = this.head || {}
-      let obj = {
-        title: title,
-        meta: [
-          {
-            'name': 'keywords',
-            'content': keyword
-          }, {
-            'name': 'descrption',
-            'content': descrption
-          }, {
-            'name': 'h1',
-            'content': h1
-          }
-        ],
-        link: [
-          { rel: 'canonical', href: canonical },
-        ]
-      }
-      if (metaLocation) {
-        obj.meta.push({ 'name': 'location', 'content': metaLocation })
-      }
-      return obj
-    },
-    async asyncData({ ...params }) {
-      try {
-        params.store.commit("updateNoneCommonFooter", true)
-      } catch ( e ) {
-        console.log("updateNoneCommonFooter", e)
-      }
-      let dealDataObj = new DealSeoData(params)
-      let ans = await dealDataObj.dealData()
+import ConnectUs from "@/components/common/connectUs";
+import BindMobile from "@/components/common/bindMobile";
+import DealSeoData from "@/components/job/dealSeoIndex";
+import DealSeoFooter from "@/components/job/dealSeoFooter";
+import BottomBanner from "@/components/job/bottomBanner";
+import SeoFooter from "@/components/SeoFooter";
 
-      let dealSeoFooterObj = new DealSeoFooter(params)
-      let footer = await dealSeoFooterObj.dealData()
-      return {
-        ...ans,
-        ...footer
-      }
-    },
-    data() {
-      return {
-        expansion: {
-          direction: 0,
-          city: 0,
+export default {
+  name: "JobListSeoIndex",
+  // layout: "opacity_header",
+  showCommonFooter: false,
+  components: { ConnectUs, BindMobile, SeoFooter, BottomBanner },
+  head() {
+    const {
+      title = "",
+      keyword = "",
+      descrption = "",
+      h1 = "",
+      canonical = "",
+      metaLocation,
+    } = this.head || {};
+    let obj = {
+      title: title,
+      meta: [
+        {
+          name: "keywords",
+          content: keyword,
         },
-        isShowToast: false,
-        name: '',
-        phone: '',
-        loading: false,
-        refreshing: false,
-        firstLoading: false, //移动端加载loading
-        isLoading: false
-      }
-    },
-    watch: {
+        {
+          name: "descrption",
+          content: descrption,
+        },
+        {
+          name: "h1",
+          content: h1,
+        },
+      ],
+      link: [{ rel: "canonical", href: canonical }],
+    };
+    if (metaLocation) {
+      obj.meta.push({ name: "location", content: metaLocation });
+    }
+    return obj;
+  },
+  async asyncData({ ...params }) {
+    try {
+      params.store.commit("updateNoneCommonFooter", true);
+    } catch (e) {
+      console.log("updateNoneCommonFooter", e);
+    }
+    let dealDataObj = new DealSeoData(params);
+    let ans = await dealDataObj.dealData();
 
-    },
-    computed: {
-      canSelectCity() {
-        //远程无法选中地区
-        return this.selected.workType !== 1
+    let dealSeoFooterObj = new DealSeoFooter(params);
+    let footer = await dealSeoFooterObj.dealData();
+    return {
+      ...ans,
+      ...footer,
+    };
+  },
+  data() {
+    return {
+      expansion: {
+        direction: 0,
+        city: 0,
       },
-      calcName() {
-        const {direction, directionSmall, directionName = "", directionSmallName = "", } = this.selected
-        let job = directionSmall || direction
-        let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
+      isShowToast: false,
+      name: "",
+      phone: "",
+      loading: false,
+      refreshing: false,
+      firstLoading: false, //移动端加载loading
+      isLoading: false,
+    };
+  },
+  watch: {},
+  computed: {
+    canSelectCity() {
+      //远程无法选中地区
+      return this.selected.workType !== 1;
+    },
+    calcName() {
+      const {
+        direction,
+        directionSmall,
+        directionName = "",
+        directionSmallName = "",
+      } = this.selected;
+      let job = directionSmall || direction;
+      let jobName =
+        directionSmallName === "全部"
+          ? directionName
+          : directionSmallName || directionName;
 
-        return {
-          text: jobName || '全部职业',
-          value: job
+      return {
+        text: jobName || "全部职业",
+        value: job,
+      };
+    },
+  },
+  created() {
+    console.log("created................", this.selected, this.typeList);
+    // this.firstLoading = true
+  },
+  mounted() {
+    console.log("mounted................", this.selected, this.typeList);
+    // this.getList()
+    if (this.mobile) {
+      document.body.style = "overflow:hidden;";
+    }
+  },
+  methods: {
+    //移动端选择器
+    changeIndex(key, item) {
+      //级联选择 特殊处理一下
+      console.log(this.selected, this.typeList);
+      if (key === "directionSmall") {
+        //当右侧选择的不是"全部"选项的时候,将大选项初始化
+        if (item.id) {
+          this.selected["direction"] = 0;
+          this.selected["directionName"] = "";
+          this.selected["directionSlug"] = "";
+          this.selected[key] = item.id;
+          this.selected[key + "Name"] = item.name;
+          this.selected[key + "Slug"] = item.slug;
+        } else {
+          //当右侧选择的是"全部"选项的时候, 将右侧数据初始化,只保留左侧数据
+          //左侧更改时 直接更改的是索引index,故这里要转换一下
+          let myItem = this.typeList.direction.list[
+            this.selected.directionIndex
+          ];
+          this.selected["direction"] = myItem.id;
+          this.selected["directionName"] = myItem.name;
+          this.selected["directionSlug"] = myItem.slug;
+          this.selected[key] = 0;
+          this.selected[key + "Name"] = "";
+          this.selected[key + "Slug"] = "";
         }
       }
-    },
-    created() {
-      // this.firstLoading = true
-    },
-    mounted() {
-      // this.getList()
-      if (this.mobile) {
-        document.body.style = "overflow:hidden;"
+      //如果选中的工作方式是远程,则初始化 城市选择
+      if (key === "workType" && this.selected.workType === 1) {
+        this.selected.city = 0;
+        this.selected.cityName = "";
       }
-    },
-    methods: {
-      //移动端选择器
-      changeIndex(key, item) {
-        //级联选择 特殊处理一下
-        console.log(this.selected, this.typeList)
-        if (key === 'directionSmall') {
-          //当右侧选择的不是"全部"选项的时候,将大选项初始化
-          if (item.id) {
-            this.selected[ 'direction'] = 0
-            this.selected[ 'directionName'] = ''
-            this.selected[ 'directionSlug'] = ''
-            this.selected[ key] = item.id
-            this.selected[ key + 'Name' ] = item.name
-            this.selected[ key + 'Slug' ] = item.slug
-          } else {
-            //当右侧选择的是"全部"选项的时候, 将右侧数据初始化,只保留左侧数据
-            //左侧更改时 直接更改的是索引index,故这里要转换一下
-            let myItem = this.typeList.direction.list[this.selected.directionIndex]
-            this.selected[ 'direction'] = myItem.id
-            this.selected[ 'directionName'] = myItem.name
-            this.selected[ 'directionSlug'] = myItem.slug
-            this.selected[ key] = 0
-            this.selected[ key + 'Name' ] = ''
-            this.selected[ key + 'Slug' ] = ''
-          }
-        }
-        //如果选中的工作方式是远程,则初始化 城市选择
-        if (key === 'workType' && this.selected.workType === 1) {
-          this.selected.city = 0
-          this.selected.cityName = ''
-        }
 
-        this.page.page = 1
-        this.page.total = 0
-        this.firstLoading = true
-        this.getList()
-        this.$refs.directionSelect.toggle(false);
-      },
-      //web的选择器
-      changeIndexSeo(key, item) {
-        console.log("key:", key, "item:", item, "selected:", this.selected)
+      this.page.page = 1;
+      this.page.total = 0;
+      this.firstLoading = true;
+      this.getList();
+      this.$refs.directionSelect.toggle(false);
+    },
+    //web的选择器
+    changeIndexSeo(key, item) {
+      console.log("hhhahahahahhhhhhhhhhhhhhhhh");
+      console.log("key:", key, "item:", item, "selected:", this.selected);
 
-        //远程无法选中地区
-        if (!this.canSelectCity && key === 'city') {
-          return
-        }
+      //远程无法选中地区
+      if (!this.canSelectCity && key === "city") {
+        return;
+      }
 
-        // 如果选中了远程工作,重置城市选择
-        if (key === "workType" && item.id === 1) {
-          this.selected.city = 0
-          this.selected.cityName = ""
-          this.selected.citySlug= ""
-        }
+      // 如果选中了远程工作,重置城市选择
+      if (key === "workType" && item.id === 1) {
+        this.selected.city = 0;
+        this.selected.cityName = "";
+        this.selected.citySlug = "";
+      }
 
-        this.selected[ key ] = item.id
-        this.selected[ key + 'Slug' ] = item.slug
-        //大工作分类时,先显示子分类
-        if (key === 'direction') {
-          if (item.id === 0) {
-            this.selected[ 'directionSmall' ] = item.id
-            this.selected[ 'directionSmallSlug' ] = item.slug
-          } else {
-            let list = this.typeList.direction.list.filter(item => item.id === this.selected.direction)[0]
-            if (list.children && list.children.length > 1) {
-              this.selected[ 'directionSmall' ] = -1
-              this.typeList[key].smallList = [...(list && list.children || [])]
-              return
-            }
+      this.selected[key] = item.id;
+      this.selected[key + "Slug"] = item.slug;
+      //大工作分类时,先显示子分类
+      if (key === "direction") {
+        if (item.id === 0) {
+          this.selected["directionSmall"] = item.id;
+          this.selected["directionSmallSlug"] = item.slug;
+        } else {
+          let list = this.typeList.direction.list.filter(
+            (item) => item.id === this.selected.direction
+          )[0];
+          if (list.children && list.children.length > 1) {
+            this.selected["directionSmall"] = -1;
+            this.typeList[key].smallList = [...((list && list.children) || [])];
+            return;
           }
         }
-        let { citySlug, directionSlug, directionSmallSlug, workTypeSlug} = this.selected
-        let url = "/job/"
-        if (citySlug) {
-          url += citySlug + '/'
-        }
-        if (directionSmallSlug || directionSlug) {
-          url += (directionSmallSlug || directionSlug) + '/'
-        }
-        //驻场方式 不放到url里面
-        if (key === "workType" ) {
-          this.page.page = 1
-          this.page.total = 0
-          this.getList()
-          return
-        }
-        location.href = url
-      },
-      changeExpansion(key) {
-        this.expansion[ key ] = !this.expansion[ key ]
-      },
-      getList() {
-        const { page, selected: {city, direction, directionSmall, workType} } = this
-        let p = {
-          cityId: city,
-          ...page
-        }
-        direction && (p.occupationId = direction) //一级
-        workType && (p.workType = workType)
-        directionSmall > 0 && (p.directionId = directionSmall)  //耳二级
-        if (this.isLoading) {
-          return
-        }
-        this.loading = true
-        this.isLoading = true
-        this.$axios.post('/api/recruit/search', p).then(res => {
+      }
+      let {
+        citySlug,
+        directionSlug,
+        directionSmallSlug,
+        workTypeSlug,
+      } = this.selected;
+      let url = "/";
+      if (citySlug) {
+        url += citySlug + "/";
+      }
+      if (directionSmallSlug || directionSlug) {
+        url += (directionSmallSlug || directionSlug) + "/";
+      }
+      //驻场方式 不放到url里面
+      if (key === "workType") {
+        this.page.page = 1;
+        this.page.total = 0;
+        this.getList();
+        return;
+      }
+      location.href = url;
+    },
+    changeExpansion(key) {
+      this.expansion[key] = !this.expansion[key];
+    },
+    getList() {
+      const {
+        page,
+        selected: { city, direction, directionSmall, workType },
+      } = this;
+      let p = {
+        cityId: city,
+        ...page,
+      };
+      direction && (p.occupationId = direction); //一级
+      workType && (p.workType = workType);
+      directionSmall > 0 && (p.directionId = directionSmall); //耳二级
+      if (this.isLoading) {
+        return;
+      }
+      this.loading = true;
+      this.isLoading = true;
+      this.$axios
+        .post("/api/recruit/search", p)
+        .then((res) => {
           if (Number(res.data.status) === 1) {
-            let data = res.data.data
-            this.page.total = data.total
+            let data = res.data.data;
+            this.page.total = data.total;
             if (this.page.page === 1 || !this.mobile) {
-              this.dataList = [...data.list]
+              this.dataList = [...data.list];
             } else {
-              this.dataList = [ ...this.dataList, ...data.list]
+              this.dataList = [...this.dataList, ...data.list];
             }
-            this.page.page += 1
-            this.page.current = Number(data.page)
+            this.page.page += 1;
+            this.page.current = Number(data.page);
             if (this.page.total <= this.dataList.length) {
-              this.finished = true
+              this.finished = true;
             }
           }
-        }).finally(() => {
-          this.firstLoading = false
-          this.refreshing = false
-          this.isLoading = false
-          this.$nextTick(()=>{
-            this.loading = false
-          })
-          console.log("this.finished", this.finished)
         })
-      },
-      pageChange(i) {
-        this.page.page = i
-        this.getList()
-      },
-      jumpToCompanyInfo(item) {
-        const {companyInfo:{uid}} = item
-        window.open(`/wo/${uid}`, `targetCompany${uid}`)
-      },
-      /** 移动端下拉刷新 **/
-      onRefresh() {
-        // 清空列表数据
-        this.finished = false;
-        console.log('onRefresh')
-        this.onLoad();
-      },
-      onLoad() {
-        console.log('onLoad')
-        this.getList()
-      },
-      calcH1() {
-        const { city, cityName = "", direction, directionName = "", directionSmall, directionSmallName = "" } = this.selected
-        let job = directionSmall || direction
-        let jobName = directionSmallName === "全部" ?  directionName : (directionSmallName || directionName)
-        let title = "兼职招聘"
-        if (city && job) {
-          title = `${cityName}${jobName}兼职招聘`
-        } else if (city && !job) {
-          //兼职城市
-          title = `${cityName}兼职招聘`
-        } else if (!city && job) {
-          //岗位页
-          title = `${jobName}兼职招聘`
-        }
-        return title
-      },
-    }
-  }
+        .finally(() => {
+          this.firstLoading = false;
+          this.refreshing = false;
+          this.isLoading = false;
+          this.$nextTick(() => {
+            this.loading = false;
+          });
+          console.log(
+            "this.finished................................",
+            this.finished
+          );
+        });
+    },
+    pageChange(i) {
+      this.page.page = i;
+      this.getList();
+    },
+    jumpToCompanyInfo(item) {
+      const {
+        companyInfo: { uid },
+      } = item;
+      window.open(
+        this.$store.state.domainConfig.baseUrl + `/wo/${uid}`,
+        `targetCompany${uid}`
+      );
+    },
+    /** 移动端下拉刷新 **/
+    onRefresh() {
+      // 清空列表数据
+      this.finished = false;
+      console.log("onRefresh");
+      this.onLoad();
+    },
+    onLoad() {
+      console.log("onLoad");
+      this.getList();
+    },
+    calcH1() {
+      const {
+        city,
+        cityName = "",
+        direction,
+        directionName = "",
+        directionSmall,
+        directionSmallName = "",
+      } = this.selected;
+      let job = directionSmall || direction;
+      let jobName =
+        directionSmallName === "全部"
+          ? directionName
+          : directionSmallName || directionName;
+      let title = "兼职招聘";
+      if (city && job) {
+        title = `${cityName}${jobName}兼职招聘`;
+      } else if (city && !job) {
+        //兼职城市
+        title = `${cityName}兼职招聘`;
+      } else if (!city && job) {
+        //岗位页
+        title = `${jobName}兼职招聘`;
+      }
+      return title;
+    },
+  },
+};
 </script>
 
 <style scope lang="scss">
-  @import "../../assets/css/job/index.scss";
+@import "../../assets/css/job/index.scss";
 </style>
 <style lang="scss">
-  .van-dropdown-menu__title {
-    color: #666;
-  }
+.van-dropdown-menu__title {
+  color: #666;
+}
 </style>