You've already forked guangan
用户积分列表
This commit is contained in:
@ -8,7 +8,7 @@ use think\facade\View;
|
|||||||
class Service extends Plugin
|
class Service extends Plugin
|
||||||
{
|
{
|
||||||
protected $appName = '积分商城';
|
protected $appName = '积分商城';
|
||||||
protected $appCode = 'points-mall';
|
protected $appCode = 'points_mall';
|
||||||
protected $package = 'jerryyan/think-plugs-points-mall';
|
protected $package = 'jerryyan/think-plugs-points-mall';
|
||||||
|
|
||||||
public static function register(): void
|
public static function register(): void
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
namespace plugin\points_mall\controller;
|
namespace plugin\points_mall\controller;
|
||||||
|
|
||||||
|
use plugin\points_mall\model\PointsMallUserPoint;
|
||||||
use think\admin\Controller;
|
use think\admin\Controller;
|
||||||
|
use think\admin\helper\QueryHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 积分情况
|
* 积分情况
|
||||||
@ -17,6 +19,12 @@ class Point extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$this->title = '积分详情';
|
||||||
|
PointsMallUserPoint::mQuery()->layTable(function () {
|
||||||
|
|
||||||
|
}, static function (QueryHelper $query) {
|
||||||
|
$query->with('user');
|
||||||
|
$query->valueBetween('point');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
49
plugs/think-plugs-points-mall/src/view/point/index.html
Normal file
49
plugs/think-plugs-points-mall/src/view/point/index.html
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{extend name="table"}
|
||||||
|
|
||||||
|
{block name="button"}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name="content"}
|
||||||
|
<div class="layui-tab">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col">
|
||||||
|
<div class="point_list think-bg-white">
|
||||||
|
{include file='point/index_search'}
|
||||||
|
<table class="layui-hide" data-url="{$request->url()}" data-target-search="form.form-search" id="Table" lay-filter="Table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/html" id="toolbar">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name='style'}
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name='script'}
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#Table').layTable({
|
||||||
|
height: 'full-250',
|
||||||
|
toolbar: true,
|
||||||
|
sort: {field: 'uid', type: 'asc'},
|
||||||
|
title: '用户积分',
|
||||||
|
cols: [[
|
||||||
|
{field: 'uid', title: '用户ID', width: 100, sort: true},
|
||||||
|
{field:'nickname', title:'用户昵称', width:120, templet:function(item){
|
||||||
|
if (item.user) {
|
||||||
|
return item.user.nickname || item.user.extra.nickName;
|
||||||
|
} else {
|
||||||
|
return '未知';
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
{field:'point', title:'积分', width:80, sort: true},
|
||||||
|
]]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{/block}
|
@ -0,0 +1,17 @@
|
|||||||
|
<fieldset>
|
||||||
|
<legend>条件搜索</legend>
|
||||||
|
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<label class="layui-form-label">积分范围</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input name="point_min" value="{:input('get.point_min')}" placeholder="最小积分" class="layui-input">
|
||||||
|
<input name="point_max" value="{:input('get.point_max')}" placeholder="最大积分" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item layui-inline">
|
||||||
|
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="searchData"><i class="layui-icon"></i> 搜 索</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</fieldset>
|
Reference in New Issue
Block a user