取消投递列表页面开发
This commit is contained in:
99
packageA/pages/cancelApplication/cancelApplication.vue
Normal file
99
packageA/pages/cancelApplication/cancelApplication.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<AppLayout :show-bg-image="false" :use-scroll-view="false">
|
||||
<view class="collection-content">
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
|
||||
<view class="one-cards">
|
||||
<view class="mian">
|
||||
<renderJobs
|
||||
seeDate="shareTime"
|
||||
v-if="pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import AppLayout from '@/components/AppLayout/AppLayout.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, vacanciesTo } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const userStore = useUserStore();
|
||||
const state = reactive({});
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
onLoad(() => {
|
||||
console.log('onLoad');
|
||||
getJobList('refresh');
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
getJobList();
|
||||
});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${encodeURIComponent(jobId)}`);
|
||||
}
|
||||
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest('/app/job/selectCencalList', params, 'GET').then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
console.log(pageState.list);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.collection-content
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-direction: column
|
||||
|
||||
.main-scroll{
|
||||
flex: 1
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.one-cards{
|
||||
padding: 0 28rpx 20rpx 28rpx;
|
||||
background: #f4f4f4
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -312,6 +312,13 @@
|
||||
"navigationBarBackgroundColor": "#4778EC",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/cancelApplication/cancelApplication",
|
||||
"style": {
|
||||
"navigationBarTitleText": "取消投递",
|
||||
"navigationBarBackgroundColor": "#FFFFFF"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -47,6 +47,10 @@
|
||||
<view class="mini-num">{{ counts.fairCollecitonCount }}</view>
|
||||
<view class="mini-text">预约</view>
|
||||
</view>
|
||||
<view class="numbe-item button-click" @click="navTo('/packageA/pages/cancelApplication/cancelApplication')">
|
||||
<view class="mini-num">{{ counts.applyCencalCount || 0 }}</view>
|
||||
<view class="mini-text">取消投递</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mini-cards">
|
||||
<view class="card-top btn-feel">
|
||||
|
||||
Reference in New Issue
Block a user