Browse Source

修改期刊论文也可生成大纲

pull/19/head
zq 3 months ago
parent
commit
2aa78dde1e
  1. 98
      home.html
  2. 2
      style/css/index.css
  3. 71
      style/js/index.js

98
home.html

@ -9,7 +9,7 @@
<title>{if $_siteinfo.site_introduction_name}{$_siteinfo.site_introduction_name}{else}AI论文{/if}</title>
{if $site_ico}
<link rel="shortcut icon" href="{$site_ico}" type="image/x-icon" />{/if}
<link rel="stylesheet" type="text/css" href="{$priv_style}/css/index.css?v=1134">
<link rel="stylesheet" type="text/css" href="{$priv_style}/css/index.css?v=1020">
<script src="{$priv_style}/js/jquery-3.6.0.min.js"></script>
<script src="{$priv_style}/js/clipboard.min.js"></script>
<script src="{$priv_style}/js/qrcode.min.js"></script>
@ -267,7 +267,6 @@
</div>
<div class="education">
<input value="3" type="radio" name="edu" id="edu3"
onclick="getEducation('edu','3','.education','edu_active_select')"
>
<div></div>
<label for="edu3">硕博</label>
@ -397,9 +396,9 @@
</form>
<div class="flex btnWrap">
<button class="btn_mast point" >立即生成正文</button>
<button class="btn_result point" onclick="showCreateCatalogue()">先生成论文大纲</button>
<button class="btn_result_now point" id="formInputSumbtn">立即生成</button>
<button class="btn_result point" >先生成论文大纲</button>
</div>
<div class="checkbox_wrap">
<p class="active agree-item">我已阅读并同意:生成的论文范文仅用于参考,不作为毕业论文使用</p>
@ -846,98 +845,11 @@
// }
return true;
}
function showCreateCatalogue() {
stepFlag = false;
geiAiUpgradeInfo(createCatalogue)
}
function showAdviseTitle() {
geiAiUpgradeInfo(adviseTitle)
}
function createCatalogue() {
if (!$('.agree-item').hasClass('active')) {
alert("请阅读并勾选同意《服务条款》");
return;
}
var chkType = $('li.active_select').attr('type');
$.ajax({
type: "post",
url: service_domain + 'ajax_get_config',
async: false,
data: {
type: chkType,
is_pc_webpage: 1
},
success: function (jsondata) {
var data = JSON.parse(jsondata);
if (!data.status) {
alert(data.info);
return;
}
let pathType = {
'94': 'aiessayzx',
'82': 'aiessayen'
}
var title = $(".inputChange").val();
var r = checkTitle(title);
if (!r) return;
var edu = parseInt($('#educationRight').find('input[type="radio"]:checked').val());
if (edu <= 0 || !edu) {
alert("请选择您的学历");
return;
}
if (chkType != '82' && $('.form_essayWords').css('display') !== 'none') {
var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val());
if (wordnums <= 0 || isNaN(wordnums)) {
alert("请选择您的字数");
return;
}
}
var major = parseInt($('.dropdown-input').attr('selected_val'));
if (major <= 0 || !major) {
alert("请选择您的专业");
return;
}
var table_and_formulas_obj = $('#paper-table_and_formulas-wrapper').find('input:checked');
var table_and_formulas = '';
for (var index = 0; index < table_and_formulas_obj.length; index++) {
var table_and_formulasval = table_and_formulas_obj.eq(index).val();
if (table_and_formulas == '') {
table_and_formulas = table_and_formulasval;
continue;
}
table_and_formulas += ',' + table_and_formulasval;
}
//固定外部链接
var url = service_domain + pathType[chkType] + "/catalogue?title=" + encodeURIComponent(title);
// var url = data.data.agent_domain + "/catalogue?title=" + encodeURIComponent(title);
var content_min_limit = $("#htmlconfig").attr('content_min_limit');
if ($('.coreContent').css('display') !== 'none') {
var core_content = $('.textAreaForWordCount').val();
if (core_content.trim().length == 0 && content_min_limit > 0) {
alert("论文核心内容不能为空");
return;
}
url += '&core=' + encodeURIComponent(core_content.trim());
}
if (table_and_formulas != '' && table_formula_types.indexOf(chkType) !== -1) url += '&table_and_formulas=' + table_and_formulas;
if ($('.form_essayWords').css('display') !== 'none') {
url += '&aiessay_wordnum=' + wordnums;
}
if (major) url += '&major=' + major;
if (edu) url += '&edu=' + edu;
if (stepFlag) {
showNextStep(title, chkType, wordnums, eduObj, edu)
return
}
setTimeout(() => {
window.open(url);
}, 1500)
}
});
}
function getTableFormulaTypes() {
var support_table_formula_types = $("#htmlconfig").attr("support_table_formula_types");
if (!support_table_formula_types) return '';
@ -1191,7 +1103,7 @@
</div>
{$access_stats_code}
<script src="{$priv_style}/js/index.js?v=1133"></script>
<script src="{$priv_style}/js/index.js?v=1020"></script>
</body>
</html>

2
style/css/index.css

@ -1701,7 +1701,7 @@ li .select_icon, .pay_every .pay_icon{
.btnWrap{
justify-content: center;
}
.btn_mast{
.btn_mast ,.btn_result_now{
margin-right: 20px;
}
.btn_result,.btn_result_now,.downLoad,.btn_result_now2,.btn_mast{

71
style/js/index.js

@ -14,6 +14,8 @@ $(document).ready(function () {
var new_parent_ppt = 0; //弹框内选择的
var add_ppt = 0; //增值服务的ppt
var child_ppt = 0;
var currentTypeObj = {};
var allTypeObj = {};
var check_type = '94'
var child_src = ''
var curTypeWordsData = {}
@ -144,6 +146,8 @@ $(document).ready(function () {
success: function (res) {
if (res.status) {
allAiServicesData = res.data.ai_input_config;
allTypeObj = res.data.type2info;
currentTypeObj = res.data.type2info[check_type];
getCurWordsCount()
}
},
@ -333,6 +337,10 @@ $(document).ready(function () {
stepFlag = true;
geiAiUpgradeInfo(createCatalogue)
})
$('.btn_result').click(function () {
stepFlag = false;
geiAiUpgradeInfo(createCatalogue)
})
function createCatalogue() {
if (!$('.agree-item').hasClass('active')) {
@ -356,16 +364,20 @@ $(document).ready(function () {
}
let pathType = {
'94': 'aiessayzx',
'82': 'aiessayen'
'82': 'aiessayen',
'97': 'aiqikan',
}
var title = $(".inputChange").val();
var r = checkTitle(title);
if (!r) return;
if(allAiServicesData[check_type]['edu_radio']){
var edu = parseInt($('#educationRight').find('input[type="radio"]:checked').val());
if (edu <= 0 || !edu) {
alert("请选择您的学历");
return;
}
}
if (chkType != '82' && $('.form_essayWords').css('display') !== 'none') {
var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val());
if (wordnums <= 0 || isNaN(wordnums)) {
@ -373,15 +385,16 @@ $(document).ready(function () {
return;
}
}
if(allAiServicesData[check_type]['major']){
var major = parseInt($('.dropdown-input').attr('selected_val'));
if (major <= 0 || !major) {
alert("请选择您的专业");
return;
}
}
var table_and_formulas_obj = $('#paper-table_and_formulas-wrapper').find('input:checked');
var table_and_formulas = '';
if(allAiServicesData[check_type]['content_type']){
for (var index = 0; index < table_and_formulas_obj.length; index++) {
var table_and_formulasval = table_and_formulas_obj.eq(index).val();
if (table_and_formulas == '') {
@ -390,6 +403,7 @@ $(document).ready(function () {
}
table_and_formulas += ',' + table_and_formulasval;
}
}
//固定外部链接
var url = service_domain + pathType[chkType] + "/catalogue?title=" + encodeURIComponent(title);
// var url = data.data.agent_domain + "/catalogue?title=" + encodeURIComponent(title);
@ -414,7 +428,7 @@ $(document).ready(function () {
}
setTimeout(() => {
window.open(url);
}, 1500)
}, 500)
}
});
}
@ -1060,6 +1074,7 @@ $(document).ready(function () {
$('.step_line').removeClass('suc_step_line')
$('.normal_step').eq(0).addClass('active_step')
}
// 切换服务
$('.main_select li').click(function (e) {
if ($('li').hasClass('active_select')) {
$('li').removeClass('active_select')
@ -1072,25 +1087,27 @@ $(document).ready(function () {
clearhisText() //清空记录
var t = $('li.active_select').attr('type');
check_type = t;
currentTypeObj = allTypeObj[check_type];
// 设置字数限制
if(currentTypeObj.title_max){
setInputText_length(currentTypeObj.title_max)
}
//重置步骤条状态
resetStep_status()
//重置ppt模板选择
old_parent_ppt = null; //首页选择的
new_parent_ppt = 0; //弹框内选择的
$('.form_pptItem .ppt_tem_item').removeClass('ppt_item_active')
// if(!$('.step_add_three').hasClass('hide')){
// $('.step_add_three').addClass('hide')
// }
if (t == '94') { //字数
setDomShow(['.form_essayWords', '.side_info', '.step_two', '.checkbox_wrap'])
setDomShow(['.side_info', '.step_two', '.checkbox_wrap'])
$('.key_words').addClass('hide')
getadd_Value('94')
} else {
setDomHide(['.form_essayWords', '.side_info', '.step_two', '.checkbox_wrap'])
setDomHide(['.side_info', '.step_two', '.checkbox_wrap'])
$('.key_words').removeClass('hide')
}
if (t == '94' || t == '82') {
if (allAiServicesData[check_type]['outline']) {
setDomShow(['[step="3"]', '.btn_result', '.step_two', '.btn_mast'])
setDomHide(['[step="2"]', '.btn_result_now'])
$('.normal_step3').removeClass('step_three')
@ -1103,6 +1120,11 @@ $(document).ready(function () {
$('.normal_step3').addClass('step_three')
$('.payModal_main').html(payhtml)
$('.pay_complete_main').html('')
if(t == '97'){
setDomShow(['.btn_result'])
}else{
setDomHide(['.btn_result'])
}
}
if (t == '64') {
$('.key_words').show()
@ -1115,35 +1137,28 @@ $(document).ready(function () {
$('.opt-advise').show()
}
if (['81', '85'].indexOf(t) !== -1) { //
// $('.coreContent').show();
$('#charCount').html('0/200')
} else {
// $('.coreContent').hide();
}
if (t == '62' || t == '63') {
setInputText_length('500')
} else if (t == '82') {
setInputText_length('200')
if (t == '82') {
getadd_Value('82')
} else {
setInputText_length('100')
}
if (t == '96') {
setInputText_length('300')
if (allAiServicesData[check_type]['ppt_tpl']) {
$('.form_pptItem').show()
$('#formInputSumbtn').html('生成答辩PPT')
} else {
$('.form_pptItem').hide()
$('#formInputSumbtn').html('立即生成')
}
if (t == '97' || t == '81') {
setDomShow(['.form_essayWords'])
// if (t == '97' || t == '81') {
if (allAiServicesData[check_type]['word_count']) {
setDomShow(['.form_essayWords']);
var wordsData = allAiServicesData[check_type]['word_count_list'];
renderWordsHtml(wordsData)
if (t == '97') {
setInputText_length('100')
}
renderWordsHtml(wordsData);
}else{
setDomHide(['.form_essayWords'])
}
// else{
// setDomHide(['.form_essayWords','.coreContent'])
// }

Loading…
Cancel
Save