mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
优化登录/注册/忘记密码页
This commit is contained in:
parent
923095700f
commit
b60f8fe485
@ -1,4 +1,11 @@
|
||||
### [v1.5.7](https://gitee.com/koogua/course-tencent-cloud/releases/v1.5.7)(2022-08-28)
|
||||
### [v1.5.8](https://gitee.com/koogua/course-tencent-cloud/releases/v1.5.8)(2022-08-28)
|
||||
|
||||
- 整理migrations
|
||||
- 更新自动安装脚本
|
||||
- 优化登录/注册/忘记密码页
|
||||
- 修复移动端首页课程缓存刷新
|
||||
|
||||
### [v1.5.7](https://gitee.com/koogua/course-tencent-cloud/releases/v1.5.7)(2022-08-18)
|
||||
|
||||
- 清理群组残留
|
||||
- 升级腾讯云存储SDK到v2.5.6
|
||||
|
@ -148,9 +148,9 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @Get("/password/forget", name="home.account.forget_pwd")
|
||||
* @Get("/forget", name="home.account.forget")
|
||||
*/
|
||||
public function forgetPasswordAction()
|
||||
public function forgetAction()
|
||||
{
|
||||
$service = new FullH5UrlService();
|
||||
|
||||
@ -167,9 +167,8 @@ class AccountController extends Controller
|
||||
|
||||
$captcha = $service->getSettings('captcha');
|
||||
|
||||
$this->seo->prependTitle('忘记密码');
|
||||
$this->seo->prependTitle('重置密码');
|
||||
|
||||
$this->view->pick('account/forget_password');
|
||||
$this->view->setVar('captcha', $captcha);
|
||||
}
|
||||
|
||||
|
42
app/Http/Home/Views/account/forget.volt
Normal file
42
app/Http/Home/Views/account/forget.volt
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends 'templates/main.volt' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set action_url = url({'for':'home.account.reset_pwd'}) %}
|
||||
|
||||
<div class="layui-breadcrumb breadcrumb">
|
||||
<a href="/">首页</a>
|
||||
<a><cite>帐号</cite></a>
|
||||
<a><cite>重置密码</cite></a>
|
||||
</div>
|
||||
|
||||
<div class="login-wrap wrap">
|
||||
<div class="layui-tab layui-tab-brief login-tab">
|
||||
<ul class="layui-tab-title login-tab-title">
|
||||
<li class="layui-this">手机方式</li>
|
||||
<li>邮箱方式</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
{{ partial('account/forget_by_phone') }}
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
{{ partial('account/forget_by_email') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a class="login-link" href="{{ url({'for':'home.account.login'}) }}">登录账户</a>
|
||||
<span class="separator">·</span>
|
||||
<a class="forget-link" href="{{ url({'for':'home.account.register'}) }}">注册账户</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block include_js %}
|
||||
|
||||
{{ js_include('https://ssl.captcha.qq.com/TCaptcha.js',false) }}
|
||||
{{ js_include('home/js/captcha.verify.js') }}
|
||||
|
||||
{% endblock %}
|
28
app/Http/Home/Views/account/forget_by_email.volt
Normal file
28
app/Http/Home/Views/account/forget_by_email.volt
Normal file
@ -0,0 +1,28 @@
|
||||
<form class="layui-form account-form" method="POST" action="{{ action_url }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-email"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="邮箱" lay-verify="email">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="new_password" autocomplete="off" placeholder="新密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" autocomplete="off" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">重置密码</button>
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
28
app/Http/Home/Views/account/forget_by_phone.volt
Normal file
28
app/Http/Home/Views/account/forget_by_phone.volt
Normal file
@ -0,0 +1,28 @@
|
||||
<form class="layui-form account-form" method="POST" action="{{ action_url }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-cellphone"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机" lay-verify="phone">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="new_password" autocomplete="off" placeholder="新密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" autocomplete="off" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">重置密码</button>
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -1,48 +0,0 @@
|
||||
{% extends 'templates/main.volt' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="layui-breadcrumb breadcrumb">
|
||||
<a href="/">首页</a>
|
||||
<a><cite>忘记密码</cite></a>
|
||||
</div>
|
||||
|
||||
<div class="account-wrap wrap">
|
||||
<form class="layui-form account-form" method="POST" action="{{ url({'for':'home.account.reset_pwd'}) }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-username"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机 / 邮箱" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="new_password" autocomplete="off" placeholder="新密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" autocomplete="off" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">重置密码</button>
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block include_js %}
|
||||
|
||||
{{ js_include('https://ssl.captcha.qq.com/TCaptcha.js',false) }}
|
||||
{{ js_include('home/js/captcha.verify.js') }}
|
||||
|
||||
{% endblock %}
|
@ -4,6 +4,7 @@
|
||||
|
||||
<div class="layui-breadcrumb breadcrumb">
|
||||
<a href="/">首页</a>
|
||||
<a><cite>帐号</cite></a>
|
||||
<a><cite>登录</cite></a>
|
||||
</div>
|
||||
|
||||
@ -25,7 +26,7 @@
|
||||
<div class="link">
|
||||
<a class="login-link" href="{{ url({'for':'home.account.register'}) }}">免费注册</a>
|
||||
<span class="separator">·</span>
|
||||
<a class="forget-link" href="{{ url({'for':'home.account.forget_pwd'}) }}">忘记密码</a>
|
||||
<a class="forget-link" href="{{ url({'for':'home.account.forget'}) }}">忘记密码</a>
|
||||
</div>
|
||||
<div class="oauth">
|
||||
{% if oauth_provider.qq.enabled == 1 %}
|
||||
|
@ -4,54 +4,34 @@
|
||||
|
||||
{% set register_with_phone = local_oauth.register_with_phone == 1 %}
|
||||
{% set register_with_email = local_oauth.register_with_email == 1 %}
|
||||
{% set action_url = url({'for':'home.account.do_register'}) %}
|
||||
|
||||
<div class="layui-breadcrumb breadcrumb">
|
||||
<a href="/">首页</a>
|
||||
<a><cite>帐号</cite></a>
|
||||
<a><cite>注册</cite></a>
|
||||
</div>
|
||||
|
||||
<div class="account-wrap wrap">
|
||||
<form class="layui-form account-form" method="POST" action="{{ url({'for':'home.account.do_register'}) }}">
|
||||
{% if register_with_phone and register_with_email %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-username"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机 / 邮箱" lay-verify="required">
|
||||
<div class="login-wrap wrap">
|
||||
<div class="layui-tab layui-tab-brief login-tab">
|
||||
<ul class="layui-tab-title login-tab-title">
|
||||
<li class="layui-this">手机注册</li>
|
||||
<li>邮箱注册</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
{{ partial('account/register_by_phone') }}
|
||||
</div>
|
||||
{% elseif register_with_email %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-email"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="邮箱" lay-verify="email">
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-cellphone"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机" lay-verify="phone">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="password" autocomplete="off" placeholder="密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
<div class="layui-tab-item">
|
||||
{{ partial('account/register_by_email') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">注册帐号</button>
|
||||
<input type="hidden" name="return_url" value="{{ return_url }}">
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="link">
|
||||
<a class="login-link" href="{{ url({'for':'home.account.login'}) }}">登录账户</a>
|
||||
<span class="separator">·</span>
|
||||
<a class="forget-link" href="{{ url({'for':'home.account.forget'}) }}">忘记密码</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
35
app/Http/Home/Views/account/register_by_email.volt
Normal file
35
app/Http/Home/Views/account/register_by_email.volt
Normal file
@ -0,0 +1,35 @@
|
||||
{% if register_with_email %}
|
||||
<form class="layui-form account-form" method="POST" action="{{ action_url }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-email"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="邮箱" lay-verify="email">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="password" autocomplete="off" placeholder="密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">注册帐号</button>
|
||||
<input type="hidden" name="return_url" value="{{ return_url }}">
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="register-close-tips">
|
||||
<i class="layui-icon layui-icon-tips"></i> 邮箱注册已关闭
|
||||
</div>
|
||||
{% endif %}
|
35
app/Http/Home/Views/account/register_by_phone.volt
Normal file
35
app/Http/Home/Views/account/register_by_phone.volt
Normal file
@ -0,0 +1,35 @@
|
||||
{% if register_with_phone == 1 %}
|
||||
<form class="layui-form account-form" method="POST" action="{{ action_url }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-cellphone"></label>
|
||||
<input id="cv-account" class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机" lay-verify="phone">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-password"></label>
|
||||
<input class="layui-input" type="password" name="password" autocomplete="off" placeholder="密码(字母数字特殊字符6-16位)" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-inline verify-input-inline">
|
||||
<label class="layui-icon layui-icon-vercode"></label>
|
||||
<input class="layui-input" type="text" name="verify_code" placeholder="验证码" lay-verify="required">
|
||||
</div>
|
||||
<div class="layui-input-inline verify-btn-inline">
|
||||
<button id="cv-emit-btn" class="layui-btn layui-btn-disabled" type="button" disabled="disabled">获取验证码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button id="cv-submit-btn" class="layui-btn layui-btn-fluid layui-btn-disabled" disabled="disabled" lay-submit="true" lay-filter="go">注册帐号</button>
|
||||
<input type="hidden" name="return_url" value="{{ return_url }}">
|
||||
<input id="cv-captcha-enabled" type="hidden" value="{{ captcha.enabled }}">
|
||||
<input id="cv-captcha-appId" type="hidden" value="{{ captcha.app_id }}">
|
||||
<input id="cv-captcha-ticket" type="hidden" name="captcha[ticket]">
|
||||
<input id="cv-captcha-rand" type="hidden" name="captcha[rand]">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="register-close-tips">
|
||||
<i class="layui-icon layui-icon-tips"></i> 手机注册已关闭
|
||||
</div>
|
||||
{% endif %}
|
@ -22,48 +22,36 @@ class IndexCourseCache extends AppService
|
||||
|
||||
public function rebuild($section = null)
|
||||
{
|
||||
$site = $this->getSettings('site');
|
||||
|
||||
$type = $site['index_tpl_type'] ?: 'full';
|
||||
|
||||
if (!$section || $section == 'featured_course') {
|
||||
if ($type == 'full') {
|
||||
$cache = new IndexFeaturedCourseListCache();
|
||||
$cache->rebuild();
|
||||
} else {
|
||||
$cache = new IndexSimpleFeaturedCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
$cache = new IndexFeaturedCourseListCache();
|
||||
$cache->rebuild();
|
||||
|
||||
$cache = new IndexSimpleFeaturedCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
|
||||
if (!$section || $section == 'new_course') {
|
||||
if ($type == 'full') {
|
||||
$cache = new IndexNewCourseListCache();
|
||||
$cache->rebuild();
|
||||
} else {
|
||||
$cache = new IndexSimpleNewCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
$cache = new IndexNewCourseListCache();
|
||||
$cache->rebuild();
|
||||
|
||||
$cache = new IndexSimpleNewCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
|
||||
if (!$section || $section == 'free_course') {
|
||||
if ($type == 'full') {
|
||||
$cache = new IndexFreeCourseListCache();
|
||||
$cache->rebuild();
|
||||
} else {
|
||||
$cache = new IndexSimpleFreeCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
$cache = new IndexFreeCourseListCache();
|
||||
$cache->rebuild();
|
||||
|
||||
$cache = new IndexSimpleFreeCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
|
||||
if (!$section || $section == 'vip_course') {
|
||||
if ($type == 'full') {
|
||||
$cache = new IndexVipCourseListCache();
|
||||
$cache->rebuild();
|
||||
} else {
|
||||
$cache = new IndexSimpleVipCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
$cache = new IndexVipCourseListCache();
|
||||
$cache->rebuild();
|
||||
|
||||
$cache = new IndexSimpleVipCourseListCache();
|
||||
$cache->rebuild();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user