大体接口
This commit is contained in:
parent
cccadac9cc
commit
91d6258476
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@
|
|||||||
*.zip
|
*.zip
|
||||||
/hyhproject/common/conf/database.php
|
/hyhproject/common/conf/database.php
|
||||||
*.DS_Store
|
*.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.
Loading…
x
Reference in New Issue
Block a user