xieruidong 2 роки тому
батько
коміт
c784e49abd
2 змінених файлів з 39 додано та 0 видалено
  1. 3 0
      application/index/controller/Index.php
  2. 36 0
      test

+ 3 - 0
application/index/controller/Index.php

@@ -4,6 +4,7 @@ namespace app\index\controller;
 
 use app\common\controller\Frontend;
 use app\common\model\Mobile;
+use app\common\model\MobileId;
 use app\common\service\MobileComputer;
 use app\service\byte_dance\ByteDance;
 use app\service\id\IdVerify;
@@ -33,5 +34,7 @@ class Index extends Frontend
     }
     public function test(){
         //dd(MobileComputer::setMobile(input('no'))->filter());
+        dd(
+            MobileId::destroy([1,2,3,4]));
     }
 }

+ 36 - 0
test

@@ -0,0 +1,36 @@
+#!/usr/bin/env php
+<?php
+ini_set('memory_limit',-1);
+use think\App;
+use Workerman\Worker as WO;
+
+define('APP_PATH', __DIR__ . '/application/');
+bcscale(2);
+// 加载框架引导文件
+require __DIR__.'/thinkphp/base.php';
+App::initCommon();
+WO::$logFile=sprintf('%s/workerman.log',RUNTIME_PATH);
+WO::$pidFile=sprintf('%s/workerman.pid',RUNTIME_PATH);
+WO::$processTitle='beauti-no';
+
+abstract class Com{
+    protected static function log($data){
+        user_log('commands/'.class_basename(get_called_class()),$data);
+    }
+    protected static function logError(\Exception $exception){
+        user_log('commands/'.class_basename(get_called_class()),[
+            'exception'=>$exception->getMessage(),
+            'file'=>$exception->getFile().' line:'.$exception->getLine(),
+            'trace'=>$exception->getTrace()
+        ]);
+    }
+    protected static function newWorker(){
+        $work=new WO();
+        $work->name=class_basename(static::class);
+        return $work;
+    }
+}
+
+require __DIR__.'/commands/mobile_delete.php';
+
+WO::runAll();