Compare commits

...

2 Commits

Author SHA1 Message Date
LiJianZhao 255dbc15c0 Merge remote-tracking branch 'origin/main' 2025-04-27 12:40:37 +08:00
LiJianZhao 00bfd318e1 dev 2025-04-27 11:41:19 +08:00
1 changed files with 24 additions and 12 deletions

View File

@ -158,10 +158,17 @@ const submitForm = async () => {
if (!formEl) return
await formEl.validate((valid:any, fields:any) => {
if (valid) {
console.log(ruleForm.value.area)
// post("vip/vip/create", {vipInfo:ruleForm.value}).then((res: any) => {
// close()
// })
console.log(ruleForm.value)
if (ruleForm.value.id){
post("vip/vip/update", {vipInfo:ruleForm.value}).then((res: any) => {
close()
})
}else {
post("vip/vip/create", {vipInfo:ruleForm.value}).then((res: any) => {
close()
})
}
}
})
}
@ -190,7 +197,10 @@ const init = (_id: any) => {
id.value = _id
levelName.value = ''
show.value = true
if (!id.value) return
if (!id.value){
ruleForm.value = {}
return
} else {
post("vip/vip/get", {id: _id}).then((res: any) => {
ruleForm.value = res
ruleForm.value.area = JSON.parse(ruleForm.value.area)
@ -199,6 +209,8 @@ const init = (_id: any) => {
levelName.value = res.name
})
})
}
}
const getLevelConfig = ()=>{