mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-01 22:54:56 +08:00
1.优化Nav导航
2.优化logo样式
This commit is contained in:
parent
73d01d62dc
commit
557ce55885
@ -85,6 +85,7 @@ class Nav extends Service
|
||||
if ($parent) {
|
||||
$nav->path = $parent->path . $nav->id . ',';
|
||||
$nav->level = $parent->level + 1;
|
||||
$nav->position = $parent->position;
|
||||
} else {
|
||||
$nav->path = ',' . $nav->id . ',';
|
||||
$nav->level = 1;
|
||||
@ -140,6 +141,11 @@ class Nav extends Service
|
||||
}
|
||||
}
|
||||
|
||||
if ($nav->parent_id > 0) {
|
||||
$parent = $this->findOrFail($nav->parent_id);
|
||||
$data['position'] = $parent->position;
|
||||
}
|
||||
|
||||
$nav->update($data);
|
||||
|
||||
$this->updateNavStats($nav);
|
||||
|
@ -204,16 +204,22 @@ class User extends Service
|
||||
$data['vip'] = $validator->checkVipStatus($post['vip']);
|
||||
}
|
||||
|
||||
if (!empty($post['vip_expiry_time'])) {
|
||||
$data['vip_expiry_time'] = $validator->checkVipExpiryTime($post['vip_expiry_time']);
|
||||
}
|
||||
|
||||
if (isset($post['locked'])) {
|
||||
$data['locked'] = $validator->checkLockStatus($post['locked']);
|
||||
}
|
||||
|
||||
if (!empty($post['vip_expiry_time'])) {
|
||||
$data['vip_expiry_time'] = $validator->checkVipExpiryTime($post['vip_expiry_time']);
|
||||
if ($data['vip_expiry_time'] < time()) {
|
||||
$data['vip'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($post['lock_expiry_time'])) {
|
||||
$data['lock_expiry_time'] = $validator->checkLockExpiryTime($post['lock_expiry_time']);
|
||||
if ($data['lock_expiry_time'] < time()) {
|
||||
$data['locked'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$oldAdminRole = $user->admin_role;
|
||||
|
@ -37,6 +37,7 @@
|
||||
<input class="layui-input" type="text" name="priority" value="10" lay-verify="number">
|
||||
</div>
|
||||
</div>
|
||||
{% if parent_id == 0 %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">位置</label>
|
||||
<div class="layui-input-block">
|
||||
@ -44,6 +45,7 @@
|
||||
<input type="radio" name="position" value="2" title="底部">
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">目标</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -24,6 +24,7 @@
|
||||
<input class="layui-input" type="text" name="priority" value="{{ nav.priority }}" lay-verify="number">
|
||||
</div>
|
||||
</div>
|
||||
{% if nav.parent_id == 0 %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">位置</label>
|
||||
<div class="layui-input-block">
|
||||
@ -31,6 +32,7 @@
|
||||
<input type="radio" name="position" value="2" title="底部" {% if nav.position == 2 %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">目标</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -72,8 +72,8 @@
|
||||
{% set restore_url = url({'for':'admin.nav.restore','id':item.id}) %}
|
||||
<tr>
|
||||
<td>{{ item.id }}</td>
|
||||
{% if item.position == 1 and item.level < 2 %}
|
||||
<td><a href="{{ child_url }}">{{ item.name }}</a></td>
|
||||
{% if item.position == 1 and item.level == 1 %}
|
||||
<td><a href="{{ child_url }}"><i class="layui-icon layui-icon-add-circle"></i> {{ item.name }}</a></td>
|
||||
{% else %}
|
||||
<td><a href="{{ edit_url }}">{{ item.name }}</a></td>
|
||||
{% endif %}
|
||||
|
@ -45,7 +45,7 @@ class Nav extends Repository
|
||||
$query->andWhere('deleted = :deleted:', ['deleted' => $where['deleted']]);
|
||||
}
|
||||
|
||||
$query->orderBy('position DESC,priority ASC');
|
||||
$query->orderBy('position ASC,priority ASC');
|
||||
|
||||
return $query->execute();
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ $error['user.invalid_edu_role'] = '无效的教学角色';
|
||||
$error['user.invalid_admin_role'] = '无效的后台角色';
|
||||
$error['user.invalid_vip_status'] = '无效的会员状态';
|
||||
$error['user.invalid_vip_expiry_time'] = '无效的会员期限';
|
||||
$error['user.invalid_block_status'] = '无效的锁定状态';
|
||||
$error['user.invalid_lock_status'] = '无效的锁定状态';
|
||||
$error['user.invalid_lock_expiry_time'] = '无效的锁定期限';
|
||||
|
||||
/**
|
||||
|
@ -234,6 +234,11 @@
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
max-width: 185px;
|
||||
max-height: 60px;
|
||||
}
|
||||
|
||||
.top-nav {
|
||||
margin-left: 185px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user