消息中心页面开发
This commit is contained in:
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,16 +56,35 @@
|
||||
},
|
||||
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
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: './newsList?type=' + item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user