|
@@ -122,14 +122,7 @@ export default {
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
this.$refs[formName].validate((valid) => {
|
|
this.$refs[formName].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- addCollections({
|
|
|
|
- addName: this.ruleForm.name,
|
|
|
|
- addDate: this.ruleForm.date,
|
|
|
|
- addAvatar: this.ruleForm.avatar,
|
|
|
|
- addDesc: this.ruleForm.desc,
|
|
|
|
- addPrice: this.ruleForm.price,
|
|
|
|
- addNumber: this.ruleForm.number
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
+ addCollections(this.ruleForm).then((res) => {
|
|
this.$message({
|
|
this.$message({
|
|
message: '添加成功',
|
|
message: '添加成功',
|
|
type: 'success'
|
|
type: 'success'
|