style(project): 统一模式切换快照写法
This commit is contained in:
@@ -247,15 +247,13 @@ export function useStoreFeesPage() {
|
|||||||
if (selectedStoreId.value === currentStoreId) {
|
if (selectedStoreId.value === currentStoreId) {
|
||||||
isConfigured.value = true;
|
isConfigured.value = true;
|
||||||
loadedStoreId.value = currentStoreId;
|
loadedStoreId.value = currentStoreId;
|
||||||
if (snapshot.value) {
|
snapshot.value = snapshot.value
|
||||||
snapshot.value = {
|
? {
|
||||||
...snapshot.value,
|
...snapshot.value,
|
||||||
packagingFeeMode: form.packagingFeeMode,
|
packagingFeeMode: form.packagingFeeMode,
|
||||||
orderPackagingFeeMode: form.orderPackagingFeeMode,
|
orderPackagingFeeMode: form.orderPackagingFeeMode,
|
||||||
};
|
|
||||||
} else {
|
|
||||||
snapshot.value = createSettingsSnapshot(form);
|
|
||||||
}
|
}
|
||||||
|
: createSettingsSnapshot(form);
|
||||||
message.success('包装费收取方式已切换');
|
message.success('包装费收取方式已切换');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -277,20 +277,18 @@ export function useStorePickupPage() {
|
|||||||
if (selectedStoreId.value === currentStoreId) {
|
if (selectedStoreId.value === currentStoreId) {
|
||||||
isConfigured.value = true;
|
isConfigured.value = true;
|
||||||
loadedStoreId.value = currentStoreId;
|
loadedStoreId.value = currentStoreId;
|
||||||
if (snapshot.value) {
|
snapshot.value = snapshot.value
|
||||||
snapshot.value = {
|
? {
|
||||||
...snapshot.value,
|
...snapshot.value,
|
||||||
mode: value,
|
mode: value,
|
||||||
};
|
}
|
||||||
} else {
|
: createSettingsSnapshot({
|
||||||
snapshot.value = createSettingsSnapshot({
|
|
||||||
mode: value,
|
mode: value,
|
||||||
basicSettings,
|
basicSettings,
|
||||||
bigSlots: bigSlots.value,
|
bigSlots: bigSlots.value,
|
||||||
fineRule,
|
fineRule,
|
||||||
previewDays: previewDays.value,
|
previewDays: previewDays.value,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
message.success('自提预约模式已切换');
|
message.success('自提预约模式已切换');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user