|
@@ -77,7 +77,7 @@
|
|
|
, '|', 'fullScreen'
|
|
|
],
|
|
|
uploadImage: {
|
|
|
- url: '/tenant/operation_help/up_image/',
|
|
|
+ url: '/tenant/operation_help/upload_image/',
|
|
|
accept: 'image',
|
|
|
acceptMime: 'image/*',
|
|
|
exts: 'jpg|png|gif|bmp|jpeg',
|
|
@@ -101,9 +101,8 @@
|
|
|
layedit.setContent(editIndex, editdata.content, false);
|
|
|
}
|
|
|
}
|
|
|
- var form_data = {},
|
|
|
- url = id ? '/tenant/operation_help/' + id + "/" : '/tenant/operation_help/';
|
|
|
- // method = id ? 'post' : 'put'
|
|
|
+ var url = id ? '/tenant/operation_help/' + id + "/" : '/tenant/operation_help/',
|
|
|
+ method = id ? 'put' : 'post'
|
|
|
|
|
|
form.on('submit(component-form-element)', function (data) {
|
|
|
//layer.msg(JSON.stringify(data.field));
|
|
@@ -112,12 +111,10 @@
|
|
|
if(!data.field.enable){
|
|
|
data.field.enable = 0
|
|
|
}
|
|
|
- // 调用接口新增或者修改运维宝典数据
|
|
|
- form_data = data.field
|
|
|
admin.req({
|
|
|
url: url
|
|
|
- , data: {data:JSON.stringify(form_data)}
|
|
|
- , type: 'post'
|
|
|
+ , data: data.field
|
|
|
+ , type: method
|
|
|
, done: function (res) {
|
|
|
if (res.code != 0) {
|
|
|
layer.msg(res.msg);
|