|
@@ -5,8 +5,6 @@ use Think\Db; |
|
@@ -5,8 +5,6 @@ use Think\Db; |
5
|
/**
|
5
|
/**
|
6
|
* @title 签到
|
6
|
* @title 签到
|
7
|
* @description 签到相关接口
|
7
|
* @description 签到相关接口
|
8
|
- * @header name:key require:1 default: desc:秘钥(区别设置)
|
|
|
9
|
- * @param name:public type:int require:1 default:1 other: desc:公共参数(区别设置)
|
|
|
10
|
*/
|
8
|
*/
|
11
|
class SignController extends RestBaseController
|
9
|
class SignController extends RestBaseController
|
12
|
{
|
10
|
{
|
|
@@ -212,4 +210,24 @@ class SignController extends RestBaseController |
|
@@ -212,4 +210,24 @@ class SignController extends RestBaseController |
212
|
));
|
210
|
));
|
213
|
}
|
211
|
}
|
214
|
|
212
|
|
|
|
213
|
+
|
|
|
214
|
+
|
|
|
215
|
+ /**
|
|
|
216
|
+ * @title 分享接口
|
|
|
217
|
+ * @description 分享接口结果返回
|
|
|
218
|
+ * @author panhaowen
|
|
|
219
|
+ * @url /portal/Sign/share
|
|
|
220
|
+ * @method POST
|
|
|
221
|
+ * @header name:XX-Token require:1 default: desc:token
|
|
|
222
|
+ * @param
|
|
|
223
|
+ */
|
|
|
224
|
+ public function share()
|
|
|
225
|
+ {
|
|
|
226
|
+ //用户信息
|
|
|
227
|
+ $config = Db::name('config')->where('id', 1)->find();
|
|
|
228
|
+ Db::name('user')->where('id',$this->getUserId())->setInc('score',$config['share_score']);
|
|
|
229
|
+ $user= Db::name('user')->where('id',$this->getUserId())->find();
|
|
|
230
|
+ Db::name('user_score_log')->insert(['user_id'=>$this->getUserId(),'score'=>$config['share_score'],'now_score'=>$user['score']]);
|
|
|
231
|
+ $this->success('分享成功');
|
|
|
232
|
+ }
|
215
|
} |
233
|
} |