123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <template>
- <view>
- <u-navbar back-text="共享用工" back-icon-size="28" back-icon-color="#ffffff" :background="{backgroundColor: '#2795FD',}"
- :back-text-style="{color: '#ffffff'}"></u-navbar>
- <view class="tabs">
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
- </view>
- <view class="info-card" v-for="(item,i) in list[current].list" :key="i"
- @click="gotoUrl('pages/packages/shareEmployment/articleDetail?id='+item.id)">
- <!-- 卡片信息 -->
- <view class="detail">
- 企业现急需熟练机床车工5名,如有资源请联系0716-8818118 刘女士。
- </view>
- <view class="tag">
- <view class="item1">
- 急需用工
- </view>
- <view class="date-item">
- 2023-06-12
- </view>
- </view>
- </view>
- <u-divider v-if="formList[current].recordsTotal==list[current].list.length"
- :isnone="formList[current].recordsTotal==0" nonetext="没有找到相关内容" border-color="#CFD2D5">已经到底了</u-divider>
- <!-- 底部按钮 -->
- </view>
- </template>
- <script>
- import * as API from '@/apis/pagejs/packages.js'
- export default {
- data() {
- return {
- formList: [{
- pageIndex: 1,
- pageSize: 20,
- recordsTotal: 1,
- type: "1",
- },
- {
- pageIndex: 1,
- pageSize: 20,
- recordsTotal: 1,
- type: "2",
- }
- ],
- list: [{
- name: '急需用工',
- list: []
- },
- {
- name: '资源共享',
- list: []
- }
- ],
- current: 0
- }
- },
- onReachBottom() {
- var obj = this.list[this.current]
- var objf = this.formList[this.current]
- if (obj.list.length < objf.recordsTotal) {
- this.myLoadmore();
- }
- },
- onReady() {
- this.getList()
- },
- methods: {
- getList() {
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- var list = this.list[this.current].list
- var listForm = this.formList[this.current]
- API.shareWorksList(listForm).then((res) => {
- if (listForm.pageIndex == 1) {
- list = res.data.data;
- } else {
- list = [
- ...list,
- ...res.data.data
- ];
- }
- this.list[this.current].list = list
- this.formList[this.current].recordsTotal = res.data.recordsTotal;
- uni.hideLoading();
- }).catch(error => {
- uni.showToast({icon: 'none',
- title: error,
- icon: "none"
- })
- })
- },
- myLoadmore() {
- this.formList[this.current].pageIndex += 1;
- this.getList();
- },
- change(index) {
- this.current = index;
- var list = this.list[this.current].list
- if (list.length == 0) {
- this.getList();
- }
- }
- }
- }
- </script>
- <style>
- page {
- background: #F0F0F2;
- padding-bottom: 100px;
- }
- </style>
- <style scoped lang="scss">
- .info-card {
- margin: 24rpx 32rpx 0;
- padding: 24rpx;
- background-color: #fff;
- border-radius: 24rpx;
- // 卡片信息
- .detail {
- color: rgba(16, 16, 16, 1);
- line-height: 40rpx;
- }
- .tag {
- display: flex;
- justify-content: space-between;
- margin-top: 16rpx;
- margin-bottom: 24rpx;
- .item1 {
- color: rgba(39, 149, 253, 1);
- font-size: 24rpx;
- }
- .item2 {
- color: rgba(0, 185, 98, 1);
- font-size: 24rpx;
- }
- }
- // 审核
- .check {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 32rpx;
- .state {
- color: rgba(51, 51, 51, 1);
- font-weight: 600;
- }
- .handle {
- display: flex;
- align-items: center;
- .unamend {
- width: 120rpx;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- font-family: Microsoft Yahei;
- border: 1px solid rgba(231, 232, 234, 1);
- border-radius: 50px;
- opacity: 0.4;
- }
- .amend {
- width: 120rpx;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- font-family: Microsoft Yahei;
- border: 1px solid rgba(231, 232, 234, 1);
- border-radius: 50px;
- }
- .delete {
- width: 120rpx;
- height: 56rpx;
- line-height: 56rpx;
- text-align: center;
- font-family: Microsoft Yahei;
- border: 1px solid rgba(231, 232, 234, 1);
- border-radius: 50px;
- margin-left: 24rpx;
- color: #E60012;
- }
- }
- }
- }
- // 底部按钮
- .btn {
- position: fixed;
- bottom: 32rpx;
- left: 0;
- right: 0;
- background-color: #F0F0F2;
- padding: 0 32rpx;
- border-radius: 50px;
- background-color: rgba(34, 149, 255, 1);
- color: rgba(241, 241, 241, 1);
- font-size: 36rpx;
- margin: 0 32rpx;
- box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.03);
- }
- </style>
|