From 63d0cdb5ad0280bbdc07eeb63184904c48c4bf54 Mon Sep 17 00:00:00 2001
From: Apcallover <1503963513@qq.com>
Date: Sat, 29 Nov 2025 16:31:34 +0800
Subject: [PATCH] =?UTF-8?q?flat:=20=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=EF=BC=8C=E6=8B=9B=E8=81=98=E4=BC=9A=E6=97=B6=E9=97=B4=E7=AD=9B?=
=?UTF-8?q?=E9=80=89=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96=E3=80=81=E7=B2=BE?=
=?UTF-8?q?=E9=80=89=E4=BC=81=E4=B8=9A=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=EF=BC=8C=E5=B0=81=E8=A3=85=E7=BC=93=E5=AD=98request=E3=80=81in?=
=?UTF-8?q?dexDb=E6=96=B9=E6=B3=95=EF=BC=8C=E4=B8=BB=E8=A6=81=E7=94=A8?=
=?UTF-8?q?=E4=BA=8E=E4=B8=8D=E5=B8=B8=E6=9B=B4=E6=96=B0=E7=9A=84=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3,=E4=BB=A5=E8=BE=BE=E5=88=B0=E6=AF=AB=E7=A7=92?=
=?UTF-8?q?=E7=BA=A7=E6=80=A7=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/globalFunction.js | 2 +
config.js | 4 +-
packageA/pages/choiceness/choiceness.vue | 5 +-
packageA/pages/selectDate/selectDate.vue | 31 +++++---
pages/careerfair/careerfair.vue | 32 ++++++---
stores/BaseDBStore.js | 73 -------------------
stores/useRecommedIndexedDBStore.js | 2 +-
stores/userChatGroupStore.js | 2 +-
utils/db.js | 91 ++++++++++++++++++++++++
utils/request.js | 52 ++++++++++++--
10 files changed, 190 insertions(+), 104 deletions(-)
delete mode 100644 stores/BaseDBStore.js
create mode 100644 utils/db.js
diff --git a/common/globalFunction.js b/common/globalFunction.js
index a4bf4bd..34ec784 100644
--- a/common/globalFunction.js
+++ b/common/globalFunction.js
@@ -1,6 +1,7 @@
import '@/lib/encryption/sm4.min.js'
import useUserStore from "../stores/useUserStore";
import {
+ createRequestWithCache,
createRequest,
uploadFile
} from "../utils/request";
@@ -624,6 +625,7 @@ export const $api = {
sendingMiniProgramMessage,
copyText,
aes_Decrypt,
+ createRequestWithCache
}
diff --git a/config.js b/config.js
index fb1fc56..74e3c87 100644
--- a/config.js
+++ b/config.js
@@ -1,6 +1,6 @@
export default {
- baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
- // baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
+ // baseUrl: 'https://fw.rc.qingdao.gov.cn/rgpp-api/api', // 内网
+ baseUrl: 'https://qd.zhaopinzao8dian.com/api', // 测试
// baseUrl: 'http://192.168.3.29:8081',
// baseUrl: 'http://10.213.6.207:19010/api',
// 语音转文字
diff --git a/packageA/pages/choiceness/choiceness.vue b/packageA/pages/choiceness/choiceness.vue
index 16f89af..1abf65f 100644
--- a/packageA/pages/choiceness/choiceness.vue
+++ b/packageA/pages/choiceness/choiceness.vue
@@ -50,10 +50,11 @@ function delCollectionCard(item) {
}
function getPremiumList() {
- $api.createRequest('/app/company/card').then((resData) => {
+ const LoadCache = (resData) => {
const { rows, total } = resData;
list.value = rows;
- });
+ };
+ $api.createRequestWithCache('/app/company/card', {}, 'GET', false, {}, LoadCache).then(LoadCache);
}
function seeDetail(item) {
diff --git a/packageA/pages/selectDate/selectDate.vue b/packageA/pages/selectDate/selectDate.vue
index c686301..5812aa9 100644
--- a/packageA/pages/selectDate/selectDate.vue
+++ b/packageA/pages/selectDate/selectDate.vue
@@ -26,7 +26,7 @@
{
- updateDateArray()
if (options.date) {
current.value = {
date: options?.date || null,
@@ -81,20 +80,30 @@ onLoad((options) => {
addMonth();
});
}
+ if (options.entrance === 'careerfair') {
+ updateDateArray();
+ }
});
function hasZphInData(item) {
- return hasZphDateArray.value.some(date=>date == item.date)
+ if (!item || typeof item.date !== 'string') {
+ return false;
+ }
+
+ const dateArray = Array.isArray(hasZphDateArray.value) ? hasZphDateArray.value : [];
+
+ return dateArray.some((date) => {
+ return typeof date === 'string' && date === item.date;
+ });
}
async function updateDateArray() {
- if(localStorage.getItem('hasZphDateArray')) hasZphDateArray.value = localStorage.getItem('hasZphDateArray')
-
- let res = await $api.createRequest('/app/internal/getDateList', {}, 'get')
- if(res.data){
- hasZphDateArray.value = res.data
- localStorage.setItem('hasZphDateArray',res.data)
- }
+ const LoadCache = (resData) => {
+ if (resData.code === 200) {
+ hasZphDateArray.value = resData.data;
+ }
+ };
+ $api.createRequestWithCache('/app/internal/getDateList', {}, 'GET', false, {}, LoadCache).then(LoadCache);
}
function backParams() {
diff --git a/pages/careerfair/careerfair.vue b/pages/careerfair/careerfair.vue
index 69b88ae..e5032cc 100644
--- a/pages/careerfair/careerfair.vue
+++ b/pages/careerfair/careerfair.vue
@@ -13,7 +13,14 @@