@@ -72,10 +72,11 @@ let searchBarClientHeight = 0;
7272export default {
7373 name: " job" ,
7474 data () {
75+ const { keyword , job_category_id } = this .$route .params ;
7576 return {
76- searchKeyword: " " ,
77+ searchKeyword: keyword || " " ,
7778 currentPage: 1 ,
78- job_category_id_list: [],
79+ job_category_id_list: job_category_id ? [job_category_id] : [],
7980 jobCategories: [],
8081 jobCities: [],
8182 location_code_list: [],
@@ -87,12 +88,6 @@ export default {
8788 };
8889 },
8990
90- activated () {
91- this .searchKeyword = this .$route .params .keyword || " " ;
92- if (this .$route .params .job_category_id ) {
93- this .job_category_id_list = [this .$route .params .job_category_id ];
94- }
95- },
9691 created () {
9792 const jobConfigRequest = this .request
9893 .get (" /job-filters" )
@@ -113,10 +108,13 @@ export default {
113108 this .$nextTick (() => {
114109 positionY = getOffsetTop (document .body , this .$refs .searchBar );
115110 searchBarClientHeight = this .$refs .searchBar .clientHeight ;
116-
117111 });
118112 },
119113 activated () {
114+ this .searchKeyword = this .$route .params .keyword || " " ;
115+ if (this .$route .params .job_category_id ) {
116+ this .job_category_id_list = [this .$route .params .job_category_id ];
117+ }
120118 const onPageScroll = () => {
121119 const top = this .$refs .searchBar .getBoundingClientRect ().top ;
122120
@@ -127,6 +125,8 @@ export default {
127125
128126 this .$on (" hook:deactivated" , () => {
129127 window .removeEventListener (" scroll" , onPageScroll);
128+ // this.clearFilter();
129+ // this.searchKeyword = "";
130130 });
131131 },
132132 computed: {
0 commit comments