This commit is contained in:
2024-11-21 16:40:44 +08:00
commit a5029a2be7
69 changed files with 3160 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace plugin\points_mall\controller;
use think\admin\Controller;
/**
* 商品管理
*/
class Goods extends Controller
{
/**
* 商品管理
* @auth true
* @menu true
* @return void
*/
public function index()
{
$this->title = '商品管理';
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace plugin\points_mall\controller;
use think\admin\Controller;
/**
* 积分情况
*/
class Point extends Controller
{
/**
* 积分情况
* @auth true
* @menu true
* @return void
*/
public function index()
{
}
}

View File

@ -0,0 +1,25 @@
<?php
namespace plugin\points_mall\controller\api;
use plugin\account\controller\api\Auth as AuthController;
use think\exception\HttpResponseException;
class Auth extends AuthController
{
/**
* 控制器初始化
* @return void
*/
protected function initialize()
{
try {
parent::initialize();
$this->checkUserStatus(false);
} catch (HttpResponseException $exception) {
throw $exception;
} catch (\Exception $exception) {
$this->error($exception->getMessage());
}
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace plugin\points_mall\controller\api\auth;
use plugin\points_mall\controller\api\Auth;
use plugin\points_mall\model\PointsMallUserPointLog;
use plugin\points_mall\service\UserPointService;
class UserPoint extends Auth
{
public function myPoint() {
$point = UserPointService::getUserPoint($this->usid);
$this->success('获取用户积分', [
'point' => $point
]);
}
public function myPointLog() {
$page = PointsMallUserPointLog::mk()->where('uid', $this->usid)->order('create_at desc')->paginate();
$this->success('获取积分记录', $page);
}
}