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/common/model/plus/business/Business.php |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/admin/app/common/model/plus/business/Business.php b/admin/app/common/model/plus/business/Business.php
index ce2cc76..58a6405 100644
--- a/admin/app/common/model/plus/business/Business.php
+++ b/admin/app/common/model/plus/business/Business.php
@@ -65,7 +65,7 @@
     public function logoImage()
     {
         $model = self::getCalledModule() ?: 'common';
-        return $this->hasOne("app\\$model\\model\\file\\UploadFile", 'file_id', 'logo')->bind(['file_path']);
+        return $this->hasOne("app\\$model\\model\\file\\UploadFile", 'file_id', 'logo');
     }
 
     /**
@@ -76,6 +76,11 @@
     {
         $model = self::getCalledModule() ?: 'common';
         return $this->hasOne("app\\$model\\model\\plus\\business\\Grade", 'grade_id', 'grade_id');
+    }
+    public function industry()
+    {
+        $model = self::getCalledModule() ?: 'common';
+        return $this->hasOne("app\\$model\\model\\plus\\business\\Industry", 'industry_id', 'industry_id');
     }
 
     /**
@@ -163,6 +168,6 @@
      */
     public static function detail($business_card_id)
     {
-        return (new self())->with(['user', 'image', 'logoImage', 'grade'])->where(['business_card_id' => $business_card_id])->find();
+        return (new self())->with(['user', 'image', 'logoImage', 'grade', 'industry'])->where(['business_card_id' => $business_card_id])->find();
     }
 }
\ No newline at end of file

--
Gitblit v1.9.2