支持按账号商品监控库存抢购
This commit is contained in:
@@ -303,6 +303,14 @@ export function useAccounts() {
|
||||
markSelectedStatus({ pending: true, message })
|
||||
}
|
||||
|
||||
const markAccountNamesPending = (accountNames: string[], message = '抢购中,等待后端结果') => {
|
||||
const next: Record<string, AccountStatus> = {}
|
||||
accountNames.forEach(name => {
|
||||
next[name] = { pending: true, message }
|
||||
})
|
||||
mergeStatuses(next)
|
||||
}
|
||||
|
||||
const setAccountProduct = (accountName: string, productId: string) => {
|
||||
if (productId) {
|
||||
accountProductMap.value[accountName] = productId
|
||||
@@ -377,6 +385,7 @@ export function useAccounts() {
|
||||
setStatus,
|
||||
markSelectedStatus,
|
||||
markSelectedPending,
|
||||
markAccountNamesPending,
|
||||
setAccountProduct,
|
||||
getAccountProduct,
|
||||
selectedAccountNames,
|
||||
|
||||
Reference in New Issue
Block a user