flat:显示性能优化

This commit is contained in:
史典卓
2025-06-10 09:36:04 +08:00
parent 9f47ea0e53
commit 02c3c7366b
5 changed files with 9 additions and 4 deletions

View File

@@ -539,6 +539,10 @@ function isInWechatMiniProgramWebview() {
return ua.includes('miniprogram') || window.__wxjs_environment === 'miniprogram'
}
function isEmptyObject(obj) {
return obj && typeof obj === 'object' && !Array.isArray(obj) && Object.keys(obj).length === 0;
}
export const $api = {
msg,
prePage,
@@ -579,5 +583,6 @@ export default {
parseQueryParams,
appendScriptTagElement,
insertSortData,
isInWechatMiniProgramWebview
isInWechatMiniProgramWebview,
isEmptyObject
}

BIN
lib/.DS_Store vendored

Binary file not shown.

View File

@@ -11,7 +11,7 @@
<image src="@/static/icon/collect2.png" v-else @click="jobCollection"></image>
</view>
</template>
<view class="content">
<view class="content" v-show="!isEmptyObject(jobInfo)">
<view class="content-top btn-feel">
<view class="top-salary">{{ jobInfo.minSalary }}-{{ jobInfo.maxSalary }}/</view>
<view class="top-name">{{ jobInfo.jobTitle }}</view>
@@ -136,7 +136,7 @@ import VideoPlayer from './component/videoPlayer.vue';
import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import dictLabel from '@/components/dict-Label/dict-Label.vue';
const { $api, navTo, getLenPx, parseQueryParams, navBack } = inject('globalFunction');
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
import RadarMap from './component/radarMap.vue';
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
const currentStep = ref(1);
@@ -167,7 +167,6 @@ function initLoad(option) {
if (jobId !== jobIdRef.value) {
jobIdRef.value = jobId;
getDetail(jobId);
getCompetivetuveness(jobId);
}
}
@@ -184,6 +183,7 @@ function getDetail(jobId) {
const { latitude, longitude, companyName, companyId } = resData.data;
jobInfo.value = resData.data;
getCompanyIsAJobs(companyId);
getCompetivetuveness(jobId);
if (latitude && longitude) {
mapCovers.value = [
{

Binary file not shown.

Binary file not shown.