作者 何书鹏
1 个管道 的构建 通过 耗费 0 秒

1

... ... @@ -51,7 +51,7 @@ class Cart extends Model
public function getGoodsStyleTextAttr($value,$data){
$goods_style_text = [];
if(!empty($data['goods_style'])){
$goods_style = json_decode(str_replace('\'','"',$data['goods_style']),true);
$goods_style = json_decode($data['goods_style'],true);
foreach($goods_style as $k => $v){
$style = Style::where('id',$k)->field('style_name,style_type')->find()->toArray();
$style['style_value'] = '';
... ...
... ... @@ -47,7 +47,7 @@ class OrderGoods extends Model
public function getGoodsStyleTextAttr($value,$data){
$goods_style_text = [];
if(!empty($data['goods_style'])){
$goods_style = json_decode(str_replace('\'','"',$data['goods_style']),true);
$goods_style = json_decode($data['goods_style'],true);
foreach($goods_style as $k => $v){
$style = Style::where('id',$k)->field('style_name,style_type')->find()->toArray();
$style['style_value'] = '';
... ...