You've already forked qlg.tsgz.moe
							
							大体接口
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -3,4 +3,5 @@
 | 
			
		||||
*.zip
 | 
			
		||||
/hyhproject/common/conf/database.php
 | 
			
		||||
*.DS_Store
 | 
			
		||||
/runtime/
 | 
			
		||||
/runtime/
 | 
			
		||||
/static
 | 
			
		||||
							
								
								
									
										57
									
								
								hyhproject/app/controller/Note.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								hyhproject/app/controller/Note.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
namespace wstmart\app\controller;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Note extends Base
 | 
			
		||||
{
 | 
			
		||||
    public function index(){
 | 
			
		||||
        $userId = (int)session('WST_USER.userId');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function detail(){
 | 
			
		||||
        $userId = (int)session('WST_USER.userId');
 | 
			
		||||
        if(($id = (int)input( 'id', 0)) > 0){
 | 
			
		||||
            return WSTReturn("", 1, [
 | 
			
		||||
                "id"=>$id,
 | 
			
		||||
                "create_time"=>"昨天",
 | 
			
		||||
                "title"=>"标题",
 | 
			
		||||
                "content"=>"内容",
 | 
			
		||||
            ]);
 | 
			
		||||
        }
 | 
			
		||||
        return WSTReturn("异常请求",0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function save(){
 | 
			
		||||
        $userId = (int)session('WST_USER.userId');
 | 
			
		||||
        $id = (int)input( 'post.id', 0);
 | 
			
		||||
        $title = input("post.title");
 | 
			
		||||
        $content = input("post.content");
 | 
			
		||||
        if(empty($title)) return WSTReturn("请填写标题",0);
 | 
			
		||||
        if(empty($content)) return WSTReturn("请填写内容",0);
 | 
			
		||||
        if($id > 0){
 | 
			
		||||
            return WSTReturn("成功", 1);
 | 
			
		||||
        }elseif($id == 0){
 | 
			
		||||
            return WSTReturn("成功", 1);
 | 
			
		||||
        }
 | 
			
		||||
        return WSTReturn("异常请求",0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function creditIndex(){
 | 
			
		||||
        $userId = (int)session('WST_USER.userId');
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function creditDetail(){
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function creditCreate(){
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function creditAdd(){
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								qlg.tar.gz
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								qlg.tar.gz
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user