修改后台的展示

This commit is contained in:
liu 2024-07-08 15:15:15 +08:00
parent cbdf2c2431
commit 4035333cd4

View File

@ -283,6 +283,15 @@ class UserLogic extends BaseLogic
->page($params['page_no'],$params['page_size'])
->order('id','desc')
->select()->toArray();
foreach ($data as &$value){
if($value['status'] == 0){
$value['title'] = "购买商品".$value['all']."元获得".$value['number']."元返还金";
}else{
//退回到余额、微信、采购款
$back = self::dealTitleCate($value['pay_type']);
$value['title'] = "返还金解冻".$value['number']."元退回到".$back;
}
}
break;
default:
$data = [];
@ -309,4 +318,29 @@ class UserLogic extends BaseLogic
];
}
public static function dealTitleCate($pay_type)
{
switch ($pay_type){
case 18:
$title = "采购款";
break;
case 17:
$title = "现金";
break;
case 3:
$title ="余额";
break;
case 7:
case 9:
$title ="微信";
break;
case 13:
$title ="支付宝";
break;
default:
$title ="默认";
}
return $title;
}
}