新增接口
This commit is contained in:
parent
2c8468e7fc
commit
9627c2b9b4
@ -43,6 +43,12 @@ class Note extends Base
|
|||||||
]);
|
]);
|
||||||
return WSTReturn("成功", 1);
|
return WSTReturn("成功", 1);
|
||||||
}elseif($id == 0){
|
}elseif($id == 0){
|
||||||
|
model("note")->save([
|
||||||
|
"title"=>$title,
|
||||||
|
"content"=>$content,
|
||||||
|
"user_id"=>$userId,
|
||||||
|
"id"=>$id
|
||||||
|
]);
|
||||||
return WSTReturn("成功", 1);
|
return WSTReturn("成功", 1);
|
||||||
}
|
}
|
||||||
return WSTReturn("异常请求",0);
|
return WSTReturn("异常请求",0);
|
||||||
@ -50,7 +56,10 @@ class Note extends Base
|
|||||||
|
|
||||||
public function creditIndex(){
|
public function creditIndex(){
|
||||||
$userId = (int)session('WST_USER.userId');
|
$userId = (int)session('WST_USER.userId');
|
||||||
|
$model = model("note_credit")->field(true)
|
||||||
|
->where(["user_id"=>$userId])->order("update_time", "desc")
|
||||||
|
->select();
|
||||||
|
return WSTReturn("OK", 1, $model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function creditDetail(){
|
public function creditDetail(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user