From d158e026996a73b1d5daf840708445112099fbef Mon Sep 17 00:00:00 2001
From: dengxin <2390584170@qq.com>
Date: Wed, 27 Mar 2024 15:42:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8B=9B=E8=81=98=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/vertical-menu/vertical-menu.vue | 58 ++++++++++++----
pages/project/project.vue | 81 ++++++++++------------
2 files changed, 80 insertions(+), 59 deletions(-)
diff --git a/components/vertical-menu/vertical-menu.vue b/components/vertical-menu/vertical-menu.vue
index f02c69a..f5f8a71 100644
--- a/components/vertical-menu/vertical-menu.vue
+++ b/components/vertical-menu/vertical-menu.vue
@@ -16,14 +16,20 @@
{{ item.name }}
-
+
+ 请选择区域
+ 请选择行业
+
-
@@ -46,7 +51,7 @@
取消
- 确定
+ 确定
diff --git a/pages/project/project.vue b/pages/project/project.vue
index dc1ae97..874712c 100644
--- a/pages/project/project.vue
+++ b/pages/project/project.vue
@@ -175,9 +175,16 @@ export default {
},
onLoad: function () {
this.getData()
- this.getPolicy()
+ // this.getPolicy()
},
onShow: function () {
+ switch (this.activeTab) {
+ case 0: this.getNewList(); break;
+ case 1: this.getNearList(); break;
+ case 2: this.getPolicy(); break;
+ default: this.getNewList(); break;
+ }
+
if (this.$store.state.user.token) {
this.$store.dispatch('refreshAuthState').then((e) => {
var auth = this.$store.state.auth
@@ -271,6 +278,29 @@ export default {
url: '../mapSeach/mapSeach'
})
},
+
+ changeTab: function (e) {
+ this.isSearch = false;
+ this.activeTab = e;
+ },
+
+ goPolicyInfo(data) {
+ if (data) {
+ // var val=encodeURIComponent(data)
+
+ uni.navigateTo({
+ url: `/pages/user/policyContent?id=${data}`
+ })
+
+ }
+ else {
+ // uni.showToast({
+ // title:'暂无内容',
+ // icon:'none'
+ // })
+ }
+ },
+
//个人户招工;
getPolicy() {
let params = {
@@ -300,10 +330,6 @@ export default {
// this.policyContentList=res.data.data.records
// })
},
- changeTab: function (e) {
- this.isSearch = false;
- this.activeTab = e;
- },
//推荐岗位;
getNearList: function (point) {
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
@@ -317,36 +343,7 @@ export default {
}
})
},
- goPolicyInfo(data) {
- if (data) {
- // var val=encodeURIComponent(data)
- uni.navigateTo({
- url: `/pages/user/policyContent?id=${data}`
- })
-
- }
- else {
- // uni.showToast({
- // title:'暂无内容',
- // icon:'none'
- // })
- }
- },
-
- // getRecommendList: function () {
- // recommendMission(this.recommendPage.current, this.recommendPage.size, '').then(res => {
- // if (this.recommendPage.current === 1) {
- // this.recommendList = [];
- // }
-
- // this.recommendPage.current += 1;
- // this.recommendPage.total = res.data.data.total;
- // if (res.data.data && res.data.data.records.length) {
- // this.recommendList = this.recommendList.concat(res.data.data.records);
- // }
- // })
- // },
//推荐任务;
getNewList: function () {
newMissionAll(this.newPage.current, this.newPage.size, '').then(res => {
@@ -385,7 +382,6 @@ export default {
if (this.isSearch) {
this.getNearListSearch();
} else {
- // this.getRecommendList();
this.getNearList();
}
} else {
@@ -426,8 +422,6 @@ export default {
return
}
if (this.activeTab === 1) {
- // this.recommendPage.current = 1;
- // this.getRecommendList();
this.nearPage.current === 1
this.getNearList();
setTimeout(function () {
@@ -452,13 +446,12 @@ export default {
} else {
uni.$emit('newsReadChange');
this.nearPage.current = 1;
- this.recommendPage.current = 1;
+ this.policyPage.current = 1;
this.newPage.current = 1;
this.getLocation();
- // this.getRecommendList();
- this.getNewList();
- this.getNearList();
- this.getPolicy()
+ // this.getNewList();
+ // this.getNearList();
+ // this.getPolicy()
}
},
@@ -468,6 +461,7 @@ export default {
},
subMitPopUp({ submitData, areaModal, industryModal }) {
this.searchData = { submitData, areaModal, industryModal }
+ console.log(this.searchData,'------');
if (submitData || areaModal || industryModal) {
this.isSearch = true;
}
@@ -496,17 +490,14 @@ export default {
//个体户招工搜索;
getPolicySearch: function () {
const { submitData, areaModal, industryModal } = this.searchData;
-
nearMissionSearch(this.policyPage.current, this.policyPage.size, submitData["学历"],
submitData["工资"], industryModal?.industry, areaModal?.address1[0], areaModal?.address1[1]
).then(res => {
- //
if (this.policyPage.current === 1) {
this.policyContentList = [];
}
this.policyPage.current += 1;
this.policyPage.total = res.data.data.total;
- //
if (res.data.data && res.data.data.records.length) {
this.policyContentList = this.policyContentList.concat(res.data.data.records);
}