...
|
...
|
@@ -151,12 +151,15 @@ class SignController extends RestBaseController |
|
|
* @method POST
|
|
|
* @header name:XX-Token require:1 default: desc:token
|
|
|
* @param name:status type:int require:1 other: desc:日打卡种类
|
|
|
* @return day_sign:是否需要进入每日一签页面(0:不需要,1:需要)
|
|
|
*/
|
|
|
public function daySignPost(){
|
|
|
$param=$this->request->param();
|
|
|
$user=Db::name('user')->where('id',$this->getUserId())->find();
|
|
|
$config=[];
|
|
|
$music=[];
|
|
|
//是否需要进入每日一签页面
|
|
|
$day_sign=0;
|
|
|
//根据签到种类判断增加积分数
|
|
|
$score=Db::name('config')->where('id',1)->find();
|
|
|
if ($param['status']==1){
|
...
|
...
|
@@ -209,6 +212,7 @@ class SignController extends RestBaseController |
|
|
}
|
|
|
//无记录
|
|
|
else{
|
|
|
$day_sign=1;
|
|
|
Db::name('user_sign')->insert(['user_id'=>$this->getUserId(),'create_time'=>time(),"$type"=>time()]);
|
|
|
}
|
|
|
//记录打卡积分
|
...
|
...
|
@@ -223,6 +227,7 @@ class SignController extends RestBaseController |
|
|
'music'=>cmf_get_file_download_url($music['url']),
|
|
|
'music_name'=>$music['name'],
|
|
|
'score'=>$score,
|
|
|
'day_sign'=>$day_sign,
|
|
|
));
|
|
|
}
|
|
|
|
...
|
...
|
|