Commit c31d9c4f authored by Junling Bu's avatar Junling Bu
Browse files

#292

parent 41672a10
......@@ -50,18 +50,21 @@ export default {
update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return
return false
}
updateExpress(this.dataForm).then(response => {
this.$notify.success({
title: '成功',
message: '运费配置修改成功'
})
}).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg
})
this.doUpdate()
})
},
doUpdate() {
updateExpress(this.dataForm).then(response => {
this.$notify.success({
title: '成功',
message: '运费配置修改成功'
})
}).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg
})
})
}
......
......@@ -33,6 +33,20 @@ export default {
litemall_mall_address: '',
litemall_mall_phone: '',
litemall_mall_qq: ''
},
rules: {
litemall_mall_name: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_mall_address: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_mall_phone: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_mall_qq: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
}
}
},
......@@ -49,6 +63,14 @@ export default {
this.init()
},
update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateMall(this.dataForm)
.then(response => {
this.$notify.success({
......
......@@ -34,7 +34,22 @@ export default {
name: 'ConfigOrder',
data() {
return {
dataForm: {}
dataForm: {
litemall_order_unpaid: 0,
litemall_order_unconfirm: 0,
litemall_order_comment: 0
},
rules: {
litemall_order_unpaid: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_order_unconfirm: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_order_comment: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
}
}
},
created() {
......@@ -50,6 +65,14 @@ export default {
this.init()
},
update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateOrder(this.dataForm)
.then(response => {
this.$notify.success({
......
......@@ -5,9 +5,7 @@
:rules="rules"
:model="dataForm"
status-icon
label-width="300px"
>
label-width="300px">
<el-tabs tab-position="left" >
<el-tab-pane label="首页配置">
<el-form-item label="新品首发栏目商品显示数量" prop="litemall_wx_index_new">
......@@ -51,7 +49,35 @@ export default {
name: 'ConfigWx',
data() {
return {
dataForm: { }
dataForm: {
litemall_wx_index_new: 0,
litemall_wx_index_hot: 0,
litemall_wx_index_brand: 0,
litemall_wx_index_topic: 0,
litemall_wx_catlog_list: 0,
litemall_wx_catlog_goods: 0,
litemall_wx_share: false
},
rules: {
litemall_wx_index_new: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_wx_index_hot: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_wx_index_brand: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_wx_index_topic: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_wx_catlog_list: [
{ required: true, message: '不能为空', trigger: 'blur' }
],
litemall_wx_catlog_goods: [
{ required: true, message: '不能为空', trigger: 'blur' }
]
}
}
},
created() {
......@@ -67,6 +93,14 @@ export default {
this.init()
},
update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateWx(this.dataForm)
.then(response => {
this.$notify.success({
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment