소스 검색

页面刷新

lifanagju_citu 11 달 전
부모
커밋
b49fd3164e
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      src/views/recruit/position/index.vue

+ 1 - 3
src/views/recruit/position/index.vue

@@ -88,8 +88,7 @@ const getData = async () => {
 }
 
 // 页面刷新
-if (routeQuery) getData() 
-// getData() 城市会触发刷新
+if (routeQuery && Object.keys(routeQuery).length) getData() 
 
 // 参数改变后刷新路由,触发数据刷新
 const updateRouter = () => {
@@ -98,7 +97,6 @@ const updateRouter = () => {
     return res
   }, '') : ''
   router.push(`${route.path}?${str}`)
-  // router.push(`${route.path}?${str1}`)
   getData()
 }