- 新增售后详情页面 aftersale-detail.vue - 优化售后列表 UI 样式,增加加载/空态/错误状态处理 - 修复售后列表跳转逻辑,新增下拉刷新功能 - 修复师傅入驻接口数组参数 500 崩溃问题 - 优化竞价单选定报价流程,修复订单状态错误问题 - 新增订单售后相关展示逻辑,包括售后状态、操作入口等 - 更新版本号至 1.0.88,配置微信小程序 AppID
29 行
2.3 KiB
PHP
29 行
2.3 KiB
PHP
<?php
|
||
require __DIR__ . '/../server/application/common/library/OrderDetailDisplay.php';
|
||
use app\common\library\OrderDetailDisplay as Display;
|
||
function same($expect, $actual) { if ($expect !== $actual) throw new RuntimeException(var_export([$expect, $actual], true)); }
|
||
same('余额支付', Display::paymentType('balance'));
|
||
same('微信支付', Display::paymentType('wechat'));
|
||
same('未记录', Display::paymentType(''));
|
||
same('其他(transfer)', Display::paymentType('transfer'));
|
||
same('余额支付', Display::paymentRecordType(['openid' => 'BALANCE', 'out_trade_no' => 'BAL123']));
|
||
same('微信支付', Display::paymentRecordType(['openid' => 'openid', 'out_trade_no' => 'PO123']));
|
||
same('余额支付', Display::paymentRecordType(['openid' => '', 'out_trade_no' => 'BAL123']));
|
||
same('未记录', Display::paymentRecordType(['openid' => '', 'out_trade_no' => 'OTHER123']));
|
||
same(['settled' => [['status' => 'paid'], ['status' => 'refunding'], ['status' => 'refund_failed']], 'attempts' => [['status' => 'pending'], ['status' => 'closed']], 'needs_review' => 1], Display::groupPaymentRecords([['status' => 'paid'], ['status' => 'pending'], ['status' => 'closed'], ['status' => 'refunding'], ['status' => 'refund_failed']]));
|
||
same(['settled' => [], 'attempts' => [['status' => 'unexpected']], 'needs_review' => 1], Display::groupPaymentRecords([['status' => 'unexpected']]));
|
||
same('用户', Display::operator('user'));
|
||
same('系统', Display::operator('system'));
|
||
same('订单应付金额', Display::amountLabel(['pay_status' => 0, 'status' => 0]));
|
||
same('订单金额', Display::amountLabel(['pay_status' => 0, 'status' => 9]));
|
||
same('已付金额(退款前)', Display::amountLabel(['pay_status' => 1, 'status' => 8, 'refund_amount' => 30]));
|
||
same('已付金额', Display::amountLabel(['pay_status' => 1, 'status' => 8, 'refund_amount' => 0]));
|
||
same('安装x1;拆旧x2', Display::services('[{"name":"拆旧","num":2}]', ['service_type_name'=>'安装','num'=>1]));
|
||
same('安装x1;拆旧x1', Display::services('安装x1;拆旧x1', []));
|
||
same('维修x2', Display::services('', ['service_type_name'=>'维修', 'num'=>2]));
|
||
same('', Display::services('[{"name":"拆旧"', []));
|
||
same('待确认', Display::quoteStatus('wait'));
|
||
same('已选定', Display::quoteStatus('selected'));
|
||
same('已选定', Display::quoteStatus('accept'));
|
||
echo "Order detail display tests passed\n";
|