|
@@ -317,21 +317,34 @@ export default {
|
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
let systemInfo = uni.getSystemInfoSync();
|
|
|
this.statusBarHeight = systemInfo.statusBarHeight || 0;
|
|
this.statusBarHeight = systemInfo.statusBarHeight || 0;
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- uni.$on('city', data => {
|
|
|
|
|
- that.city = data.city
|
|
|
|
|
- uni.setStorageSync('city', that.city)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 更换城市调用getJobSearchList
|
|
|
|
|
+ uni.$on('city', data => {
|
|
|
|
|
+ that.city = data.city
|
|
|
|
|
+ uni.setStorageSync('city', that.city);
|
|
|
|
|
+ this.searchPage = 1
|
|
|
|
|
+ this.getJobSearchList();
|
|
|
|
|
+ })
|
|
|
|
|
+ // 监听筛选条件触发getJobSearchList
|
|
|
|
|
+ uni.$on('updateRecord', () => {
|
|
|
|
|
+ this.getFilterData();
|
|
|
|
|
+ })
|
|
|
|
|
+ // 监听工作性质变化
|
|
|
|
|
+ uni.$on('updatePosition', () => {
|
|
|
|
|
+ this.searchPage = 1;
|
|
|
|
|
+ this.page = 1;
|
|
|
|
|
+ this.getTypeList();
|
|
|
|
|
+ })
|
|
|
if (uni.getStorageSync('city')) {
|
|
if (uni.getStorageSync('city')) {
|
|
|
this.city = uni.getStorageSync('city')
|
|
this.city = uni.getStorageSync('city')
|
|
|
} else {
|
|
} else {
|
|
|
this.city = ''
|
|
this.city = ''
|
|
|
}
|
|
}
|
|
|
- this.getTypeList();
|
|
|
|
|
this.getLocation();
|
|
this.getLocation();
|
|
|
- //this.getJobSearchList();
|
|
|
|
|
},
|
|
},
|
|
|
onUnload(){
|
|
onUnload(){
|
|
|
- uni.$off('city')
|
|
|
|
|
|
|
+ uni.$off('city');
|
|
|
|
|
+ uni.$off('updateRecord');
|
|
|
|
|
+ uni.$off('updatePosition')
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
current(newData, oldData) {
|
|
current(newData, oldData) {
|
|
@@ -339,37 +352,37 @@ export default {
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
title: '加载中'
|
|
|
})
|
|
})
|
|
|
- this.page = 1
|
|
|
|
|
|
|
+ this.searchPage = 1
|
|
|
this.getJobSearchList();
|
|
this.getJobSearchList();
|
|
|
},
|
|
},
|
|
|
currentSx(newData, oldData) {
|
|
currentSx(newData, oldData) {
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
title: '加载中'
|
|
|
})
|
|
})
|
|
|
- this.page = 1
|
|
|
|
|
- this.getJobSearchList();
|
|
|
|
|
- },
|
|
|
|
|
- currentjob(newData, oldData) {
|
|
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '加载中'
|
|
|
|
|
- })
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.getJobSearchList();
|
|
|
|
|
- },
|
|
|
|
|
- currentJobSx(newData, oldData) {
|
|
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '加载中'
|
|
|
|
|
- })
|
|
|
|
|
- this.page = 1
|
|
|
|
|
- this.getJobSearchList();
|
|
|
|
|
- },
|
|
|
|
|
- currentJobSxs(newData, oldData) {
|
|
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '加载中'
|
|
|
|
|
- })
|
|
|
|
|
- this.page = 1
|
|
|
|
|
|
|
+ this.searchPage = 1
|
|
|
this.getJobSearchList();
|
|
this.getJobSearchList();
|
|
|
},
|
|
},
|
|
|
|
|
+ // currentjob(newData, oldData) {
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '加载中'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.page = 1
|
|
|
|
|
+ // this.getJobSearchList();
|
|
|
|
|
+ // },
|
|
|
|
|
+ // currentJobSx(newData, oldData) {
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '加载中'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.page = 1
|
|
|
|
|
+ // this.getJobSearchList();
|
|
|
|
|
+ // },
|
|
|
|
|
+ // currentJobSxs(newData, oldData) {
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '加载中'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.page = 1
|
|
|
|
|
+ // this.getJobSearchList();
|
|
|
|
|
+ // },
|
|
|
},
|
|
},
|
|
|
onPageScroll(e) {
|
|
onPageScroll(e) {
|
|
|
// 监听页面滚动
|
|
// 监听页面滚动
|
|
@@ -380,107 +393,57 @@ export default {
|
|
|
this.isFixed = false;
|
|
this.isFixed = false;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onShow(){
|
|
|
|
|
- //获取选中的筛选条件
|
|
|
|
|
- if (uni.getStorageSync('filter') && (uni.getStorageSync('filter')).length > 0) {
|
|
|
|
|
- let filter = uni.getStorageSync('filter')
|
|
|
|
|
- this.education = '' //学历
|
|
|
|
|
- this.experience = '' //经验
|
|
|
|
|
- this.industry = '' //行业
|
|
|
|
|
- this.salaryRange = '' //薪资
|
|
|
|
|
- this.companyPeople = '' //公司规模
|
|
|
|
|
- filter.map(item => {
|
|
|
|
|
- let arr = []
|
|
|
|
|
- item.list.map(ite => {
|
|
|
|
|
- if (ite.value != '不限') {
|
|
|
|
|
- arr.push(ite.value)
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- switch (item.name) {
|
|
|
|
|
- case '学历要求':
|
|
|
|
|
- this.education = arr.join(',')
|
|
|
|
|
- break;
|
|
|
|
|
- case '薪资范围(单选)':
|
|
|
|
|
- this.salaryRange = arr.join(',')
|
|
|
|
|
- break;
|
|
|
|
|
- case '经验要求':
|
|
|
|
|
- this.experience = arr.join(',')
|
|
|
|
|
- break;
|
|
|
|
|
- case '公司规模':
|
|
|
|
|
- this.companyPeople = arr.join(',')
|
|
|
|
|
- break;
|
|
|
|
|
- case '行业':
|
|
|
|
|
- this.industry = arr.join(',')
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- // console.log(filter)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.education = '' //学历
|
|
|
|
|
- this.experience = '' //经验
|
|
|
|
|
- this.industry = '' //行业
|
|
|
|
|
- this.salaryRange = '' //薪资
|
|
|
|
|
- this.companyPeople = '' //公司规模
|
|
|
|
|
- }
|
|
|
|
|
- this.getJobSearchList();
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
// 获取工作性质列表
|
|
// 获取工作性质列表
|
|
|
getTypeList() {
|
|
getTypeList() {
|
|
|
- var that=this
|
|
|
|
|
- //行业期望
|
|
|
|
|
- this.$Request.get('/app/intention/getIntentionList', {
|
|
|
|
|
-
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.code == 0) {
|
|
|
|
|
- let arr = res.data
|
|
|
|
|
- let classRule=[]
|
|
|
|
|
- let industry=[{id:'不限',name:'不限'}]
|
|
|
|
|
- var industryArr=this.industry==''?[]:this.industry.split(',')
|
|
|
|
|
- industryArr.forEach(function(item){
|
|
|
|
|
- if(that.$queue.array_column(that.directionList,'name').indexOf(item)<0)
|
|
|
|
|
- industry.push({id:item,name:item})
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- arr.forEach(function(item){
|
|
|
|
|
- var tmp={}
|
|
|
|
|
- tmp.id=item.ruleClassifyId
|
|
|
|
|
- tmp.name=item.ruleClassifyName
|
|
|
|
|
- tmp.label=item.ruleClassifyName
|
|
|
|
|
- classRule.push(tmp)
|
|
|
|
|
- var indus=!item.industry?[]:item.industry.split('/')
|
|
|
|
|
- indus.forEach(function(ind){
|
|
|
|
|
- var tm={}
|
|
|
|
|
- tm.name=ind
|
|
|
|
|
- tm.id=ind
|
|
|
|
|
- if(that.$queue.array_column(industry,'name').indexOf(tm.name)<0)
|
|
|
|
|
- industry.push(tm)
|
|
|
|
|
|
|
+ var that=this
|
|
|
|
|
+ //行业期望
|
|
|
|
|
+ this.$Request.get('/app/intention/getIntentionList', {}).then(res => {
|
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
|
+ let arr = res.data
|
|
|
|
|
+ let classRule=[]
|
|
|
|
|
+ let industry=[{id:'不限',name:'不限'}]
|
|
|
|
|
+ var industryArr=this.industry==''?[]:this.industry.split(',')
|
|
|
|
|
+ industryArr.forEach(function(item){
|
|
|
|
|
+ if(that.$queue.array_column(that.directionList,'name').indexOf(item)<0)
|
|
|
|
|
+ industry.push({id:item,name:item})
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ arr.forEach(function(item){
|
|
|
|
|
+ var tmp={}
|
|
|
|
|
+ tmp.id=item.ruleClassifyId
|
|
|
|
|
+ tmp.name=item.ruleClassifyName
|
|
|
|
|
+ tmp.label=item.ruleClassifyName
|
|
|
|
|
+ classRule.push(tmp)
|
|
|
|
|
+ var indus=!item.industry?[]:item.industry.split('/')
|
|
|
|
|
+ indus.forEach(function(ind){
|
|
|
|
|
+ var tm={}
|
|
|
|
|
+ tm.name=ind
|
|
|
|
|
+ tm.id=ind
|
|
|
|
|
+ if(that.$queue.array_column(industry,'name').indexOf(tm.name)<0)
|
|
|
|
|
+ industry.push(tm)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
|
|
+ this.typeList = classRule
|
|
|
|
|
+ this.directionList=industry
|
|
|
|
|
+ that.getJobSearchList();
|
|
|
|
|
+ that.getJobList();
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- this.typeList = classRule
|
|
|
|
|
- this.directionList=industry
|
|
|
|
|
- console.log(44444)
|
|
|
|
|
- that.getJobList();
|
|
|
|
|
- // console.log(this.typeList, '1111')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- return;
|
|
|
|
|
- this.$Request
|
|
|
|
|
- .getT("/app/dict/list", {
|
|
|
|
|
- type: "工作性质",
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- if (res.code == 0) {
|
|
|
|
|
- this.typeList = res.data.map((item) => ({
|
|
|
|
|
- label: item.value,
|
|
|
|
|
- value: item.code,
|
|
|
|
|
- }));
|
|
|
|
|
- // 获取到tabs数据后调用职位列表
|
|
|
|
|
- console.log(3333333)
|
|
|
|
|
- this.getJobList();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.$Request
|
|
|
|
|
+ // .getT("/app/dict/list", {
|
|
|
|
|
+ // type: "工作性质",
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .then((res) => {
|
|
|
|
|
+ // if (res.code == 0) {
|
|
|
|
|
+ // this.typeList = res.data.map((item) => ({
|
|
|
|
|
+ // label: item.value,
|
|
|
|
|
+ // value: item.code,
|
|
|
|
|
+ // }));
|
|
|
|
|
+ // // 获取到tabs数据后调用职位列表
|
|
|
|
|
+ // this.getJobList();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
// 跳转到搜索页面
|
|
// 跳转到搜索页面
|
|
|
goNavs(url) {
|
|
goNavs(url) {
|
|
@@ -518,8 +481,7 @@ export default {
|
|
|
that.getSelectCity(res.longitude,res.latitude)
|
|
that.getSelectCity(res.longitude,res.latitude)
|
|
|
},
|
|
},
|
|
|
fail: function () {
|
|
fail: function () {
|
|
|
- console.log('1111')
|
|
|
|
|
- that.getJobList();
|
|
|
|
|
|
|
+ this.getTypeList();
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -530,8 +492,7 @@ export default {
|
|
|
// console.log(res, '获取地址信息')
|
|
// console.log(res, '获取地址信息')
|
|
|
this.city = res.data.city ? res.data.city : '区域'
|
|
this.city = res.data.city ? res.data.city : '区域'
|
|
|
uni.setStorageSync('city', res.data.city)
|
|
uni.setStorageSync('city', res.data.city)
|
|
|
- console.log('2222')
|
|
|
|
|
- that.getJobList();
|
|
|
|
|
|
|
+ that.getTypeList();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -540,8 +501,8 @@ export default {
|
|
|
let data = {
|
|
let data = {
|
|
|
page: this.page,
|
|
page: this.page,
|
|
|
limit: this.limit,
|
|
limit: this.limit,
|
|
|
- /* postType: this.typeList.length > 0 ? this.typeList[this.current].name : "", */
|
|
|
|
|
- ruleClassifyName: this.typeList[this.current].name, //岗位名称
|
|
|
|
|
|
|
+ postType: this.typeList.length > 0 ? this.typeList[this.current].name : "",
|
|
|
|
|
+ ruleClassifyName: this.typeList.length > 0 ? this.typeList[this.current].name : "", //岗位名称
|
|
|
screen: +this.currentSx + 1, //1推荐 2最新
|
|
screen: +this.currentSx + 1, //1推荐 2最新
|
|
|
city: this.city == "全国" ? "" : this.city,
|
|
city: this.city == "全国" ? "" : this.city,
|
|
|
lng: this.longitude,
|
|
lng: this.longitude,
|
|
@@ -593,9 +554,55 @@ export default {
|
|
|
// 刷新职位列表
|
|
// 刷新职位列表
|
|
|
refreshJobList() {
|
|
refreshJobList() {
|
|
|
this.page = 1;
|
|
this.page = 1;
|
|
|
- console.log(55555)
|
|
|
|
|
this.getJobList();
|
|
this.getJobList();
|
|
|
},
|
|
},
|
|
|
|
|
+ // 筛选求职列表
|
|
|
|
|
+ getFilterData(){
|
|
|
|
|
+ //获取选中的筛选条件
|
|
|
|
|
+ if (uni.getStorageSync('filter') && (uni.getStorageSync('filter')).length > 0) {
|
|
|
|
|
+ let filter = uni.getStorageSync('filter')
|
|
|
|
|
+ this.education = '' //学历
|
|
|
|
|
+ this.experience = '' //经验
|
|
|
|
|
+ this.industry = '' //行业
|
|
|
|
|
+ this.salaryRange = '' //薪资
|
|
|
|
|
+ this.companyPeople = '' //公司规模
|
|
|
|
|
+ filter.map(item => {
|
|
|
|
|
+ let arr = []
|
|
|
|
|
+ item.list.map(ite => {
|
|
|
|
|
+ if (ite.value != '不限') {
|
|
|
|
|
+ arr.push(ite.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ switch (item.name) {
|
|
|
|
|
+ case '学历要求':
|
|
|
|
|
+ this.education = arr.join(',')
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '薪资范围(单选)':
|
|
|
|
|
+ this.salaryRange = arr.join(',')
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '经验要求':
|
|
|
|
|
+ this.experience = arr.join(',')
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '公司规模':
|
|
|
|
|
+ this.companyPeople = arr.join(',')
|
|
|
|
|
+ break;
|
|
|
|
|
+ case '行业':
|
|
|
|
|
+ this.industry = arr.join(',')
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ // console.log(filter)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.education = '' //学历
|
|
|
|
|
+ this.experience = '' //经验
|
|
|
|
|
+ this.industry = '' //行业
|
|
|
|
|
+ this.salaryRange = '' //薪资
|
|
|
|
|
+ this.companyPeople = '' //公司规模
|
|
|
|
|
+ }
|
|
|
|
|
+ this.searchPage = 1
|
|
|
|
|
+ this.getJobSearchList();
|
|
|
|
|
+ },
|
|
|
// 获取求职列表
|
|
// 获取求职列表
|
|
|
getJobSearchList() {
|
|
getJobSearchList() {
|
|
|
let data = {
|
|
let data = {
|
|
@@ -608,6 +615,11 @@ export default {
|
|
|
lat: this.latitude,
|
|
lat: this.latitude,
|
|
|
isDue:1,
|
|
isDue:1,
|
|
|
userId: uni.getStorageSync("userId") ? uni.getStorageSync("userId") : "",
|
|
userId: uni.getStorageSync("userId") ? uni.getStorageSync("userId") : "",
|
|
|
|
|
+ education:this.education || '',//学历
|
|
|
|
|
+ experience:this.experience || '',//经验
|
|
|
|
|
+ industry:this.industry || '',//行业
|
|
|
|
|
+ salaryRange:this.salaryRange || '',//薪资
|
|
|
|
|
+ companyPeople:this.companyPeople || ''//公司规模
|
|
|
};
|
|
};
|
|
|
this.$Request.get("/app/postPush/userGetPostPushList", data).then((res) => {
|
|
this.$Request.get("/app/postPush/userGetPostPushList", data).then((res) => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|