$files) {
switch (strtolower($ext)) {
case '.css' :
foreach ($files as $f) {
$output .= '' . "\n";
}
break;
case '.js' :
foreach ($files as $f) {
$output .= '' . "\n";
}
break;
case '.jpg' :
case '.gif' :
case '.png' :
foreach ($files as $f) {
$output = $staticUrlPart . 'img/' . $f;
}
break;
default :
foreach ($files as $f) {
$output = $staticUrlPart . $f;
}
}
}
}
return $output;
}
public static function getStaticCommonFile($files, $forceTimestamp = '') {
$static = array();
$staticDir = str_replace('\\', '/', Zc::C(ZcConfigConst::DirWsApp));
$apiPath = stripos(Zc::C('static.domain'), 'api.') === 0 ? '/' : '/api/';
$staticUrlPart = AppConst::getCurProtocol() . '://' . Zc::C('static.domain') . $apiPath . $staticDir . 'views/static_common/';
$files = is_array($files) ? $files : [$files];
foreach ($files as $file) {
$timestamp = '';
list ($file, $timestamp) = explode('?', $file);
$timestamp = empty($timestamp) ? '' : ('?' . $timestamp);
$timestamp = $forceTimestamp ? ('?' . $forceTimestamp) : $timestamp;
$ext = strrchr($file, '.');
$static[$ext][] = $file . $timestamp;
}
$output = '';
foreach ($static as $ext => $files) {
switch (strtolower($ext)) {
case '.css' :
foreach ($files as $f) {
$output .= '' . "\n";
}
break;
case '.js' :
foreach ($files as $f) {
$output .= '' . "\n";
}
break;
default :
foreach ($files as $f) {
$output = $staticUrlPart . $f;
}
}
}
return $output;
}
public static function checkIsCloseSidebarMenu() {
$cookieKey = $_SESSION[SessionConst::mallId] . '_getSideBarCookieKey';
return $_COOKIE[$cookieKey] == 'close';
}
public static function getTbkOrderStaticFile($files, $forceTimestamp = null) {
if (empty($files)) {
return ;
}
return self::getStaticFile($files, $forceTimestamp);
}
public static function renderLogisticsStatus($logisticsStatus) {
switch ($logisticsStatus) {
case OrderPrintConst::logisticsActionGot:
return '已揽件';
case OrderPrintConst::logisticsActionSend:
return '派件';
case OrderPrintConst::logisticsActionSign:
return '签收';
case OrderPrintConst::logisticsActionRejection:
return '拒签';
case OrderPrintConst::logisticsActionReturn:
return '退件';
case OrderPrintConst::logisticsActionArrival:
case OrderPrintConst::logisticsActionDeparture:
return '流转中';
case OrderPrintConst::logisticsActionFail:
return '问题件';
case OrderPrintConst::logisticsActionStayInWarehouse:
return '留仓';
case OrderPrintConst::logisticsActionSignOnBehalf:
return '代收点代签';
case OrderPrintConst::logisticsActionOther:
return '其他';
case OrderPrintConst::logisticsActionInCabinet:
return '入代收点';
case OrderPrintConst::logisticsActionOutCabinet:
return '出代收点';
case OrderPrintConst::logisticsActionClearanceStart:
return '清关中';
case OrderPrintConst::logisticsActionClearanceFinish:
return '清关完成';
}
return '-';
}
public static function buildLogisticsWarningHtml($warningType, $logisticsStatus) {
if (in_array($logisticsStatus, OrderPrintConst::getLogisticsRejectActions())) {
return '买家拒收';
}
switch ($warningType) {
case OrderPrintConst::logisticsFilterOvertimeGot:
return '超时未揽收';
case OrderPrintConst::logisticsFilterOvertimeNoArrival:
return '超时未流转';
case OrderPrintConst::logisticsFilterOvertimeNoNewTrace:
return '超时无物流更新';
case OrderPrintConst::logisticsFilterOvertimeNoSign:
return '超时未签收';
case OrderPrintConst::logisticsFilterRejection:
return '买家拒收';
case OrderPrintConst::logisticsFilterAllocateStay:
return '分拨停留';
case OrderPrintConst::logisticsFilterNodeStayJZHW:
return '江浙沪皖节点停留';
case OrderPrintConst::logisticsFilterNodeStayJJJ:
return '京津冀节点停留';
case OrderPrintConst::logisticsFilterNodeStayTYSF:
return '同意省份节点停留';
case OrderPrintConst::logisticsFilterNodeStayBTSF:
return '不同省份节点停留';
case OrderPrintConst::logisticsFilterNodeStayXXN:
return '任一地址在新疆、西藏或内蒙古节点停留';
}
}
}