mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-06 16:21:17 +08:00
Compare commits
8 Commits
06c1b7d2be
...
e829aba4f6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e829aba4f6 | ||
|
|
bc76f541f8 | ||
|
|
03180d64ef | ||
|
|
801788a3f2 | ||
|
|
8049a21c27 | ||
|
|
25014ee662 | ||
|
|
82dad4b050 | ||
|
|
3788a88de7 |
@ -68,9 +68,7 @@
|
||||
$.form.load("{:url('state')}", data, 'post', function (ret) {
|
||||
if (ret.code < 1) $.msg.error(ret.info, 3, function () {
|
||||
$('#MenuTable').trigger('reload');
|
||||
}); else if (obj.value.split(',').length > 2) {
|
||||
$('#MenuTable').trigger('reload');
|
||||
}
|
||||
}); else $('#MenuTable').trigger('reload');
|
||||
return false;
|
||||
}, false);
|
||||
});
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
$.form.load("{:url('state')}", data, 'post', function (ret) {
|
||||
if (ret.code < 1) $.msg.error(ret.info, 3, function () {
|
||||
$('#UserTable').trigger('reload');
|
||||
});
|
||||
}); else $('#UserTable').trigger('reload')
|
||||
return false;
|
||||
}, false);
|
||||
});
|
||||
|
||||
@ -79,8 +79,7 @@ class UserTokenService extends Service
|
||||
public static function token(int $uuid, string $type): array
|
||||
{
|
||||
// 清理无效认证数据
|
||||
$time = time();
|
||||
$map1 = [['token', '<>', 'token'], ['time', '<', $time]];
|
||||
$map1 = [['token', '<>', 'token'], ['time', '<', $time = time()]];
|
||||
$map2 = [['token', '<>', 'token'], ['type', '=', $type], ['uuid', '=', $uuid]];
|
||||
DataUserToken::mk()->whereOr([$map1, $map2])->delete();
|
||||
// 创建新的认证数据
|
||||
@ -90,7 +89,7 @@ class UserTokenService extends Service
|
||||
$data = array_merge($map, [
|
||||
'uuid' => $uuid,
|
||||
'time' => $time + static::$expire,
|
||||
'tokenv' => static::buildVerify()
|
||||
'tokenv' => static::buildVerify(),
|
||||
]);
|
||||
if (DataUserToken::mk()->insert($data) !== false) {
|
||||
return [1, '刷新认证成功', $data];
|
||||
|
||||
@ -32,9 +32,6 @@ class FansService extends Service
|
||||
* @param array $user 粉丝信息
|
||||
* @param string $appid 微信APPID
|
||||
* @return boolean
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function set(array $user, string $appid = ''): bool
|
||||
{
|
||||
@ -46,8 +43,9 @@ class FansService extends Service
|
||||
}
|
||||
if ($appid !== '') $user['appid'] = $appid;
|
||||
unset($user['privilege'], $user['groupid']);
|
||||
foreach ($user as $k => $v) if ($v === '') unset($user[$k]);
|
||||
$this->app->event->trigger('WechatFansUpdate', $user);
|
||||
return !!data_save(WechatFans::class, $user, 'openid');
|
||||
return !!WechatFans::mUpdate($user, 'openid');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -665,6 +665,8 @@ $(function () {
|
||||
option.id = table.id, option.elem = table, option.url = params.url || table.dataset.url || location.href;
|
||||
option.page = params.page !== false ? (params.page || true) : false, option.limit = params.limit || 20;
|
||||
option.loading = params.loading === true, option.autoSort = params.autoSort === true, option.cols = params.cols || [[]];
|
||||
// 初始化不显示头部
|
||||
option.css = (option.css || '') + '.layui-table-box{opacity:0}.layui-table-page{opacity:0}';
|
||||
// 默认动态设置页数, 动态设置最大高度
|
||||
if (option.page === true) option.page = {curr: layui.sessionData('pages')[option.id] || 1};
|
||||
if (option.height === 'full') if ($table.parents('.iframe-pagination').size()) {
|
||||
@ -675,8 +677,8 @@ $(function () {
|
||||
}
|
||||
// 动态计算最大页数
|
||||
option.done = function () {
|
||||
$table.data('that', this);
|
||||
layui.sessionData('pages', {key: table.id, value: this.page.curr || 1}), (option.loading = true);
|
||||
$table.data('that', this).next().find('.layui-table-box,.layui-table-page').animate({opacity: 1})
|
||||
$.form.reInit($table.next()).find('[data-load],[data-queue],[data-action],[data-iframe]').not('[data-table-id]').attr('data-table-id', table.id);
|
||||
}, option.parseData = function (res) {
|
||||
if (typeof params.filter === 'function') res.data = params.filter(res.data, res);
|
||||
@ -685,9 +687,8 @@ $(function () {
|
||||
if (curp > maxp && maxp > 1) $table.trigger('reload', {page: {curr: maxp}});
|
||||
return res;
|
||||
};
|
||||
// 实例并绑定的对象
|
||||
// 实例并绑定事件
|
||||
$table.data('this', layui.table.render(bindData(option)));
|
||||
// 绑定实例重载事件
|
||||
$table.bind('reload render reloadData', function (evt, opts) {
|
||||
data = $.extend({}, data, (opts = opts || {}).where || {});
|
||||
opts = bindData($.extend({}, opts, {loading: true}));
|
||||
|
||||
@ -60,7 +60,6 @@
|
||||
@LoadBackColor: #EFEFEF;
|
||||
|
||||
// 窗口页面背景颜色
|
||||
@BodyMainTop: 50px;
|
||||
@BodyMainBackColor: #EFEFEF;
|
||||
|
||||
// 左侧菜单大小
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
.layui-nav-child {
|
||||
top: @BodyMainTop;
|
||||
top: @TopHeaderHeight;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
line-height: 48px;
|
||||
@ -211,7 +211,7 @@
|
||||
}
|
||||
|
||||
.layui-side-scroll {
|
||||
top: @BodyMainTop;
|
||||
top: @TopHeaderHeight;
|
||||
bottom: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
@ -294,7 +294,7 @@
|
||||
}
|
||||
|
||||
> .layui-body {
|
||||
top: @BodyMainTop;
|
||||
top: @TopHeaderHeight;
|
||||
left: @LayoutDefaLeftSzie;
|
||||
padding: 0;
|
||||
z-index: 111;
|
||||
@ -319,7 +319,7 @@
|
||||
box-sizing: border-box;
|
||||
|
||||
> .layui-card-html {
|
||||
padding: 15px;
|
||||
padding: 15px 15px 10px 15px;
|
||||
min-width: 100%;
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
@ -327,7 +327,7 @@
|
||||
}
|
||||
|
||||
> .layui-card-table {
|
||||
padding: 15px;
|
||||
padding: 15px 15px 10px 15px;
|
||||
box-sizing: border-box;
|
||||
#bodyLayout();
|
||||
}
|
||||
@ -352,7 +352,7 @@
|
||||
}
|
||||
|
||||
> .layui-card-header {
|
||||
top: @BodyMainTop;
|
||||
top: @TopHeaderHeight;
|
||||
left: @LayoutDefaLeftSzie;
|
||||
border-top: @BoxBottomLine;
|
||||
border-bottom: 1px solid #fff !important;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user