diff --git a/.DS_Store b/.DS_Store index 587f1ec..e678966 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/public/.DS_Store b/public/.DS_Store index 1ac45b8..edfc6f2 100644 Binary files a/public/.DS_Store and b/public/.DS_Store differ diff --git a/resources/views/admin/order-agreement/index.blade.php b/resources/views/admin/order-agreement/index.blade.php index 143e99f..227b98f 100644 --- a/resources/views/admin/order-agreement/index.blade.php +++ b/resources/views/admin/order-agreement/index.blade.php @@ -6,10 +6,10 @@
+ + @lang("icons.action_create") @lang('actions.create'){{$modelName}} + +
-->
@@ -97,8 +97,8 @@ {{ $row->created_at->format('Y-m-d H:i:s') }} + href="{{url("{$urlPrefix}/edit?id={$row['id']}")}}">@lang("icons.action_edit") + @lang("actions.edit") --> @lang("icons.action_delete") @lang("actions.delete") @@ -121,15 +121,21 @@ function showHtml(element) { // 获取base64编码的HTML内容 var encodedHtml = element.getAttribute('data-html'); - // 解码HTML内容 - var htmlContent = atob(encodedHtml); + + // 解码HTML内容并正确处理UTF-8字符 + var binaryString = atob(encodedHtml); + var bytes = new Uint8Array(binaryString.length); + for (var i = 0; i < binaryString.length; i++) { + bytes[i] = binaryString.charCodeAt(i); + } + var htmlContent = new TextDecoder('utf-8').decode(bytes); + + // 使用Blob和URL创建正确编码的HTML文档 + var blob = new Blob([htmlContent], { type: 'text/html; charset=utf-8' }); + var url = URL.createObjectURL(blob); // 打开新窗口 - var newWindow = window.open('', '_blank'); - // 写入HTML内容 - newWindow.document.open(); - newWindow.document.write(htmlContent); - newWindow.document.close(); + window.open(url, '_blank'); } -@endpush +@endpush \ No newline at end of file