Browse Source

login and register ui ready

master
filesite 7 months ago
parent
commit
f51b748b8a
  1. 19
      themes/tajian/controller/SiteController.php
  2. 8
      themes/tajian/views/layout/index.php
  3. 31
      themes/tajian/views/site/login.php
  4. 39
      themes/tajian/views/site/register.php
  5. 19
      themes/tajian/views/site/tajian.php
  6. 65
      www/css/tajian.css
  7. 27
      www/js/tajian.js

19
themes/tajian/controller/SiteController.php

@ -216,15 +216,28 @@ Class SiteController extends Controller {
return $this->render($viewName, $params, $pageTitle); return $this->render($viewName, $params, $pageTitle);
} }
//TODO: 采用邀请制注册 //邀请制新用户注册,使用手机号码 + 邀请码 + 短信验证码注册
//新用户注册
public function actionRegister() { public function actionRegister() {
$pageTitle = "注册Ta荐:一个好用的视频收藏夹,帮你整理不同平台的好视频,还能分享给朋友!";
$this->layout = 'index';
$viewName = 'register';
$params = compact(
'pageTitle'
);
return $this->render($viewName, $params, $pageTitle);
} }
//用户登陆 //用户登陆:使用手机号码 + 短信验证码登录
public function actionLogin() { public function actionLogin() {
$pageTitle = "登录Ta荐:一个好用的视频收藏夹,帮你整理不同平台的好视频,还能分享给朋友!";
$this->layout = 'index';
$viewName = 'login';
$params = compact(
'pageTitle'
);
return $this->render($viewName, $params, $pageTitle);
} }
} }

8
themes/tajian/views/layout/index.php

@ -17,7 +17,7 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
<link rel="icon" type="image/x-icon" href="/favicon.ico?v1.0"> <link rel="icon" type="image/x-icon" href="/favicon.ico?v1.0">
<link href="/css/tajian.css?v<?=Html::getStaticFileVersion('tajian.css', 'css')?>" rel="stylesheet"> <link href="/css/tajian.css?v<?=Html::getStaticFileVersion('tajian.css', 'css')?>" rel="stylesheet">
</head> </head>
<body> <body class="layout_index">
<div class="app_recommend" id="app_recommend"> <div class="app_recommend" id="app_recommend">
<header class="top_nav"> <header class="top_nav">
<a class="log_tn clearfix" href="/" title="<?php echo $pageTitle; ?>"> <a class="log_tn clearfix" href="/" title="<?php echo $pageTitle; ?>">
@ -25,7 +25,7 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
- TaJian.tv - TaJian.tv
</a> </a>
<div class="right_class_tn"> <div class="right_class_tn">
<a class="connect_me_tn" href="https://github.com/filesite-io/machete" target="_blank" title="从GitHub下载Machete源码"><img src="/img/download.png" alt="下载Machete源码" class="downicon">下载源码</a> <a class="connect_me_tn" href="https://github.com/filesite-io/machete" target="_blank" title="从GitHub下载Machete源码"><img src="/img/download.png" alt="下载Machete源码" class="verBottom">下载源码</a>
</div> </div>
</header> </header>
@ -38,10 +38,6 @@ if (!empty($viewFile) && file_exists($viewFile)) {
<div class="footer"> <div class="footer">
<div class="copyright"> <div class="copyright">
<?php /*if (!empty(FSC::$app['config']['theme'])) { ?>
Theme name <strong><?php echo FSC::$app['config']['theme']; ?></strong>
<br>
<?php }*/ ?>
<a href="https://filesite.io" target="_blank">&copy;FileSite.io</a> 2022 - execute time: {page_time_cost} ms <a href="https://filesite.io" target="_blank">&copy;FileSite.io</a> 2022 - execute time: {page_time_cost} ms
<br> <br>
数据采集由 数据采集由

31
themes/tajian/views/site/login.php

@ -0,0 +1,31 @@
<main class="g_main_lay g_main_border">
<form class="add_video_form g_form_style mt65" id="add_video_form" action="" method="get">
<div class="mb-3 pt20">
<label for="text_input_username" class="form-label">手机号码</label>
<input id="text_input_username" name="username" placeholder="请填写手机号码">
</div>
<div class="mb-3 twocol">
<label for="text_input_sm" class="form-label">验证码</label>
<input id="text_input_sm" name="friendscode" placeholder="输入收到的短信验证码">
<button disabled="disabled">发送验证码</button>
</div>
<div class="avform_bt vercenter">
<button class="jsbtn" aria-label="注册" type="button">
<div class="loading_bt bt_class_JS elementNone verMiddle">
<svg viewBox="25 25 50 50">
<circle cx="50" cy="50" r="20"></circle>
</svg>
</div>
<span class="bt_text_JS">登录</span>
<div class="bt_loading_cover bt_class_JS elementNone"></div>
</button>
<span class="ml20">
没注册?
<a href="/site/register/">
<img src="/img/PersonalCenter.svg" alt="用户图标" width="20" class="verBottom">去注册
</a>
</span>
</div>
</form>
</main>

39
themes/tajian/views/site/register.php

@ -0,0 +1,39 @@
<main class="g_main_lay g_main_border">
<form class="add_video_form g_form_style mt65" id="add_video_form" action="" method="get">
<div class="mb-3 pt20 twocol">
<label for="text_input_code" class="form-label">邀请码</label>
<input id="text_input_code" name="friendscode" placeholder="邀请者手机号末 6 位">
<button class="bt_kf_JS" type="button" data-hide="隐藏客服微信">加客服索要</button>
<p class="mt10 hide kf_wx_JS">
<img src="/tajian/wx_jialuoma.jpeg" alt="Ta荐客服微信二维码" width="200" class="kfwx">
</p>
</div>
<div class="mb-3">
<label for="text_input_username" class="form-label">手机号码</label>
<input id="text_input_username" name="username" placeholder="请填写手机号码">
</div>
<div class="mb-3 twocol">
<label for="text_input_sm" class="form-label">验证码</label>
<input id="text_input_sm" name="friendscode" placeholder="输入收到的短信验证码">
<button disabled="disabled" type="button">发送验证码</button>
</div>
<div class="avform_bt vercenter">
<button class="jsbtn" aria-label="注册" type="button">
<div class="loading_bt bt_class_JS elementNone verMiddle">
<svg viewBox="25 25 50 50">
<circle cx="50" cy="50" r="20"></circle>
</svg>
</div>
<span class="bt_text_JS">注册</span>
<div class="bt_loading_cover bt_class_JS elementNone"></div>
</button>
<span class="ml20">
已有账号,
<a href="/site/login/">
<img src="/img/PersonalCenter.svg" alt="用户图标" width="20" class="verBottom">去登录
</a>
</span>
</div>
</form>
</main>

19
themes/tajian/views/site/tajian.php

@ -10,31 +10,22 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
} }
?> ?>
<style>
body{background-color:#e5f1f3}
.verMiddle{vertical-align:baseline !important}
.footer{border-top:1px solid #DDD;padding-top:20px}
.top_nav{padding-left:20%;padding-right:20%}
@media screen and (max-width:480px) {
.top_nav{padding-left:22px;padding-right:22px}
}
</style>
<main class="tajian_index"> <main class="tajian_index">
<h1 class="h1title vercenter"> <h1 class="h1title vercenter mt65">
一个好用的视频收藏夹 一个好用的视频收藏夹
<small>- 帮你整理不同App/网站的好视频,还能分享给朋友</small> <small>- 帮你整理不同App/网站的好视频,还能分享给朋友</small>
</h1> </h1>
<div class="btns clearfix"> <div class="btns clearfix">
<div class="favbtn"> <div class="favbtn">
<a href="###"> <a href="/site/register/">
<img src="/img/favorite.png" alt="Create your favorite tajian link." width="100"> <img src="/img/favorite.png" alt="Create your favorite tajian link." width="100">
<br> <br>
创建专属收藏夹 创建专属收藏夹
</a> </a>
</div> </div>
<div class="downbtn"> <div class="downbtn">
<a href="###"> <a href="/site/login/">
<img src="/img/share.png" alt="Download machete source code" width="100"> <img src="/img/share.png" alt="Download machete source code" width="100">
<br> <br>
获取分享链接 获取分享链接
@ -45,12 +36,12 @@ if (!empty(FSC::$app['config']['multipleUserUriParse']) && !empty(FSC::$app['use
<h3 class="h3title pl20">使用方法</h3> <h3 class="h3title pl20">使用方法</h3>
<div class="pl20 lh18"> <div class="pl20 lh18">
1. 点上面“创建专属收藏夹”, 1. 点上面“创建专属收藏夹”,
<br>&nbsp;&nbsp;&nbsp;&nbsp;用手机号码 + 邀请码(朋友手机号码末6位)<a href="###" class="loginbtn">注册</a> <br>&nbsp;&nbsp;&nbsp;&nbsp;用手机号码 + 邀请码(朋友手机号码末6位)<a href="/site/register/" class="loginbtn">注册</a>
<br class="hidden-xs"> <br class="hidden-xs">
&nbsp;&nbsp;&nbsp;&nbsp;还可以加客服微信索要注册邀请码 &nbsp;&nbsp;&nbsp;&nbsp;还可以加客服微信索要注册邀请码
<img src="/tajian/wx_jialuoma.jpeg" alt="Ta荐客服微信二维码" width="200" class="kfwx"> <img src="/tajian/wx_jialuoma.jpeg" alt="Ta荐客服微信二维码" width="200" class="kfwx">
<br class="hidden-xs"> <br class="hidden-xs">
2. 用手机号码 <a href="###" class="loginbtn">登录</a> 2. 用手机号码 <a href="/site/login/" class="loginbtn">登录</a>
<br class="hidden-xs"> <br class="hidden-xs">
3. 从各大视频App、网站复制分享链接 3. 从各大视频App、网站复制分享链接
<br> <br>

65
www/css/tajian.css

@ -13,6 +13,7 @@ a{color:#464c5c;}
.elementNone{display:none !important;} .elementNone{display:none !important;}
.elementhidden{visibility:hidden !important;} .elementhidden{visibility:hidden !important;}
.verMiddle{vertical-align:middle !important;} .verMiddle{vertical-align:middle !important;}
.verBottom{vertical-align:bottom !important;}
.vercenter{text-align:center !important;} .vercenter{text-align:center !important;}
.verbold{font-weight:bold !important;} .verbold{font-weight:bold !important;}
.opacityshow{opacity:1 !important;} .opacityshow{opacity:1 !important;}
@ -23,25 +24,6 @@ a:link{text-decoration:none;}
.breadcrumbs{padding-left:1em;padding-top:1em} .breadcrumbs{padding-left:1em;padding-top:1em}
.footer{margin:7em auto 6em auto;text-align:center} .footer{margin:7em auto 6em auto;text-align:center}
/* TaJian首页 */
.tajian_index{max-width:640px;margin:0 auto;padding:10px}
.tajian_index .h1title{margin-top:65px;font-size:17px;color:#444}
.tajian_index .h3title{margin-top:30px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #DDD}
.tajian_index .ulist{margin-top:10px}
.tajian_index .ulist li{list-style:circle;margin-left:26px;padding-left:8px;line-height:1.8}
.tajian_index .btns{margin-top:30px;text-align:center}
.tajian_index .btns img{width:90px;opacity:0.8}
.tajian_index .btns .favbtn{float:left;width:50%}
.tajian_index .btns .downbtn{float:right;width:50%}
.tajian_index .btns a{color:#3e3edc}
.tajian_index .btns a:hover{color:blue}
.tajian_index .btns a:hover img{opacity:1}
.tajian_index .pl20{padding-left:20px}
.tajian_index .pt20{padding-top:20px}
.tajian_index .lh18{line-height:1.8}
.tajian_index .kfwx{float:right;border-radius:6px}
.tajian_index .loginbtn{border:1px solid #50509d;background-color:#50509d;color:#FFF;padding:3px 10px;border-radius:4px}
.downicon{vertical-align:bottom}
/* 首页 start*/ /* 首页 start*/
.g_app_lay{padding:56px 0 0 200px;} .g_app_lay{padding:56px 0 0 200px;}
@ -239,10 +221,49 @@ a:link{text-decoration:none;}
.menu_ls>a{flex:1;text-align:center;padding:10px 0;margin:0;} .menu_ls>a{flex:1;text-align:center;padding:10px 0;margin:0;}
.menu_ls>a img{margin:0;} .menu_ls>a img{margin:0;}
.g_form_style{padding:0 12% 0 10%;width:100%;} .g_form_style{padding:0 12% 0 10%;width:100%;}
.tajian_index .h1title small{display:block}
.tajian_index .kfwx{float:none;width:130px;display:block;margin-left:1em}
.tajian_index .loginbtn{display:block;width:80%;margin-left:1em;text-align:center}
.hidden-xs{display:none} .hidden-xs{display:none}
} }
.hide{display:none} .hide{display:none}
/* TaJian首页 */
.tajian_index{max-width:640px;margin:0 auto;padding:10px}
.tajian_index .h1title{font-size:17px;color:#444}
.tajian_index .h3title{margin-top:30px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid #DDD}
.tajian_index .ulist{margin-top:10px}
.tajian_index .ulist li{list-style:circle;margin-left:26px;padding-left:8px;line-height:1.8}
.tajian_index .btns{margin-top:30px;text-align:center}
.tajian_index .btns img{width:90px;opacity:0.8}
.tajian_index .btns .favbtn{float:left;width:50%}
.tajian_index .btns .downbtn{float:right;width:50%}
.tajian_index .btns a{color:#3e3edc}
.tajian_index .btns a:hover{color:blue}
.tajian_index .btns a:hover img{opacity:1}
.tajian_index .kfwx{float:right;border-radius:6px}
.tajian_index .loginbtn{border:1px solid #50509d;background-color:#50509d;color:#FFF;padding:3px 10px;border-radius:4px}
/* 注册 */
.twocol label{display:block}
.twocol input{width:62%}
.twocol button{margin-left:4px;padding:6px 4px;border-radius:4px;border-width:1px;cursor:pointer}
.twocol button:hover{background-color:lightblue}
/* layout index */
body.layout_index{background-color:#e5f1f3}
.layout_index .top_nav .verMiddle{vertical-align:baseline !important}
.layout_index .footer{border-top:1px solid #DDD;padding-top:20px}
.layout_index .top_nav{padding-left:20%;padding-right:20%}
.layout_index .mt65{margin-top:65px}
.layout_index .mt10{margin-top:10px}
.layout_index .ml20{margin-left:20px}
.layout_index .pl20{padding-left:20px}
.layout_index .pt20{padding-top:20px}
.layout_index .lh18{line-height:1.8}
@media screen and (max-width:480px) {
.layout_index .top_nav{padding-left:22px;padding-right:22px}
.tajian_index .h1title small{display:block}
.tajian_index .kfwx{float:none;width:130px;display:block;margin-left:1em}
.tajian_index .loginbtn{display:block;width:80%;margin-left:1em;text-align:center}
}

27
www/js/tajian.js

@ -28,18 +28,6 @@ if ($("img.lazy").get(0)) {
}); });
} }
// 返回顶部
// var scrolltop = $('.scroll_topJS');
// $(window).scroll(function () {
// if ($(this).scrollTop() > 100) {
// scrolltop.fadeIn();
// } else {
// scrolltop.fadeOut();
// }
// });
if ($('.connectmeJS').get(0)) { if ($('.connectmeJS').get(0)) {
// 点击打开右侧弹出框 // 点击打开右侧弹出框
$('.connectmeJS').click(function () { $('.connectmeJS').click(function () {
@ -198,4 +186,19 @@ function publicAjax(apiUrl, method, datas, callback, fail) {
}); });
}; };
// 注册
if ($('.bt_kf_JS').get(0)) {
var kf_hide_text = $('.bt_kf_JS').attr('data-hide'),
kf_text = $('.bt_kf_JS').text();
$('.bt_kf_JS').click(function(e) {
if ($('.kf_wx_JS').hasClass('hide')) {
$('.kf_wx_JS').removeClass('hide');
$('.bt_kf_JS').text(kf_hide_text);
}else {
$('.kf_wx_JS').addClass('hide');
$('.bt_kf_JS').text(kf_text);
}
});
}
})(); })();

Loading…
Cancel
Save