mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-24 20:06:09 +08:00
增加登录选择配置
This commit is contained in:
parent
d0112d501e
commit
3fd3cb1fbe
26
CHANGELOG.md
26
CHANGELOG.md
@ -1,3 +1,29 @@
|
||||
### [v1.4.4](https://gitee.com/koogua/course-tencent-cloud/releases/v1.4.4)(2021-09-17)
|
||||
|
||||
- 后台增加邮件手机登录选择配置
|
||||
- 增加移动端支付选项配置
|
||||
- 首页增加秒杀,直播,提问,文章接口
|
||||
- 增加秒杀列表列表接口
|
||||
- 精简取消点赞以及取消收藏逻辑
|
||||
- 修复浮点转整型精度丢失造成的支付回调失败
|
||||
- 修复竖屏直播时造成的位置错乱
|
||||
- 修复视频清晰度配置序列化问题
|
||||
- 修复评论取消点赞数量不变问题
|
||||
- 修复章节资源数量问题
|
||||
- 修复删除课程后引发的用户课程列表错误问题
|
||||
- 修正课程咨询列表查询条件
|
||||
- 修正回答,兑换礼品说明重复转译的问题
|
||||
- 资源下载查询主键由md5改为加密的ID
|
||||
- 去除上传文件md5唯一索引
|
||||
- 去除课程发布对章节的要求
|
||||
- 去除点播回调中的处理数量限制
|
||||
- 优化文章,课程,提问,群组全文搜索
|
||||
- 优化直播列表数据结构
|
||||
- 优化章节目录交互呈现
|
||||
- 优化后台添加学员重复检查
|
||||
- 优化订单发货逻辑
|
||||
- 优化公众号订阅逻辑
|
||||
|
||||
### [v1.4.3](https://gitee.com/koogua/course-tencent-cloud/releases/v1.4.3)(2021-08-23)
|
||||
|
||||
- 优化邮件验证码
|
||||
|
@ -350,10 +350,12 @@ class SettingController extends Controller
|
||||
$qqAuth = $settingService->getQQAuthSettings();
|
||||
$weixinAuth = $settingService->getWeixinAuthSettings();
|
||||
$weiboAuth = $settingService->getWeiboAuthSettings();
|
||||
$localAuth = $settingService->getLocalAuthSettings();
|
||||
|
||||
$this->view->setVar('qq_auth', $qqAuth);
|
||||
$this->view->setVar('weixin_auth', $weixinAuth);
|
||||
$this->view->setVar('weibo_auth', $weiboAuth);
|
||||
$this->view->setVar('local_auth', $localAuth);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,11 @@ use App\Services\WeChat as WeChatService;
|
||||
class Setting extends Service
|
||||
{
|
||||
|
||||
public function getLocalAuthSettings()
|
||||
{
|
||||
return $this->getSettings('oauth.local');
|
||||
}
|
||||
|
||||
public function getQQAuthSettings()
|
||||
{
|
||||
$oauth = $this->getSettings('oauth.qq');
|
||||
|
@ -4,12 +4,16 @@
|
||||
|
||||
<div class="layui-tab layui-tab-brief">
|
||||
<ul class="layui-tab-title kg-tab-title">
|
||||
<li class="layui-this">QQ登录</li>
|
||||
<li class="layui-this">本地登录</li>
|
||||
<li>QQ登录</li>
|
||||
<li>微信登录</li>
|
||||
<li>新浪微博</li>
|
||||
<li>微博登录</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
{{ partial('setting/oauth_local') }}
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
{{ partial('setting/oauth_qq') }}
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
|
24
app/Http/Admin/Views/setting/oauth_local.volt
Normal file
24
app/Http/Admin/Views/setting/oauth_local.volt
Normal file
@ -0,0 +1,24 @@
|
||||
<form class="layui-form kg-form" method="POST" action="{{ url({'for':'admin.setting.oauth'}) }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开启手机登录</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="login_with_phone" value="1" title="是" {% if local_auth.login_with_phone == "1" %}checked="checked"{% endif %}>
|
||||
<input type="radio" name="login_with_phone" value="0" title="否" {% if local_auth.login_with_phone == "0" %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开启邮箱登录</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="login_with_email" value="1" title="是" {% if local_auth.login_with_email == "1" %}checked="checked"{% endif %}>
|
||||
<input type="radio" name="login_with_email" value="0" title="否" {% if local_auth.login_with_email == "0" %}checked="checked"{% endif %}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="true" lay-filter="go">提交</button>
|
||||
<button type="button" class="kg-back layui-btn layui-btn-primary">返回</button>
|
||||
<input type="hidden" name="section" value="oauth.local">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@ -86,6 +86,24 @@ class PublicController extends Controller
|
||||
return $this->jsonSuccess(['captcha' => $captcha]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Get("/payment/info", name="api.public.payment_info")
|
||||
*/
|
||||
public function paymentInfoAction()
|
||||
{
|
||||
$service = new AppService();
|
||||
|
||||
$alipay = $service->getSettings('pay.alipay');
|
||||
$wxpay = $service->getSettings('pay.wxpay');
|
||||
|
||||
$content = [
|
||||
'alipay' => ['enabled' => $alipay['enabled']],
|
||||
'wxpay' => ['enabled' => $wxpay['enabled']],
|
||||
];
|
||||
|
||||
return $this->jsonSuccess($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Get("/reward/options", name="api.public.reward_options")
|
||||
*/
|
||||
|
@ -2,6 +2,9 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set login_with_phone = oauth_provider.local.login_with_phone == 1 %}
|
||||
{% set login_with_email = oauth_provider.local.login_with_email == 1 %}
|
||||
|
||||
<div class="layui-breadcrumb breadcrumb">
|
||||
<a href="/">首页</a>
|
||||
<a><cite>登录</cite></a>
|
||||
|
@ -1,8 +1,20 @@
|
||||
<form class="layui-form account-form" method="POST" action="{{ url({'for':'home.account.pwd_login'}) }}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-username"></label>
|
||||
<input class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机 / 邮箱" lay-verify="required">
|
||||
</div>
|
||||
{% if login_with_phone and login_with_email %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-username"></label>
|
||||
<input class="layui-input" type="text" name="account" autocomplete="off" placeholder="手机 / 邮箱" lay-verify="required">
|
||||
</div>
|
||||
{% elseif login_with_email %}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-icon layui-icon-email"></label>
|
||||
<input 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 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="密码" lay-verify="required">
|
||||
|
@ -14,11 +14,16 @@ class OAuthProvider extends LogicService
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$local = $this->getSettings('oauth.local');
|
||||
$weixin = $this->getSettings('oauth.weixin');
|
||||
$weibo = $this->getSettings('oauth.weibo');
|
||||
$qq = $this->getSettings('oauth.qq');
|
||||
|
||||
return [
|
||||
'local' => [
|
||||
'login_with_phone' => $local['login_with_phone'],
|
||||
'login_with_email' => $local['login_with_email'],
|
||||
],
|
||||
'weixin' => ['enabled' => $weixin['enabled']],
|
||||
'weibo' => ['enabled' => $weibo['enabled']],
|
||||
'qq' => ['enabled' => $qq['enabled']],
|
||||
|
36
db/migrations/20210916072842.php
Normal file
36
db/migrations/20210916072842.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
||||
* @license https://opensource.org/licenses/GPL-2.0
|
||||
* @link https://www.koogua.com
|
||||
*/
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class V20210916072842 extends AbstractMigration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->handleLocalAuthSetting();
|
||||
}
|
||||
|
||||
protected function handleLocalAuthSetting()
|
||||
{
|
||||
$rows = [
|
||||
[
|
||||
'section' => 'oauth.local',
|
||||
'item_key' => 'login_with_phone',
|
||||
'item_value' => '1',
|
||||
],
|
||||
[
|
||||
'section' => 'oauth.local',
|
||||
'item_key' => 'login_with_email',
|
||||
'item_value' => '1',
|
||||
]
|
||||
];
|
||||
|
||||
$this->table('kg_setting')->insert($rows)->save();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user