Browse Source

Merge pull request '修改服务类型及选择ppt模板确认逻辑修改' (#9) from zq-1224-ppt into master

Reviewed-on: #9
pull/13/head
zhangqi 4 months ago
parent
commit
5585ba70d8
  1. 51
      home.html
  2. BIN
      style/img/kaitibaogao.png
  3. 28
      style/js/index.js

51
home.html

@ -109,13 +109,18 @@
<span>专升本计划书</span> <span>专升本计划书</span>
<img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon"> <img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon">
</li> --> </li> -->
<li type="85" check_flag='aiessayqk'> <!-- <li type="85" check_flag='aiessayqk'>
<img src="{$priv_style}/img/zhichenglunwen.png" alt="" class="li_icon"> <img src="{$priv_style}/img/zhichenglunwen.png" alt="" class="li_icon">
<span>职称论文</span> <span>职称论文</span>
<img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon"> <img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon">
</li> -->
<li type="97" check_flag='aiqikan'>
<img src="{$priv_style}/img/zhichenglunwen.png" alt="" class="li_icon">
<span>期刊范文</span>
<img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon">
</li> </li>
<li type="62" check_flag="aiktbg"> <li type="62" check_flag="aiktbg">
<img src="{$priv_style}/img/zhichenglunwen.png" alt="" class="li_icon"> <img src="{$priv_style}/img/kaitibaogao.png" alt="" class="li_icon">
<span>开题报告</span> <span>开题报告</span>
<img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon"> <img src="{$priv_style}/img/select_icon.svg" alt="" class="select_icon">
</li> </li>
@ -285,26 +290,6 @@
placeholder="请输入相关的辅助信息,帮助论文生成的更加准确!(非必填)"></textarea> placeholder="请输入相关的辅助信息,帮助论文生成的更加准确!(非必填)"></textarea>
</div> </div>
</div> </div>
<div class="formItem coreContent " style="display: none;">
<div class="formLeft">核心内容</div>
<div class="formRight textAreaRight">
<textarea name="coreContent" class="coreWordCount" id="coreTextarea" maxlength="200"
placeholder="请写出需要在论文中包含的要点。"></textarea>
<div id="charCount" class="char-count">0/200</div>
<!-- {literal} -->
<script>
const maxLength = 200; // 设置最大字数限制
$('#coreTextarea').on('input', function () {
const currentLength = $('#coreTextarea').val().length;
$('#charCount').text(`${currentLength}/${maxLength}`);
if (currentLength > maxLength) {
$('#coreTextarea').val($('#coreTextarea').val().slice(0, maxLength)); // 如果超过限制,则截断文本
}
});
</script>
<!-- {/literal} -->
</div>
</div>
<div class="formItem form_essayWords"> <div class="formItem form_essayWords">
<div class="formLeft"> <div class="formLeft">
论文字数 论文字数
@ -349,6 +334,26 @@
<p>将在所生成范文的随机位置插入所选项</p> <p>将在所生成范文的随机位置插入所选项</p>
</div> </div>
</div> </div>
<div class="formItem coreContent " style="display: none;">
<div class="formLeft">核心内容</div>
<div class="formRight textAreaRight">
<textarea name="coreContent" class="coreWordCount" id="coreTextarea" maxlength="200"
placeholder="请写出需要在论文中包含的要点。"></textarea>
<div id="charCount" class="char-count">0/200</div>
<!-- {literal} -->
<script>
const maxLength = 200; // 设置最大字数限制
$('#coreTextarea').on('input', function () {
const currentLength = $('#coreTextarea').val().length;
$('#charCount').text(`${currentLength}/${maxLength}`);
if (currentLength > maxLength) {
$('#coreTextarea').val($('#coreTextarea').val().slice(0, maxLength)); // 如果超过限制,则截断文本
}
});
</script>
<!-- {/literal} -->
</div>
</div>
<div class="form_pptItem " style="display: none;"> <div class="form_pptItem " style="display: none;">
<input id="upload_file_md5" type="hidden" value=""> <input id="upload_file_md5" type="hidden" value="">
<input id="upload_file_name" type="hidden" value=""> <input id="upload_file_name" type="hidden" value="">
@ -1182,7 +1187,7 @@
</div> </div>
{$access_stats_code} {$access_stats_code}
<script src="{$priv_style}/js/index.js?v=1102"></script> <script src="{$priv_style}/js/index.js?v=1104"></script>
</body> </body>
</html> </html>

BIN
style/img/kaitibaogao.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

28
style/js/index.js

@ -73,6 +73,7 @@ $(document).ready(function() {
'94':'毕业论文', '94':'毕业论文',
'81':'课程论文', '81':'课程论文',
'85':'职称论文', '85':'职称论文',
'97':'期刊范文',
'62':'开题报告', '62':'开题报告',
'64':'论文选题', '64':'论文选题',
'91':'文献综述', '91':'文献综述',
@ -155,8 +156,12 @@ $(document).ready(function() {
if(wordsData){ if(wordsData){
var edu = parseInt($('#educationRight').find('.edu_active_select input').val()); var edu = parseInt($('#educationRight').find('.edu_active_select input').val());
// var edu1 = parseInt($('#educationRight').find('input[type="radio"]:checked').val()); // var edu1 = parseInt($('#educationRight').find('input[type="radio"]:checked').val());
renderWordsHtml(wordsData[edu])
}
}
function renderWordsHtml(data){
var html1 = '' var html1 = ''
wordsData[edu].forEach(item=>{ data.forEach(item=>{
html1 += ` <div class="essayWords"> html1 += ` <div class="essayWords">
<input value="`+ item +`" type="radio" name="wordnums" > <input value="`+ item +`" type="radio" name="wordnums" >
<div></div> <div></div>
@ -165,7 +170,6 @@ $(document).ready(function() {
}) })
$('.words_content').html(html1) $('.words_content').html(html1)
} }
}
$('.words_content').on('click', '.essayWords input', function () { $('.words_content').on('click', '.essayWords input', function () {
$('.words_content .essayWords').removeClass('essayWords_active'); $('.words_content .essayWords').removeClass('essayWords_active');
$(this).parent().addClass('essayWords_active'); $(this).parent().addClass('essayWords_active');
@ -715,6 +719,7 @@ $(document).ready(function() {
alert("请选择您的字数"); alert("请选择您的字数");
return; return;
} }
postData.aiessay_wordnum = wordnums;
} }
if(check_type == '96'){ if(check_type == '96'){
if (!old_parent_ppt) { if (!old_parent_ppt) {
@ -795,7 +800,7 @@ $(document).ready(function() {
...postData ...postData
}, },
success: function (res) { success: function (res) {
if(res.data.user_not_enough_money) { if(res.data && res.data.user_not_enough_money) {
if(check_type !== '94' && check_type !== '82'){ if(check_type !== '94' && check_type !== '82'){
if(isPayDialog){ if(isPayDialog){
$('.pageMask').addClass('hide'); $('.pageMask').addClass('hide');
@ -818,6 +823,8 @@ $(document).ready(function() {
getRechargePayUrl() getRechargePayUrl()
// getRechargeGoods(payInfo, configData); // getRechargeGoods(payInfo, configData);
} }
}else{
alert(res.info)
} }
} }
}); });
@ -1042,7 +1049,7 @@ $(document).ready(function() {
$('.normal_step3').removeClass('step_three') $('.normal_step3').removeClass('step_three')
$('.payModal_main').html('') $('.payModal_main').html('')
$('.pay_complete_main').html(payhtml) $('.pay_complete_main').html(payhtml)
getWordsCount() getCurWordsCount()
}else{ }else{
setDomHide(['[step="3"]','.btn_result','.step_two','.btn_mast']) setDomHide(['[step="3"]','.btn_result','.step_two','.btn_mast'])
setDomShow(['[step="2"]','.btn_result_now']) setDomShow(['[step="2"]','.btn_result_now'])
@ -1082,6 +1089,15 @@ $(document).ready(function() {
$('.form_pptItem').hide() $('.form_pptItem').hide()
$('#formInputSumbtn').html('立即生成') $('#formInputSumbtn').html('立即生成')
} }
if(t == '97'){
setDomShow(['.form_essayWords','.coreContent'])
var wordsData = allAiServicesData[check_type]['word_count_list'];
renderWordsHtml(wordsData)
setInputText_length('100')
}
// else{
// setDomHide(['.form_essayWords','.coreContent'])
// }
// $("#downdemo").attr('href', '/downreportdemo/type/'+t); // $("#downdemo").attr('href', '/downreportdemo/type/'+t);
//图表公式 //图表公式
var table_formula_types = getTableFormulaTypes('support_table_formula_types'); var table_formula_types = getTableFormulaTypes('support_table_formula_types');
@ -1172,7 +1188,7 @@ $(document).ready(function() {
}) })
$('.gallery').html(html); $('.gallery').html(html);
$('.gallery_img').eq(child_ppt).addClass('ppt_child_active'); $('.gallery_img').eq(child_ppt).addClass('ppt_child_active');
$('.look_backImg').attr('src',pptUrlList[new_parent_ppt]['bgurl']) $('.look_backImg').attr('src',pptUrlList[key]['bgurl'])
setBackImgUrl(childList[child_ppt],true) setBackImgUrl(childList[child_ppt],true)
} }
} }
@ -1242,12 +1258,12 @@ $(document).ready(function() {
if ($('.form_pptItem').css('display') == 'none') { if ($('.form_pptItem').css('display') == 'none') {
add_ppt=new_parent_ppt; add_ppt=new_parent_ppt;
$('#cur_ppt_selectName').html(pptUrlList[add_ppt]['name']) $('#cur_ppt_selectName').html(pptUrlList[add_ppt]['name'])
payAction()
}else{ }else{
old_parent_ppt = new_parent_ppt; old_parent_ppt = new_parent_ppt;
setPagePPT_active(new_parent_ppt) setPagePPT_active(new_parent_ppt)
} }
$('.look_PPT_modal').addClass('hide') $('.look_PPT_modal').addClass('hide')
payAction()
}) })

Loading…
Cancel
Save