|
@@ -0,0 +1,131 @@
|
|
|
|
+<template>
|
|
|
|
+ <view>
|
|
|
|
+ <view class="tab">
|
|
|
|
+ <u-tabs :list="tab" :current="current" @click="click"></u-tabs>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="cmain">
|
|
|
|
+ <view class="position">
|
|
|
|
+ <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
|
|
|
|
+ <view class="top">
|
|
|
|
+ <view class="title omit">{{ item.title }}</view>
|
|
|
|
+ <view class="op" v-if="item.status != 0 && item.state == 0" style="color: #ccc">
|
|
|
|
+ <text class="icon"></text>
|
|
|
|
+ <text>审核中</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="op" v-if="item.status != 0 && item.state == 1" style="color: #07cb4c">
|
|
|
|
+ <text class="icon"></text>
|
|
|
|
+ <text>开放中</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="op" v-if="item.status != 0 && item.state == 2" style="color: #ccc">
|
|
|
|
+ <text class="icon"></text>
|
|
|
|
+ <text>审核不通过</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="op" v-if="item.status == 0 || item.state == 3" style="color: #ccc">
|
|
|
|
+ <text class="icon"></text>
|
|
|
|
+ <text>已关闭</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="clear"></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="con">
|
|
|
|
+ <view class="desc">
|
|
|
|
+ <text class="tag">{{ item.experience == '不限' ? '经验不限' : item.experience }}</text>
|
|
|
|
+ <text class="tag">{{ item.education == '不限' ? '学历不限' : item.education }}</text>
|
|
|
|
+ <text class="tag">{{ item.salary }}</text>
|
|
|
|
+ <view class="clear"></view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="clear"></view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
|
|
|
|
+ <u-empty v-if="!loadMore && list.length == 0"></u-empty>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <se v-model="show" :list="tab" @confirm="confirm"></se>
|
|
|
|
+ </view>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ user: this.getUser(),
|
|
|
|
+ show: false,
|
|
|
|
+ name: '全职',
|
|
|
|
+ tab: [{ name: '全职' }, { name: '兼职' }],
|
|
|
|
+ list: [],
|
|
|
|
+ param: { pageNum: 1, pageSize: 10, types: '全职', orderByColumn: 'createTime', isAsc: 'desc' },
|
|
|
|
+ loadMore: true
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ onLoad(e) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/app/position/updateIsRead',
|
|
|
|
+ success: (res) => {}
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ if (this.user.types == 0) {
|
|
|
|
+ this.tab = ['兼职', '任务'];
|
|
|
|
+ this.param.types = '兼职';
|
|
|
|
+ }
|
|
|
|
+ this.getData();
|
|
|
|
+ uni.$on('position', (res) => {
|
|
|
|
+ this.refresh();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //去发布
|
|
|
|
+ confirm(e) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/position/push?types=' + e
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ select(item) {
|
|
|
|
+ this.param.types = item;
|
|
|
|
+ this.refresh();
|
|
|
|
+ },
|
|
|
|
+ detail(item) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/position/push?id=' + item.id
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getData() {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/app/position/user/push/list',
|
|
|
|
+ data: this.param,
|
|
|
|
+ loading: 'false',
|
|
|
|
+ success: (res) => {
|
|
|
|
+ this.loadMore = res.data.pages > this.param.pageNum ? true : false;
|
|
|
|
+ res.data.rows.forEach((item) => {
|
|
|
|
+ item.createTime = uni.$u.timeFrom(Date.parse(item.createTime));
|
|
|
|
+ this.list.push(item);
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ //刷新数据
|
|
|
|
+ refresh() {
|
|
|
|
+ this.loadMore = true;
|
|
|
|
+ this.param.pageNum = 1;
|
|
|
|
+ this.list = [];
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //下拉刷新
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.refresh();
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
+ }, 1000);
|
|
|
|
+ },
|
|
|
|
+ //上拉加载
|
|
|
|
+ onReachBottom() {
|
|
|
|
+ if (this.loadMore) {
|
|
|
|
+ this.param.pageNum++;
|
|
|
|
+ this.getData();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss">
|
|
|
|
+</style>
|