...
|
...
|
@@ -5,7 +5,7 @@ namespace app\api\controller; |
|
|
use app\common\controller\Api;
|
|
|
use app\common\controller\Resource;
|
|
|
use tinymeng\code\Generate;
|
|
|
|
|
|
mb_internal_encoding("UTF-8");
|
|
|
/**
|
|
|
* 示例接口
|
|
|
*/
|
...
|
...
|
@@ -69,16 +69,9 @@ class Demo extends Api |
|
|
*/
|
|
|
public function test3()
|
|
|
{
|
|
|
$id = '三年级三班';
|
|
|
$arr = substr($id,0,1);
|
|
|
$map = array('一' => '1','二' => '2','三' => '3','四' => '4','五' => '5','六' => '6');
|
|
|
foreach ($map as $k => $v){
|
|
|
$k = $arr;
|
|
|
return $k;
|
|
|
}
|
|
|
|
|
|
// $res = str_pad($id,8,"0",STR_PAD_LEFT);
|
|
|
// dump($res);
|
|
|
|
|
|
dump($res);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|