2025-03-28 15:19:42 +08:00
|
|
|
<template>
|
2025-12-16 09:22:57 +08:00
|
|
|
<AppLayout
|
|
|
|
|
title="投递记录"
|
|
|
|
|
:use-scroll-view="true"
|
|
|
|
|
mainback-ground-color="#f4f4f4"
|
|
|
|
|
:show-bg-image="false"
|
|
|
|
|
@onScrollBottom="getJobList()"
|
|
|
|
|
>
|
2025-12-15 15:56:47 +08:00
|
|
|
<template #headerleft v-if="isMiniProgram">
|
|
|
|
|
<view class="btnback">
|
|
|
|
|
<image src="@/static/icon/back.png" @click="navBack"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<view class="collection-content">
|
2025-12-15 15:40:16 +08:00
|
|
|
<renderDeliveryRecord
|
|
|
|
|
v-if="pageState.list.length"
|
|
|
|
|
seeDate="applyTime"
|
|
|
|
|
:list="pageState.list"
|
|
|
|
|
:longitude="longitudeVal"
|
|
|
|
|
:latitude="latitudeVal"
|
2025-12-16 09:22:57 +08:00
|
|
|
></renderDeliveryRecord>
|
2025-12-15 15:40:16 +08:00
|
|
|
<empty v-else :is-position="true"></empty>
|
|
|
|
|
</view>
|
|
|
|
|
</AppLayout>
|
2025-03-28 15:19:42 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
|
|
|
|
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
|
|
|
|
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
|
|
|
|
import useUserStore from '@/stores/useUserStore';
|
2025-12-15 15:56:47 +08:00
|
|
|
const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction');
|
2025-05-13 11:10:38 +08:00
|
|
|
import { storeToRefs } from 'pinia';
|
|
|
|
|
import useLocationStore from '@/stores/useLocationStore';
|
|
|
|
|
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
2025-03-28 15:19:42 +08:00
|
|
|
const userStore = useUserStore();
|
2025-12-08 21:46:55 +08:00
|
|
|
const { isMiniProgram } = storeToRefs(useUserStore());
|
2025-03-28 15:19:42 +08:00
|
|
|
const state = reactive({});
|
|
|
|
|
const pageState = reactive({
|
|
|
|
|
page: 0,
|
|
|
|
|
list: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
maxPage: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
});
|
|
|
|
|
onLoad(() => {
|
|
|
|
|
console.log('onLoad');
|
|
|
|
|
// $api.sleep(2000).then(() => {
|
|
|
|
|
// navTo('/pages/login/login');
|
|
|
|
|
// });
|
|
|
|
|
getJobList();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function getJobList(type = 'add') {
|
|
|
|
|
if (type === 'refresh') {
|
2025-05-15 14:17:51 +08:00
|
|
|
pageState.page = 1;
|
2025-03-28 15:19:42 +08:00
|
|
|
pageState.maxPage = 1;
|
|
|
|
|
}
|
|
|
|
|
if (type === 'add' && pageState.page < pageState.maxPage) {
|
|
|
|
|
pageState.page += 1;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
current: pageState.page,
|
|
|
|
|
pageSize: pageState.pageSize,
|
|
|
|
|
};
|
2025-11-30 16:47:06 +08:00
|
|
|
const LoadCache = (resData) => {
|
2025-03-28 15:19:42 +08:00
|
|
|
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.list = resData.rows;
|
|
|
|
|
pageState.total = resData.total;
|
|
|
|
|
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
2025-11-30 16:47:06 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$api.createRequestWithCache('/app/user/apply/job', params, 'GET', false, {}, LoadCache).then(LoadCache);
|
2025-03-28 15:19:42 +08:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-05-13 11:10:38 +08:00
|
|
|
<style lang="stylus" scoped>
|
2025-12-15 15:40:16 +08:00
|
|
|
.btnback{
|
|
|
|
|
width: 64rpx;
|
|
|
|
|
height: 64rpx;
|
|
|
|
|
}
|
|
|
|
|
image {
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2025-05-13 11:10:38 +08:00
|
|
|
.collection-content{
|
|
|
|
|
padding: 1rpx 28rpx 20rpx 28rpx;
|
|
|
|
|
background: #F4F4F4;
|
2025-11-30 14:08:16 +08:00
|
|
|
height: 100%;
|
|
|
|
|
position: relative;
|
2025-05-13 11:10:38 +08:00
|
|
|
}
|
2025-03-28 15:19:42 +08:00
|
|
|
</style>
|