12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\api\controller\v1;
- use app\hander\HelpHander;
- use think\Controller;
- use think\Db;
- // 不需要登录信息的接口写这
- class Common extends Controller
- {
- public function newAppMgr(){
- $ret = Db::name('app_mgr')
- ->where(['enable'=>1, 'del'=>0])
- ->order('id desc')
- ->find();
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error('暂无数据');
- }
- }
- public function newAppIos(){
- $ret = Db::name('app_ios')
- ->where(['enable'=>1, 'del'=>0])
- ->order('id desc')
- ->find();
- if($ret){
- HelpHander::success($ret);
- }else{
- HelpHander::error('暂无数据');
- }
- }
- public function staticUrl(){
- $data=[
- 'adoutUsUrl' => url('h5/Index/sysarticle',['name'=>'about'],false,true),
- 'privacyPolicyUrl' => url('h5/Index/sysarticle',['name'=>'privacy'],false,true),
- 'disclaimerUrl' => url('h5/Index/sysarticle',['name'=>'disclaimer'],false,true),
- ];
- HelpHander::success($data);
- }
- public function deps(){
- $orgId = input('orgId/d',0);
- $deps = Db::name('dep')
- ->where('org_id',$orgId)
- ->where('del',0)
- ->where('enable',1)
- ->field('id,title')
- ->select();
- $deps = $deps?$deps:[];
- HelpHander::success($deps,'成功');
- }
- }
|