chore: code format

This commit is contained in:
xiaojunnuo
2025-06-29 14:09:09 +08:00
parent 04422a4637
commit 4fcfd089d8
644 changed files with 10845 additions and 13184 deletions
@@ -49,23 +49,23 @@ import ProductManager from "/@/views/sys/suite/product/index.vue";
import { useSettingStore } from "/@/store/settings";
defineOptions({
name: "SettingsSuite"
name: "SettingsSuite",
});
const api = {
async SuiteSettingGet() {
return await request({
url: "/sys/settings/suite/get",
method: "post"
method: "post",
});
},
async SuiteSettingSave(data: any) {
return await request({
url: "/sys/settings/suite/save",
method: "post",
data
data,
});
}
},
};
const formRef = ref<any>(null);
@@ -93,7 +93,7 @@ const onClick = async () => {
await loadSettings();
await settingsStore.loadSysSettings();
notification.success({
message: "保存成功"
message: "保存成功",
});
};
@@ -8,7 +8,7 @@ import { dict } from "@fast-crud/fast-crud";
import { request } from "/@/api/service";
defineOptions({
name: "SuiteDurationSelector"
name: "SuiteDurationSelector",
});
const props = defineProps<{
@@ -22,13 +22,13 @@ const suiteDictRef = dict({
async getData() {
const res = await request({
url: "/sys/suite/product/list",
method: "post"
method: "post",
});
const options: any = [
{
value: "",
label: "不赠送"
}
label: "不赠送",
},
];
res.forEach((item: any) => {
const durationPrices = JSON.parse(item.durationPrices);
@@ -39,13 +39,13 @@ const suiteDictRef = dict({
value: value,
target: {
productId: item.id,
duration: dp.duration
}
duration: dp.duration,
},
});
}
});
return options;
}
},
});
const selectedValue = ref();
@@ -53,7 +53,7 @@ watch(
() => {
return props.modelValue;
},
(value) => {
value => {
if (value && value.productId && value.duration) {
selectedValue.value = value.productId + "_" + value.duration;
} else {
@@ -61,7 +61,7 @@ watch(
}
},
{
immediate: true
immediate: true,
}
);
@@ -75,14 +75,14 @@ const onSelectedChange = (value: any) => {
const arr = value.value.split("_");
emit("update:modelValue", {
productId: parseInt(arr[0]),
duration: parseInt(arr[1])
duration: parseInt(arr[1]),
});
};
defineExpose({
refresh() {
suiteDictRef.reloadDict();
}
},
});
</script>