修复上传背景

This commit is contained in:
liaozetao
2023-12-01 21:00:44 +08:00
parent a75aa695e8
commit f829763fd6

View File

@@ -280,15 +280,15 @@ export default {
}
$.ajaxFileUpload({
fileElementId: 'picUrlSelectedFile', //需要上传的文件域的ID即<input type="file">的ID。
url: '/admin/qiniu/upload', //后台方法的路径
url: '/admin/upload/img', //后台方法的路径
type: 'post', //当要提交自定义参数时这个参数要设置成post
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) { //提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.flag) {
$('#picUrlSelectedUrl').val(json.url);
$('#picUrlSelectedImgUrl').attr("src", json.url);
if (json.path) {
$('#picUrlSelectedUrl').val(json.path);
$('#picUrlSelectedImgUrl').attr("src", json.path);
$("#tipMsg").text("上传成功");
$("#tipModal").modal('show');
} else {