20240120-ljl-routeConfig
ljl 10 months ago
parent 6977ca6db1
commit 6343605bb0

@ -751,7 +751,7 @@ class ExpressTplService extends AbstractService {
$attributeList[] = [ $attributeList[] = [
'name' => $attribute['attribute_name'], 'name' => $attribute['attribute_name'],
'code' => $attribute['attribute_code'], 'code' => $attribute['attribute_code'],
'options' => $this->getNetSiteServiceSelectOptions($service['service_code'], $attribute['attribute_code'], $attribute['type_desc']), 'options' => CommonTool::convertMapToOptions(json_decode($attribute['type_desc'], true)),
'type' => $attribute['attribute_type'], 'type' => $attribute['attribute_type'],
]; ];
} }
@ -763,21 +763,4 @@ class ExpressTplService extends AbstractService {
} }
return $serviceList; return $serviceList;
} }
private function getNetSiteServiceSelectOptions($serviceCode, $attributeCode, $typeDesc) {
if ($serviceCode == 'TIMED-DELIVERY' && $attributeCode == 'value') {
return CommonTool::convertMapToOptions(json_decode($typeDesc, true));
}
return [];
}
private function getNetSiteServiceInputType($serviceCode) {
if (in_array($serviceCode, ['PRODUCT_TYPE', 'TIMED-DELIVERY'])) {
return 'select';
} elseif (in_array($serviceCode, ['IN41'])) {
return 'checkbox';
} elseif (in_array($serviceCode, ['INSURE', 'IN144'])) {
return 'input';
}
}
} }
Loading…
Cancel
Save