add categoty
This commit is contained in:
parent
211f4a0586
commit
e4da41c85d
@ -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')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user