Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
f36ee099
Commit
f36ee099
authored
Oct 27, 2021
by
lshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天管理不可以添加空问题
parent
3a0f005e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
21 deletions
+9
-21
index.vue
src/views/Root/Chat/index.vue
+9
-21
No files found.
src/views/Root/Chat/index.vue
View file @
f36ee099
...
...
@@ -244,13 +244,15 @@ export default Vue.extend({
},
//发布
onSubmit
()
{
(
this
.
$refs
.
ruleForm
as
FormModel
).
validate
(
valid
=>
{
if
(
valid
)
{
// if(this.total
<
10
&&
this
.
total
+
this
.
forms
.
length
<=
10
){
this
.
show
=
false
this
.
show
=
false
for
(
let
i
=
0
;
i
<
this
.
forms
.
length
;
i
++
){
FAQService
.
getInstance
().
AddQueAns
({
if
(
!
this
.
forms
[
i
].
question
){
message
.
error
(
'第'
+
i
+
'个问题为空'
)
}
else
{
FAQService
.
getInstance
().
AddQueAns
({
answer
:
this
.
forms
[
i
].
answer
,
question
:
this
.
forms
[
i
].
question
}).
then
((
ret
)
=>
{
...
...
@@ -258,26 +260,12 @@ export default Vue.extend({
this
.
fetchList
()
}
})
}
}
// }else if(this.total
<
10
&&
this
.
total
+
this
.
forms
.
length
>
10
){
// this.show = false
// for(let i=0;i
<
10
-
this
.
total
;
i
++
){
// FAQService.getInstance(). AddQueAns({
// answer:this.forms[i].answer,
// question: this.forms[i].question
// }).then((ret) => {
// if (ret.code === 200) {
// this.fetchList()
// }
// })
// }
// }else{
// this.show = true
// this.$message.error('数据数量超出限制!', 3);
// }
this
.
resetForm
()
}
else
{
console
.
log
(
'error submit!!'
);
message
.
error
(
'error submit!!'
)
return
false
;
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment