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

1

... ... @@ -48,47 +48,47 @@ class Order extends Model
* 订单状态
*/
public function getTypeAttr($value,$data){
$type_arr = ['name'=>'待支付','value'=>'payment'];
$type = ['name'=>'待支付','value'=>'payment'];
if($data['refund_status'] > '0'){
if($this['refund']['type'] == '1'){
$refund_status_arr = ['1'=>'退款申请中','2'=>'已退款','3'=>'已拒绝'];
$type_arr = [
$type = [
'name' => $refund_status_arr[$data['refund_status']],
'value' => 'refund_'.$data['refund_status']
];
}else{
$refund_status_arr = ['1'=>'退货申请中','2'=>'已退款','3'=>'已拒绝'];
$type_arr = [
$type = [
'name' => $refund_status_arr[$data['refund_status']],
'value' => 'return_goods_'.$data['refund_status']
];
}
}else{
if($data['pay_status'] == '0'){
$type_arr = [
$type = [
'name' => '待支付',
'value' => 'payment'
];
}else{
if($data['delivery_status'] == '0'){
$type_arr = [
$type = [
'name' => '待发货',
'value' => 'delivery'
];
}else{
if($data['receive_status'] == '0'){
$type_arr = [
$type = [
'name' => '待收货',
'value' => 'receive'
];
}else{
if($data['appraise_status'] == '0'){
$type_arr = [
$type = [
'name' => '待评价',
'value' => 'appraise'
];
}else{
$type_arr = [
$type = [
'name' => '已评价',
'value' => 'appraised'
];
... ... @@ -97,7 +97,7 @@ class Order extends Model
}
}
}
return $type_arr;
return $type;
}
/**
... ...