flat:合并冲突

This commit is contained in:
Apcallover
2025-12-03 11:08:53 +08:00
4 changed files with 15 additions and 4 deletions

View File

@@ -59,10 +59,10 @@ const pages = reactive({
year: 0, year: 0,
month: 0, month: 0,
}); });
const hasZphDateArray = ref([]); const hasZphDateArray = ref([]);
onLoad((options) => { onLoad((options) => {
updateDateArray();
if (options.date) { if (options.date) {
current.value = { current.value = {
date: options?.date || null, date: options?.date || null,

View File

@@ -596,7 +596,16 @@ function getJobRecommend(type = 'add') {
if (question) { if (question) {
comd.jobCategory = question; comd.jobCategory = question;
data.unshift(comd); // 生成随机插入位置,排除前两个和最后两个位置
let insertIndex;
if (data.length <= 4) {
// 如果数据长度小于等于4直接插入到中间位置
insertIndex = Math.floor(data.length / 2);
} else {
// 生成2到data.length-2之间的随机位置
insertIndex = Math.floor(Math.random() * (data.length - 4)) + 2;
}
data.splice(insertIndex, 0, comd);
} }
} }
const reslist = dataToImg(data); const reslist = dataToImg(data);

View File

@@ -1,6 +1,6 @@
<template> <template>
<scroll-view scroll-y class="main-scroll"> <scroll-view scroll-y class="main-scroll">
<view class="scrollmain"> <view v-if="msgList.length" class="scrollmain">
<view <view
class="list-card press-button" class="list-card press-button"
v-for="(item, index) in msgList" v-for="(item, index) in msgList"
@@ -37,6 +37,7 @@
</view> </view>
<empty v-if="!msgList.length"></empty> <empty v-if="!msgList.length"></empty>
</view> </view>
<empty v-else pdTop="200" content="暂无消息~"></empty>
</scroll-view> </scroll-view>
</template> </template>

View File

@@ -1,6 +1,6 @@
<template> <template>
<scroll-view scroll-y class="main-scroll"> <scroll-view scroll-y class="main-scroll">
<view class="scrollmain"> <view v-if="unreadMsgList.length" class="scrollmain">
<view <view
class="list-card press-button" class="list-card press-button"
v-for="(item, index) in unreadMsgList" v-for="(item, index) in unreadMsgList"
@@ -35,6 +35,7 @@
</view> </view>
<empty v-if="!unreadMsgList.length"></empty> <empty v-if="!unreadMsgList.length"></empty>
</view> </view>
<empty v-else pdTop="200" content="暂无消息~"></empty>
</scroll-view> </scroll-view>
</template> </template>