|
|
@@ -26,6 +26,15 @@ class MtController extends PublicController
|
|
|
|
|
|
public $guestAccess = [];
|
|
|
|
|
|
+ protected function filterEmoji($str)
|
|
|
+ {
|
|
|
+ $str = preg_replace_callback('/./u',
|
|
|
+ function (array $match) {
|
|
|
+ return strlen($match[0]) >= 4 ? '' : $match[0];
|
|
|
+ }, $str);
|
|
|
+ return $str;
|
|
|
+ }
|
|
|
+
|
|
|
//已确认订单通知
|
|
|
public function actionConfirmOrder()
|
|
|
{
|
|
|
@@ -106,7 +115,7 @@ class MtController extends PublicController
|
|
|
return Json::encode(['data' => 'ok']);
|
|
|
}
|
|
|
|
|
|
- $caution = $post['caution'] ?? '';
|
|
|
+ $caution = isset($post['caution']) && !empty($post['caution']) ? $this->filterEmoji($post['caution']) : '';
|
|
|
$remark = $caution;
|
|
|
|
|
|
$bookMobile = $post['order_phone_number'] ?? '';
|