...
|
...
|
@@ -15,7 +15,8 @@ class Cart extends Model |
|
|
|
|
|
// 追加属性
|
|
|
protected $append = [
|
|
|
'goods_style_text'
|
|
|
'goods_style_text',
|
|
|
'make_type_text'
|
|
|
];
|
|
|
|
|
|
// 错误提示
|
...
|
...
|
@@ -72,6 +73,14 @@ class Cart extends Model |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 定制项名称
|
|
|
*/
|
|
|
public function getMakeTypeTextAttr($value,$data){
|
|
|
$make_type_arr = ['0'=>'','1'=>'模特款','2'=>'自定义'];
|
|
|
return $make_type_arr[$data['make_type']];
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 加入购物车
|
|
|
*/
|
|
|
public function add($user,$data)
|
...
|
...
|
|