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) {
|
if ($parent) {
|
||||||
$nav->path = $parent->path . $nav->id . ',';
|
$nav->path = $parent->path . $nav->id . ',';
|
||||||
$nav->level = $parent->level + 1;
|
$nav->level = $parent->level + 1;
|
||||||
|
$nav->position = $parent->position;
|
||||||
} else {
|
} else {
|
||||||
$nav->path = ',' . $nav->id . ',';
|
$nav->path = ',' . $nav->id . ',';
|
||||||
$nav->level = 1;
|
$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);
|
$nav->update($data);
|
||||||
|
|
||||||
$this->updateNavStats($nav);
|
$this->updateNavStats($nav);
|
||||||
|
@ -204,16 +204,22 @@ class User extends Service
|
|||||||
$data['vip'] = $validator->checkVipStatus($post['vip']);
|
$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'])) {
|
if (isset($post['locked'])) {
|
||||||
$data['locked'] = $validator->checkLockStatus($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'])) {
|
if (!empty($post['lock_expiry_time'])) {
|
||||||
$data['lock_expiry_time'] = $validator->checkLockExpiryTime($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;
|
$oldAdminRole = $user->admin_role;
|
||||||
|
@ -37,13 +37,15 @@
|
|||||||
<input class="layui-input" type="text" name="priority" value="10" lay-verify="number">
|
<input class="layui-input" type="text" name="priority" value="10" lay-verify="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
{% if parent_id == 0 %}
|
||||||
<label class="layui-form-label">位置</label>
|
<div class="layui-form-item">
|
||||||
<div class="layui-input-block">
|
<label class="layui-form-label">位置</label>
|
||||||
<input type="radio" name="position" value="1" title="顶部" checked="checked">
|
<div class="layui-input-block">
|
||||||
<input type="radio" name="position" value="2" title="底部">
|
<input type="radio" name="position" value="1" title="顶部" checked="checked">
|
||||||
|
<input type="radio" name="position" value="2" title="底部">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">目标</label>
|
<label class="layui-form-label">目标</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@ -61,4 +63,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -24,13 +24,15 @@
|
|||||||
<input class="layui-input" type="text" name="priority" value="{{ nav.priority }}" lay-verify="number">
|
<input class="layui-input" type="text" name="priority" value="{{ nav.priority }}" lay-verify="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
{% if nav.parent_id == 0 %}
|
||||||
<label class="layui-form-label">位置</label>
|
<div class="layui-form-item">
|
||||||
<div class="layui-input-block">
|
<label class="layui-form-label">位置</label>
|
||||||
<input type="radio" name="position" value="1" title="顶部" {% if nav.position == 1 %}checked="checked"{% endif %}>
|
<div class="layui-input-block">
|
||||||
<input type="radio" name="position" value="2" title="底部" {% if nav.position == 2 %}checked="checked"{% endif %}>
|
<input type="radio" name="position" value="1" title="顶部" {% if nav.position == 1 %}checked="checked"{% endif %}>
|
||||||
|
<input type="radio" name="position" value="2" title="底部" {% if nav.position == 2 %}checked="checked"{% endif %}>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">目标</label>
|
<label class="layui-form-label">目标</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@ -54,4 +56,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -72,8 +72,8 @@
|
|||||||
{% set restore_url = url({'for':'admin.nav.restore','id':item.id}) %}
|
{% set restore_url = url({'for':'admin.nav.restore','id':item.id}) %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ item.id }}</td>
|
<td>{{ item.id }}</td>
|
||||||
{% if item.position == 1 and item.level < 2 %}
|
{% if item.position == 1 and item.level == 1 %}
|
||||||
<td><a href="{{ child_url }}">{{ item.name }}</a></td>
|
<td><a href="{{ child_url }}"><i class="layui-icon layui-icon-add-circle"></i> {{ item.name }}</a></td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td><a href="{{ edit_url }}">{{ item.name }}</a></td>
|
<td><a href="{{ edit_url }}">{{ item.name }}</a></td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -102,4 +102,4 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -45,7 +45,7 @@ class Nav extends Repository
|
|||||||
$query->andWhere('deleted = :deleted:', ['deleted' => $where['deleted']]);
|
$query->andWhere('deleted = :deleted:', ['deleted' => $where['deleted']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query->orderBy('position DESC,priority ASC');
|
$query->orderBy('position ASC,priority ASC');
|
||||||
|
|
||||||
return $query->execute();
|
return $query->execute();
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ $error['user.invalid_edu_role'] = '无效的教学角色';
|
|||||||
$error['user.invalid_admin_role'] = '无效的后台角色';
|
$error['user.invalid_admin_role'] = '无效的后台角色';
|
||||||
$error['user.invalid_vip_status'] = '无效的会员状态';
|
$error['user.invalid_vip_status'] = '无效的会员状态';
|
||||||
$error['user.invalid_vip_expiry_time'] = '无效的会员期限';
|
$error['user.invalid_vip_expiry_time'] = '无效的会员期限';
|
||||||
$error['user.invalid_block_status'] = '无效的锁定状态';
|
$error['user.invalid_lock_status'] = '无效的锁定状态';
|
||||||
$error['user.invalid_lock_expiry_time'] = '无效的锁定期限';
|
$error['user.invalid_lock_expiry_time'] = '无效的锁定期限';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -234,6 +234,11 @@
|
|||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.logo img {
|
||||||
|
max-width: 185px;
|
||||||
|
max-height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
.top-nav {
|
.top-nav {
|
||||||
margin-left: 185px;
|
margin-left: 185px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user