消息中心页面开发
This commit is contained in:
@@ -109,6 +109,29 @@ export const myMission = (current, size, status) => {
|
||||
})
|
||||
}
|
||||
|
||||
// 消息中心:推荐岗位和推荐任务
|
||||
export const tuiJianMission = (ids, type) => {
|
||||
return request({
|
||||
url: '/api/jobslink-api/user/userWork/getListByIDs',
|
||||
method: 'get',
|
||||
params: {
|
||||
ids,
|
||||
type
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 推送政策
|
||||
export const getNewsPolicyList = (ids) => {
|
||||
return request({
|
||||
url: '/api/jobslink-api/policy/userList',
|
||||
method: 'get',
|
||||
params: {
|
||||
ids
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/*我的收藏*/
|
||||
export const myCollection = (current, size, status) => {
|
||||
return request({
|
||||
|
||||
@@ -18,6 +18,14 @@ export const getPolicyContent=(type, id)=>request({
|
||||
}
|
||||
})
|
||||
|
||||
export const getPolicyDetail=(id)=>request({
|
||||
url:'/api/jobslink-api/policy/detail',
|
||||
method:'get',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
|
||||
//常见问题
|
||||
export const getQuestionList=(sidebarId, type, source, current, size)=>request({
|
||||
url:'/api/jobslink-api/desk/sidebarContent/getSidebarContentList',
|
||||
|
||||
226
components/companyList/newJobList.vue
Normal file
226
components/companyList/newJobList.vue
Normal file
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view class="body" @click="goInfo(companyitem)">
|
||||
<view class="heads">
|
||||
<view class="head_left">
|
||||
<rich-text :nodes="string">
|
||||
</rich-text>
|
||||
</view>
|
||||
|
||||
<view class="head_right">
|
||||
{{ companyitem.wage }}
|
||||
</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 style="flex:1;"></view>
|
||||
<u-tag text="任务" v-if="companyitem.type == 0" plain size="mini" type="warning"></u-tag>
|
||||
<u-tag text="岗位" v-if="companyitem.type == 1" plain size="mini"></u-tag>
|
||||
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
|
||||
</view>
|
||||
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
||||
<view class="timeAddress" style="position: relative;">
|
||||
<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 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 (item) {
|
||||
// const isCan = this.noApply === false ? '0' : '1'
|
||||
// if(item.type == 0) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
|
||||
// })
|
||||
// } else if(item.type == 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`
|
||||
})
|
||||
// }
|
||||
},
|
||||
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>
|
||||
226
components/companyList/newTaskList.vue
Normal file
226
components/companyList/newTaskList.vue
Normal file
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<view class="body" @click="goInfo(companyitem)">
|
||||
<view class="heads">
|
||||
<view class="head_left">
|
||||
<rich-text :nodes="string">
|
||||
</rich-text>
|
||||
</view>
|
||||
|
||||
<view class="head_right">
|
||||
{{ companyitem.wage }}
|
||||
</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 style="flex:1;"></view>
|
||||
<u-tag text="任务" v-if="companyitem.type == 0" plain size="mini" type="warning"></u-tag>
|
||||
<u-tag text="岗位" v-if="companyitem.type == 1" plain size="mini"></u-tag>
|
||||
<u-tag text="招工" v-if="companyitem.type == 2" plain size="mini"></u-tag>
|
||||
</view>
|
||||
<view style="width: 100%;height: 1rpx;background-color: #999;margin: 0 auto;opacity: .5;"></view>
|
||||
<view class="timeAddress" style="position: relative;">
|
||||
<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.missionCompanyName }}</view>
|
||||
</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.missionTitle +
|
||||
"</div>"
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
skillNames() {
|
||||
return this.companyitem.skillNames.split(',')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goComment: function (no) {
|
||||
uni.navigateTo({
|
||||
url: `../../pageMy/mycomment/mycomment?missionNo=${encodeURIComponent(no)}`
|
||||
})
|
||||
},
|
||||
goInfo: function (item) {
|
||||
// const isCan = this.noApply === false ? '0' : '1'
|
||||
// if(item.type == 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?missionNo=${encodeURIComponent(item.missionNo)}&isCan=1`
|
||||
})
|
||||
// } else if(item.type == 1) {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/projectInfo/workInfo?workId=${encodeURIComponent(item.id)}&isCan=1`
|
||||
// })
|
||||
// }
|
||||
},
|
||||
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>
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "招聘",
|
||||
"appid" : "__UNI__0775612",
|
||||
"appid" : "__UNI__FC83367",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
|
||||
30
pages.json
30
pages.json
@@ -190,6 +190,12 @@
|
||||
"navigationBarTitleText" : "新政详情",
|
||||
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||
}
|
||||
},{
|
||||
"path" : "pages/user/policyDetail",
|
||||
"style" : {
|
||||
"navigationBarTitleText" : "政策详情",
|
||||
"navigationBarBackgroundColor" : "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/project/projectList",
|
||||
@@ -281,6 +287,30 @@
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/news/jobProjectList",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "推送岗位",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/news/taskProjectList",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "推送任务",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/news/policyList",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "推送政策",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
|
||||
159
pages/news/jobProjectList.vue
Normal file
159
pages/news/jobProjectList.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<!-- <view class="tab">
|
||||
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
|
||||
activeFontSize="36rpx" @change='changeTab' />
|
||||
</view> -->
|
||||
<block v-for="(page, pIndex) in data" :key="pIndex">
|
||||
<block v-for="(item, index) in page" :key="item.id">
|
||||
<view class="probody">
|
||||
<company-list :companyitem="item" :noApply="false"></company-list>
|
||||
<view class="baddd"></view>
|
||||
<!-- <block>
|
||||
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
|
||||
<image src="/static/img/tab.blue.svg" mode="" v-else-if="item.status === 2"></image>
|
||||
<image src="/static/img/tab.green.svg" mode="" v-else-if="item.status === 3"></image>
|
||||
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
|
||||
</block> -->
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<view class="nothing" v-if="data.length === 0">
|
||||
<image src="/static/img/pic_notask.svg" mode=""></image>
|
||||
<view class="nothingContnt">
|
||||
暂无岗位信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||
import companyList from '@/components/companyList/newJobList.vue';
|
||||
import {
|
||||
tuiJianMission
|
||||
} from '@/api/mission.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
vTabs,
|
||||
companyList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
activeTab: 0,
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
this.init()
|
||||
},
|
||||
/*页面滚动到底部 换页*/
|
||||
onReachBottom: function() {
|
||||
if (this.current <= Math.ceil(this.total / this.size)) {
|
||||
this.getData();
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: '已经是最后一页',
|
||||
})
|
||||
}
|
||||
},
|
||||
/*下拉刷新*/
|
||||
onPullDownRefresh:function(){
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.current = 1
|
||||
this.data = []
|
||||
this.getData()
|
||||
},
|
||||
getData() {
|
||||
var status = Number(this.activeTab) + 1
|
||||
// 任务
|
||||
// let ids = ["1758500271264247928","1758500271264247929","1758500271264247930","1758500271264247931","1758500271264247932","1758500271264247933"]
|
||||
// let type = 0
|
||||
// 岗位
|
||||
let ids = ["1758500271264247823","1758500271264247824","1758500271264247825","1758500271264247826","1758500271264247827"]
|
||||
let type = 1
|
||||
tuiJianMission(ids, type).then(res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (this.current === 1) {
|
||||
this.data = [];
|
||||
}
|
||||
this.current += 1;
|
||||
this.total = res.data.data.total;
|
||||
if (res.data.data && res.data.data.length) {
|
||||
this.data.push(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
gomap: function() {
|
||||
uni.navigateTo({
|
||||
url: '../mapSeach/mapSeach'
|
||||
})
|
||||
},
|
||||
changeTab: function(e) {
|
||||
this.activeTab = e;
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tab {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.probody image {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.probody {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.baddd {
|
||||
background: #f6f6f6;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.nothing {
|
||||
height: 100%;
|
||||
padding-top: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nothing image {
|
||||
width: 400rpx;
|
||||
height: 200rpx;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.nothingContnt {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -56,17 +56,36 @@
|
||||
},
|
||||
methods: {
|
||||
goList(item) {
|
||||
if (item.data.length === 0) {
|
||||
uni.showToast({
|
||||
title: '暂无消息',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
// if (item.data.length === 0) {
|
||||
// uni.showToast({
|
||||
// title: '暂无消息',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
console.log(item.data)
|
||||
// 任务推送、岗位推送、政策推送
|
||||
if(item.title == '任务推送') {
|
||||
console.log('任务推送')
|
||||
uni.navigateTo({
|
||||
url: './taskProjectList'
|
||||
})
|
||||
} else if(item.title == '岗位推送') {
|
||||
console.log('岗位推送')
|
||||
uni.navigateTo({
|
||||
url: './jobProjectList'
|
||||
})
|
||||
} else if(item.title == '政策推送') {
|
||||
console.log('政策推送')
|
||||
uni.navigateTo({
|
||||
url: './policyList'
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: './newsList?type=' + item.id
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['news']),
|
||||
|
||||
185
pages/news/policyList.vue
Normal file
185
pages/news/policyList.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<!-- <block v-for="(page, pIndex) in data" :key="pIndex">
|
||||
<block v-for="(item, index) in page" :key="item.id">
|
||||
<view class="probody">
|
||||
<company-list :companyitem="item" :noApply="false"></company-list>
|
||||
<view class="baddd"></view>
|
||||
</view>
|
||||
</block>
|
||||
</block> -->
|
||||
<view class="newPeojectList">
|
||||
<view style="background-color: #fff;padding: 20rpx 30rpx;">
|
||||
<view v-for="(item,index) in policyContentList" :key="index" style="display: flex;align-items: center;padding: 20rpx 0;border-bottom:1rpx solid #ddd;" @click="toArticleDetail(item.id)">
|
||||
<!-- <image :src="item.headPic" style="width: 80rpx;height: 80rpx;margin-right: 20rpx;border-radius: 10rpx;" mode=""></image> -->
|
||||
<view style="font-size: 32rpx;">{{ item.name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="policyContentList.length<=0">
|
||||
<image src="../../static/img/pic_notask.svg" class="nothing" mode=""></image>
|
||||
<view class="nothing_text">暂无最新资讯</view>
|
||||
<view class="baddd"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="nothing" v-if="data.length === 0">
|
||||
<image src="/static/img/pic_notask.svg" mode=""></image>
|
||||
<view class="nothingContnt">
|
||||
暂无政策信息
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||
// import companyList from '@/components/companyList/applyList.vue';
|
||||
import {
|
||||
getNewsPolicyList
|
||||
} from '@/api/mission.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
vTabs,
|
||||
// companyList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
policyContentList: [],
|
||||
activeTab: 0,
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
this.init()
|
||||
},
|
||||
/*页面滚动到底部 换页*/
|
||||
onReachBottom: function() {
|
||||
if (this.current <= Math.ceil(this.total / this.size)) {
|
||||
this.getData();
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: '已经是最后一页',
|
||||
})
|
||||
}
|
||||
},
|
||||
/*下拉刷新*/
|
||||
onPullDownRefresh:function(){
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.current = 1
|
||||
this.policyContentList = []
|
||||
this.getData()
|
||||
},
|
||||
toArticleDetail(id) {
|
||||
if(id){
|
||||
uni.navigateTo({
|
||||
url:`/pages/user/policyDetail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
getData() {
|
||||
var status = Number(this.activeTab) + 1
|
||||
// 任务
|
||||
let ids = ["1767522008019800065","1767523160165748738"]
|
||||
// let type = 0
|
||||
// 岗位
|
||||
// let ids = ["1758500271264247823","1758500271264247824","1758500271264247825","1758500271264247826","1758500271264247827"]
|
||||
// let type = 1
|
||||
getNewsPolicyList(ids).then(res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (this.current === 1) {
|
||||
this.policyContentList = [];
|
||||
}
|
||||
this.current += 1;
|
||||
// this.total = res.data.data.total;
|
||||
if (res.data.data && res.data.data.length) {
|
||||
this.policyContentList = res.data.data;
|
||||
// console.log(this.policyContentList)
|
||||
}
|
||||
})
|
||||
},
|
||||
gomap: function() {
|
||||
uni.navigateTo({
|
||||
url: '../mapSeach/mapSeach'
|
||||
})
|
||||
},
|
||||
changeTab: function(e) {
|
||||
this.activeTab = e;
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tab {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.probody image {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.probody {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.baddd {
|
||||
background: #f6f6f6;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.nothing {
|
||||
height: 100%;
|
||||
padding-top: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nothing image {
|
||||
width: 400rpx;
|
||||
height: 200rpx;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.nothingContnt {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nothing {
|
||||
width: 345px;
|
||||
height: 130px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nothing_text {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
text-align: center;
|
||||
margin-bottom: 20rpx;
|
||||
width: 690rpx;
|
||||
}
|
||||
</style>
|
||||
159
pages/news/taskProjectList.vue
Normal file
159
pages/news/taskProjectList.vue
Normal file
@@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<view class="body">
|
||||
<!-- <view class="tab">
|
||||
<v-tabs :tabs="['全部任务','全部岗位']" v-model="activeTab" color="#999" activeColor="#000" fontSize="36rx"
|
||||
activeFontSize="36rpx" @change='changeTab' />
|
||||
</view> -->
|
||||
<block v-for="(page, pIndex) in data" :key="pIndex">
|
||||
<block v-for="(item, index) in page" :key="item.id">
|
||||
<view class="probody">
|
||||
<company-list :companyitem="item" :noApply="false"></company-list>
|
||||
<view class="baddd"></view>
|
||||
<!-- <block>
|
||||
<image src="/static/img/tab.orange.svg" mode="" v-if="item.status === 1"></image>
|
||||
<image src="/static/img/tab.blue.svg" mode="" v-else-if="item.status === 2"></image>
|
||||
<image src="/static/img/tab.green.svg" mode="" v-else-if="item.status === 3"></image>
|
||||
<image src="/static/img/tab.gray.svg" mode="" v-else></image>
|
||||
</block> -->
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<view class="nothing" v-if="data.length === 0">
|
||||
<image src="/static/img/pic_notask.svg" mode=""></image>
|
||||
<view class="nothingContnt">
|
||||
暂无任务信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vTabs from '@/components/v-tabs/v-tabs.vue';
|
||||
import companyList from '@/components/companyList/newTaskList.vue';
|
||||
import {
|
||||
tuiJianMission
|
||||
} from '@/api/mission.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
vTabs,
|
||||
companyList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
activeTab: 0,
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
this.init()
|
||||
},
|
||||
/*页面滚动到底部 换页*/
|
||||
onReachBottom: function() {
|
||||
if (this.current <= Math.ceil(this.total / this.size)) {
|
||||
this.getData();
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: '已经是最后一页',
|
||||
})
|
||||
}
|
||||
},
|
||||
/*下拉刷新*/
|
||||
onPullDownRefresh:function(){
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
this.current = 1
|
||||
this.data = []
|
||||
this.getData()
|
||||
},
|
||||
getData() {
|
||||
var status = Number(this.activeTab) + 1
|
||||
// 任务
|
||||
let ids = ["1758500271264247928","1758500271264247929","1758500271264247930","1758500271264247931","1758500271264247932","1758500271264247933"]
|
||||
let type = 0
|
||||
// 岗位
|
||||
// let ids = ["1758500271264247823","1758500271264247824","1758500271264247825","1758500271264247826","1758500271264247827"]
|
||||
// let type = 1
|
||||
tuiJianMission(ids, type).then(res => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (this.current === 1) {
|
||||
this.data = [];
|
||||
}
|
||||
this.current += 1;
|
||||
this.total = res.data.data.total;
|
||||
if (res.data.data && res.data.data.length) {
|
||||
this.data.push(res.data.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
gomap: function() {
|
||||
uni.navigateTo({
|
||||
url: '../mapSeach/mapSeach'
|
||||
})
|
||||
},
|
||||
changeTab: function(e) {
|
||||
this.activeTab = e;
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tab {
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.probody image {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.probody {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.baddd {
|
||||
background: #f6f6f6;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.nothing {
|
||||
height: 100%;
|
||||
padding-top: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.nothing image {
|
||||
width: 400rpx;
|
||||
height: 200rpx;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.nothingContnt {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
44
pages/user/policyDetail.vue
Normal file
44
pages/user/policyDetail.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<view class="policy-content">
|
||||
<view v-html="strings"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPolicyDetail} from '@/api/newIndex.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
strings:'',
|
||||
contentShow:false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log('1111111111')
|
||||
getPolicyDetail (option.id).then(res => {
|
||||
let htmlString = res.data.data.guidelineContent
|
||||
this.strings = htmlString.replace(/width=\"\d+\" height=\"\d+\"/g, 'width="100%" height="auto"');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
percent2percent25 (URI) {
|
||||
if(URI.indexOf('%') > -1) {
|
||||
return URI.replace(/%/g,'%25')
|
||||
}else{
|
||||
return URI;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page{
|
||||
padding: 20px 20px 20px 20px;
|
||||
overflow: auto;
|
||||
}
|
||||
.policy-content>img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
</style>
|
||||
@@ -138,36 +138,36 @@ const news = {
|
||||
})
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
id: "1",
|
||||
title: "技能推送",
|
||||
icon: "../../static/img/jineng.svg",
|
||||
page: {
|
||||
current: 0,
|
||||
size,
|
||||
total: size
|
||||
},
|
||||
data: [],
|
||||
prop: {
|
||||
title: 'missionTitle',
|
||||
desc: (value) => {
|
||||
if (value.data[0])
|
||||
return `您收到${value.data[0][0]['companyName']}的任务`
|
||||
},
|
||||
time: 'createTime',
|
||||
isRead: 'status',
|
||||
listDesc: 'companyName',
|
||||
},
|
||||
navigateTo(item, dispatch) {
|
||||
dispatch('readNew', {
|
||||
key: '1',
|
||||
id: item.id
|
||||
})
|
||||
uni.navigateTo({
|
||||
url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}`
|
||||
})
|
||||
}
|
||||
},
|
||||
// "3": {
|
||||
// id: "1",
|
||||
// title: "技能推送",
|
||||
// icon: "../../static/img/jineng.svg",
|
||||
// page: {
|
||||
// current: 0,
|
||||
// size,
|
||||
// total: size
|
||||
// },
|
||||
// data: [],
|
||||
// prop: {
|
||||
// title: 'missionTitle',
|
||||
// desc: (value) => {
|
||||
// if (value.data[0])
|
||||
// return `您收到${value.data[0][0]['companyName']}的任务`
|
||||
// },
|
||||
// time: 'createTime',
|
||||
// isRead: 'status',
|
||||
// listDesc: 'companyName',
|
||||
// },
|
||||
// navigateTo(item, dispatch) {
|
||||
// dispatch('readNew', {
|
||||
// key: '1',
|
||||
// id: item.id
|
||||
// })
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/projectInfo/projectInfo?type=1&missionNo=${encodeURIComponent(item.missionNo)}&id=${encodeURIComponent(item.id)}`
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
"4": {
|
||||
id: "1",
|
||||
title: "政策推送",
|
||||
|
||||
@@ -3,9 +3,9 @@ module.exports = {
|
||||
port: 1887,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://192.168.3.104:8000', // 本地服务接口地址
|
||||
// target: 'http://192.168.3.104:8000', // 本地服务接口地址
|
||||
// target: "http://39.98.184.58:8000", // 阿里云后台地址
|
||||
// target: 'http://192.168.3.108:8000', // 本地服务接口地址
|
||||
target: 'http://192.168.3.108:8000', // 本地服务接口地址
|
||||
// target: 'http://192.168.3.111:8000', // 本地服务接口地址
|
||||
ws: true,
|
||||
pathRewrite: {
|
||||
|
||||
Reference in New Issue
Block a user