fix: 卖价发布后强制刷新同步态,避免徽章卡在待发布
All checks were successful
Build and Deploy Front / deploy (push) Successful in 8m52s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 8m52s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
8c47c2772a
commit
4a8a4eddca
@ -1224,14 +1224,12 @@
|
||||
priceTableData.value = rows;
|
||||
priceTabLoadedProductId = productId;
|
||||
void refreshSalesProductPriceEffectiveInfo(productId);
|
||||
const sig = `${productId}|${rows
|
||||
.map((r) => `${r.id}:${r.modifyTime}:${r.status ? 1 : 0}`)
|
||||
.join(',')}`;
|
||||
if (sig === pricePublishCheckedSig) return;
|
||||
// 立刻拉预览/线上快照(网络与表格并行);重 CPU 对比在请求返回后 yield 再跑
|
||||
// 发布同步态必须每次刷新:不能跟价格行 modifyTime 签名绑死,否则刚发布后签名不变会跳过刷新、徽章一直「待发布」
|
||||
void refreshPricePublishSyncStatus(productId).then(() => {
|
||||
if (seq === priceTabLoadSeq && selectedProduct.value === productId) {
|
||||
pricePublishCheckedSig = sig;
|
||||
pricePublishCheckedSig = `${productId}|${rows
|
||||
.map((r) => `${r.id}:${r.modifyTime}:${r.status ? 1 : 0}`)
|
||||
.join(',')}`;
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
@ -2274,7 +2272,10 @@
|
||||
publishModalMethods.closeModal();
|
||||
await loadRecordsTabData(pid, true);
|
||||
if (operatorType === 'price') {
|
||||
pricePublishCheckedSig = '';
|
||||
pricePublishPending.value = false;
|
||||
await loadPriceTabData(pid);
|
||||
await refreshPricePublishSyncStatus(pid);
|
||||
}
|
||||
} catch (e: any) {
|
||||
Message.error(e?.message || t('channel.salesProducts.publish.fail'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user