You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
35
hyhproject/home2/controller/Userscores.php
Executable file
35
hyhproject/home2/controller/Userscores.php
Executable file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
namespace wstmart\home\controller;
|
||||
use wstmart\common\model\UserScores as MUserscores;
|
||||
/**
|
||||
* ============================================================================
|
||||
* 积分控制器
|
||||
*/
|
||||
class Userscores extends Base{
|
||||
protected $beforeActionList = ['checkAuth'];
|
||||
/**
|
||||
* 查看商城消息
|
||||
*/
|
||||
public function index(){
|
||||
$rs = model('Users')->getFieldsById((int)session('WST_USER.userId'),['userScore','userTotalScore']);
|
||||
$this->assign('object',$rs);
|
||||
return $this->fetch('users/userscores/list');
|
||||
}
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
public function pageQuery(){
|
||||
$userId = (int)session('WST_USER.userId');
|
||||
$data = model('UserScores')->pageQuery($userId);
|
||||
return WSTReturn("", 1,$data);
|
||||
}
|
||||
/**
|
||||
* 签到积分
|
||||
*/
|
||||
public function signScore(){
|
||||
$m = new MUserscores();
|
||||
$userId = (int)session('WST_USER.userId');
|
||||
$rs = $m->signScore($userId);
|
||||
return $rs;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user