更新我要招工中的消息页面

This commit is contained in:
dengxin
2024-03-18 17:06:39 +08:00
parent d8930fb893
commit f3cfb8479a
10 changed files with 1688 additions and 663 deletions

View File

@@ -32,7 +32,8 @@
"navigationBarTitleText": "岗位详情", "navigationBarTitleText": "岗位详情",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "pages/projectInfo/userrecruitInfo", "path": "pages/projectInfo/userrecruitInfo",
"style": { "style": {
"navigationBarTitleText": "招工详情", "navigationBarTitleText": "招工详情",
@@ -183,14 +184,15 @@
"navigationBarBackgroundColor": "#1B66FF", "navigationBarBackgroundColor": "#1B66FF",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
} },
,{ {
"path": "pages/user/policyContent", "path": "pages/user/policyContent",
"style": { "style": {
"navigationBarTitleText": "新政详情", "navigationBarTitleText": "新政详情",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "pages/user/policyDetail", "path": "pages/user/policyDetail",
"style": { "style": {
"navigationBarTitleText": "政策详情", "navigationBarTitleText": "政策详情",
@@ -210,8 +212,7 @@
}, },
{ {
"path": "pages/market/market", "path": "pages/market/market",
"style" : "style": {
{
"navigationBarTitleText": "市场详情", "navigationBarTitleText": "市场详情",
"navigationBarBackgroundColor": "#4570fa", "navigationBarBackgroundColor": "#4570fa",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
@@ -223,24 +224,21 @@
}, },
{ {
"path": "pages/recruit/recruit", "path": "pages/recruit/recruit",
"style" : "style": {
{
"navigationBarTitleText": "我要招工", "navigationBarTitleText": "我要招工",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/recruit/reform", "path": "pages/recruit/reform",
"style" : "style": {
{
"navigationBarTitleText": "个体招工", "navigationBarTitleText": "个体招工",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/recruit/subPage/index", "path": "pages/recruit/subPage/index",
"style" : "style": {
{
"navigationBarTitleText": "招工列表", "navigationBarTitleText": "招工列表",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
@@ -248,17 +246,51 @@
}, },
{ {
"path": "pages/recruit/subPage/MessageList", "path": "pages/recruit/subPage/MessageList",
"style" : "style": {
{
"navigationBarTitleText": "消息", "navigationBarTitleText": "消息",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path" : "pages/recruit/subPage/recruit", "path": "pages/recruit/subPage/jobProjectList",
"style" : "style": {
"navigationBarTitleText": "推送岗位",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/recruit/subPage/newsList",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true
}
},
{
"path": "pages/recruit/subPage/newsDetail",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "pages/recruit/subPage/taskProjectList",
"style": {
"navigationBarTitleText": "推送任务",
"enablePullDownRefresh": false
}
},
{
"path": "pages/recruit/subPage/policyList",
"style": {
"navigationBarTitleText": "推送政策",
"enablePullDownRefresh": false
}
},
{
"path": "pages/recruit/subPage/recruit",
"style": {
"navigationBarTitleText": "发布招工", "navigationBarTitleText": "发布招工",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom"
@@ -266,54 +298,49 @@
}, },
{ {
"path": "pages/recruit/subPage/task", "path": "pages/recruit/subPage/task",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/recruit/subPage/work", "path": "pages/recruit/subPage/work",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/recruit/subPage/person", "path": "pages/recruit/subPage/person",
"style" : "style": {
{
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/news/jobProjectList", "path": "pages/news/jobProjectList",
"style" : "style": {
{
"navigationBarTitleText": "推送岗位", "navigationBarTitleText": "推送岗位",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/news/taskProjectList", "path": "pages/news/taskProjectList",
"style" : "style": {
{
"navigationBarTitleText": "推送任务", "navigationBarTitleText": "推送任务",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/news/policyList", "path": "pages/news/policyList",
"style" : "style": {
{
"navigationBarTitleText": "推送政策", "navigationBarTitleText": "推送政策",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
], ],
"subPackages": [{ "subPackages": [
{
"root": "pageMy", "root": "pageMy",
"pages": [ "pages": [
{ {
@@ -406,14 +433,16 @@
"navigationBarTitleText": "我的评价", "navigationBarTitleText": "我的评价",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "my/sala", "path": "my/sala",
"style": { "style": {
"navigationBarTitleText": "我的工资", "navigationBarTitleText": "我的工资",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "my/resume/index", "path": "my/resume/index",
"style": { "style": {
"navigationBarTitleText": "我的简历", "navigationBarTitleText": "我的简历",
@@ -454,13 +483,15 @@
"navigationBarTitleText": "我的行业", "navigationBarTitleText": "我的行业",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "my/vip/index", "path": "my/vip/index",
"style": { "style": {
"navigationBarTitleText": "VIP会员申请", "navigationBarTitleText": "VIP会员申请",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "my/changePhone", "path": "my/changePhone",
"style": { "style": {
"navigationBarTitleText": "变更手机号", "navigationBarTitleText": "变更手机号",
@@ -473,50 +504,54 @@
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "my/userBase", "path": "my/userBase",
"style": { "style": {
"navigationBarTitleText": "基本信息", "navigationBarTitleText": "基本信息",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "my/set", "path": "my/set",
"style": { "style": {
"navigationBarTitleText": "设置", "navigationBarTitleText": "设置",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ },
{
"path": "contract/index", "path": "contract/index",
"style": { "style": {
"navigationBarTitleText": "我的合同", "navigationBarTitleText": "我的合同",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "myProject/myProject", "path": "myProject/myProject",
"style": { "style": {
"navigationBarTitleText": "我的申请", "navigationBarTitleText": "我的申请",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "myProject/myCollection", "path": "myProject/myCollection",
"style": { "style": {
"navigationBarTitleText": "我的收藏", "navigationBarTitleText": "我的收藏",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "myProject/browsingHistory", "path": "myProject/browsingHistory",
"style": { "style": {
"navigationBarTitleText": "浏览记录", "navigationBarTitleText": "浏览记录",
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "setUserBase/seal/setSealPassword", "path": "setUserBase/seal/setSealPassword",
"style": { "style": {
"navigationBarTitleText": "设置签名密码", "navigationBarTitleText": "设置签名密码",
@@ -571,7 +606,6 @@
"navigationBarTitleText": "填写认证信息", "navigationBarTitleText": "填写认证信息",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, },
{ {
"path": "setUserBase/mailbox", "path": "setUserBase/mailbox",
@@ -580,7 +614,8 @@
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, { },
{
"path": "setUserBase/complain", "path": "setUserBase/complain",
"style": { "style": {
"navigationBarTitleText": "投诉建议", "navigationBarTitleText": "投诉建议",
@@ -602,7 +637,8 @@
"navigationBarBackgroundColor": "#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{ },
{
"path": "help/questions/questionDetail", "path": "help/questions/questionDetail",
"style": { "style": {
"navigationBarTitleText": "问题详情", "navigationBarTitleText": "问题详情",
@@ -618,7 +654,8 @@
} }
} }
] ]
}], }
],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "", "navigationBarTitleText": "",

View File

@@ -90,6 +90,7 @@
computed: { computed: {
...mapGetters(['news']), ...mapGetters(['news']),
data() { data() {
console.log(this.news.data,'-----------------------------');
return this.news.data return this.news.data
} }
} }

View File

@@ -1,4 +1,191 @@
<template> <template>
<view class="body">
<view v-for="(value,key) in data" class="newsList" @click="goList(value)" :key="key">
<view class="newsIcon">
<image :src="'../'+value.icon" mode=""></image>
<view v-if="news.unread[value.id] > 0" class="point"></view>
</view>
<view class="newsListRight">
<view class="head">
<view class="head_left">
{{value.title}}
</view>
<view class="head_right" v-if="value.data.length > 0">
{{value.data[0][0][value.prop.time]}}
</view>
</view>
<view class="content" v-if="value.data.length > 0">
{{value.prop.desc(value)}}
</view>
</view>
</view>
<cs-button></cs-button>
</view>
</template>
<script>
import {
mapGetters
} from 'vuex'
export default {
data() {
return {
loading: false
}
},
onLoad() {},
onShow() {
if (!this.$store.state.user.token) {
uni.redirectTo({
url: "/pages/login/login"
})
} else {
uni.$emit('newsReadChange')
}
},
onPullDownRefresh() {
this.loading = true
this.$store.dispatch("newsInit").then(() => {
this.loading = false
uni.stopPullDownRefresh();
}).catch(() => {
this.loading = false
uni.stopPullDownRefresh();
})
},
methods: {
goList(item) {
// 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']),
data() {
console.log(this.news.data,'--------------------==========');
return this.news.data
}
}
}
</script>
<style>
.content {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
width: 560rpx;
overflow: hidden;
white-space: nowrap;
/*不换行*/
text-overflow: ellipsis;
/*超出部分文字以...显示*/
}
.head_right {
float: right;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCCCC;
}
.head_left {
float: left;
font-family: PingFangSC-Regular;
font-size: 36rpx;
color: #333333;
}
.head {
overflow: hidden;
width: 560rpx;
}
.newsListRight {
float: left;
width: 560rpx;
height: 50rpx;
line-height: 50rpx;
padding-left: 30rpx;
}
.newsList .newsIcon {
position: relative;
width: 100rpx;
height: 100rpx;
display: inline-block;
float: left;
}
.newsList image {
width: 100rpx;
height: 100rpx;
}
.newsList .point {
position: absolute;
top: 5rpx;
right: 10rpx;
width: 20rpx;
height: 20rpx;
background: red;
border-radius: 50%;
}
.newsList {
border-bottom: 1rpx solid #dddddd;
padding-bottom: 30rpx;
padding-right: 30rpx;
padding-top: 30rpx;
overflow: hidden;
display: flex;
align-items: center;
}
.body {
background-color: #fefefe;
padding-left: 30rpx;
width: 720rpx;
}
page {
background: #f6f6f6;
}
</style>
<!-- <template>
<view class="1"> <view class="1">
<CustomNavbar @back="back" :titke="'消息'"></CustomNavbar> <CustomNavbar @back="back" :titke="'消息'"></CustomNavbar>
<empty content="暂无数据" mr-top="300"></empty> <empty content="暂无数据" mr-top="300"></empty>
@@ -28,4 +215,4 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style> -->

View File

@@ -0,0 +1,154 @@
<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);
}
})
},
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>

View File

@@ -0,0 +1,100 @@
<template>
<view>
<view class="titlt">
<view class="title_left">
{{data.title}}
</view>
<view class="title_time">
{{data.createTime}}
</view>
</view>
<view class="content">
<rich-text :nodes="nodes"></rich-text>
</view>
</view>
</template>
<script>
import {
noticeDetail
} from '@/api/news.js';
import parseHtml from '@/untils/html-parser.js'
import {
mapGetters
} from 'vuex'
export default {
data() {
return {
content: {},
data: {},
nodes: []
}
},
onLoad({
type
}) {
this.id = type
uni.setNavigationBarTitle({
title: this.news.data[type].title
});
uni.$emit('getNewsDetail', (data) => {
this.data = data
})
this.nodes = parseHtml(this.data.content)
},
onShow() {
if (this.data.isRead === 0) {
this.$store.dispatch('readNew', {
key: this.id,
id: this.data.id
})
}
},
methods: {
},
computed: {
...mapGetters(['news']),
list() {
if (this.id) {
return this.news.data[this.id].data
}
}
}
}
</script>
<style>
.content {
padding: 10rpx 30rpx;
}
text {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #666666;
}
.title_time {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCCCC;
float: right;
}
.titlt {
overflow: hidden;
padding: 10rpx 30rpx;
}
.title_left {
font-family: PingFangSC-Regular;
font-size: 32rpx;
color: #333333;
float: left;
}
</style>

View File

@@ -0,0 +1,202 @@
<template>
<view>
<view :key="group" v-for="(item,group) in list">
<m-slide-list :prop="prop" :key="value.id" v-for="(value,index) in item" :value="value" :button="buttonList" @remove="click(value,group,index)"
@controller-reg="controller.reg" @controller-moving="controller.moving" @controller-opened="controller.opened"
@controller-closed="controller.closed">
<view class="news-item">
<view class="now-message-info" hover-class="uni-item--hover" @click="clickMethod(value)" :style="{width:windowWidth}">
<view class="list-right">
<view v-if="value[prop.isRead] === 0" class="point"></view>
<view class="list-title">{{ value[prop.title] }}</view>
<view class="list-detail">{{ value[prop.listDesc] }}</view>
</view>
<view class="list-right-1" v-if="value[prop.time]">{{ value[prop.time] }}</view>
</view>
<view style="clear:both"></view>
</view>
</m-slide-list>
<!-- <view class="news-loading">
加载中...
</view> -->
</view>
</view>
</template>
<script>
import mSlideList from '../../../components/mark-slide-list/mark-slide-list.vue';
import controller from '../../../components/mark-slide-list/controller';
import {
mapGetters
} from 'vuex'
export default {
components: {
mSlideList
},
data() {
return {
loading: false,
id: '',
controller: new controller(),
buttonList: [{
title: '删除',
background: '#ff3b32',
clickName: 'remove'
}]
};
},
onLoad({
type
}) {
this.id = type
uni.setNavigationBarTitle({
title: this.news.data[type].title
});
},
onPullDownRefresh() {
this.loading = true
this.$store.dispatch("newsReload", this.id).then(() => {
this.loading = false
uni.stopPullDownRefresh();
}).catch(() => {
this.loading = false
uni.stopPullDownRefresh();
})
},
// onPageScroll(obj) {},
onReachBottom() {
if (!this.loading) {
this.loading = true
this.$store.dispatch("newsGetNextPage", this.id).then(() => {
this.loading = false
})
}
},
methods: {
//查看详情
clickMethod(data) {
this.news.data[this.id].navigateTo(data, this.$store.dispatch)
},
click(value, group, index) {
this.$store.dispatch('removeNew', {
id: value.id,
key: this.id,
group,
index
})
}
},
computed: {
...mapGetters(['news']),
list() {
if (this.id) {
return this.news.data[this.id].data
}
},
prop() {
if (this.id) {
return this.news.data[this.id].prop
}
},
windowWidth() {
return uni.getSystemInfoSync().windowWidth + 'px';
}
}
};
</script>
<style lang="scss" scoped>
.uni-item--hover {
background-color: #f1f1f1 !important;
}
.news-item {
height: 160rpx;
}
.now-message-info {
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
/* justify-content: space-between; */
font-size: 16px;
clear: both;
height: 160rpx;
padding: 0 30rpx;
// margin-bottom: 20rpx;
background: #ffffff;
float: left;
border-bottom: 1px solid #f2f2f2;
.icon-image {
border-radius: 10rpx;
width: 100rpx;
height: 100rpx;
float: left;
}
.icon-circle {
background: #3396fb;
border-radius: 100%;
width: 100rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
color: #ffffff;
font-weight: bold;
font-size: 20px;
float: left;
}
.list-right {
position: relative;
float: left;
margin-left: 25rpx;
margin-right: 30rpx;
.point {
position: absolute;
top: 15rpx;
left: -25rpx;
width: 20rpx;
height: 20rpx;
background: red;
border-radius: 50%;
}
.list-title {
width: 350rpx;
line-height: 1.5;
overflow: hidden;
margin-bottom: 10rpx;
color: #333;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
.list-detail {
width: 350rpx;
font-size: 14px;
color: #a9a9a9;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
}
}
.list-right-1 {
position: absolute;
right: 30rpx;
color: #a9a9a9;
font-size: 24rpx;
}
}
.news-loading {}
</style>

View 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="../../../static/img/policy_icon.png" style="width: 60rpx;height:60rpx;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>

View 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>

View File

@@ -308,7 +308,7 @@ export default {
.headSearch .search-view { .headSearch .search-view {
border-bottom: 1rpx solid #dddddd; border-bottom: 1rpx solid #dddddd;
padding: 10rpx 32rpx; padding: 14rpx 32rpx;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
} }

View File

@@ -4,7 +4,7 @@ module.exports = {
proxy: { proxy: {
'/api': { '/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.104:8000", // 阿里云后台地址
// target: 'http://192.168.3.108:8000', // 本地服务接口地址 // target: 'http://192.168.3.108:8000', // 本地服务接口地址
// target: 'http://192.168.3.111:8000', // 本地服务接口地址 // target: 'http://192.168.3.111:8000', // 本地服务接口地址
ws: true, ws: true,