feat(admin): 后台全站中文化
- 补齐后台字段、枚举、状态、动作中文语言包,覆盖业务模块与 FastAdmin 基础页面 - 新增 order/banner/service/review/service.cat 等模块语言包,统一字段文案 - 订单表头/状态/支付/结算/加急/电梯/评价改为中文展示,订单表单改为中文下拉/单选 - 发票类型、优惠券类型、师傅/商家审核、提现/结算/申诉状态按模块中文覆盖 - 后台菜单与权限节点标题统一改为中文 - 移除英文语言入口,仅保留简体中文 - 右侧主题配色名称、页脚版权文案改为中文 - 新增 schema_phase9_admin_zh.sql 菜单节点中文迁移
这个提交包含在:
@@ -26,6 +26,12 @@ class Order extends Model
|
||||
// 追加属性
|
||||
protected $append = [
|
||||
'price_type_text',
|
||||
'status_text',
|
||||
'pay_status_text',
|
||||
'settle_status_text',
|
||||
'is_review_text',
|
||||
'has_elevator_text',
|
||||
'urgent_text',
|
||||
'appoint_time_text',
|
||||
'pay_time_text',
|
||||
'accept_time_text',
|
||||
@@ -51,6 +57,75 @@ class Order extends Model
|
||||
return $list[$value] ?? '';
|
||||
}
|
||||
|
||||
public function getStatusList()
|
||||
{
|
||||
return [
|
||||
0 => '待支付', 1 => '待接单', 2 => '报价中', 3 => '已接单', 4 => '待上门',
|
||||
5 => '已到达', 6 => '服务中', 7 => '待验收', 8 => '已完成', 9 => '已取消', 10 => '售后中',
|
||||
];
|
||||
}
|
||||
|
||||
public function getPayStatusList()
|
||||
{
|
||||
return [0 => '未支付', 1 => '已支付', 2 => '已退款'];
|
||||
}
|
||||
|
||||
public function getSettleStatusList()
|
||||
{
|
||||
return [0 => '未结算', 1 => '已结算'];
|
||||
}
|
||||
|
||||
public function getIsReviewList()
|
||||
{
|
||||
return [0 => '未评价', 1 => '已评价'];
|
||||
}
|
||||
|
||||
public function getHasElevatorList()
|
||||
{
|
||||
return [0 => '无电梯', 1 => '有电梯'];
|
||||
}
|
||||
|
||||
public function getUrgentList()
|
||||
{
|
||||
return [0 => '普通', 1 => '加急'];
|
||||
}
|
||||
|
||||
public function getStatusTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getStatusList();
|
||||
return $list[(int)($data['status'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
public function getPayStatusTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getPayStatusList();
|
||||
return $list[(int)($data['pay_status'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
public function getSettleStatusTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getSettleStatusList();
|
||||
return $list[(int)($data['settle_status'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
public function getIsReviewTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getIsReviewList();
|
||||
return $list[(int)($data['is_review'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
public function getHasElevatorTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getHasElevatorList();
|
||||
return $list[(int)($data['has_elevator'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
public function getUrgentTextAttr($value, $data)
|
||||
{
|
||||
$list = $this->getUrgentList();
|
||||
return $list[(int)($data['urgent'] ?? 0)] ?? '';
|
||||
}
|
||||
|
||||
|
||||
public function getAppointTimeTextAttr($value, $data)
|
||||
{
|
||||
|
||||
在新工单中引用
屏蔽一个用户