12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace app\admin\controller;
- use app\admin\model\Admin;
- use app\admin\model\User;
- use app\common\controller\Backend;
- use app\common\model\Attachment;
- use app\common\model\Config as ConfigModel;
- use fast\Date;
- use think\Db;
- use think\Env;
- class Simulator extends Backend
- {
- protected $noNeedRight = ['readfault'];
- /**
- * 查看
- */
- public function index()
- {
- $simNum = [];
- if(Env::get('app.is_fault')){
- $url = config('site.url_type').'/sim/sim/listAllEnable';
- $ret = json_decode(send_get($url),true);
- if($ret['code'] == 200){
- foreach ($ret['data'] as $k => $val){
- $simNum[] = [
- 'simNum'=>$val['simNum'],
- 'simType'=>$val['simType'],
- ];
- }
- }
- }
- $this->assign('simNum', $simNum);
- $this->assignConfig('url_type', config('site.url_type'));
- return $this->view->fetch();
- }
- public function readfault(){
- $list = Db::name('debug_fault')->select();
- }
- }
|