Compare commits

..

No commits in common. "255dbc15c0e14bc54ffd183591fc8aa02d4bf30b" and "0fa3bf802e99f37fd5f296a0532396dd2e47bf61" have entirely different histories.

1 changed files with 12 additions and 24 deletions

View File

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