Authored by htoooth

Merge branch 'master' into feature/report

... ... @@ -95,7 +95,7 @@ const file = {
};
}
let actPath = _.get(ctx, 'request.body.actPath');
let actPath = _.chain(ctx).get('request.body.actPath').trimStart('/').value();
if (!actPath) {
return ctx.body = {
... ... @@ -142,7 +142,7 @@ const file = {
let config = CDNCONFIG.main;
if (cover) {
_.assign(CDNCONFIG.main, {
_.assign(config, {
key: filePath
});
}
... ...
... ... @@ -22,7 +22,7 @@
<label class="control-label col-sm-1">上传地址:</label>
<div class="col-sm-6">
<div class="input-group">
<span class="input-group-addon">{{domain}}</span>
<span class="input-group-addon">{{domain}}/</span>
<input id="actPath" type="text" class="form-control col-sm-10" placeholder="请输入上传地址">
<span class="input-group-addon">/index.html</span>
</div>
... ... @@ -179,8 +179,8 @@
marker: marker
},
success: (result) => {
if (result && result.data &&result.data.items) {
if ($this.parents('td').find('.get-more').attr('data-marker') === result.data.marker) {
if (result && result.data && result.data.items) {
if (result.data.marker && $this.parents('td').find('.get-more').attr('data-marker') === result.data.marker) {
$this.parents('td').find('.get-more').remove();
return false;
}
... ...
... ... @@ -27,7 +27,7 @@
<label for="file">选择文件</label>
<input type="file" class="form-control" name="file" id="fileInput">
</div>
<input type="hidden" id="cover" name="cover">
<input type="hidden" id="cover" name="cover" value="29m34gs6f5">
<div class="form-group">
<button class="btn btn-default" id="upLoadBtn">上传</button>
<span id="resultMsg"></span>
... ...