|
|
@@ -518,4 +518,33 @@ function initContentEvent(nameEn) {
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function uploadImgsSubmit(){
|
|
|
+ var fromData = new FormData($("#uploadImgs")[0]);
|
|
|
+ $.ajax({
|
|
|
+ url: "coin/uploadImgs", //请求的url地址
|
|
|
+ dataType: "json", //返回格式为json
|
|
|
+ data: fromData, //参数值
|
|
|
+ type: "post", //请求方式
|
|
|
+ processData: false,// 告诉jQuery不要去处理发送的数据
|
|
|
+ contentType: false,// 告诉jQuery不要去设置Content-Type请求头
|
|
|
+ async: false, //请求是否异步,默认为异步,这也是ajax重要特性
|
|
|
+ success: function (data) {
|
|
|
+ //请求成功时处理
|
|
|
+ if (data != null && $.trim(data) != "" && data.success) {
|
|
|
+ $("#uploadImgsAlert").html(JSON.stringify(data.data));
|
|
|
+ } else {
|
|
|
+ $("#uploadImgsAlert").html(data.message);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ beforeSend: function () {
|
|
|
+ },
|
|
|
+ complete: function () {
|
|
|
+ },
|
|
|
+ error: function (data) {
|
|
|
+ //请求出错处理
|
|
|
+ console.log("uploadImgs-submit error," + data);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|