flat: 3.7

This commit is contained in:
Apcallover
2024-03-07 17:34:17 +08:00
parent b655be8cbe
commit 0acb00a2b6
10 changed files with 928 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
<view class="titleSearch">
<view class="searchName"> </view>
<u-search placeholder="搜任务/搜岗位/搜政策" @focus="goSeach" shape="round" :showAction="false"></u-search>
<u-search placeholder="搜任务/搜岗位/搜政策/搜招工" @focus="goSeach" shape="round" :showAction="false"></u-search>
</view>
<view class="navPosition" @click="navTo('/pages/project/projectList')">
<u-icon name="map" color="#2979ff" size="16"></u-icon>
@@ -64,28 +64,35 @@
</view>
</view>
</block>
<block v-if="activeTab == 2">
<view>
<!-- <view class="location" @click="gomap">
<image src="../../static/img/location.svg" mode=""></image>
{{ currentAddress }}切换位置
<image src="../../static/img/right.svg" mode=""></image>
</view> -->
</view>
<view v-if="policyContentList.length > 0" style="padding-bottom: 20rpx;">
<block v-for="(item, index) in policyContentList" :key="item.id">
<userrecruitList :companyitem="item"></userrecruitList>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
暂无信息
</view>
</view>
</block>
<block v-if="activeTab == 2">
<!-- <view v-if="recommendList.length > 0">
<block v-for="(item, index) in recommendList" :key="item.id">
<companyList :companyitem="item"></companyList>
</block>
</view>
<view v-else>
<image src="../../static/img/pic_notask.svg" mode="" class="nothing"></image>
<view class="nothingContnt">
完善技能获取精推荐
</view>
<view class="btn" @click="goResume">
完善技能
</view>
</view> -->
<!-- <block v-if="activeTab == 2">
<view v-for="(item, index) in policyContentList" :key="index" style="width: 90%;height: 100rpx;background-color: #fff;border-radius: 10rpx;margin:20rpx 5% 20rpx 5%;display: flex;align-items: center" @click="goPolicyInfo(item.id)">
<image :src="item.headPic" style="width: 60rpx;height: 60rpx;margin: 0 20rpx;"></image>
<view style="font-size: 26rpx;">{{ item.articleTitle }}</view>
</view>
</block>
</block> -->
<cs-button></cs-button>
</view>
@@ -98,12 +105,14 @@ import vTabs from '@/components/v-tabs/v-tabs.vue';
import testData from '@/common/textdata.js';
import companyList from '@/components/companyList/companyList.vue';
import workList from '@/components/companyList/workList.vue'
import userrecruitList from './userrecruitList.vue'
import {
newMissionAll,
recommendMission,
nearMission
} from '@/api/mission.js';
import {getPolicyContent} from '@/api/newIndex.js'
import {getPushListByUserId } from '@/api/userrecruit.js'
import {
getcoder
} from "@/api/map.js";
@@ -114,7 +123,8 @@ export default {
vTabs,
companyList,
verticalMenu,
workList
workList,
userrecruitList
},
data() {
@@ -140,6 +150,11 @@ export default {
size: 10,
total: 0
},
policyPage: {
current: 1,
size: 10,
total: 0
},
currentAddress: '',
currentPoint: {
latitude: 0,
@@ -149,7 +164,7 @@ export default {
open: false,
showPopUp: false,
nonReactiveArray: ["推荐任务", "推荐岗位", "推荐政策"],
nonReactiveArray: ["推荐任务", "推荐岗位", "推荐招工"],
}
},
onLoad: function () {
@@ -251,9 +266,32 @@ export default {
})
},
getPolicy(){
getPolicyContent(1).then(res=>{
this.policyContentList=res.data.data.records
})
let params = {
current: this.policyPage.current,
size: this.policyPage.size,
}
getPushListByUserId(params).then((res) => {
if(res.data.code === 200 ){
const {records, current, total, size } = res.data.data
console.log('个人招工', records, current, total, size)
if(!records.length) {
return uni.showToast({
icon: "none",
title: '没有更多了',
})
}
if(current === 1) {
this.policyContentList = records
} else {
this.policyContentList = this.policyContentList.concat(records);
}
this.policyPage.current = current + 1;
this.policyPage.total = total;
}
})
// getPolicyContent(1).then(res=>{
// this.policyContentList=res.data.data.records
// })
},
changeTab: function (e) {
this.activeTab = e;
@@ -306,10 +344,10 @@ export default {
if (this.newPage.current === 1) {
this.newList = [];
}
this.newPage.current += 1;
this.newPage.total = res.data.data.total;
if (res.data.data && res.data.data.records.length) {
this.newList = this.newList.concat(res.data.data.records);
this.newPage.current += 1;
}
})
},
@@ -317,7 +355,8 @@ export default {
upLoad: function () {
if (this.activeTab === 0) {
if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) {
this.getNearList(this.currentPoint);
// this.getNearList(this.currentPoint);
this.getNewList();
} else {
uni.showToast({
icon: "none",
@@ -338,22 +377,16 @@ export default {
return
}
if (this.activeTab === 2) {
if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) {
this.getNewList();
} else {
uni.showToast({
icon: "none",
title: '已经是最后一页',
})
}
return
this.getPolicy()
}
},
//下拉刷新
download: function () {
if (this.activeTab === 0) {
this.nearPage.current = 1;
this.newPage.current = 1;
this.getLocation();
this.getNewList();
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);
@@ -368,8 +401,8 @@ export default {
return
}
if (this.activeTab === 2) {
this.newPage.current = 1;
this.getNewList();
this.policyPage.current = 1;
this.getPolicy()
setTimeout(function () {
uni.stopPullDownRefresh();
}, 1000);