123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402 |
- <!-- 菜单悬浮的原理: 通过给菜单添加position:sticky实现, 用法超简单, 仅APP端的低端机不兼容 https://caniuse.com/#feat=css-sticky -->
- <template>
- <view v-if="XCXIsSelect == '是'">
- <view class="sticky-tabs">
- <me-tabs v-model="tabIndex" nameKey='name' :tabs="tabs" @change="tabChange"></me-tabs>
- </view>
- <view>
- <view class="box" v-for="(item,index) in goods" :key="index"
- @click="goNav('/my/order/pay?postPushId='+item.postPushId)">
- <view class="flex align-center justify-between padding-lr padding-tb-sm">
- <view style="color: #00B88F;font-size: 28rpx;font-weight: bold;"><text
- v-if="item.isOverdue==1">到期</text>{{item.statusName}}</view>
- <view class="text-sm" style="color: #999999;">{{item.createTime}}</view>
- </view>
- <view style="width: 100%;height: 1rpx;background: #EEEEEE;"></view>
- <view class="padding-lr padding-tb-sm">
- <view class="flex align-center justify-between">
- <view class="text-bold" style="color: #1F1F1F;font-size: 38upx;">
- {{item.stationName?item.stationName:''}}
- </view>
- <view class="" style="color: #00B88F;font-size: 38upx;"><text
- class="text-lg text-bold">{{item.salaryRange?item.salaryRange:''}}</text></view>
- </view>
- <view class="flex align-center margin-top-sm flex-wrap">
- <view class="argrtn">
- {{item.education}}
- </view>
- <view class="argrtn">
- {{item.experience}}
- </view>
- <view class="argrtn" v-for="(ite,index) in (item.positionWelfare).split(',')" :key="index">
- {{ite}}
- </view>
- </view>
- <view class="address flex align-center justify-between">
- <view class="" style="color: #999999;">
- {{item.company?item.company.companyName:''}}
- </view>
- <view class="" style="color: #666666;">
- {{item.city}} {{item.county}}
- </view>
- </view>
- </view>
- <view style="width: 100%;height: 1rpx;background: #EEEEEE;"></view>
- <view class="flex align-center padding-tb justify-end padding-lr">
- <view class="flex align-center">
- <!-- <view class="btn" @click.stop="Changekefu()">联系客服</view> -->
- <view class="btn" v-if="item.status == 2" @click.stop="closeJob(item.postPushId,'close')">关闭岗位
- </view>
- <view class="btn" v-if="item.status == 5 && item.isOverdue == 0"
- @click.stop="closeJob(item.postPushId,'open')">开启岗位</view>
- <view class="btn" v-if="item.status == 4 || item.isOverdue==1"
- @click.stop="updataServeType(item.postPushId,'save')">重新发布</view>
- <view class="btn"
- v-if="item.status == 2 || item.status==3 || item.status==5 && item.isOverdue==0"
- @click.stop="updataServeType(item.postPushId,'updata')">修改内容</view>
- <view v-if="item.status==1" class="btn" @click.stop="cancelProject(item.postPushId)">取消招聘</view>
- </view>
- </view>
- </view>
- </view>
- <empty v-if="goods.length==0" />
- </view>
- <view class="" v-else>
- 帮助中心,联系我们,为你提供帮助
- </view>
- </template>
- <script>
- import meTabs from "@/components/mescroll-uni/me-tabs/me-tabs.vue";
- import empty from '@/components/empty.vue'
- export default {
- components: {
- meTabs,
- empty
- },
- data() {
- return {
- count: 0,
- statuss: 'loadmore',
- iconType: 'flower',
- loadText: {
- loadmore: '轻轻上拉',
- loading: '努力加载中',
- nomore: '实在没有了'
- },
- goods: [], // 数据列表
- game: [],
- tabs: [{
- name: '全部',
- status: 0
- }, {
- name: '待审核',
- status: 1
- }, {
- name: '招聘中',
- status: 2
- }, {
- name: '已拒绝',
- status: 3
- }, {
- name: '已取消',
- status: 4
- }, {
- name: '已关闭',
- status: 5
- }],
- tabIndex: 0, // tab下标
- page: 1,
- limit: 10,
- userId: 0,
- status: 1,
- nickName: '',
- avatar: '',
- customStyle: {
- color: '#999999',
- border: '2rpx solid #999999',
- // backgroundColor: '#1E1F31',
- border: "8rpx",
- width: '180rpx',
- height: '54rpx',
- margin: "0 0 0 20rpx"
- },
- customStyle1: {
- color: '#557EFD',
- border: '2rpx solid #557EFD',
- // backgroundColor: '#1E1F31',
- border: "8rpx",
- width: '180rpx',
- height: '54rpx',
- margin: "0 0 0 20rpx"
- },
- peopleNum: 0,
- dayNum: 0,
- XCXIsSelect: '是',
- }
- },
- onLoad(option) {
- this.XCXIsSelect = uni.getStorageSync('XCXIsSelect')
- if (this.XCXIsSelect != '是') {
- uni.setNavigationBarTitle({
- title: '帮助中心'
- })
- }
- this.$queue.showLoading("加载中...");
- if (option.index) {
- console.log(option)
- this.tabIndex = parseInt(option.index)
- console.log(' this.tabIndex this.tabIndex', this.tabIndex)
- }
- // this.gettype1();
- // this.gettype2();
- // this.getlist()
- this.userId = uni.getStorageSync('userId')
- this.nickName = uni.getStorageSync('nickName')
- },
- onShow() {
- this.getlist()
- },
- methods: {
- //关闭岗位
- closeJob(postPushId, type) {
- let that = this
- uni.showModal({
- title: '提示',
- content: type == 'close' ? '关闭岗位后,该岗位不会再推荐给用户,是否关闭?' : '开启岗位后,该岗位会重新推荐给用户,是否开启?',
- complete(ret) {
- if (ret.confirm) {
- that.$Request.getT('/app/postPush/closeOrOpen', {
- postPushId: postPushId
- }).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: type == 'close' ? '已关闭' : '已开启',
- duration: 1500,
- complete() {
- that.page = 1
- that.getlist()
- }
- })
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- })
- }
- }
- })
- },
- //修改岗位
- updataServeType(postPushId, type) {
- let companyStatus = uni.getStorageSync('companyStatus')
- if (companyStatus == 1) {
- uni.showToast({
- title: '企业认证审核中,请审核通过后操作!',
- icon: 'none'
- })
- return
- }
- if (companyStatus == 3) {
- uni.showToast({
- title: '企业认证审核未通过,请重新认证!',
- icon: 'none'
- })
- return
- }
- uni.navigateTo({
- url: '/package/addJob/addJob?postPushId=' + postPushId + '&type=' + type
- })
- },
- //取消招聘
- cancelProject(postPushId) {
- let that = this
- uni.showModal({
- content: '确认取消该招聘?',
- title: '提示',
- confirmColor: '#00B88F',
- success(iet) {
- if (iet.confirm) {
- let data = {
- postPushId: postPushId
- }
- that.$Request.postT('/app/postPush/cancelPostPush', data).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: '取消成功',
- duration: 1500,
- complete() {
- that.page = 1
- that.getlist()
- }
- })
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- uni.hideLoading()
- })
- }
- }
- })
- },
- //联系客服
- Changekefu() {
- let that = this
- if (uni.getStorageSync('userType') == 1) { //用户端
- // #ifdef MP-WEIXIN
- wx.openCustomerServiceChat({
- extInfo: {
- url: that.$queue.getData('kefu')
- },
- corpId: that.$queue.getData('kefuAppid'),
- success(res) {
- console.log(res)
- },
- })
- // #endif
- // #ifdef H5
- window.location.href = that.$queue.getData('kefu');
- // #endif
- // #ifdef APP
- let kefu = that.$queue.getData('kefu')
- console.log(kefu)
- plus.runtime.openURL(kefu, function(res) {});
- // #endif
- } else { //企业端
- // #ifdef MP-WEIXIN
- wx.openCustomerServiceChat({
- extInfo: {
- url: that.$queue.getData('kefuq')
- },
- corpId: that.$queue.getData('kefuAppidq'),
- success(res) {
- console.log(res)
- },
- })
- // #endif
- // #ifdef H5
- window.location.href = that.$queue.getData('kefuq');
- // #endif
- // #ifdef APP
- let kefu = that.$queue.getData('kefuq')
- console.log(kefu)
- plus.runtime.openURL(kefu, function(res) {});
- // #endif
- }
- },
- getlist() {
- let data = {
- status: this.tabIndex == 0 ? '' : this.tabIndex,
- page: this.page,
- limit: this.limit,
- companyId: uni.getStorageSync('companyId')
- }
- this.$Request.getT('/app/postPush/getPostPushList', data).then(res => {
- if (res.code == 0) {
- if (this.page == 1) this.goods = []; //如果是第一页需手动制空列表
- res.data.records.forEach(ret => {
- ret.showpeop = false
- if (ret.status == 1) {
- ret.statusName = '待审核'
- } else if (ret.status == 2) {
- ret.statusName = '招聘中'
- } else if (ret.status == 3) {
- ret.statusName = '已拒绝'
- } else if (ret.status == 4) {
- ret.statusName = '已取消'
- } else if (ret.status == 5) {
- ret.statusName = '已关闭'
- }
- this.goods.push(ret)
- })
- this.count = res.data.total
- }
- uni.hideLoading()
- })
- },
- // 切换菜单
- tabChange(e) {
- console.log(e)
- this.tabIndex = e
- this.goods = []; // 置空列表,显示加载进度条
- this.getlist()
- },
- goNav(url) {
- uni.navigateTo({
- url
- })
- }
- },
- onReachBottom: function() {
- if (this.goods.length == this.count) {
- uni.showToast({
- title: '已经到底了',
- icon: 'none'
- })
- } else {
- this.page = this.page + 1;
- this.getlist()
- }
- },
- onPullDownRefresh: function() {
- this.page = 1;
- this.getlist()
- }
- }
- </script>
- <style lang="scss">
- /*
- sticky生效条件:
- 1、父元素不能overflow:hidden或者overflow:auto属性。(mescroll-body设置:sticky="true"即可, mescroll-uni本身没有设置overflow)
- 2、必须指定top、bottom、left、right4个值之一,否则只会处于相对定位
- 3、父元素的高度不能低于sticky元素的高度
- 4、sticky元素仅在其父元素内生效,所以父元素必须是 mescroll
- */
- .sticky-tabs {
- z-index: 990;
- position: sticky;
- top: var(--window-top);
- // background-color: #fff;
- }
- page {
- background-color: #F7F7F7;
- }
- .bg {
- background-color: #FFFFFF;
- }
- .box {
- background: #FFFFFF;
- border-radius: 24upx;
- margin: 30upx;
- }
- .argrtn {
- background: #F6F6F6;
- color: #666666;
- font-size: 24upx;
- border-radius: 8upx;
- padding: 5upx 20upx;
- margin-right: 20upx;
- margin-bottom: 20upx;
- }
- .btn {
- border: 1px solid #00B88F;
- border-radius: 30px;
- color: #00B88F;
- padding: 14upx 35upx;
- margin-left: 20upx;
- }
- </style>
|