save
This commit is contained in:
parent
ca63338a0a
commit
a990c26586
@ -235,7 +235,7 @@ layui.use(['upload', 'layer', 'popup', 'util'], function() {
|
||||
elem: "#$id",$options_string
|
||||
done: function (res) {
|
||||
if (res.code) return layui.popup.failure(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().html(layui.util.escape(res.data.path));
|
||||
this.item.prev().val(res.data.url).prev().html(layui.util.escape(res.data.url));
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -307,7 +307,7 @@ layui.use(["upload", "layer"], function() {
|
||||
elem: "#$id",$options_string
|
||||
done: function (res) {
|
||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().attr("src", res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -107,7 +107,7 @@ class UploadController extends Crud
|
||||
}
|
||||
$data = $this->base($request, '/upload/files/'.date('Ymd'));
|
||||
return $this->json(0, '上传成功', [
|
||||
'path' => $data['path'],
|
||||
'url' => $data['url'],
|
||||
'name' => $data['name'],
|
||||
'size' => $data['size'],
|
||||
]);
|
||||
@ -145,7 +145,7 @@ class UploadController extends Crud
|
||||
$upload->category = $request->post('category');
|
||||
$upload->save();
|
||||
return $this->json(0, '上传成功', [
|
||||
'path' => $data['path'],
|
||||
'url' => $data['url'],
|
||||
'name' => $data['name'],
|
||||
'size' => $data['size'],
|
||||
]);
|
||||
@ -197,7 +197,7 @@ class UploadController extends Crud
|
||||
'code' => 0,
|
||||
'msg' => '上传成功',
|
||||
'data' => [
|
||||
'path' => "/app/admin/$relative_path/$name.$ext"
|
||||
'url' => "/app/admin/$relative_path/$name.$ext"
|
||||
]
|
||||
]);
|
||||
}
|
||||
@ -236,7 +236,7 @@ class UploadController extends Crud
|
||||
'code' => 0,
|
||||
'msg' => '上传成功',
|
||||
'data' => [
|
||||
'path' => $data['path'],
|
||||
'url' => $data['url'],
|
||||
'name' => $data['name'],
|
||||
'size' => $data['size'],
|
||||
]
|
||||
@ -282,7 +282,7 @@ class UploadController extends Crud
|
||||
$mime_type = $img_info['mime'];
|
||||
}
|
||||
return [
|
||||
'path' => "/app/admin/$relative_path",
|
||||
'url' => "/app/admin/$relative_path",
|
||||
'name' => $file_name,
|
||||
'realpath' => $full_path,
|
||||
'size' => $file_size,
|
||||
|
@ -102,7 +102,7 @@
|
||||
field: '__file__',
|
||||
done: function (res) {
|
||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().attr("src", res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -125,7 +125,7 @@
|
||||
field: '__file__',
|
||||
done: function (res) {
|
||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().attr("src", res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -200,7 +200,7 @@
|
||||
if (res.code) {
|
||||
return layui.popup.failure(res.msg);
|
||||
}
|
||||
this.item.prev().val(res.data.path).prev().attr('src', res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr('src', res.data.url);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
field: '__file__',
|
||||
done: function (res) {
|
||||
if (res.code) return layui.popup.failure(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().html(layui.util.escape(res.data.path));
|
||||
this.item.prev().val(res.data.url).prev().html(layui.util.escape(res.data.url));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -203,7 +203,7 @@
|
||||
field: '__file__',
|
||||
done: function (res) {
|
||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().attr("src", res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -210,7 +210,7 @@
|
||||
field: '__file__',
|
||||
done: function (res) {
|
||||
if (res.code > 0) return layui.layer.msg(res.msg);
|
||||
this.item.prev().val(res.data.path).prev().attr("src", res.data.path);
|
||||
this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user