@@ -34,8 +34,12 @@ public function list(){
// $item[]=$var;
}
-// $data=[];
-// $db=Db::name('')
+ //var_dump(Db::name('cat')->getLastSql());
+ $data = Db::name("cat")->where(['pid'>0])->select();
+ $vmp = [];
+ foreach ($data as $sts){
+ $vmp[]=stro($sts);
+ }
return app_show(0,"获取成功",$item);
@@ -522,7 +522,7 @@ public function out(){
$sendtime = isset($this->post['sendtime']) && $this->post['sendtime'] !=="" ? $this->post['sendtime']:date("Y-m-d H:i:s");
// $check_num = isset($this->post['check_num']) && $this->post['check_num'] !=="" ? $this->post['check_num'] :"";
// $error_num = isset($this->post['error_num']) && $this->post['error_num'] !=="" ? $this->post['error_num'] :"";
- $status = isset($this->post['status']) && $this->post['status'] !=="" ? $this->post['status'] :"0";
+ $status = isset($this->post['status']) && $this->post['status'] !=="" ? $this->post['status'] :"1";
//$dn=Db::name('sale_info')->where(['wsm_code'=>$outCode])->find();
Db::startTrans();
try {
@@ -294,14 +294,17 @@ function crea($data,$vio=0)
return $data;
-function str(){
+function stro(){
$data=[];
$db=Db::name('cat')->where(['pid'=>$data['id']])->select()->toArray();
if(empty($db)){
$data['child']=[];
-
+ foreach ($db as $item) {
+ $data['child'][]=$item;
+ return $data;
/**
* @param $files