From 9fde31ba608b3e57759208eff3b2a6fb7f6b1d64 Mon Sep 17 00:00:00 2001 From: CGDF <17256673+CGDF-Github@users.noreply.github.com> Date: Sun, 13 Jan 2019 01:43:45 +0800 Subject: [PATCH 01/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91fe0474..2217ac83 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ Wiki已经启用,欢迎为此面板维护wiki - [冲上云霄云主机](http://console.soar-clouds.com/aff.php?aff=94) - [Vultr](https://www.vultr.com/?ref=7205737) -[Nymph 的前端课程报名](t.me/kinokonominoco) +[laurieryayoi 的前端课程报名](https://t.me/kinokonominoco) From 2d87ccba41c7979bda3f4158c20b4a023a10c71b Mon Sep 17 00:00:00 2001 From: NimaQu Date: Sun, 13 Jan 2019 01:47:54 +0800 Subject: [PATCH 02/17] test --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 2217ac83..bb8f28b8 100644 --- a/README.md +++ b/README.md @@ -90,10 +90,6 @@ Wiki已经启用,欢迎为此面板维护wiki 您对我们的帮助将是支持我们做下去的动力,只需您在购买部分产品或向他人推荐产品时从我们的返利链接购买,这就是对我们很大的支持了。~~没有钱了,肯定要做啊,不做没有钱用啊,打工是不可能打工的,这辈子不可能打工的~~ -**NimaQu** - -- [TrimePay 签约](https://portal.trimepay.com/#/auth/register/134) -- [Scorpioud - 圣何塞大带宽/波特兰高防 VPS](https://www.scorpioud.com) ##### dumplin From e0587f99c3af2adcc75dfe1f6083793877d0e0fc Mon Sep 17 00:00:00 2001 From: CGDF <17256673+CGDF-Github@users.noreply.github.com> Date: Sun, 13 Jan 2019 09:44:13 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=BE=AE=E6=95=99?= =?UTF-8?q?=E7=A8=8B=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/material/user/index.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/material/user/index.tpl b/resources/views/material/user/index.tpl index 67d12b56..1f2785e1 100644 --- a/resources/views/material/user/index.tpl +++ b/resources/views/material/user/index.tpl @@ -223,7 +223,7 @@ {$user = URL::getSSRConnectInfo($pre_user)} {$ssr_url_all = URL::getAllUrl($pre_user, 0, 0)} {$ssr_url_all_mu = URL::getAllUrl($pre_user, 1, 0)} -

filter_1save_alt 点击下载客户端解压至任意磁盘并运行

+

filter_1save_alt 点击下载SSRR解压至任意磁盘并运行

filter_2 任务栏右下角右键纸飞机图标->服务器订阅->SSR服务器订阅设置,将订阅链接设置为下面的地址,确定之后再更新SSR服务器订阅(绕过代理)

filter_3 然后选择一个合适的服务器,代理规则选“绕过局域网和大陆”,然后即可上网

filter_4 备用导入节点方法:点击复制how_to_vote普通端口链接或者how_to_vote单端口多用户链接,然后右键小飞机->从剪贴板复制地址

@@ -238,7 +238,7 @@

点击这里查看Windows教程

-

filter_1save_alt 点击下载ShadowsocksX,安装并启动

+

filter_1save_alt 点击下载ShadowsocksX-NG-R8,安装并启动

filter_2 右击托盘纸飞机图标->服务器->服务器订阅,填入以下订阅地址

filter_3更新订阅成功后服务器列表即可出现节点,选择一个节点

filter_4 再次右击托盘纸飞机图标,如果shadowsocks还未打开,则需要点击打开

@@ -323,7 +323,7 @@ {/if}
-

filter_1save_alt 点击下载客户端,并安装

+

filter_1save_alt 点击下载SSTap,并安装

filter_2 期间会安装虚拟网卡,请点击允许或确认

filter_3 打开桌面程序SSTap

filter_4 齿轮图标-SSR订阅-SSR订阅管理添加以下订阅链接即可

@@ -452,7 +452,7 @@

filter_1save_alt 点击下载 SSD,save_alt 点击下载 SS 混淆插件

filter_2 安装后,在手机上点击复制下方的订阅链接

-

filter_3 打开 ShadowsocksD 客户端,点击右上角的“加号”,选择“添加订阅”,将剪贴板中的内容粘贴进去,点击“OK”,稍等片刻即可看见订阅的节点

+

filter_3 打开 ShadowsocksD ,点击右上角的“加号”,选择“添加订阅”,将剪贴板中的内容粘贴进去,点击“OK”,稍等片刻即可看见订阅的节点

flash_auto 节点订阅地址:

From 57aba1dbac46c564928339350a5d23efa77c888d Mon Sep 17 00:00:00 2001 From: laurieryayoi <14360417+laurieryayoi@users.noreply.github.com> Date: Sun, 13 Jan 2019 21:39:14 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0TG=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controllers/AuthController.php | 4 +- app/Controllers/VueController.php | 3 +- config/routes.php | 2 +- public/theme/material/css/index.css | 12 +++ resources/views/material/auth/login.tpl | 2 +- resources/views/material/index.tpl | 138 ++++++++++++++++++++---- 6 files changed, 133 insertions(+), 28 deletions(-) diff --git a/app/Controllers/AuthController.php b/app/Controllers/AuthController.php index 79bbe755..34bc7d24 100644 --- a/app/Controllers/AuthController.php +++ b/app/Controllers/AuthController.php @@ -526,8 +526,8 @@ class AuthController extends BaseController public function qrcode_check($request, $response, $args) { - $token = $request->getQueryParams()["token"]; - $number = $request->getQueryParams()["number"]; + $token = $request->getParam('token'); + $number = $request->getParam('number'); if (Config::get('enable_telegram') == 'true') { $ret = TelegramSessionManager::check_login_session($token, $number); diff --git a/app/Controllers/VueController.php b/app/Controllers/VueController.php index 7b884b3f..2982d29f 100644 --- a/app/Controllers/VueController.php +++ b/app/Controllers/VueController.php @@ -64,7 +64,7 @@ class VueController extends BaseController { "telegram_bot" => Config::get('telegram_bot'), "enable_logincaptcha" => Config::get('enable_login_captcha'), "enable_regcaptcha" => Config::get('enable_reg_captcha'), - "base_url" => Config::get('enable_reg_captcha'), + "base_url" => Config::get('baseUrl'), "recaptcha_sitekey" => $recaptcha_sitekey, "captcha_provider" => Config::get('captcha_provider'), "jump_delay" => Config::get('jump_delay'), @@ -73,6 +73,7 @@ class VueController extends BaseController { "appName" => Config::get('appName'), "dateY" => date("Y"), "isLogin" => $user->isLogin, + "enable_telegram" => Config::get('enable_telegram'), ); $res['ret'] = 1; diff --git a/config/routes.php b/config/routes.php index 47abef72..6b59209b 100755 --- a/config/routes.php +++ b/config/routes.php @@ -178,7 +178,7 @@ $app->group('/payment', function () { // Auth $app->group('/auth', function () { $this->get('/login', 'App\Controllers\AuthController:login'); - $this->get('/qrcode_check', 'App\Controllers\AuthController:qrcode_check'); + $this->post('/qrcode_check', 'App\Controllers\AuthController:qrcode_check'); $this->post('/login', 'App\Controllers\AuthController:loginHandle'); $this->post('/qrcode_login', 'App\Controllers\AuthController:qrcode_loginHandle'); $this->get('/register', 'App\Controllers\AuthController:register'); diff --git a/public/theme/material/css/index.css b/public/theme/material/css/index.css index ee8c5224..d4cb6529 100755 --- a/public/theme/material/css/index.css +++ b/public/theme/material/css/index.css @@ -210,6 +210,10 @@ input.checkbox { .auth h1 { font-size: 3.5rem; + margin-top: 0; +} +.auth h3 { + margin: 0; } .page-auth, @@ -330,6 +334,14 @@ select { font-weight: bolder; } +.basis-max .input-control { + width: 100%; +} + +.basis-max .auth-submit { + width: 80%; +} + @media screen and (min-width:35.5em) { .auth-sm a { min-width: 120px; diff --git a/resources/views/material/auth/login.tpl b/resources/views/material/auth/login.tpl index c2406c5b..057f5283 100755 --- a/resources/views/material/auth/login.tpl +++ b/resources/views/material/auth/login.tpl @@ -243,7 +243,7 @@ ); function f() { $.ajax({ - type: "GET", + type: "POST", url: "qrcode_check", dataType: "json", data: { diff --git a/resources/views/material/index.tpl b/resources/views/material/index.tpl index 74538e79..1a1b7ba6 100755 --- a/resources/views/material/index.tpl +++ b/resources/views/material/index.tpl @@ -108,7 +108,9 @@ {if isset($geetest_html)} {/if} - + {if $config['enable_telegram'] == 'true'} + + {/if} @@ -135,7 +137,12 @@ const tmp = new Vuex.Store({ jumpDelay: '', isGetestSuccess: '', registMode: '', + base_url: '', isEmailVeryify: '', + login_token: '', + login_number: '', + telegram_bot: '', + enable_telegram: '', enableLoginCaptcha: '', enableRegCaptcha: '', indexMsg: { @@ -162,6 +169,7 @@ const tmp = new Vuex.Store({ }, SET_GLOBALCONFIG (state,config) { state.logintoken = config.isLogin + state.globalConfig.base_url = config.base_url; state.globalConfig.captchaProvider = config.captcha_provider; state.globalConfig.recaptchaSiteKey = config.recaptcha_sitekey; state.globalConfig.jumpDelay = config.jump_delay; @@ -173,6 +181,7 @@ const tmp = new Vuex.Store({ state.globalConfig.login_token = config.login_token; state.globalConfig.login_number = config.login_number; state.globalConfig.telegram_bot = config.telegram_bot; + state.globalConfig.enable_telegram = config.enable_telegram; state.globalConfig.indexMsg.appname = config.appName; state.globalConfig.indexMsg.date = config.dateY; }, @@ -181,6 +190,9 @@ const tmp = new Vuex.Store({ }, SET_JINRISHICI (state,content) { state.globalConfig.indexMsg.jinrishici = content; + }, + SET_TGAUTHNUMBER (state,content) { + Vue.set(state.globalConfig,'login_number',content); } }, actions: { @@ -342,32 +354,59 @@ const Auth = { const Login = { delimiters: ['$[',']$'], mixins: [storeAuth], + computed: Vuex.mapState({ + msgrCon: 'msgrCon', + globalConfig: 'globalConfig', + logintoken: 'logintoken', + isLoading: 'isLoading', + telegramHref: function() { + return 'https://t.me/' + this.globalConfig.telegram_bot; + }, + isTgEnabled: function() { + return this.globalConfig.enable_telegram === 'true'; + } + }), template: /*html*/ ` -
+
LOGIN

登录

-
- - -
-
- - -
-
- - 记住我 - -
-
-
-
-
-
+
+
+ + +
+
+ + +
+
+ + 记住我 + +
+
+
+
+
+
+
+
- +
+

Telegram登录

+
+

Telegram OAuth一键登陆

+
+

正在载入 Telegram,如果长时间未显示请刷新页面或检查代理

+
+

或者添加机器人账号 @$[globalConfig.telegram_bot]$,发送下面的数字验证码给它 +

+
+

$[globalConfig.login_number]$

+
+
`, data: function () { @@ -435,6 +474,52 @@ const Login = { }); }, + telegramRender() { + let el = document.createElement('script'); + document.getElementById('telegram-login-box').append(el); + el.onload = function () { + document.getElementById('telegram-alert').outerHTML = ''; + } + el.src = 'https://telegram.org/js/telegram-widget.js?4'; + el.setAttribute('data-size', 'large'); + el.setAttribute('data-telegram-login', this.globalConfig.telegram_bot); + el.setAttribute('data-auth-url', this.globalConfig.base_url + '/auth/telegram_oauth'); + el.setAttribute('data-request-access', 'write'); + }, + tgAuthTrigger(tid) { + let callConfig = { + msg: '', + icon: '', + }; + axios.post('/auth/qrcode_check',{ + token: this.globalConfig.login_token, + number: this.globalConfig.login_number, + }).then(r=>{ + if(r.data.ret > 0) { + clearTimeout(tid); + + axios.post('/auth/qrcode_login',{ + token: this.globalConfig.login_token, + number: this.globalConfig.login_number, + }).then(r=>{ + if (r.data.ret) { + callConfig.msg += '登录成功Kira~'; + callConfig.icon += 'fa-check-square-o'; + tmp.dispatch('CALL_MSGR',callConfig); + window.setTimeout(()=>{ + tmp.commit('SET_LOGINTOKEN',1); + this.$router.replace('/user/panel'); + }, this.globalConfig.jumpDelay); + } + }) + } else if (r.data.ret == -1) { + tmp.commit('SET_TGAUTHNUMBER','此数字已经过期,请刷新页面后重试'); + } + }) + tid = setTimeout(()=>{ + this.tgAuthTrigger(tid); + }, 2500); + } }, mounted() { document.addEventListener('keyup',(e)=>{ @@ -443,6 +528,13 @@ const Login = { } }); + if (this.globalConfig.enable_telegram === 'true') { + this.telegramRender(); + let tid = setTimeout(()=>{ + this.tgAuthTrigger(tid); + }, 2500); + } + if (this.globalConfig.enableLoginCaptcha === 'false') { return; } From 5bb9f75a56662a4e03ee10ec09b71ea57dd03cbc Mon Sep 17 00:00:00 2001 From: laurieryayoi <14360417+laurieryayoi@users.noreply.github.com> Date: Mon, 14 Jan 2019 02:14:59 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0TG=E4=BA=8C=E7=BB=B4?= =?UTF-8?q?=E7=A0=81=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/theme/material/css/index.css | 17 +++++++++++++++++ resources/views/material/index.tpl | 29 +++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/public/theme/material/css/index.css b/public/theme/material/css/index.css index d4cb6529..bcbceeb7 100755 --- a/public/theme/material/css/index.css +++ b/public/theme/material/css/index.css @@ -342,6 +342,23 @@ select { width: 80%; } +#code_number, +.tg-timeout { + padding: .6rem 1rem; + width: 100%; + font-size: 1.3em; +} + +.tg-timeout { + width: 80%; +} + +.qr-center img { + width: 70%; + height: 70%; + text-align: center; +} + @media screen and (min-width:35.5em) { .auth-sm a { min-width: 120px; diff --git a/resources/views/material/index.tpl b/resources/views/material/index.tpl index 1a1b7ba6..efbe811a 100755 --- a/resources/views/material/index.tpl +++ b/resources/views/material/index.tpl @@ -191,9 +191,6 @@ const tmp = new Vuex.Store({ SET_JINRISHICI (state,content) { state.globalConfig.indexMsg.jinrishici = content; }, - SET_TGAUTHNUMBER (state,content) { - Vue.set(state.globalConfig,'login_number',content); - } }, actions: { CALL_MSGR ({ commit,state },config) { @@ -394,18 +391,28 @@ const Login = { 确认登录
-
+

Telegram登录

Telegram OAuth一键登陆

正在载入 Telegram,如果长时间未显示请刷新页面或检查代理

-

或者添加机器人账号 @$[globalConfig.telegram_bot]$,发送下面的数字验证码给它 +

或者添加机器人账号 @$[globalConfig.telegram_bot]$,发送下面的数字/二维码验证码给它

-
-

$[globalConfig.login_number]$

+ +
+
+
+
+
+
$[globalConfig.login_number]$
+
+
+
+
验证方式已过期,请刷新页面后重试
+
`, @@ -415,6 +422,7 @@ const Login = { passwd: '', remember_me: false, isDisabled: false, + isTgtimeout: false, } }, methods: { @@ -485,6 +493,11 @@ const Login = { el.setAttribute('data-telegram-login', this.globalConfig.telegram_bot); el.setAttribute('data-auth-url', this.globalConfig.base_url + '/auth/telegram_oauth'); el.setAttribute('data-request-access', 'write'); + + let telegram_qrcode = 'mod://login/' + this.globalConfig.login_token; + let qrcode = new QRCode(document.getElementById("telegram-qr")); + qrcode.clear(); + qrcode.makeCode(telegram_qrcode); }, tgAuthTrigger(tid) { let callConfig = { @@ -513,7 +526,7 @@ const Login = { } }) } else if (r.data.ret == -1) { - tmp.commit('SET_TGAUTHNUMBER','此数字已经过期,请刷新页面后重试'); + this.isTgtimeout = true; } }) tid = setTimeout(()=>{ From 359a295ed580b8069ba427a314ea657b54317d55 Mon Sep 17 00:00:00 2001 From: laurieryayoi <14360417+laurieryayoi@users.noreply.github.com> Date: Tue, 15 Jan 2019 03:31:49 +0800 Subject: [PATCH 06/17] =?UTF-8?q?user=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=81=94=E7=BB=9C=E6=96=B9=E5=BC=8F=E5=B1=95=E7=A4=BA=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/material/user/edit.tpl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/views/material/user/edit.tpl b/resources/views/material/user/edit.tpl index c259f906..6441ef18 100755 --- a/resources/views/material/user/edit.tpl +++ b/resources/views/material/user/edit.tpl @@ -99,7 +99,7 @@
联络方式修改
-

当前联络方式: +

当前联络方式: {if $user->im_type==1} 微信 @@ -116,9 +116,11 @@ {if $user->im_type==4} Telegram {/if} - {$user->im_value}

+

当前联络方式账号: + {$user->im_value} +

-
+

Telegram登录

Telegram OAuth一键登陆

@@ -558,9 +561,9 @@ const Login = { const Register = { delimiters: ['$[',']$'], - mixins: [storeAuth], + mixins: [storeMap,storeAuth], template: /*html*/ ` -
+
REGISTER

账号注册

@@ -813,15 +816,64 @@ const Password = {
`, + props: ['routermsg'], } const Reset = { delimiters: ['$[',']$'], + mixins: [storeMap], template: /*html*/ ` -
-

密码重置页demo

+
+
PASSWORD
+
+

密码重置

+
+ + +
+ +
`, + data: function() { + return { + email: '', + isDisabled: false, + } + }, + methods: { + reset() { + let callConfig = { + msg: '', + icon: '', + }; + + axios.post('/password/reset',{ + email: this.email, + }).then(r=>{ + if (r.data.ret == 1) { + callConfig.msg += '邮件发送成功kira~'; + callConfig.icon += 'fa-check-square-o'; + tmp.dispatch('CALL_MSGR',callConfig); + window.setTimeout(()=>{ + this.$router.push('/auth/login'); + }, this.globalConfig.jumpDelay); + } else { + callConfig.msg += 'WTF……邮件发送失败,请检查邮箱地址'; + callConfig.icon += 'fa-times-circle-o'; + tmp.dispatch('CALL_MSGR',callConfig); + window.setTimeout(()=>{ + this.isDisabled = false; + },3000) + } + }) + } + }, } const User = { @@ -1003,17 +1055,11 @@ const indexPage = new Vue({ router: Router, el: '#index', delimiters: ['$[',']$'], - store: tmp, + mixins: [storeMap], data: { routerN: 'auth', transType: 'slide-fade' }, - computed: Vuex.mapState({ - msgrCon: 'msgrCon', - globalConfig: 'globalConfig', - logintoken: 'logintoken', - isLoading: 'isLoading', - }), methods: { routeJudge() { switch(this.$route.path) { diff --git a/resources/views/material/password/reset.tpl b/resources/views/material/password/reset.tpl index d94c6609..d0418ec1 100755 --- a/resources/views/material/password/reset.tpl +++ b/resources/views/material/password/reset.tpl @@ -89,7 +89,7 @@ if(data.ret == 1){ $("#result").modal(); $("#msg").html(data.msg); - // window.setTimeout("location.href='/auth/login'", 2000); + window.setTimeout("location.href='/auth/login'", 2000); }else{ $("#result").modal(); $("#msg").html(data.msg); diff --git a/resources/views/material/user/edit.tpl b/resources/views/material/user/edit.tpl index 6441ef18..14696b72 100755 --- a/resources/views/material/user/edit.tpl +++ b/resources/views/material/user/edit.tpl @@ -99,7 +99,7 @@
联络方式修改
-

当前联络方式: +

当前联络方式: {if $user->im_type==1} 微信 @@ -118,7 +118,7 @@ {/if}

-

当前联络方式账号: +

当前联络方式账号: {$user->im_value}