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);

View File

@@ -0,0 +1,230 @@
<template>
<view class="body" @click="goInfo(companyitem.id)">
<view class="heads">
<view class="head_left">
<rich-text :nodes="string">
</rich-text>
</view>
<view class="head_right">
{{ companyitem.wage }}{{ wageUnit[companyitem.wageUnitCategory] }}
</view>
</view>
<view class="ask">
<view class="askList">
{{ companyitem.tradeNames }}
</view>
<view class="askList" v-for="(item, index) in skillNames" :key="index">
{{ item }}
</view>
</view>
<!-- <view class="allName">
{{ companyitem.jobCompanyName }}
</view> -->
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
<view class="timeAddress" style="position: relative;">
<!-- <view v-if="companyitem.missionCompanyName">
{{ companyitem.missionCompanyName }}
</view> -->
<!-- <view>
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;" mode=""></image>
{{ companyitem.jobCompanyName }}
</view> -->
<view style="display: flex;align-items: center;">
<image src="../../static/img/city.png" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" mode=""></image>
<view style="font-size: 26rpx;color:#333;">{{ companyitem.jobCompanyName }}</view>
</view>
<!-- <view v-if="near">
{{ companyitem.distanceStr }}km
</view>
<view v-else>
{{ getCity(companyitem.cityId) }}
</view> -->
<view style="display: flex;align-items: center;position:absolute;right:0;">
<image src="../../static/img/location_new.png" style="width: 30rpx;height: 30rpx;" mode=""></image>
<view>2.2km</view>
</view>
</view>
<view class="comment" v-if='comment' @tap.stop="goComment(companyitem.missionNo)">
<view class="comment_content commentimg" v-if='companyitem.scoreAll > 0'>
<image class="commentimg_image" src="../../static/img/star.full.svg" v-for="index1 in companyitem.scoreAll"
mode="" :key="index1"></image>
<image class="commentimg_image" src="../../static/img/star.empty.svg"
v-for="index2 in (5 - companyitem.scoreAll)" mode="" :key="index2"></image>
</view>
<view class="comment_content allName gocomment" v-else>
评价
</view>
</view>
</view>
</template>
<script>
import {
toDoller,
dateFormat
} from "../../untils/format.js";
import dictionary from '@/common/textdata.js';
export default {
beforeCreate: function () { },
props: {
companyitem: {
type: Object,
default() { return [] }
},
comment: {
type: Boolean,
default: false
},
noApply: {
type: Boolean,
default: true
},
near: {
type: Boolean,
default: false
}
},
data() {
return {
...dictionary,
string: "<div style='overflow: hidden;white-space: nowrap;text-overflow: ellipsis;'>" + this.companyitem.jobName +
"</div>"
};
},
computed: {
skillNames() {
return this.companyitem.skillNames.split(',')
}
},
methods: {
goComment: function (no) {
uni.navigateTo({
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
})
},
goInfo: function (no) {
console.log('11111')
const isCan = this.noApply === false ? '0' : '1'
uni.navigateTo({
url: `/pages/projectInfo/userrecruitInfo?workId=${encodeURIComponent(no)}&isCan=${isCan}`
})
},
getCity: function (val) {
if (val) {
let areas = this.$store.getters.getAreaParents(val)
if (areas.length === 3) {
return areas[0].label + '-' + areas[1].label + '-' + areas[2].label
}
}
},
toDoller,
dateFormat
}
}
</script>
<style>
.commentimg_image {
width: 40rpx;
height: 40rpx;
}
.commentimg {
display: flex;
align-items: center;
justify-content: flex-end;
}
.gocomment {
font-size: 26rpx !important;
border-radius: 5rpx;
border: 1rpx solid #c3c3c3;
width: 160rpx;
text-align: center;
float: right;
height: 50rpx;
line-height: 50rpx;
}
.timeAddress {
display: flex;
align-items: center;
justify-content: space-between;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #999999;
margin: 10rpx 0;
padding: 10rpx 0;
}
.allName {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
}
.askList {
/* width: 14%; */
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #666666;
background-color: #f6f6f6;
padding: 5rpx 15rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
}
.ask {
overflow: hidden;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
margin: 20rpx 0;
}
.head_right {
ont-family: PingFangSC-Medium;
font-size: 28rpx;
color: #F46161;
font-weight: bold;
}
.head_left {
font-family: PingFangSC-Medium;
font-size: 32rpx;
font-weight: bold;
color: #333333;
width: 350rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.highlight {
color: #F46161;
}
.body {
width: 690rpx;
margin: 0rpx auto;
background-color: #fefefe;
overflow: hidden;
box-sizing: border-box;
padding: 20rpx;
padding-bottom: 0;
border-radius: 20rpx;
margin-top: 20rpx;
}
.heads {
display: flex;
align-items: center;
justify-content: space-between;
}
</style>