operations.gate.Edit.js
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
webpackJsonp([106],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(1), common = __webpack_require__(2);
var e = new common.edit('#editor-group', {bucket: "yhb-img01"});
e.on("render", function() {
$("#status").select2({ minimumResultsForSearch: Infinity });
});
// 验证图片
e.on("validate", function() {
});
e.init();
// submit
$('#add-btn').click(function(option) {
e.submit($('#add-form').attr('action'), function(option) {
option.data.platform = option.data.platform.replace(/\|/g, ",");
option.beforeSend = function() {
$('#add-btn').addClass('disabled');
};
option.success = function(res) {
if (res.code == "200") {
e.$tip('提交成功', function() {
location.href = "/operations/gate/index";
}, 'growl-success');
} else {
$('#add-btn').removeClass('disabled');
e.$tip(res.message);
}
return false;
}
option.error = function(res) {
e.$tip("提交失败");
};
});
});
/***/ }
]);