quanwei
2025-11-01 121b714d710cf3c865f4a1b5efe81abec11056d1
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('添加失败');
    }