1.提交缺失的东西
This commit is contained in:
@ -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 [];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user