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

#292

parent 41672a10
...@@ -50,18 +50,21 @@ export default { ...@@ -50,18 +50,21 @@ export default {
update() { update() {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (!valid) { if (!valid) {
return return false
} }
updateExpress(this.dataForm).then(response => { this.doUpdate()
this.$notify.success({ })
title: '成功', },
message: '运费配置修改成功' doUpdate() {
}) updateExpress(this.dataForm).then(response => {
}).catch(response => { this.$notify.success({
this.$notify.error({ title: '成功',
title: '失败', message: '运费配置修改成功'
message: response.data.errmsg })
}) }).catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg
}) })
}) })
} }
......
...@@ -33,6 +33,20 @@ export default { ...@@ -33,6 +33,20 @@ export default {
litemall_mall_address: '', litemall_mall_address: '',
litemall_mall_phone: '', litemall_mall_phone: '',
litemall_mall_qq: '' 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 { ...@@ -49,6 +63,14 @@ export default {
this.init() this.init()
}, },
update() { update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateMall(this.dataForm) updateMall(this.dataForm)
.then(response => { .then(response => {
this.$notify.success({ this.$notify.success({
......
...@@ -34,7 +34,22 @@ export default { ...@@ -34,7 +34,22 @@ export default {
name: 'ConfigOrder', name: 'ConfigOrder',
data() { data() {
return { 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() { created() {
...@@ -50,6 +65,14 @@ export default { ...@@ -50,6 +65,14 @@ export default {
this.init() this.init()
}, },
update() { update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateOrder(this.dataForm) updateOrder(this.dataForm)
.then(response => { .then(response => {
this.$notify.success({ this.$notify.success({
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
:rules="rules" :rules="rules"
:model="dataForm" :model="dataForm"
status-icon status-icon
label-width="300px" label-width="300px">
>
<el-tabs tab-position="left" > <el-tabs tab-position="left" >
<el-tab-pane label="首页配置"> <el-tab-pane label="首页配置">
<el-form-item label="新品首发栏目商品显示数量" prop="litemall_wx_index_new"> <el-form-item label="新品首发栏目商品显示数量" prop="litemall_wx_index_new">
...@@ -51,7 +49,35 @@ export default { ...@@ -51,7 +49,35 @@ export default {
name: 'ConfigWx', name: 'ConfigWx',
data() { data() {
return { 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() { created() {
...@@ -67,6 +93,14 @@ export default { ...@@ -67,6 +93,14 @@ export default {
this.init() this.init()
}, },
update() { update() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
}
this.doUpdate()
})
},
doUpdate() {
updateWx(this.dataForm) updateWx(this.dataForm)
.then(response => { .then(response => {
this.$notify.success({ 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