- 新增客服电话、服务时间、企业微信客服配置项 - 新增客服弹窗组件支持微信在线客服和电话拨打 - 调整核销码为6位数字,修复相关提示文本 - 优化订单服务项目展示逻辑 - 完善抢单大厅加载动画和列表样式
12 行
867 B
PHP
12 行
867 B
PHP
<?php
|
|
require __DIR__ . '/../server/application/common/library/OrderServiceSnapshot.php';
|
|
use app\common\library\OrderServiceSnapshot;
|
|
function checkSnapshot($expected, $actual) {
|
|
if ($expected !== $actual) throw new RuntimeException(var_export([$expected, $actual], true));
|
|
}
|
|
checkSnapshot('安装x1;拆旧x1', OrderServiceSnapshot::format(['service_type_name' => '安装', 'num' => 1, 'extras' => [['name' => '拆旧', 'num' => 1], ['name' => '搬运', 'num' => 0]]]));
|
|
checkSnapshot('维修x2;搬运x3', OrderServiceSnapshot::format(['service_type_name' => '维修', 'goods_num' => 2, 'addon_services' => [['name' => '搬运', 'num' => 3]]]));
|
|
checkSnapshot('安装x1;拆旧x1', OrderServiceSnapshot::format(['addon_services' => '安装x1;拆旧x1']));
|
|
checkSnapshot('', OrderServiceSnapshot::format([]));
|
|
echo "Order service snapshot tests passed\n";
|