From 3d98a627230a2fde78fe829cf0c67597d5bbf178 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Fri, 18 Nov 2022 17:03:15 +0800 Subject: [PATCH] edit-sylive-logo --- common/libraries/market/Sylive_entity.php | 3 ++- home/controllers/h5/market/sylive/Biz.php | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/common/libraries/market/Sylive_entity.php b/common/libraries/market/Sylive_entity.php index 36064b16..074fd20b 100644 --- a/common/libraries/market/Sylive_entity.php +++ b/common/libraries/market/Sylive_entity.php @@ -6,6 +6,7 @@ class Sylive_entity{ const DEFAULT_HEAD = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-head.png'; //默认头像 const DF_IMG = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg'; //东风图标 + const HD_IMG = 'https://qs.haodian.cn/web/images/project/H5-ShiYu/default-avatar.jpg'; //好店云默认头像 private $ci; private $map_kpi_biz = [ 'browse' => 'browse', 'subscribe' => 'subscribe', 'order' => 'orderTotal','watch' => 'watch' @@ -125,7 +126,7 @@ class Sylive_entity{ * @return int */ public function get_level_lists($organizationId,$data=[]){ - $row = $this->ci->market_sylive_organization_model->get(['organizationId'=>$organizationId],'organizationId,parentId,organizationName'); + $row = $this->ci->market_sylive_organization_model->get(['organizationId'=>$organizationId],'organizationId,parentId,organizationName,logo'); if(!$row){ return $data; }else{ diff --git a/home/controllers/h5/market/sylive/Biz.php b/home/controllers/h5/market/sylive/Biz.php index 860f115e..ae6164ff 100644 --- a/home/controllers/h5/market/sylive/Biz.php +++ b/home/controllers/h5/market/sylive/Biz.php @@ -33,7 +33,8 @@ class Biz extends Admin { $this->data['biz_id'] = $biz_id; $this->data['group_id'] = $this->group_id; $row = $this->market_sylive_organization_model->get(['organizationId'=>$biz_id]); - $this->data['headimg'] = Sylive_entity::DF_IMG; + $org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']]); + $this->data['headimg'] = $org_row['logo'] ? build_qiniu_image_url($org_row['logo']):Sylive_entity::HD_IMG; $this->data['biz_name'] = $row['organizationName']; //微信分享 $wx_info = $this->share_info(); @@ -80,9 +81,11 @@ class Biz extends Admin { } $area_id = $this->input->get('area_id'); $user = $this->user_model->get(['userId'=>$this->uid]); + $org_row = $this->market_sylive_organization_model->get(['organizationId'=>$this->session['org_id']]); + $headimg = $org_row['logo'] ? build_qiniu_image_url($org_row['logo']):Sylive_entity::HD_IMG; $data = [ 'nickname' => $user['nickname'], - 'headimg' => Sylive_entity::DF_IMG + 'headimg' => $headimg ]; if($this->group_id==1 || $area_id){ //所有店铺 !$area_id && $area_id = $this->session['org_id'];