...
|
...
|
@@ -5,8 +5,6 @@ use Think\Db; |
|
|
/**
|
|
|
* @title 签到
|
|
|
* @description 签到相关接口
|
|
|
* @header name:key require:1 default: desc:秘钥(区别设置)
|
|
|
* @param name:public type:int require:1 default:1 other: desc:公共参数(区别设置)
|
|
|
*/
|
|
|
class SignController extends RestBaseController
|
|
|
{
|
...
|
...
|
@@ -212,4 +210,24 @@ class SignController extends RestBaseController |
|
|
));
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* @title 分享接口
|
|
|
* @description 分享接口结果返回
|
|
|
* @author panhaowen
|
|
|
* @url /portal/Sign/share
|
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
* @param
|
|
|
*/
|
|
|
public function share()
|
|
|
{
|
|
|
//用户信息
|
|
|
$config = Db::name('config')->where('id', 1)->find();
|
|
|
Db::name('user')->where('id',$this->getUserId())->setInc('score',$config['share_score']);
|
|
|
$user= Db::name('user')->where('id',$this->getUserId())->find();
|
|
|
Db::name('user_score_log')->insert(['user_id'=>$this->getUserId(),'score'=>$config['share_score'],'now_score'=>$user['score']]);
|
|
|
$this->success('分享成功');
|
|
|
}
|
|
|
} |
...
|
...
|
|