From 41e2eaf769e67732877bbde462e3cd68ca449d22 Mon Sep 17 00:00:00 2001 From: yin5th <541304803@qq.com> Date: Thu, 12 Oct 2023 17:04:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/admin/controller/goods/Goods.php | 9 +++++++++ server/app/admin/view/goods/goods/import.html | 1 + .../public/static/admin/images/import_demo.xlsx | Bin 0 -> 32970 bytes 3 files changed, 10 insertions(+) create mode 100644 server/public/static/admin/images/import_demo.xlsx diff --git a/server/app/admin/controller/goods/Goods.php b/server/app/admin/controller/goods/Goods.php index 1e860d11..12ee7fd3 100644 --- a/server/app/admin/controller/goods/Goods.php +++ b/server/app/admin/controller/goods/Goods.php @@ -451,4 +451,13 @@ class Goods extends AdminBase ]); } + + public function importTemplate() + { + $fullPath = public_path().'static/admin/images/import_demo.xlsx'; + if (file_exists($fullPath)) { + return download($fullPath, '商品导入模版.xlsx'); + } + echo '文件不存在';exit; + } } \ No newline at end of file diff --git a/server/app/admin/view/goods/goods/import.html b/server/app/admin/view/goods/goods/import.html index 535fd4f6..ea0cb2ea 100644 --- a/server/app/admin/view/goods/goods/import.html +++ b/server/app/admin/view/goods/goods/import.html @@ -11,6 +11,7 @@
rUteh>-LW0WDa@=IhsES!;D?f zf?*&=v5$n0b&;&yl_d&)>#eJX+0s|}3qEI{dYU~q@WtiD&hWCCsXk+D5?{PK(c7C9 z%%;g&%8GWzeOWUns?jmM>j3oOF)hgz&rjDn)$bSy;q3Ej3#ZSh zV=j=}j!5UF*A0Dq*W0}`g0VFP-& @ViTG%Va%Lg!dSS6IfZ@Mt_2q*b5Z zL|*T7S26^IBJWcxBvvoWAHai>kswxmFjcmw$_L%ESjYGt-MZYj#zIJRRgvhP`xae2 zOB;hjc!R>VfDP=#K41)lSgTuH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