Compare commits

..

No commits in common. "e829aba4f6498ebbb61266d1371560281f6650a0" and "06c1b7d2be4741ca7d8476083f983dfd1f3970d6" have entirely different histories.

9 changed files with 23 additions and 18 deletions

View File

@ -68,7 +68,9 @@
$.form.load("{:url('state')}", data, 'post', function (ret) {
if (ret.code < 1) $.msg.error(ret.info, 3, function () {
$('#MenuTable').trigger('reload');
}); else $('#MenuTable').trigger('reload');
}); else if (obj.value.split(',').length > 2) {
$('#MenuTable').trigger('reload');
}
return false;
}, false);
});

View File

@ -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);
});

View File

@ -79,7 +79,8 @@ class UserTokenService extends Service
public static function token(int $uuid, string $type): array
{
// 清理无效认证数据
$map1 = [['token', '<>', 'token'], ['time', '<', $time = time()]];
$time = time();
$map1 = [['token', '<>', 'token'], ['time', '<', $time]];
$map2 = [['token', '<>', 'token'], ['type', '=', $type], ['uuid', '=', $uuid]];
DataUserToken::mk()->whereOr([$map1, $map2])->delete();
// 创建新的认证数据
@ -89,7 +90,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];

View File

@ -32,6 +32,9 @@ 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
{
@ -43,9 +46,8 @@ 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 !!WechatFans::mUpdate($user, 'openid');
return !!data_save(WechatFans::class, $user, 'openid');
}
/**

View File

@ -665,8 +665,6 @@ $(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()) {
@ -677,8 +675,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);
@ -687,8 +685,9 @@ $(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}));

View File

@ -60,6 +60,7 @@
@LoadBackColor: #EFEFEF;
// 窗口页面背景颜色
@BodyMainTop: 50px;
@BodyMainBackColor: #EFEFEF;
// 左侧菜单大小

View File

@ -88,7 +88,7 @@
}
.layui-nav-child {
top: @TopHeaderHeight;
top: @BodyMainTop;
border: 0;
padding: 0;
line-height: 48px;
@ -211,7 +211,7 @@
}
.layui-side-scroll {
top: @TopHeaderHeight;
top: @BodyMainTop;
bottom: 0;
width: 100% !important;
height: 100% !important;
@ -294,7 +294,7 @@
}
> .layui-body {
top: @TopHeaderHeight;
top: @BodyMainTop;
left: @LayoutDefaLeftSzie;
padding: 0;
z-index: 111;
@ -319,7 +319,7 @@
box-sizing: border-box;
> .layui-card-html {
padding: 15px 15px 10px 15px;
padding: 15px;
min-width: 100%;
position: absolute;
box-sizing: border-box;
@ -327,7 +327,7 @@
}
> .layui-card-table {
padding: 15px 15px 10px 15px;
padding: 15px;
box-sizing: border-box;
#bodyLayout();
}
@ -352,7 +352,7 @@
}
> .layui-card-header {
top: @TopHeaderHeight;
top: @BodyMainTop;
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