feat: 添加催一催按钮、应用宝跳转配置

This commit is contained in:
2026-08-12 13:15:50 +08:00
parent 6a1f4f66ac
commit 9a30b0efde
10 changed files with 744 additions and 54 deletions
+20 -5
View File
@@ -235,14 +235,29 @@
const getStoreStatusLevel = (status) => STORE_STATUS_LEVEL[Number(status)] || 'closed';
const isStoreOpen = (item) => Number(item?.status) === 1;
const sortStoreList = (list = []) => {
const STATUS_WEIGHT = { 1: 0, 2: 1, 3: 2 };
return [...list].sort((a, b) => {
const wa = STATUS_WEIGHT[Number(a?.status)] ?? 99;
const wb = STATUS_WEIGHT[Number(b?.status)] ?? 99;
if (wa !== wb) return wa - wb;
const da = Number(a?.distance);
const db = Number(b?.distance);
if (da >= 0 && db >= 0) return da - db;
return 0;
});
};
const filteredStoreList = computed(() => {
const list = Array.isArray(state.storeList) ? state.storeList : [];
const kw = String(state.keyword || '').trim();
if (!kw) return list;
return list.filter((item) => {
const s = `${item?.name || ''} ${formatAddress(item)}`.toLowerCase();
return s.includes(kw.toLowerCase());
});
const raw = !kw
? list
: list.filter((item) => {
const s = `${item?.name || ''} ${formatAddress(item)}`.toLowerCase();
return s.includes(kw.toLowerCase());
});
return sortStoreList(raw);
});
const selectedStore = computed(() => {