From 459d01254ff622caef469b44d5bb1636a5ab15a0 Mon Sep 17 00:00:00 2001 From: pengda <10266652509@qq.com> Date: Fri, 21 Mar 2025 09:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/css/index.css | 8 ++++---- view/js/index.js | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/view/css/index.css b/view/css/index.css index e6bcff3..6ad6efc 100644 --- a/view/css/index.css +++ b/view/css/index.css @@ -591,14 +591,14 @@ button:hover { flex: 1; } .editmodal .add-form .form-left{ - display: none; + /*display: none;*/ } .editmodal .form-item{ - padding: 0; + /*padding: 0;*/ } .editmodal textarea { - transition: all.3s; - margin-bottom: 0 !important; + /*transition: all.3s;*/ + /*margin-bottom: 0 !important;*/ } .addmodal .add-form .form-left{ display: block; diff --git a/view/js/index.js b/view/js/index.js index 70cec36..cc95132 100644 --- a/view/js/index.js +++ b/view/js/index.js @@ -6,11 +6,10 @@ $(document).ready(function () { $('.radio-wrap').on('click', '.radio_box input', function () { var radio_val = $(this).attr('value') - $('.edit-input').val('') if (radio_val == '1') { $('.normal-form').hide() $('.common-input').html('录入信息') - $('.normal-input').removeClass('h74') + $('.normal-input').removeClass('h74').val('') } else { $('.common-input').html('回答信息') $('.normal-input').addClass('h74') @@ -37,10 +36,19 @@ $(document).ready(function () { } $('.edit-input').val('') - $('.radio-form').hide(); - $('.normal-form').hide(); + // $('.radio-form').hide(); + // $('.normal-form').hide(); + + $('.normal-input').val(res.data.refer); + $('.char-count').text(res.data.refer.length + '/100'); + if(res.data.refer.length>0){ + $('.normal-form').show(); + $('.normal-input').addClass('h74') + $('#edu2').click(); + } + $('.answer-input').val(res.data.text); - $('.char-count').text(res.data.text.length + '/100'); + $('.char-count1').text(res.data.text.length + '/100'); if ($('.modal').hasClass('addmodal')) { $('.modal').removeClass('addmodal')