add categoty

This commit is contained in:
sdaduanbilei-d1581 2026-01-09 11:57:20 +08:00
parent 211f4a0586
commit e4da41c85d

View File

@ -87,8 +87,6 @@ export default {
submit(done) { submit(done) {
this.$refs.form.validate(err => { this.$refs.form.validate(err => {
if (err === undefined) { if (err === undefined) {
const keyword = this.options.find(e => e.id === this.form.categoryId).desc
this.form.keyword = keyword
if (this.form.id) { if (this.form.id) {
this.$api.badge.update(this.form).then(res => { this.$api.badge.update(this.form).then(res => {
if (res.code === 200) { if (res.code === 200) {
@ -101,6 +99,8 @@ export default {
} }
}) })
} else { } else {
const keyword = this.options.find(e => e.id === this.form.categoryId).desc
this.form.keyword = keyword
this.$api.badge.save(this.form).then(res => { this.$api.badge.save(this.form).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$emit('ok') this.$emit('ok')