完善打印相关功能

去掉无用的前端文件
修改版权描述
This commit is contained in:
2021-02-26 05:52:52 +08:00
parent 37229cac4a
commit 427dabb95d
101 changed files with 442 additions and 7350 deletions
+5 -11
View File
@@ -1559,10 +1559,6 @@ function encodeURIComponent($str)
function plugin_sync_api($uri, $data = [])
{
if (env('PLUGIN_SYNC_API_STATUS') === false) {
return ['success' => true];
}
$base_url = env('PLUGIN_SYNC_API_URL');
if (empty($base_url)) {
return ['success' => true];
@@ -1624,15 +1620,13 @@ function plugin_sync_api($uri, $data = [])
function print_prince($view)
{
$viewData = $view->getData();
$prince = new App\Support\Prince(env('PRINCE_DIR'));
$file = storage_path() . '/print/' . auth()->id() . '.pdf';
$ret = $prince->convert_string_to_file($view, $file);
if ($ret) {
try {
$prince = new App\Support\Prince(env('PRINCE_DIR'));
header('Content-Type:application/pdf');
header('Content-Disposition:inline;filename="' . $viewData['form']['template']['name'] . '.pdf"');
echo file_get_contents($file);
} else {
echo $ret;
$prince->convert_string_to_passthru($view);
} catch (Exception $e) {
echo $e->getMessage();
}
}