Procházet zdrojové kódy

兼职招聘Web分页bug

xinfeng před 6 roky
rodič
revize
4cb4c78f99
2 změnil soubory, kde provedl 5 přidání a 23 odebrání
  1. 1 0
      components/job/dealSeoIndex.js
  2. 4 23
      pages/job/index.vue

+ 1 - 0
components/job/dealSeoIndex.js

@@ -186,6 +186,7 @@ export default class DealSeoData {
       })
       this.dataList = [ ...dataList ]
       this.page.page += 1
+      this.page.current = Number(data.page)
       if (this.page.total <= this.dataList.length) {
         this.finished = true
       }

+ 4 - 23
pages/job/index.vue

@@ -79,11 +79,12 @@
         </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.page)"></el-pagination>
+            :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="`/kaifain/s/?page=${index+1}`"
+                :to="`/job/?page=${index+1}`"
                 :key="(page)+index"
               >
                 {{index+1}}
@@ -236,6 +237,7 @@
             })
             this.dataList = data.list
             this.page.page += 1
+            this.page.current = Number(data.page)
             if (this.page.total <= this.dataList.length) {
               this.finished = true
             }
@@ -251,27 +253,6 @@
         this.page.page = i
         this.getList()
       },
-      handleApplyBtnClick() {
-        const { userinfo } = this.$store.state || {}
-        //检查登录
-        if (!userinfo || !userinfo.uid) {
-          this.$message.info('请先登录!')
-          location.href = '/?loginbox=show'
-          return
-        }
-        //去绑定手机号
-        if (!userinfo.mobile) {
-          this.$message.info('请先绑定手机号')
-          this.$refs.bindMobile.open()
-          return
-        }
-        //判断是否是首次入驻 非首次入驻 跳转到企业主页
-        if (Number(userinfo.has_attend_service_provider) !== 0) {
-          location.href = "/wo/" + userinfo.uid
-          return
-        }
-        location.href = "/kaifain/add";
-      },
       jumpToCompanyInfo(item) {
         const {companyInfo:{uid}} = item
         window.open(`/wo/${uid}`, `targetCompany${uid}`)