'等待审核', '2' => '审核通过', '3' => '审核拒绝']; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } public function getTypeList() { return ['1' => '仅退款', '2' => '退货退款']; } public function getTypeTextAttr($value, $data) { $value = $value ?: ($data['type'] ?? ''); $list = $this->getTypeList(); return $list[$value] ?? ''; } public function getImagesAttr($value, $data) { $value = $value ?: ($data['images'] ?? ''); if (empty($value)) { return []; } $value = explode(',', $value); foreach ($value as &$img) { $img = cdnurl($img, true); } return $value; } public function OrderGoods() { return $this->hasOne('OrderGoods', 'id', 'order_goods_id', [], 'LEFT'); } }