1.提交缺失的东西

This commit is contained in:
2025-05-16 13:23:45 +08:00
parent 2d6296280b
commit de1f9aff97
2 changed files with 6 additions and 4 deletions

View File

@ -26,8 +26,8 @@ use app\common\model\goods\GoodsBrand;
use app\common\model\TeamActivity; use app\common\model\TeamActivity;
use app\common\model\TeamFound; use app\common\model\TeamFound;
use app\common\model\TeamGoodsItem; use app\common\model\TeamGoodsItem;
use app\common\server\ConfigServer; use app\common\service\ConfigServer;
use app\common\server\UrlServer; use app\common\service\UrlServer;
use think\facade\Db; use think\facade\Db;
use think\facade\Hook; use think\facade\Hook;
@ -115,7 +115,7 @@ class GoodsLogic{
//商品详情 //商品详情
public static function getGoodsDetail($user_id,$id){ public static function getGoodsDetail($user_id,$id){
$goods = Goods::get(['id'=>$id,'status'=>1],['goods_image','goods_item']); $goods = Goods::where(['id'=>$id,'status'=>1])->with(['goods_image','goods_item']);
if(empty($goods)){ if(empty($goods)){
return []; return [];
} }

View File

@ -25,7 +25,9 @@ use think\Model;
class Goods extends Model{ class Goods extends Model{
//商品图片 //商品图片
public function getImageAttr($value,$data){
public function getImageAttr($value, $data){
if($value){ if($value){
return UrlServer::getFileUrl($value); return UrlServer::getFileUrl($value);
} }