You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
701 B
PHP
26 lines
701 B
PHP
<?php
|
|
namespace app\admin\controller;
|
|
use think\Controller;
|
|
use think\Db;
|
|
class Paramindexset extends Common
|
|
{
|
|
|
|
public function index()
|
|
{
|
|
return $this->fetch();
|
|
}
|
|
|
|
|
|
public function get_ajax(){
|
|
$data = Db::query("SELECT DISTINCT 'b'||bdzid id,bmc name,0 as pId from vw_sb UNION SELECT DISTINCT 'j'||jgid id,jmc name,'b'||bdzid pId from vw_sb UNION SELECT DISTINCT 'z'||zid id,zmc name,'j'||jgid pId from vw_sb UNION SELECT DISTINCT 'm'||id id,name,'z'||zid pId from vw_sb");
|
|
echo json_encode($data);
|
|
}
|
|
|
|
public function ajax(){
|
|
$id=input('id');
|
|
$data1 = Db::table('vw_sb')->where('id',$id)->find();
|
|
echo $data1['mtid'];
|
|
}
|
|
|
|
}
|