From 0d5dfa573eb9b2e100af96b7ddc7a7577c54c4f9 Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 20 Apr 2024 22:19:40 +0800 Subject: [PATCH] add fav form ui update --- themes/tajian/views/site/new.php | 8 +--- www/css/tajian.css | 7 ++-- www/js/tajian.js | 65 +------------------------------- 3 files changed, 7 insertions(+), 73 deletions(-) diff --git a/themes/tajian/views/site/new.php b/themes/tajian/views/site/new.php index 50b8a7a..27be997 100644 --- a/themes/tajian/views/site/new.php +++ b/themes/tajian/views/site/new.php @@ -2,11 +2,7 @@
- -
-
- - +
@@ -30,7 +26,7 @@ eof;
- 提交 + 保存
diff --git a/www/css/tajian.css b/www/css/tajian.css index b941579..2ac7047 100644 --- a/www/css/tajian.css +++ b/www/css/tajian.css @@ -21,9 +21,9 @@ a:active{text-decoration:none;} a:visited{text-decoration:none;} a:link{text-decoration:none;} .breadcrumbs{padding-left:1em;padding-top:1em} -.footer{margin:5em auto 6em auto;text-align:center} +.footer{margin:7em auto 6em auto;text-align:center} -/* 首页 star*/ +/* 首页 start*/ .g_app_lay{padding:56px 0 0 200px;} /* 顶部导航 */ .top_nav{position:fixed;top:0;left:0;z-index:1100;width:100%;height:56px;overflow:hidden;background:#FFF;padding:8px 22px;display:flex;flex-wrap:wrap;flex-direction:row;align-items:center;justify-content: space-between;} @@ -101,7 +101,7 @@ a:link{text-decoration:none;} .sideboxShow{animation:bounceInRight 0.5s ease forwards;} /* 添加视频 */ -.g_form_style{width:406px;margin:11% auto 0 auto;} +.g_form_style{width:406px;margin:8% auto 0 auto} .g_form_style input,.g_form_style select{width:100%;font-size:15px;padding:12px 10px;border-radius:5px;border:solid 1px #9b9b9b;margin:6px 0 0 0;} .g_form_style>div{margin-bottom:11px;} .avform_bt{margin-top:18px;} @@ -112,6 +112,7 @@ a:link{text-decoration:none;} } .loading_bt circle {fill: none;stroke: #FFF;stroke-width: 7;stroke-dasharray: 1, 200;stroke-dashoffset: 0;stroke-linecap: round;animation: diansh 2s ease-in-out infinite; } +.g_form_style textarea{display:block;width:100%;padding:4px} /* 个人中心 */ .ui_name{padding:3% 0 0 0;margin-bottom:20px;display:flex;align-items: center;justify-content:center;} diff --git a/www/js/tajian.js b/www/js/tajian.js index a886d3a..29ed192 100644 --- a/www/js/tajian.js +++ b/www/js/tajian.js @@ -106,7 +106,7 @@ if ($('#add_video_form').get(0)) { // 添加视频表单处理 $('#add_video_form .jsbtn').click(function (e) { e.preventDefault(); - let inputList = $('#add_video_form input'); + let inputList = $('#add_video_form textarea'); if (!inputList[0].value) { alert('请填写分享内容或网址!'); return false; @@ -122,7 +122,6 @@ if ($('#add_video_form').get(0)) { let datas = { 'content': inputList[0].value, - 'title': inputList[1].value, 'tag': $('#add_video_form select').val() } @@ -199,66 +198,4 @@ function publicAjax(apiUrl, method, datas, callback, fail) { }); }; - -//--v1.0-- -/* - //show modal - $('.btn-open').click(function(evt) { - var target_id = $(evt.target).parents('.btn-open').attr('href'); - if ($(evt.target).hasClass('btn-open')) { - target_id = $(evt.target).attr('href'); - } - $(target_id).css('display', 'block'); - }); - - //hide modal - $('.btn-close').click(function(evt) { - $(evt.target).parents('.modal-mask').css('display', 'none'); - }); - $('.modal-mask').click(function(evt) { - if ($(evt.target).hasClass('modal-mask')) { - $(evt.target).css('display', 'none'); - } - }); - - $('#btn_addfav').click(function(e) { - var share_content = $('input[name=share_content]').val(), - select_tag = $('select[name=tag]').val(); - if (!share_content) { - alert('请填写分享内容或网址!'); - return false; - }else if (/https:\/\/[\w\.]+\/[\w]+/ig.test(share_content) == false) { - alert('目前只支持抖音、快手、西瓜视频和Bilibili的分享网址哦!'); - return false; - } - - var btn = this; - $(btn).prop('disabled', true); - - var postData = {content: share_content}; - if (select_tag) { - postData.tag = select_tag; - } - - $.ajax({ - url: '/frontapi/addfav', - method: 'POST', - dataType: 'JSON', - data: postData - }).done(function(data, textStatus, jqXHR) { - $(btn).removeAttr('disabled'); - - if (data.code == 1) { - $('input[name=share_content]').val(''); - alert(data.msg || data.err); - }else { - alert('保存失败!' + data.err); - } - }).fail(function(jqXHR, textStatus, errorThrown) { - $(btn).removeAttr('disabled'); - alert('服务器异常了:' + errorThrown); - }); - }); -*/ - })();