对接招聘会接口
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
<view class="header-input btn-feel">
|
||||
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
||||
<input class="input" placeholder="招聘会" placeholder-class="inputplace" />
|
||||
<input v-model="pageState.zphmc" confirm-type="search" @confirm="getFair" class="input" placeholder="招聘会" placeholder-class="inputplace" />
|
||||
</view>
|
||||
<view class="header-date">
|
||||
<view class="data-week">
|
||||
@@ -42,42 +42,42 @@
|
||||
class="card press-button"
|
||||
v-for="(item, index) in fairList"
|
||||
:key="index"
|
||||
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)"
|
||||
@click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.zphID + '&jobFairName=' + item.zphmc)"
|
||||
>
|
||||
<view class="card-title">{{ item.name }}</view>
|
||||
<view class="card-title">{{ item.zphmc }}</view>
|
||||
<view class="card-row">
|
||||
<text class="">{{ item.location }}</text>
|
||||
<text class="">{{ item.jbf }}</text>
|
||||
<text class="">
|
||||
<convert-distance
|
||||
<!-- <convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitudeVal"
|
||||
:blong="longitudeVal"
|
||||
></convert-distance>
|
||||
></convert-distance> -->
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-times">
|
||||
<view class="time-left">
|
||||
<view class="left-date">{{ parseDateTime(item.startTime).time }}</view>
|
||||
<view class="left-dateDay">{{ parseDateTime(item.startTime).date }}</view>
|
||||
<view class="left-date">{{ parseDateTime(item.zphjbsj).time }}</view>
|
||||
<view class="left-dateDay">{{ parseDateTime(item.zphjbsj).date }}</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="time-center">
|
||||
<view class="center-date">
|
||||
{{ getTimeStatus(item.startTime, item.endTime).statusText }}
|
||||
{{ getTimeStatus(item.zphjbsj, item.zphjzsj).statusText }}
|
||||
</view>
|
||||
<view class="center-dateDay">
|
||||
{{ getHoursBetween(item.startTime, item.endTime) }}小时
|
||||
{{ getHoursBetween(item.zphjbsj, item.zphjzsj) }}小时
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="time-right">
|
||||
<view class="left-date">{{ parseDateTime(item.endTime).time }}</view>
|
||||
<view class="left-dateDay">{{ parseDateTime(item.endTime).date }}</view>
|
||||
<view class="left-date">{{ parseDateTime(item.zphjzsj).time }}</view>
|
||||
<view class="left-dateDay">{{ parseDateTime(item.zphjzsj).date }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recommend-card-line"></view>
|
||||
<view class="card-footer">内容简介:{{ item.description }}</view>
|
||||
<view class="card-footer">内容简介:{{ item.zphjj }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
@@ -95,7 +95,7 @@ import Tabbar from '@/components/tabbar/midell-box.vue';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import { storeToRefs } from 'pinia';
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
const { $api, navTo, cloneDeep } = inject('globalFunction');
|
||||
const { $api, navTo, cloneDeep,debounce } = inject('globalFunction');
|
||||
const weekList = ref([]);
|
||||
const fairList = ref([]);
|
||||
const currentDay = ref({});
|
||||
@@ -108,7 +108,7 @@ const pageState = reactive({
|
||||
total: 0,
|
||||
maxPage: 2,
|
||||
pageSize: 10,
|
||||
search: {},
|
||||
zphmc:''
|
||||
});
|
||||
|
||||
onLoad(() => {
|
||||
@@ -122,6 +122,7 @@ onLoad(() => {
|
||||
startDate: currentDate,
|
||||
});
|
||||
weekList.value = result;
|
||||
currentDay.value.fullDate = result[0].fullDate
|
||||
getFair('refresh');
|
||||
});
|
||||
|
||||
@@ -161,10 +162,12 @@ function seemsg(index) {
|
||||
}
|
||||
|
||||
const handleScrollToLower = () => {
|
||||
return
|
||||
getFair();
|
||||
console.log('触底');
|
||||
};
|
||||
|
||||
|
||||
function getFair(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
@@ -174,21 +177,24 @@ function getFair(type = 'add') {
|
||||
pageState.page += 1;
|
||||
}
|
||||
let params = {
|
||||
...pageState.search,
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
zphmc:pageState.zphmc,
|
||||
// current: pageState.page,
|
||||
// pageSize: pageState.pageSize,
|
||||
};
|
||||
// if (currentDay.value?.fullDate) {
|
||||
// params.queryDate = currentDay.value.fullDate;
|
||||
// }
|
||||
if (currentDay.value?.fullDate) {
|
||||
params.queryDate = currentDay.value.fullDate;
|
||||
params.zphjbsj = currentDay.value.fullDate.replace(/-/g, '');
|
||||
}
|
||||
$api.createRequest('/app/fair', params).then((resData) => {
|
||||
$api.createRequest('/app/internal/jobFairThirdPart', params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
console.log(rows);
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
const end = fairList.value.length;
|
||||
const reslist = rows;
|
||||
fairList.value.splice(str, end, ...reslist);
|
||||
// const str = pageState.pageSize * (pageState.page - 1);
|
||||
// const end = fairList.value.length;
|
||||
// const reslist = rows;
|
||||
// fairList.value.splice(str, end, ...reslist);
|
||||
fairList.value = rows
|
||||
} else {
|
||||
fairList.value = rows;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user