聊天功能优化,部分问题修复

This commit is contained in:
2025-12-05 09:37:30 +08:00
parent 6590a3514b
commit 885ef57c93
9 changed files with 554 additions and 159 deletions

View File

@@ -222,6 +222,12 @@ async function save() {
console.log(form);
const submitData = {
...form,
conditionList: conditionLists.value
.filter((v) => v.checked)
.map((v) => ({
code: v.code,
value: v.value,
})),
};
const res = await superVipStore.editConfig(submitData);
uni.showToast({
@@ -244,6 +250,18 @@ function setForm(data) {
if (data.rewardCount == -1) {
isLimitCount.value = 1;
}
console.log(data);
conditionLists.value = conditionLists.value.map((v) => {
const findItem = data.conditionList.find((cond) => cond.code == v.code);
if (findItem) {
v.value = findItem.value;
v.checked = true;
} else {
v.checked = false;
}
return v;
});
Object.assign(form, data);
console.log(form);
}