bug
This commit is contained in:
@@ -14,11 +14,28 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
id: '',
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
if (query.id) {
|
||||
this.id = query.id
|
||||
|
||||
this.getInfo(query.id)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.$http.post(`/app/applearningquestion/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.content = res.data.content
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
submit () {
|
||||
if (!this.content) {
|
||||
return this.$u.toast('请输入题目内容')
|
||||
@@ -26,7 +43,8 @@
|
||||
|
||||
this.$loading()
|
||||
this.$http.post(`/app/applearningquestion/addOrUpdate`, {
|
||||
content: this.content
|
||||
content: this.content,
|
||||
id: this.id || ''
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('提交成功')
|
||||
|
||||
Reference in New Issue
Block a user