add notice bar for HomeTab.vue

This commit is contained in:
Timi
2026-10-28 11:44:15 +08:00
parent e71c0e8a4e
commit bf901f4031
8 changed files with 213 additions and 96 deletions
+6 -2
View File
@@ -1,5 +1,6 @@
import { pendingNoticeEvents } from "@/utils/pendingNoticeEvents";
import { axios } from "timi-web-api";
import { withCurrentStoreId } from "@/utils/store";
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
import type {
DirectProductOrderCreateRequest,
FundRecord,
@@ -45,7 +46,10 @@ async function receivePaymentAndVerify(request: OrderPaymentReceiveRequest): Pro
return await axios.post(`${ORDER_URI}/payment/receive-and-verify`, request);
}
async function verifyPayment(id: string): Promise<FundRecord> {
return await axios.post(`${ORDER_URI}/payment/verify`, undefined, { params: { id } });
const storeId = getCurrentStoreId();
const result = await axios.post(`${ORDER_URI}/payment/verify`, undefined, { params: { id } });
pendingNoticeEvents.emit("changed", storeId);
return result;
}
async function rejectPayment(request: OrderPaymentActionRequest): Promise<FundRecord> {
return await axios.post(`${ORDER_URI}/payment/reject`, request);