修复订单爬虫不发送短信的 bug,原因:config(app.debug) 返回字符串 false
This commit is contained in:
parent
09f08a3598
commit
ed1e344f9c
|
@ -453,7 +453,7 @@ class SpiderDy extends Command
|
||||||
private function sms($admin_id, $order)
|
private function sms($admin_id, $order)
|
||||||
{
|
{
|
||||||
$user = Admins::cache(true)->where('id', $admin_id)->find();
|
$user = Admins::cache(true)->where('id', $admin_id)->find();
|
||||||
if (!config('app.debug', true) && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
|
if ((!config('app.debug', true) || config('app.debug', true) === 'false') && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
|
||||||
echo "发送短信\n";
|
echo "发送短信\n";
|
||||||
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
|
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
|
||||||
$has = Blacks::where('mobile', $order->mobile)->find();
|
$has = Blacks::where('mobile', $order->mobile)->find();
|
||||||
|
|
|
@ -487,7 +487,7 @@ class SpiderMt extends Command
|
||||||
private function sms($admin_id, $order)
|
private function sms($admin_id, $order)
|
||||||
{
|
{
|
||||||
$user = Admins::cache(true)->where('id', $admin_id)->find();
|
$user = Admins::cache(true)->where('id', $admin_id)->find();
|
||||||
if (!config('app.debug', true) && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
|
if ((!config('app.debug', true) || config('app.debug', true) === 'false') && (time() * 1000 - $order->create_at) / 1000 < 2 * 24 * 3600) {
|
||||||
echo "发送短信\n";
|
echo "发送短信\n";
|
||||||
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
|
print_r([$order->mobile, 261607, ['title' => $order->product_name, 'mobile' => $user->mobile]]);
|
||||||
$has = Blacks::where('mobile', $order->mobile)->find();
|
$has = Blacks::where('mobile', $order->mobile)->find();
|
||||||
|
|
Loading…
Reference in New Issue