From 121b714d710cf3c865f4a1b5efe81abec11056d1 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Sat, 01 Nov 2025 14:36:36 +0800
Subject: [PATCH] 修复名片模板生成失败问题 修复后台名片查看不显示头像和logo问题

---
 admin/app/shop/controller/plus/business/Template.php |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/admin/app/shop/controller/plus/business/Template.php b/admin/app/shop/controller/plus/business/Template.php
index dd01ca6..6f9c3f2 100644
--- a/admin/app/shop/controller/plus/business/Template.php
+++ b/admin/app/shop/controller/plus/business/Template.php
@@ -34,25 +34,22 @@
         $param['template']['backdrop']['width'] = $imageInfo[0];
         foreach ($param['template']['unit'] as $key => $value) {
             // 写入公司
-            $dealer['unit'][] = 'xxxxx公司' . ($key + 1);
+            $dealer['unit'][] = 'xxxxx公司';
         }
         // 写入职位
         //$dealer['duties'][] = '职位';
-        foreach ($param['template']['duties'] as $key => $value) {
             // 写入职位
-            $dealer['duties'][] = '职位'.($key + 1);
-        }
+        $dealer['duties'][] = '职位';
         
-        foreach ($param['template']['address'] as $key => $value) {
-           // 写入地址
-            $dealer['address'][] = '广西壮族自治区南宁市江南区壮锦大道八桂绿城·龙湖御景-A栋-2单元'.($key + 1).'号';
-        }
+        // 写入地址
+        $dealer['address'][] = '广西壮族自治区南宁市江南区壮锦大道八桂绿城·龙湖御景-A栋-2单元xxx号';
+        
         
         $Qrcode = new Poster($dealer);
         $paramL['image'] = $Qrcode->getImageE($param['template'], $template_id);
         $paramL['style'] = json_encode($param['template'], JSON_UNESCAPED_UNICODE);
         if ($model->add($paramL)) {
-            return $this->renderSuccess('编辑成功', url('business.template/index'));
+            return $this->renderSuccess('编辑成功');
         }
         return $this->renderError('编辑失败');
     }
@@ -179,7 +176,7 @@
             $paramI['image'] = $Qrcode->getImageE($param['template'], $template_id);
             $modelBusiness = (new BusinessTemplate())->where(['template_id' => $template_id])->find();
             $modelBusiness->where(['template_id' => $template_id])->update($paramI);
-            return $this->renderSuccess('添加成功', url('business.template/index'));
+            return $this->renderSuccess('添加成功');
         }
         return $this->renderError('添加失败');
     }

--
Gitblit v1.9.2