|
|
@@ -39,19 +39,23 @@ class ShopExtClass extends BaseClass
|
|
|
}
|
|
|
$lbSn = $order->fromType == 4 ? $shopExt->mtLbSn : $shopExt->makeLbSn;
|
|
|
$sound = "您有新的制作单";
|
|
|
- $reachDate = $order->reachDate ?? '';
|
|
|
- if (!empty($reachDate) && $reachDate != '0000-00-00') {
|
|
|
- $readPeriod = $order->reachPeriod ?? 0;
|
|
|
- $period = explode(':', $readPeriod);
|
|
|
- $periodName = implode($period, '点');
|
|
|
- if ($reachDate == date("Y-m-d")) {
|
|
|
- $sound .= ',今天' . $periodName . "分前送达";
|
|
|
- } elseif ($reachDate == date("Y-m-d", strtotime("+1 day"))) {
|
|
|
- $sound .= ',明天' . $periodName . "分前送达";
|
|
|
- } elseif ($reachDate == date("Y-m-d", strtotime("+2 day"))) {
|
|
|
- $sound .= ',后天' . $periodName . "分前送达";
|
|
|
- } else {
|
|
|
- $sound .= date("d", strtotime($reachDate)) . '号' . $periodName . "分前送达";
|
|
|
+ if ($order->sendType == 1) {
|
|
|
+ $sound = ",客户到店自取";
|
|
|
+ } else {
|
|
|
+ $reachDate = $order->reachDate ?? '';
|
|
|
+ if (!empty($reachDate) && $reachDate != '0000-00-00') {
|
|
|
+ $readPeriod = $order->reachPeriod ?? 0;
|
|
|
+ $period = explode(':', $readPeriod);
|
|
|
+ $periodName = implode($period, '点');
|
|
|
+ if ($reachDate == date("Y-m-d")) {
|
|
|
+ $sound .= ',今天' . $periodName . "分前送达";
|
|
|
+ } elseif ($reachDate == date("Y-m-d", strtotime("+1 day"))) {
|
|
|
+ $sound .= ',明天' . $periodName . "分前送达";
|
|
|
+ } elseif ($reachDate == date("Y-m-d", strtotime("+2 day"))) {
|
|
|
+ $sound .= ',后天' . $periodName . "分前送达";
|
|
|
+ } else {
|
|
|
+ $sound .= date("d", strtotime($reachDate)) . '号' . $periodName . "分前送达";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$url = "https://speaker.17laimai.cn/notify.php?id={$lbSn}&token=HK1626595800&version=3&message=" . $sound;
|