mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 20:12:48 +00:00
perf: 导出任务统计 - 下载地址换成按钮
This commit is contained in:
parent
da131746be
commit
a7e5bd0b80
@ -1352,6 +1352,7 @@ class ProjectController extends AbstractController
|
|||||||
$base64 = base64_encode(Base::array2string([
|
$base64 = base64_encode(Base::array2string([
|
||||||
'file' => $zipFile,
|
'file' => $zipFile,
|
||||||
]));
|
]));
|
||||||
|
$fileUrl = Base::fillUrl('api/project/task/down?key=' . urlencode($base64));
|
||||||
Session::put('task::export:userid', $user->userid);
|
Session::put('task::export:userid', $user->userid);
|
||||||
$botUser = User::botGetOrCreate('system-msg');
|
$botUser = User::botGetOrCreate('system-msg');
|
||||||
if (empty($botUser)) {
|
if (empty($botUser)) {
|
||||||
@ -1364,7 +1365,7 @@ class ProjectController extends AbstractController
|
|||||||
$text .= "\n";
|
$text .= "\n";
|
||||||
$text .= "文件大小:".Base::twoFloat(filesize($zipPath) / 1024, true)."KB";
|
$text .= "文件大小:".Base::twoFloat(filesize($zipPath) / 1024, true)."KB";
|
||||||
$text .= "\n";
|
$text .= "\n";
|
||||||
$text .= "下载地址:".Base::fillUrl('api/project/task/down?key=' . urlencode($base64));
|
$text .= '<button class="ivu-btn" style="margin-top: 10px;"><a href="'.$fileUrl.'" target="_blank">立即下载</a></button>';
|
||||||
WebSocketDialogMsg::sendMsg(null, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
WebSocketDialogMsg::sendMsg(null, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user