界面调整
This commit is contained in:
@@ -40,7 +40,7 @@ export const recMission = () => {
|
|||||||
/*抢任务-附近任务*/
|
/*抢任务-附近任务*/
|
||||||
export const nearMission = (current, size, lat, lon, distance) => {
|
export const nearMission = (current, size, lat, lon, distance) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/jobslink-api/missions/user/mission/nearByList',
|
url: '/api/jobslink-api/user/userWork/getPushListByUserId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
current,
|
current,
|
||||||
@@ -118,3 +118,52 @@ export const missionDetail = (missionNo) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*获取收藏状态*/
|
||||||
|
export const getCollectState = (workId) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/works/jkworkscollect/getCollectStatus',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
workId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/*收藏和取消收藏接口*/
|
||||||
|
export const updateCollectStatus = (workId, status) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/works/jkworkscollect/updateCollectStatus',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
workId,
|
||||||
|
status
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*获取查询关键字列表*/
|
||||||
|
export const getSearchKeyWordsList = () => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/user/userWork/getSearchAllKeyWords',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/*清空搜索历史*/
|
||||||
|
export const clearSearchKeyWords = () => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/user/userWork/delSearchAllKeyWords',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/*通过关键字获取面板搜索结果*/
|
||||||
|
export const getListByKeyWords = (keywords) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/user/userWork/searchAll',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
keywords
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
{{ companyitem.companyName }}
|
{{ companyitem.companyName }}
|
||||||
</view>
|
</view>
|
||||||
<view class="timeAddress">
|
<view class="timeAddress">
|
||||||
<view>
|
<view v-if="companyitem.missionCompanyName">
|
||||||
报名截止日期:{{ dateFormat(companyitem.etimePub) }}
|
{{ companyitem.missionCompanyName }}
|
||||||
</view>
|
</view>
|
||||||
<view v-if="near">
|
<view v-if="near">
|
||||||
{{ companyitem.distanceStr }}km
|
{{ companyitem.distanceStr }}km
|
||||||
|
|||||||
211
components/companyList/workList.vue
Normal file
211
components/companyList/workList.vue
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<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" v-for="(item, index) in skillNames" :key="index">
|
||||||
|
{{ item }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="allName">
|
||||||
|
{{ companyitem.jobCompanyName }}
|
||||||
|
</view>
|
||||||
|
<view class="timeAddress">
|
||||||
|
<view v-if="companyitem.missionCompanyName">
|
||||||
|
{{ companyitem.missionCompanyName }}
|
||||||
|
</view>
|
||||||
|
<view v-if="near">
|
||||||
|
{{ companyitem.distanceStr }}km
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
{{ getCity(companyitem.cityId) }}
|
||||||
|
</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) {
|
||||||
|
const isCan = this.noApply === false ? '0' : '1'
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/projectInfo/projectInfo?missionNo=${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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heads {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="home-body">
|
<view class="home-body">
|
||||||
<uni-nav-bar :shadow="false">
|
<uni-nav-bar :shadow="false" >
|
||||||
<view class="headd">
|
<view class="headd" @click="goSeach">
|
||||||
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
||||||
<input type="text" confirm-type="搜索" @confirm="goSeach" v-model="keywords" placeholder="请搜索任务名称或公司名称" />
|
<input type="text" confirm-type="搜索" v-model="keywords" placeholder="请搜索任务名称或公司名称" />
|
||||||
</view>
|
</view>
|
||||||
</uni-nav-bar>
|
</uni-nav-bar>
|
||||||
<view class="homeHead">
|
<view class="homeHead">
|
||||||
@@ -380,12 +380,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.keywords) {
|
// if (this.keywords) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../seach/seach?keywords=' + this.keywords
|
url: '../seach/seach?keywords=' + this.keywords
|
||||||
});
|
});
|
||||||
this.keywords = ''
|
this.keywords = ''
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSwiperList(){
|
getSwiperList(){
|
||||||
|
|||||||
@@ -41,16 +41,16 @@
|
|||||||
|
|
||||||
<block v-if="activeTab == 1">
|
<block v-if="activeTab == 1">
|
||||||
<view>
|
<view>
|
||||||
<view class="location" @click="gomap">
|
<!-- <view class="location" @click="gomap">
|
||||||
<image src="../../static/img/location.svg" mode=""></image>
|
<image src="../../static/img/location.svg" mode=""></image>
|
||||||
{{ currentAddress }}(切换位置)
|
{{ currentAddress }}(切换位置)
|
||||||
<image src="../../static/img/right.svg" mode=""></image>
|
<image src="../../static/img/right.svg" mode=""></image>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="companyList.length > 0">
|
<view v-if="companyList.length > 0">
|
||||||
<block v-for="(item, index) in companyList" :key="item.id">
|
<block v-for="(item, index) in companyList" :key="item.id">
|
||||||
<companyList :companyitem="item" :near="activeTab === 0"></companyList>
|
<workList :companyitem="item" :near="activeTab === 0"></workList>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</block>
|
</block>
|
||||||
|
|
||||||
<block v-if="activeTab == 2">
|
<block v-if="activeTab == 2">
|
||||||
<view v-if="recommendList.length > 0">
|
<!-- <view v-if="recommendList.length > 0">
|
||||||
<block v-for="(item, index) in recommendList" :key="item.id">
|
<block v-for="(item, index) in recommendList" :key="item.id">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
</block>
|
</block>
|
||||||
@@ -76,6 +76,10 @@
|
|||||||
<view class="btn" @click="goResume">
|
<view class="btn" @click="goResume">
|
||||||
完善技能
|
完善技能
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<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">
|
||||||
|
<image :src="item.headPic" style="width: 60rpx;height: 60rpx;margin: 0 20rpx;"></image>
|
||||||
|
<view style="font-size: 26rpx;">{{ item.articleTitle }}</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
@@ -89,11 +93,13 @@
|
|||||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||||
import testData from '@/common/textdata.js';
|
import testData from '@/common/textdata.js';
|
||||||
import companyList from '@/components/companyList/companyList.vue';
|
import companyList from '@/components/companyList/companyList.vue';
|
||||||
|
import workList from '@/components/companyList/workList.vue'
|
||||||
import {
|
import {
|
||||||
newMissionAll,
|
newMissionAll,
|
||||||
recommendMission,
|
recommendMission,
|
||||||
nearMission
|
nearMission
|
||||||
} from '@/api/mission.js';
|
} from '@/api/mission.js';
|
||||||
|
import {getPolicyContent} from '@/api/newIndex.js'
|
||||||
import {
|
import {
|
||||||
getcoder
|
getcoder
|
||||||
} from "@/api/map.js";
|
} from "@/api/map.js";
|
||||||
@@ -102,15 +108,19 @@ import verticalMenu from '@/components/vertical-menu/vertical-menu.vue';
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
vTabs,
|
vTabs,
|
||||||
companyList, verticalMenu
|
companyList,
|
||||||
|
verticalMenu,
|
||||||
|
workList
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
policyContentList: [],
|
||||||
activeTab: 0,
|
activeTab: 0,
|
||||||
companyList: [],
|
companyList: [],
|
||||||
recommendList: [],
|
recommendList: [],
|
||||||
newList: [],
|
newList: [],
|
||||||
|
|
||||||
nearPage: {
|
nearPage: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -135,11 +145,12 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
showPopUp: false,
|
showPopUp: false,
|
||||||
|
|
||||||
nonReactiveArray: ["任务", "岗位", "推荐"],
|
nonReactiveArray: ["推荐任务", "推荐岗位", "推荐政策"],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function () {
|
onLoad: function () {
|
||||||
this.getData()
|
this.getData()
|
||||||
|
this.getPolicy()
|
||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
if (this.$store.state.user.token) {
|
if (this.$store.state.user.token) {
|
||||||
@@ -235,12 +246,17 @@ export default {
|
|||||||
url: '../mapSeach/mapSeach'
|
url: '../mapSeach/mapSeach'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getPolicy(){
|
||||||
|
getPolicyContent(1).then(res=>{
|
||||||
|
this.policyContentList=res.data.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
changeTab: function (e) {
|
changeTab: function (e) {
|
||||||
this.activeTab = e;
|
this.activeTab = e;
|
||||||
},
|
},
|
||||||
//附近任务;
|
//附近任务;
|
||||||
getNearList: function (point) {
|
getNearList: function (point) {
|
||||||
nearMission(this.nearPage.current, this.nearPage.size, point.latitude, point.longitude, 50).then(res => {
|
nearMission(this.nearPage.current, this.nearPage.size).then(res => {
|
||||||
if (this.nearPage.current === 1) {
|
if (this.nearPage.current === 1) {
|
||||||
this.companyList = [];
|
this.companyList = [];
|
||||||
}
|
}
|
||||||
@@ -353,6 +369,7 @@ export default {
|
|||||||
this.getLocation();
|
this.getLocation();
|
||||||
this.getRecommendList();
|
this.getRecommendList();
|
||||||
this.getNewList();
|
this.getNewList();
|
||||||
|
this.getNearList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<view class="proname">
|
<view class="proname">
|
||||||
{{info.missionTitle}}
|
{{info.missionTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="prolist">
|
<!-- <view class="prolist">
|
||||||
任务编码:{{info.missionNo}}
|
任务编码:{{info.missionNo}}
|
||||||
</view>
|
</view> -->
|
||||||
<view class="prolist">
|
<view class="prolist">
|
||||||
任务日期:{{dateFormat((info.stime))}}至{{dateFormat((info.etime))}}
|
任务日期:{{dateFormat((info.stime))}}至{{dateFormat((info.etime))}}
|
||||||
</view>
|
</view>
|
||||||
@@ -86,8 +86,18 @@
|
|||||||
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
|
<map class="map" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
|
||||||
</view>
|
</view>
|
||||||
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view>
|
<view class="" style="height:200rpx;background-color: #f6f6f6;" v-if="isShow!=='0'"></view>
|
||||||
<view class="btn" @click="submit" v-if="isShow!=='0'&&status===0">
|
<view class="btn" v-if="isShow!=='0'&&status===0">
|
||||||
<view class="bottombtn flexbtn">
|
<view @click="collect" style="display: flex;align-items: center;margin-right: 10rpx;flex-direction: column;">
|
||||||
|
<image v-if="collectStatus == 0" src="../../static/img/collect.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
|
||||||
|
<image v-if="collectStatus == 1" src="../../static/img/collect_yes.png" style="width: 36rpx;height: 36rpx;" mode=""></image>
|
||||||
|
<view v-if="collectStatus == 0" style="font-size: 26rpx;color:#707070;margin-top:10rpx;">收藏</view>
|
||||||
|
<view v-if="collectStatus == 1" style="font-size: 20rpx;color:#707070;margin-top:10rpx;">已收藏</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view @click="callPhone" class="bottombtn flexbtn" style="margin-right: 10rpx;background-color: #FBAD17;border-radius: 45rpx;">
|
||||||
|
电话联系
|
||||||
|
</view>
|
||||||
|
<view @click="submit" class="bottombtn flexbtn" style="border-radius: 45rpx;">
|
||||||
抢任务
|
抢任务
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -130,7 +140,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters} from 'vuex'
|
import {mapGetters} from 'vuex'
|
||||||
import {missionDetail,submit} from '@/api/mission.js';
|
import {missionDetail,submit, getCollectState, updateCollectStatus} from '@/api/mission.js';
|
||||||
import {GoLogin} from '@/untils/AxiosUtils.js';
|
import {GoLogin} from '@/untils/AxiosUtils.js';
|
||||||
import {setRead} from '@/api/news.js';
|
import {setRead} from '@/api/news.js';
|
||||||
import {checkPass} from '@/api/auth.js';
|
import {checkPass} from '@/api/auth.js';
|
||||||
@@ -164,7 +174,8 @@
|
|||||||
type: '',
|
type: '',
|
||||||
id: '',
|
id: '',
|
||||||
src: 'https://jlfiles.oss-cn-zhangjiakou.aliyuncs.com/jobslink-api/doc/%E7%94%B5%E5%AD%90%E5%90%88%E5%90%8C%E9%A2%84%E8%A7%88%E5%9B%BE%E7%89%87.png',
|
src: 'https://jlfiles.oss-cn-zhangjiakou.aliyuncs.com/jobslink-api/doc/%E7%94%B5%E5%AD%90%E5%90%88%E5%90%8C%E9%A2%84%E8%A7%88%E5%9B%BE%E7%89%87.png',
|
||||||
maxlength: 6
|
maxlength: 6,
|
||||||
|
collectStatus: 0, // 收藏状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {uniMask,validCode},
|
components: {uniMask,validCode},
|
||||||
@@ -186,6 +197,7 @@
|
|||||||
onShow: function() {
|
onShow: function() {
|
||||||
this.showDetail = true
|
this.showDetail = true
|
||||||
this.getData();
|
this.getData();
|
||||||
|
|
||||||
},
|
},
|
||||||
onShareAppMessage(obj) {
|
onShareAppMessage(obj) {
|
||||||
return {
|
return {
|
||||||
@@ -195,6 +207,26 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dateFormat,
|
dateFormat,
|
||||||
|
collect() {
|
||||||
|
// console.log('收藏,取消收藏')
|
||||||
|
const status = this.collectStatus == 0 ? 1 : 0;
|
||||||
|
updateCollectStatus(this.info.id, status).then(res => {
|
||||||
|
if(res.data.code == 200) {
|
||||||
|
this.getCollectStatus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
callPhone() {
|
||||||
|
console.log('电话联系')
|
||||||
|
},
|
||||||
|
// 获取收藏状态
|
||||||
|
getCollectStatus() {
|
||||||
|
getCollectState(this.info.id).then(res => {
|
||||||
|
// 0 未收藏,1 已收藏
|
||||||
|
// console.log(res)
|
||||||
|
this.collectStatus = res.data.data;
|
||||||
|
})
|
||||||
|
},
|
||||||
getData: function() {
|
getData: function() {
|
||||||
const self = this;
|
const self = this;
|
||||||
missionDetail(self.missionNo).then(res => {
|
missionDetail(self.missionNo).then(res => {
|
||||||
@@ -205,6 +237,7 @@
|
|||||||
self.covers[0].latitude = self.info.lat;
|
self.covers[0].latitude = self.info.lat;
|
||||||
self.covers[0].longitude = self.info.lon;
|
self.covers[0].longitude = self.info.lon;
|
||||||
self.showDetail = true;
|
self.showDetail = true;
|
||||||
|
self.getCollectStatus();
|
||||||
if (self.type === 1) {
|
if (self.type === 1) {
|
||||||
// 设置已读
|
// 设置已读
|
||||||
setRead(self.id).then(res => {
|
setRead(self.id).then(res => {
|
||||||
|
|||||||
@@ -4,19 +4,44 @@
|
|||||||
<view class="search-view">
|
<view class="search-view">
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;" mode=""></image>
|
||||||
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getList('search')"
|
<input type="text" confirm-type="搜索" v-model="keywords" @confirm="getNewList('search')"
|
||||||
placeholder="请输入任务名称或公司名称" />
|
placeholder="请输入任务名称或公司名称" />
|
||||||
|
<view style="width: 80rpx;height: 50rpx;color:#fff;background-color: #0091ff;font-size:24rpx;text-align: center;line-height: 50rpx;border-radius: 25rpx;;">搜索</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="close" @click="closeBack">
|
<!-- <view class="close" @click="closeBack">
|
||||||
取消
|
取消
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<v-tabs :tabs="['推荐任务', '推荐服务', '推荐政策']" height="45px" v-model="activeTab" color="#999" activeColor="#000"
|
<view v-show="searchResultShow" class="search-result">
|
||||||
|
<view class="title">搜索结果</view>
|
||||||
|
<view v-for="(item, index) in searchResultList" class="search-item" @click="toDetail(item)">
|
||||||
|
<image src="../../static/img/search.svg" style="width: 32rpx;height: 32rpx;margin-right: 10rpx;" mode=""></image>
|
||||||
|
<view style="flex:1">{{ item.name }}</view>
|
||||||
|
<view class="type" v-if="item.type == 0">任务</view>
|
||||||
|
<view class="type" v-else-if="item.type == 1">岗位</view>
|
||||||
|
<view class="type" v-else-if="item.type == 2">政策</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="searchResultList.length == 0" style="text-align: center;font-size: 26rpx;margin-top: 20rpx;">暂无数据</view>
|
||||||
|
</view>
|
||||||
|
<view v-show="!searchResultShow" class="search-history">
|
||||||
|
<view class="title">搜索记录</view>
|
||||||
|
<view class="clear" @click="clearKeyWords">
|
||||||
|
<image src="../../static/img/delete.png" style="width: 20rpx;height: 20rpx;" mode=""></image>
|
||||||
|
<view style="margin-left: 5rpx;">清空</view>
|
||||||
|
</view>
|
||||||
|
<view class="wrapper" v-if="searchHistoryList.length > 0">
|
||||||
|
<view class="item" v-for="(item, index) in searchHistoryList">
|
||||||
|
{{ item.keywords }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="empty">暂无历史记录</view>
|
||||||
|
</view>
|
||||||
|
<v-tabs v-show="!searchResultShow" :tabs="['推荐任务', '推荐服务', '推荐政策']" height="45px" v-model="activeTab" color="#999" activeColor="#000"
|
||||||
fontSize="30rpx" activeFontSize="31rpx" @change='changeTab' />
|
fontSize="30rpx" activeFontSize="31rpx" @change='changeTab' />
|
||||||
|
|
||||||
|
|
||||||
<block v-if="activeTab == 0">
|
<block v-if="(activeTab == 0)&&!searchResultShow">
|
||||||
<view v-if="companyList.length > 0">
|
<view v-if="companyList.length > 0">
|
||||||
<block v-for="(item, index) in companyList" :key="item.id">
|
<block v-for="(item, index) in companyList" :key="item.id">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
@@ -29,7 +54,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-if="activeTab == 1">
|
<block v-if="(activeTab == 1)&&!searchResultShow">
|
||||||
<view v-if="newList.length > 0">
|
<view v-if="newList.length > 0">
|
||||||
<block v-for="(item, index) in newList" :key="index">
|
<block v-for="(item, index) in newList" :key="index">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
@@ -43,7 +68,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<block v-if="activeTab == 2">
|
<block v-if="(activeTab == 2)&&!searchResultShow">
|
||||||
<view v-if="recommendList.length > 0">
|
<view v-if="recommendList.length > 0">
|
||||||
<block v-for="(item, index) in recommendList" :key="item.id">
|
<block v-for="(item, index) in recommendList" :key="item.id">
|
||||||
<companyList :companyitem="item"></companyList>
|
<companyList :companyitem="item"></companyList>
|
||||||
@@ -77,7 +102,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { newMissionAll } from '@/api/mission.js';
|
import { newMissionAll, getSearchKeyWordsList, clearSearchKeyWords, getListByKeyWords } from '@/api/mission.js';
|
||||||
import companyList from '@/components/companyList/companyList.vue';
|
import companyList from '@/components/companyList/companyList.vue';
|
||||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||||
import testData from '@/common/textdata.js';
|
import testData from '@/common/textdata.js';
|
||||||
@@ -97,7 +122,10 @@ export default {
|
|||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
total: 0
|
total: 0
|
||||||
}
|
},
|
||||||
|
searchHistoryList: [],
|
||||||
|
searchResultShow: false,
|
||||||
|
searchResultList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function (option) {
|
onLoad: function (option) {
|
||||||
@@ -105,12 +133,33 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
this.getList('search');
|
this.getList('search');
|
||||||
|
|
||||||
|
this.getKeyWordsList()
|
||||||
},
|
},
|
||||||
/*页面滚动到底部*/
|
/*页面滚动到底部*/
|
||||||
onReachBottom: function () {
|
onReachBottom: function () {
|
||||||
this.upLoad()
|
this.upLoad()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 新面板搜索
|
||||||
|
getNewList() {
|
||||||
|
getListByKeyWords(this.keywords).then(res => {
|
||||||
|
this.searchResultShow = true
|
||||||
|
this.searchResultList = res.data.data
|
||||||
|
// this.searchResultList.forEach((item, index) => {
|
||||||
|
// item.name = this.getInf(item.name, this.keywords);
|
||||||
|
// })
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取搜索历史记录
|
||||||
|
getKeyWordsList() {
|
||||||
|
getSearchKeyWordsList().then(res => {
|
||||||
|
let response = res.data
|
||||||
|
if(response.code == 200) {
|
||||||
|
this.searchHistoryList = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//最新任务;
|
//最新任务;
|
||||||
getList: function (type) {
|
getList: function (type) {
|
||||||
//改变搜索条件,页码值变为1
|
//改变搜索条件,页码值变为1
|
||||||
@@ -169,9 +218,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toDetail(item) {
|
||||||
|
const no = item.id
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(no)}&isCan=1`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
changeTab: function (e) {
|
changeTab: function (e) {
|
||||||
this.activeTab = e;
|
this.activeTab = e;
|
||||||
},
|
},
|
||||||
|
// 清空搜索历史
|
||||||
|
clearKeyWords() {
|
||||||
|
clearSearchKeyWords().then(res => {
|
||||||
|
if(res.data.code == 200) {
|
||||||
|
this.getKeyWordsList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -206,7 +270,7 @@ export default {
|
|||||||
|
|
||||||
.headSearch .search-item {
|
.headSearch .search-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 80%;
|
width: 90%;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
line-height: 60rpx;
|
line-height: 60rpx;
|
||||||
@@ -251,4 +315,66 @@ export default {
|
|||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.search-history {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.search-history .title {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.search-history .clear {
|
||||||
|
position: absolute;
|
||||||
|
right: 20rpx;
|
||||||
|
top: 10rpx;
|
||||||
|
font-size: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
.search-history .empty {
|
||||||
|
font-size: 24rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #707070;
|
||||||
|
}
|
||||||
|
.search-history .wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.search-history .wrapper .item {
|
||||||
|
font-size: 20rpx;
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
.search-result {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
}
|
||||||
|
.search-result .title {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 1rpx solid #ddd;
|
||||||
|
height: 60rpx;
|
||||||
|
line-height: 60rpx;
|
||||||
|
}
|
||||||
|
.search-result .search-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 26rpx;
|
||||||
|
border-bottom: 1rpx solid #ddd;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
.search-result .search-item .type {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #707070;
|
||||||
|
background-color: #dddddd;
|
||||||
|
border-radius: 15rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
static/img/collect.png
Normal file
BIN
static/img/collect.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/img/collect_yes.png
Normal file
BIN
static/img/collect_yes.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/img/delete.png
Normal file
BIN
static/img/delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -3,7 +3,7 @@ module.exports = {
|
|||||||
port: 1887,
|
port: 1887,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// target: 'http://127.0.0.1:8000', // 本地服务接口地址
|
// target: 'http://192.168.0.102:8000', // 本地服务接口地址
|
||||||
target: "http://39.98.184.58:8000", // 阿里云后台地址
|
target: "http://39.98.184.58:8000", // 阿里云后台地址
|
||||||
// target: "http://192.168.0.100:8000", // 本地网关
|
// target: "http://192.168.0.100:8000", // 本地网关
|
||||||
ws: true,
|
ws: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user