flat: 性能优化,animation 等\preload等
This commit is contained in:
@@ -93,7 +93,7 @@ const pageOptions = ref({});
|
||||
const dataType = ref(1); // 1: 原数据, 2: 第三方数据
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options);
|
||||
// console.log(options);
|
||||
dataType.value = options.dataType ? parseInt(options.dataType) : 1;
|
||||
pageOptions.value = options;
|
||||
|
||||
@@ -145,13 +145,13 @@ function getCompanyInfo(...args) {
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据接口
|
||||
const [companyId, zphId] = args;
|
||||
$api.createRequest(`/app/internal/companyThirdPart/${companyId}/${zphId}`).then((resData) => {
|
||||
$api.createRequest(`/app/internal/companyThirdPart/${companyId}/${zphId}`, {}, 'GET', true).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
});
|
||||
} else {
|
||||
// 原数据接口
|
||||
const [companyId] = args;
|
||||
$api.createRequest(`/app/company/${companyId}`).then((resData) => {
|
||||
$api.createRequest(`/app/company/${companyId}`, {}, 'GET', true).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
getJobsList();
|
||||
});
|
||||
@@ -184,12 +184,15 @@ function getThirdPartyJobsList(type = 'add') {
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
|
||||
$api.createRequest(`/app/internal/jobThirdPart?gsID=${companyId}&gsmc=${companyName}&zphID=${zphId}`, params).then(
|
||||
(resData) => {
|
||||
const { rows, total } = resData;
|
||||
handleJobsListResponse(type, rows, total, 'current');
|
||||
}
|
||||
);
|
||||
$api.createRequest(
|
||||
`/app/internal/jobThirdPart?gsID=${companyId}&gsmc=${companyName}&zphID=${zphId}`,
|
||||
params,
|
||||
'GET',
|
||||
true
|
||||
).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
handleJobsListResponse(type, rows, total, 'current');
|
||||
});
|
||||
}
|
||||
|
||||
function getOriginalJobsList(type = 'add') {
|
||||
@@ -206,7 +209,7 @@ function getOriginalJobsList(type = 'add') {
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
|
||||
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params).then((resData) => {
|
||||
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params, 'GET', true).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
handleJobsListResponse(type, rows, total, 'page');
|
||||
});
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
<scroll-view class="scroll-view" scroll-y @scrolltolower="scrollBottom">
|
||||
<view class="list">
|
||||
<renderJobs
|
||||
:list="pageState.list"
|
||||
v-if="pageState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
<empty v-else></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -140,6 +139,7 @@ function getList(type = 'add', loading = true) {
|
||||
height: 100%
|
||||
.list{
|
||||
padding: 0 28rpx 28rpx 28rpx
|
||||
height: calc(100% - 28rpx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
<view class="main">
|
||||
<scroll-view class="height-100" scroll-y>
|
||||
<view v-if="pageState.list.length">
|
||||
<view>
|
||||
<view class="card" v-for="(item, index) in pageState.list" :key="index">
|
||||
<view
|
||||
@click="
|
||||
@@ -46,7 +46,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-else></empty>
|
||||
<empty v-if="!pageState.list.length"></empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user