From ccb9af9b1726147916936a8d00022788340568c0 Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Fri, 28 Feb 2025 17:24:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=BA=E6=96=87=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=A1=B5=E6=A0=B7=E5=BC=8F=E5=8F=8A=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home.html | 18 +- style/css/index.css | 88 ++++- style/js/index.js | 1077 +++++++++++++++++++++++++++++---------------------- 3 files changed, 706 insertions(+), 477 deletions(-) diff --git a/home.html b/home.html index 3209f34..604b03d 100644 --- a/home.html +++ b/home.html @@ -9,7 +9,7 @@ {if $_siteinfo.site_introduction_name}{$_siteinfo.site_introduction_name}{else}AI论文{/if} {if $site_ico} {/if} - + @@ -453,6 +453,8 @@ '3': '硕博' } var service_domain = location.origin+'/'; + // var service_domain = 'https://zq.pengda.checkcopy.com/' + // var service_domain = 'https://www.90616.com/' $(document).ready(function () { @@ -1055,6 +1057,10 @@
+
+ + 系统仅保留7天以内的论文范文,超过7天则被删除,来确保您的论文安全。请尽早下载您的论文范文。 +

论文下载

@@ -1093,16 +1099,14 @@

咦~ 还没有订单号呢?

-
- - 系统仅保留7天以内的论文范文,超过7天会被删除,请尽早下载您的论文范文。 -
@@ -1187,7 +1191,7 @@ {$access_stats_code} - + \ No newline at end of file diff --git a/style/css/index.css b/style/css/index.css index f6de244..f121241 100644 --- a/style/css/index.css +++ b/style/css/index.css @@ -2039,7 +2039,7 @@ footer a{ flex-direction: column; } .report_content{ - width: 600px; + width: 956px; text-align: center; /* display: flex; flex-direction: column; @@ -2243,7 +2243,7 @@ footer a{ position: absolute; border-radius: 4px; top: 35px; - left: -81px; + left: 90px; box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16); } .report_content .findtid-wrap::before{ @@ -2259,8 +2259,8 @@ footer a{ border-bottom: 15px solid white; } .report_content .report_detail{ - width: 600px; - height: 360px; + width: 956px; + min-height: 360px; border-radius: 6px; opacity: 1; background: rgba(255, 255, 255, 0.8); @@ -2275,17 +2275,18 @@ footer a{ flex-direction: column; color: #1D2837; height: 100%; + padding-top: 100px; } -.report_box .report_mes{ +.report_mes{ color: #EE7000; border-radius: 6px; background: rgba(236, 133, 51, 0.12); padding: 8px 16px; } .report_main{ - width: calc(100% - 52px); + width: calc(100%); height: calc(100% - 52px); - padding: 26px; + /* padding: 26px; */ display: flex; flex-direction: column; align-items: center; @@ -2314,13 +2315,86 @@ footer a{ .main_item p.report_finish{ color: #3BB551; } +button:disabled { + background: #94A3B7; + color: #fff; + user-select: none; + cursor: not-allowed !important; +} +.primary_btn { + border: none; + font-weight: 600; + background: #1675FF; + color: #fff; +} .report_main .main_top{ flex: 1; + width: 543px; + padding-top: 26px; +} +.main_top2 { width: 100%; } .report_main .waiting{ color:#EE7000; } + +.main_orderList{ + display: flex; + justify-content: space-between; + color: #2C394B; + padding: 20px 24px; + background: rgba(243, 243, 243, 0.6); +} +.main_orderList b{ + font-weight: 500; +} +.main_orderList div{ + font-size: 16px; + color: #2C394B; +} +.reportlist-item{ + padding: 20px 24px; +} +.reportlist-item-desc{ + padding: 24px 0; + justify-content: space-between; +} +.reportlist-item .primary_btn{ + width: 100px; + height: 31px; + padding: 6px 36px; + float: right; + border-radius: 4px; +} +button:disabled{ + background: #94A3B7; + color: #fff; +} +.reportlist-item, .reportlist-item p{ + color: #333333; + text-align: left; + font-weight: 500; +} +.reportlist-item div{ + display: flex; +} + .reportlist-item span{ + color: #5C6E86; + font-weight: normal; +} + .reportlist-item b{ + font-weight: 500; + display: flex; + align-items: center; + margin-left: 12px; +} +.reportlist-item b img{ + margin-right: 4px; +} +.main_top1 { + width: 543px; +} .report_main .downLoad{ width: 130px; padding: 11px 0; diff --git a/style/js/index.js b/style/js/index.js index 6658d73..9eee0b4 100644 --- a/style/js/index.js +++ b/style/js/index.js @@ -1,117 +1,116 @@ -$(document).ready(function() { +$(document).ready(function () { var notRadio = ''; var yesRadio = ''; var notChecked = ''; var checked = ''; var payResultTimer = null; - var service_domain = location.origin+'/'; - // var service_domain = 'https://www.90616.com/' + // var service_domain = location.origin+'/'; + var service_domain = 'https://www.90616.com/' // var service_domain = 'https://aitest.chachongz.com/' + // var service_domain = 'https://zq.pengda.checkcopy.com/' var isPayDialog = false - var allPostData=new Object() - var old_parent_ppt = null;//首页选择的 - var new_parent_ppt = 0;//弹框内选择的 - var add_ppt = 0;//增值服务的ppt + var allPostData = new Object() + var old_parent_ppt = null; //首页选择的 + var new_parent_ppt = 0; //弹框内选择的 + var add_ppt = 0; //增值服务的ppt var child_ppt = 0; var check_type = '94' var child_src = '' var curTypeWordsData = {} var allAiServicesData = {} var value_added_servicesList = null; - var value_added_select = [];//已选择的增值服务 + var value_added_select = []; //已选择的增值服务 var stepFlag = false; var table_and_formulas = ''; - var noCheckList = ['62','63','81'] + var noCheckList = ['62', '63', '81'] var cssurl = $('#styleUrl').attr('url'); // var cssurl= './style/img/'//dev - var pptUrlList = [ - { - name:'清新绿意通用模版', - url:'', - list:[], - ppt_id:'2' + var pptUrlList = [{ + name: '清新绿意通用模版', + url: '', + list: [], + ppt_id: '2' }, { - name:'蓝色启航通用模版', - ppt_id:'3' + name: '蓝色启航通用模版', + ppt_id: '3' }, { - name:'蓝色梦境通用模版', - ppt_id:'5' + name: '蓝色梦境通用模版', + ppt_id: '5' }, { - name:'棕韵蓝调通用模版', - ppt_id:'6' + name: '棕韵蓝调通用模版', + ppt_id: '6' }, { - name:'绿野金辉通用模版', - ppt_id:'7' + name: '绿野金辉通用模版', + ppt_id: '7' }, { - name:'深邃星空通用模版', - ppt_id:'8' + name: '深邃星空通用模版', + ppt_id: '8' }, { - name:'毕业庆典通用模版', - ppt_id:'9' + name: '毕业庆典通用模版', + ppt_id: '9' }, { - name:'生命之链通用模版', - ppt_id:'10' + name: '生命之链通用模版', + ppt_id: '10' }, { - name:'云水之间通用模版', - ppt_id:'11' + name: '云水之间通用模版', + ppt_id: '11' }, { - name:'金色地标通用模版', - ppt_id:'12' + name: '金色地标通用模版', + ppt_id: '12' }, - - + + ] - var checkTypeList={ - '94':'毕业论文', - '81':'课程论文', + var checkTypeList = { + '94': '毕业论文', + '81': '课程论文', // '85':'职称论文', - '97':'职称论文', - '62':'开题报告', - '64':'论文选题', - '91':'文献综述', - '96':'答辩PPT', - '63':'任务书', - '82':'英文论文', + '97': '职称论文', + '62': '开题报告', + '64': '论文选题', + '91': '文献综述', + '96': '答辩PPT', + '63': '任务书', + '82': '英文论文', } - var tableType={ - '1':'图片', - '2':'表格', - '3':'公式', - '4':'代码', + var tableType = { + '1': '图片', + '2': '表格', + '3': '公式', + '4': '代码', } - var addservicedsDescList = [ - { - title:'论文封面', - desc:'贴合学校查重结果,原创力MAX' + var addservicedsDescList = [{ + title: '论文封面', + desc: '贴合学校查重结果,原创力MAX' }, { - title:'论文封面', - desc:'规范整洁的第一页很重要哦' + title: '论文封面', + desc: '规范整洁的第一页很重要哦' }, { - title:'论文提纲', - desc:'对应正文内容,赠送提纲' + title: '论文提纲', + desc: '对应正文内容,赠送提纲' }, { - title:'论文摘要', - desc:'精炼总结,一眼抓住研究核心' + title: '论文摘要', + desc: '精炼总结,一眼抓住研究核心' }, { - title:'论文致谢', - desc:'感恩有“你”,温馨致谢' + title: '论文致谢', + desc: '感恩有“你”,温馨致谢' }, { - title:'参考文献', - desc:'权威引用,规范格式,真实可查' + title: '参考文献', + desc: '权威引用,规范格式,真实可查' } ] // window.addEventListener('resize', function(event) { @@ -122,51 +121,54 @@ $(document).ready(function() { // // $('.look_backImg').css('width',347*(740/428)) // // } // }); - $(function(){ + $(function () { bindFileUpload(); initFun() }); - function initFun(){ + + function initFun() { getadd_Value('94') getWordsCount() scrollView() } // 渲染字数数据 - - function getWordsCount(){ + + function getWordsCount() { $.ajax({ type: "post", - dataType:'json', - url: service_domain +'ajax_get_ai_services', + dataType: 'json', + url: service_domain + 'ajax_get_ai_services', data: { // type - }, - success:function(res){ - if(res.status){ + }, + success: function (res) { + if (res.status) { allAiServicesData = res.data.ai_input_config; getCurWordsCount() } }, - error:function(err){ + error: function (err) { } }) } - function getCurWordsCount(){ + + function getCurWordsCount() { var wordsData = allAiServicesData[check_type]['major2wordcount']; - if(wordsData){ + if (wordsData) { var edu = parseInt($('#educationRight').find('.edu_active_select input').val()); // var edu1 = parseInt($('#educationRight').find('input[type="radio"]:checked').val()); renderWordsHtml(wordsData[edu]) } } - function renderWordsHtml(data){ + + function renderWordsHtml(data) { var html1 = '' - data.forEach(item=>{ + data.forEach(item => { html1 += `
- +
- +
` }) $('.words_content').html(html1) @@ -178,17 +180,17 @@ $(document).ready(function() { $('#educationRight').on('click', '.education input', function () { $('#educationRight .education').removeClass('edu_active_select'); $(this).parent().addClass('edu_active_select'); - if(check_type == '94'){ + if (check_type == '94') { getCurWordsCount() } }) //首页增值服务相关展示 let servicedsHtml = '' - addservicedsDescList.forEach((item,i)=>{ + addservicedsDescList.forEach((item, i) => { var url = `${cssurl}/img/gift${i+1}.svg` servicedsHtml += `
- `+item.title+` X1 -

`+item.desc+`

+ ` + item.title + ` X1 +

` + item.desc + `

` }) $('.left_ai_listMes').html(servicedsHtml) @@ -197,14 +199,14 @@ $(document).ready(function() {
- + 微信支付 - +
- + 支付宝支付 - +
@@ -217,19 +219,19 @@ $(document).ready(function() {
- + 支付成功!订单号是下载范文唯一凭证

- + 微信扫码,随时获知生成状态

订单号:OIY898998787721878233 - +

@@ -239,7 +241,7 @@ $(document).ready(function() {
` @@ -252,54 +254,55 @@ $(document).ready(function() { // console.log(error); // }); -// 首页增值服务相关 + // 首页增值服务相关 var add_item_valueText = { - '62':'选题正文一步到位', - '63':'导师看了都说好', - '96':'可自定义风格,答辩最靓的仔', + '62': '选题正文一步到位', + '63': '导师看了都说好', + '96': '可自定义风格,答辩最靓的仔', } var add_item_valueUrl = { - '62': cssurl +'/img/kaiti_preview.png', - '63': cssurl +'/img/renwushu_preview.png', - '96':'', - 'AIGC': cssurl +'/img/AIGC_preview.png' + '62': cssurl + '/img/kaiti_preview.png', + '63': cssurl + '/img/renwushu_preview.png', + '96': '', + 'AIGC': cssurl + '/img/AIGC_preview.png' } - function getadd_Value(type){ + + function getadd_Value(type) { $.ajax({ type: "post", - dataType:'json', - url: service_domain +'ajax_get_value_added_services', + dataType: 'json', + url: service_domain + 'ajax_get_value_added_services', data: { type - }, - - success:function(res){ - if(res.status){ + }, + + success: function (res) { + if (res.status) { let addListBoxHtml = '' value_added_servicesList = Object.values(res.data.value_added_services); - value_added_servicesList.forEach((item,i)=>{ - if(item.type != '96'){ - addListBoxHtml+= `
+ value_added_servicesList.forEach((item, i) => { + if (item.type != '96') { + addListBoxHtml += `
-

`+item.name +`

+

` + item.name + `

- `+item.price_desc.slice(0,-3)+` + ` + item.price_desc.slice(0, -3) + ` 12.00元

预览
- +
` - }else{ - addListBoxHtml+= `
+ } else { + addListBoxHtml += `
-

`+item.name +`

+

` + item.name + `

- `+item.price_desc.slice(0,-3)+` + ` + item.price_desc.slice(0, -3) + ` 12.00元

@@ -308,7 +311,7 @@ $(document).ready(function() {

当前模板

清新绿意通用模板 - +

` @@ -316,20 +319,21 @@ $(document).ready(function() { }) $('.addListBox').html(addListBoxHtml) // $('.addListBox') - }else{ + } else { alert(res.info) } - + }, - error:function(){ + error: function () { alert('网络错误1'); } }) } - $('.btn_mast').click(function(){ + $('.btn_mast').click(function () { stepFlag = true; geiAiUpgradeInfo(createCatalogue) }) + function createCatalogue() { if (!$('.agree-item').hasClass('active')) { alert("请阅读并勾选同意《服务条款》"); @@ -414,6 +418,7 @@ $(document).ready(function() { } }); } + function showNextStep(title, chkType, wordnums, eduObj, edu) { //修改步骤条状态 $('.step_line').removeClass('suc_step_line') @@ -439,6 +444,7 @@ $(document).ready(function() { // } showPayModal() } + function geiAiUpgradeInfo(callback, param) { $.ajax({ type: "post", @@ -456,19 +462,19 @@ $(document).ready(function() { } }); } - $('.addListBox').on('click','.add_lookPPT',function(){ + $('.addListBox').on('click', '.add_lookPPT', function () { $('.look_PPT_modal').removeClass('hide') if (!$('.look_PPT_modal').hasClass('hide')) { - if(add_ppt !== null){ + if (add_ppt !== null) { setLookPPT_active(add_ppt) - }else{ + } else { setLookPPT_active(0) } setLeftShow(add_ppt != null ? add_ppt : 0) } }) // 增值服务 选择 - $('.addListBox').on('click','.title',function(){ + $('.addListBox').on('click', '.title', function () { if ($(this).parent().parent().hasClass('add_active')) { $(this).parent().parent().removeClass('add_active'); payAction() @@ -479,31 +485,31 @@ $(document).ready(function() { }) //点击生成 // $('#click_AI_moretext').click(function(){ - function showPayModal(){ + function showPayModal() { var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); let title = $('.inputChange').val(); // pay_completeDetailMes let html1 = '' html1 += `
写作题目: - `+title+` + ` + title + `
` - html1 +=`
+ html1 += `
写作类型: - `+checkTypeList[check_type]+` + ` + checkTypeList[check_type] + `
` - - html1 +=`
+ + html1 += `
论文金额: ---元
` - if(check_type == '94'){ - html1 +=`
+ if (check_type == '94') { + html1 += `
字  数: - 约`+wordnums+`字 + 约` + wordnums + `字
` var table_and_formulas_obj = $('#paper-table_and_formulas-wrapper').find('input:checked'); - if(table_and_formulas_obj.length >0){ + if (table_and_formulas_obj.length > 0) { var table_and_formulas_text = []; for (var index = 0; index < table_and_formulas_obj.length; index++) { var table_and_formulasval = table_and_formulas_obj.eq(index).val(); @@ -517,7 +523,7 @@ $(document).ready(function() { } html1 += `
正文包含: - `+table_and_formulas_text.join('、')+` + ` + table_and_formulas_text.join('、') + `
` } } @@ -527,39 +533,39 @@ $(document).ready(function() { } //step监听滚动位置 -// new QRCode(document.getElementById("qrcode"), { -// text: 'weixin://wxpay/bizpayurl?pr=BbrGBgBz3', -// width: 135, -// height: 135, -// colorDark : "#000000", -// colorLight : "#ffffff", -// correctLevel : QRCode.CorrectLevel.H -// }); - function scrollView(){ - $(window).scroll(function() { - var element = $('.step_back'); - var element2 = $('.footer'); + // new QRCode(document.getElementById("qrcode"), { + // text: 'weixin://wxpay/bizpayurl?pr=BbrGBgBz3', + // width: 135, + // height: 135, + // colorDark : "#000000", + // colorLight : "#ffffff", + // correctLevel : QRCode.CorrectLevel.H + // }); + function scrollView() { + $(window).scroll(function () { + var element = $('.step_back'); + var element2 = $('.footer'); // console.log($(this).scrollTop(),'$(this).scrollTop()'); var distanceToTop = element.offset().top - $(this).scrollTop(); - if(distanceToTop <= 64){ - if($('.main_page_top').hasClass('hide'))return + if (distanceToTop <= 64) { + if ($('.main_page_top').hasClass('hide')) return element.addClass('stickyStep') element2.addClass('footer2') - - }else{ + + } else { element.removeClass('stickyStep') element2.removeClass('footer2') } }); } - $('.right_btn').click(function(){ + $('.right_btn').click(function () { $('.right_btn').removeClass('activebtn') $(this).addClass('activebtn') - if($(this).attr('type') == '1'){ + if ($(this).attr('type') == '1') { $('.main_page_top').removeClass('hide') $('.main_page').removeClass('hide') $('#report_page').addClass('hide') - }else{ + } else { $('.main_page_top').addClass('hide') $('.main_page').addClass('hide') $('#report_page').removeClass('hide') @@ -574,70 +580,78 @@ $(document).ready(function() { // console.log(data); // } //标题输入字数 - $('.inputChange').on('input', function() { + $('.inputChange').on('input', function () { var maxLength = $('.inputText').attr('max'); var currentLength = $(this).val().length; - if(currentLength > 0){ + if (currentLength > 0) { $('.normal_recommend_title').addClass('recommend_title') - }else{ + } else { $('.normal_recommend_title').removeClass('recommend_title') } $('.inputText').text(currentLength + '/' + maxLength); - if(currentLength >maxLength){ + if (currentLength > maxLength) { $('.inputText').addClass('warnInputText') - }else{ + } else { $('.inputText').removeClass('warnInputText') // $('.inputText').removeClass('recommend_title') } }); - $('.payModal_main').on('click','.pay_every',function(){ + $('.payModal_main').on('click', '.pay_every', function () { if ($('.payModal_main .pay_every').hasClass('pay_active')) { $('.payModal_main .pay_every').removeClass('pay_active') } $(this).addClass('pay_active') let pay_type = $('.pay_active').attr('pay_type'); - allPostData = {...allPostData,pay_type} + allPostData = { + ...allPostData, + pay_type + } payAction() }) - $('.pay_complete_main').on('click','.pay_every',function(){ + $('.pay_complete_main').on('click', '.pay_every', function () { if ($('.pay_complete_main .pay_every').hasClass('pay_active')) { $('.pay_complete_main .pay_every').removeClass('pay_active') } $(this).addClass('pay_active') let pay_type = $('.pay_active').attr('pay_type'); - allPostData = {...allPostData,pay_type} + allPostData = { + ...allPostData, + pay_type + } payAction() }) - $('.close_modal').on('click',function(e){ + $('.close_modal').on('click', function (e) { $('.pageMask').addClass('hide'); - if(!$('.pay_complete_modal').hasClass('hide')){ + if (!$('.pay_complete_modal').hasClass('hide')) { $('.pay_complete_modal').addClass('hide'); - if($('.pay_complete_modal .modal_mes').hasClass('hide')){ + if ($('.pay_complete_modal .modal_mes').hasClass('hide')) { $('.pay_complete_modal .modal_mes').removeClass('hide') } - if($('.pay_complete_modal .pay_content').hasClass('hide')){ + if ($('.pay_complete_modal .pay_content').hasClass('hide')) { $('.pay_complete_modal .pay_content').removeClass('hide') } - }else{ + } else { $('.payModal').addClass('hide'); - if(!$('.payModal .pay_detail').hasClass('hide')){ + if (!$('.payModal .pay_detail').hasClass('hide')) { $('.payModal .pay_detail').addClass('hide') } - if($('.payModal .modal_mes').hasClass('hide')){ + if ($('.payModal .modal_mes').hasClass('hide')) { $('.payModal .modal_mes').removeClass('hide') } - if($('.payModal .pay_content').hasClass('hide')){ + if ($('.payModal .pay_content').hasClass('hide')) { $('.payModal .pay_content').removeClass('hide') } } clearTimeout(payResultTimer); }) + function getPayType() { var paytype = $('.pay_active').attr('pay_type'); return paytype; } - function payAction(){ - var flag = noCheckList.includes(check_type) + + function payAction() { + var flag = noCheckList.includes(check_type) value_added_select = []; let check_type1 = $('li.active_select').attr('type'); check_type = check_type1 @@ -645,17 +659,17 @@ $(document).ready(function() { let pay_type = getPayType(); let title = $('.inputChange').val().trim(); // let add_selected = [] - $('.addListBox .add_active').each(function() { + $('.addListBox .add_active').each(function () { let value = $(this).attr('type'); - let this_item = value_added_servicesList.forEach(item=> { - if(item.type == value){ + let this_item = value_added_servicesList.forEach(item => { + if (item.type == value) { value_added_select.push(item.type) } return item.type == value }) // add_selected.push(...this_item) }); - if(check_type == '') { + if (check_type == '') { alert('提交类型不合法'); errorJump(); return false; @@ -667,54 +681,54 @@ $(document).ready(function() { get_pay_goods: '1', } if ($('.opt-advise').css('display') !== 'none') { - if(title == ''){ + if (title == '') { alert('提交标题不能为空'); return; } - if(check_type == '62' ||check_type == '63'){ - if(title.length >500){ + if (check_type == '62' || check_type == '63') { + if (title.length > 500) { alert('论文标题不得多于500字'); // errorJump(); - $('.inputChange').val('')//重置输入框文本 + $('.inputChange').val('') //重置输入框文本 $('.inputText').text('0/500') $('.inputText').removeClass('warnInputText') return; } - }else if(check_type == '96'){ - if(title.length >100){ + } else if (check_type == '96') { + if (title.length > 100) { alert('论文标题不得多于300字'); - $('.inputChange').val('')//重置输入框文本 + $('.inputChange').val('') //重置输入框文本 $('.inputText').text('0/300') $('.inputText').removeClass('warnInputText') return; } } - if(title.length >100){ + if (title.length > 100) { alert('论文标题不得多于100字'); - $('.inputChange').val('')//重置输入框文本 + $('.inputChange').val('') //重置输入框文本 $('.inputText').text('0/100') $('.inputText').removeClass('warnInputText') return; } } - if(check_type == '64'){ + if (check_type == '64') { title = $('.key_words_input').val().trim() - if(title == ''){ + if (title == '') { alert('关键词不能为空'); return; } - if(title.length >50){ + if (title.length > 50) { alert('关键词不得多于50字'); - $('.inputChange').val('')//重置输入框文本 + $('.inputChange').val('') //重置输入框文本 return; } postData.title = title } - if ($('.coreContent').css('display') !== 'none'){ + if ($('.coreContent').css('display') !== 'none') { postData.core_content = $('#coreTextarea').val() } - if(!$('.custom-dropdown').hasClass('disNone') && !flag){ - var major= parseInt($('.dropdown-input').attr('selected_val')) + if (!$('.custom-dropdown').hasClass('disNone') && !flag) { + var major = parseInt($('.dropdown-input').attr('selected_val')) if (major <= 0 || !major) { alert("请选择您的专业"); return; @@ -723,14 +737,14 @@ $(document).ready(function() { if ($('.form_essayWords').css('display') !== 'none') { var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); if (wordnums <= 0 || isNaN(wordnums)) { - if(check_type!= '81'){ + if (check_type != '81') { alert("请选择您的字数"); return; } } postData.aiessay_wordnum = wordnums; } - if(check_type == '96'){ + if (check_type == '96') { if (!old_parent_ppt) { alert("请选择ppt模板"); return; @@ -739,7 +753,7 @@ $(document).ready(function() { var upload_file_md5 = $("#upload_file_md5").val(); var upload_file_name = $("#upload_file_name").val(); var upload_file_tmpname = $("#upload_file_tmpname").val(); - + if (!upload_file_md5 || !upload_file_name || !upload_file_tmpname) { alert("请上传论文文件"); return; @@ -753,17 +767,22 @@ $(document).ready(function() { postData.upload_file_name = upload_file_name; postData.upload_file_tmpname = upload_file_tmpname; } - if(check_type == '94'){ - if(value_added_select.indexOf('96') > -1){ + if (check_type == '94') { + if (value_added_select.indexOf('96') > -1) { postData.ppt_tpl = pptUrlList[add_ppt]['ppt_id']; } var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); postData.aiessay_wordnum = wordnums; } - if(check_type == '94' || check_type == '82'){ + if (check_type == '94' || check_type == '82') { postData.value_added_services = value_added_select.join(',') } - allPostData = {...allPostData,check_flag,recharge_goods_id:'0',...postData} + allPostData = { + ...allPostData, + check_flag, + recharge_goods_id: '0', + ...postData + } $('.normal_step').removeClass('active_step') $('.step_line').removeClass('suc_step_line') $('.step_line').eq(0).addClass('suc_step_line') @@ -772,82 +791,85 @@ $(document).ready(function() { //检验信息 getPayQrcode(postData) } - function clearhisText(){ - $('.inputChange').val('')//重置输入框文本 - $('.key_words_input').val('')//重置输入框文本 + + function clearhisText() { + $('.inputChange').val('') //重置输入框文本 + $('.key_words_input').val('') //重置输入框文本 $('.inputText').text('0/100') $('#project_select').val('') $('.coreWordCount').val('') - if($('.normal_recommend_title').hasClass('recommend_title'))$('.normal_recommend_title').removeClass('recommend_title') + if ($('.normal_recommend_title').hasClass('recommend_title')) $('.normal_recommend_title').removeClass('recommend_title') } + function errorJump() { // if(isPayDialog) { - location.reload(); - return; + location.reload(); + return; // } // location.href = '/'; } - $('#formInputSumbtn').on('click',function(e){ - + $('#formInputSumbtn').on('click', function (e) { + payAction() }) - function getPayQrcode(postData){ + + function getPayQrcode(postData) { $.ajax({ type: "post", url: '/bd_buy_click_log', - async:false, - success: function(jsondata2) { - } + async: false, + success: function (jsondata2) {} }); // let pay_type = getPayType(); // postData.pay_type = pay_type $.ajax({ type: "post", - dataType:'json', - url: service_domain + allPostData.check_flag+'/ajax_check_aisubmit', + dataType: 'json', + url: service_domain + allPostData.check_flag + '/ajax_check_aisubmit', data: { ...postData - }, + }, success: function (res) { - if(res.data && res.data.user_not_enough_money) { - if(check_type !== '94' && check_type !== '82'){ - if(isPayDialog){ + if (res.data && res.data.user_not_enough_money) { + if (check_type !== '94' && check_type !== '82') { + if (isPayDialog) { $('.pageMask').addClass('hide'); $('.payModal').addClass('hide'); } $('.pageMask').removeClass('hide'); $('.payModal').removeClass('hide'); - $('.pay_message').html(`写作题目:

`+ postData.title+`

- 写作类型:

`+ checkTypeList[postData.check_type]+`

+ $('.pay_message').html(`写作题目:

` + postData.title + `

+ 写作类型:

` + checkTypeList[postData.check_type] + `

订单金额:

—— 元

`) // $('.payCode').removeClass('hide'); // $('.pay_content').html = $('#payCode').html isPayDialog = true - }else{ + } else { $('.pageMask').removeClass('hide') $('.pay_complete_modal').removeClass('hide') - $('.textPrice').html(res.data.user_not_enough_money+'元') + $('.textPrice').html(res.data.user_not_enough_money + '元') } - if(postData.pay_type == 2 || postData.pay_type == 3){ + if (postData.pay_type == 2 || postData.pay_type == 3) { getRechargePayUrl() // getRechargeGoods(payInfo, configData); } - }else{ + } else { alert(res.info) } } }); } - function getRechargePayUrl(){ + + function getRechargePayUrl() { var postData1 = new Object(); postData1.type = allPostData.check_type; postData1.pay_type = allPostData.pay_type; postData1.title = allPostData.title; - if(!$('.custom-dropdown').hasClass('disNone')){ - var major= parseInt($('.dropdown-input').attr('selected_val')) + if (!$('.custom-dropdown').hasClass('disNone')) { + var major = parseInt($('.dropdown-input').attr('selected_val')) postData1.aiessay_major = major } - if(!$('.formItem_pro').hasClass('disNone')){ + if (!$('.formItem_pro').hasClass('disNone')) { var edu = parseInt($('#educationRight').find('input[type="radio"]:checked').val()); postData1.aiessay_edu = edu } @@ -855,41 +877,43 @@ $(document).ready(function() { var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); postData1.aiessay_wordnum = wordnums } - if(postData1.type == '81' || postData1.type == '85'){ - postData1.core_content = $('.core_content').val()//核心内容 + if (postData1.type == '81' || postData1.type == '85') { + postData1.core_content = $('.core_content').val() //核心内容 } - if(postData1.type == '96'){ + if (postData1.type == '96') { var pptid = pptUrlList[old_parent_ppt]['ppt_id']; var upload_file_md5 = $("#upload_file_md5").val(); var upload_file_name = $("#upload_file_name").val(); var upload_file_tmpname = $("#upload_file_tmpname").val(); postData1.ppt_tpl = pptid; - postData1.recharge_goods_id=0 + postData1.recharge_goods_id = 0 postData1.upload_file_md5 = upload_file_md5; postData1.upload_file_name = upload_file_name; postData1.upload_file_tmpname = upload_file_tmpname; } - if(postData1.type == '94'){ - if(value_added_select.indexOf('96') > -1){ + if (postData1.type == '94') { + if (value_added_select.indexOf('96') > -1) { postData1.ppt_tpl = pptUrlList[add_ppt]['ppt_id']; } // table_and_formulas - if(table_and_formulas !== ''){ + if (table_and_formulas !== '') { postData1.table_and_formulas = table_and_formulas; } var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); postData1.aiessay_wordnum = wordnums; } - if(postData1.type == '82' || postData1.type == '94'){ + if (postData1.type == '82' || postData1.type == '94') { postData1.value_added_services = value_added_select.join(',') } $.ajax({ - url:service_domain+allPostData.check_flag+'/ajax_get_ai_pay_url', - type:'post', - dataType:'json', - data:{...postData1}, - success:function(res){ - if(res.status){ + url: service_domain + allPostData.check_flag + '/ajax_get_ai_pay_url', + type: 'post', + dataType: 'json', + data: { + ...postData1 + }, + success: function (res) { + if (res.status) { $('#qrcode').html(''); $('#qrcode').attr('tid', res.data.tid); $('#qrcode').attr('paytype', postData1.pay_type); @@ -899,84 +923,84 @@ $(document).ready(function() { text: res.data.qrcode_url, width: 135, height: 135, - colorDark : "#000000", - colorLight : "#ffffff", - correctLevel : QRCode.CorrectLevel.H + colorDark: "#000000", + colorLight: "#ffffff", + correctLevel: QRCode.CorrectLevel.H }); getRechargePayResult(res.data) - }else{ + } else { alert(res.info); } }, - error:function(){ + error: function () { alert('网络错误1'); } }); } - function getRechargePayResult(payinfo){ + function getRechargePayResult(payinfo) { // console.log(payinfo,'payinfo'); clearTimeout(payResultTimer); if (payinfo.tid) { ptid = payinfo.tid; } $.ajax({ - url:service_domain+ allPostData.check_flag +'/ajax_get_ai_pay_result', - type:'post', - dataType:'json', - data:{ - tid:ptid, - pay_type:getPayType() + url: service_domain + allPostData.check_flag + '/ajax_get_ai_pay_result', + type: 'post', + dataType: 'json', + data: { + tid: ptid, + pay_type: getPayType() }, - success:function(res){ - if(res.status){ - if(res.data.pay_status == 'NOTPAY') { - payResultTimer = setTimeout(function(){ + success: function (res) { + if (res.status) { + if (res.data.pay_status == 'NOTPAY') { + payResultTimer = setTimeout(function () { getRechargePayResult(payinfo); }, 2000); return; - }else if(res.data.pay_status == 'SUCCESS'){ + } else if (res.data.pay_status == 'SUCCESS') { // if(isPayDialog){ - // $('.pageMask').addClass('hide'); - $('.pay_content').addClass('hide'); - $('.modal_mes').addClass('hide'); - $('.pay_detail').removeClass('hide'); + // $('.pageMask').addClass('hide'); + $('.pay_content').addClass('hide'); + $('.modal_mes').addClass('hide'); + $('.pay_detail').removeClass('hide'); // } payresultAction(res) } clearTimeout(payResultTimer); return; } - + clearTimeout(payResultTimer); alert(res.info); }, - error:function(err){ + error: function (err) { alert('网络错误2'); } }); - + } // payresultAction({data:{tid:'99237482378','wechat_qrcode_url':'iuyeriuweyi'}}) function payresultAction(res) { var data = res.data; - if(data.wechat_qrcode_url){ + if (data.wechat_qrcode_url) { $('#pay_succ_tid').text(data.tid) $('#qrcode1').attr('src', data.wechat_qrcode_url); } // $('.pay_complete_modal') - $('.pay_complete_modal').on('click','.payresultBtn2',function(){ - goLoadDown(data.tid,'.pay_complete_modal') + $('.pay_complete_modal').on('click', '.payresultBtn2', function () { + goLoadDown(data.tid, '.pay_complete_modal') // $('.user_none').addClass('hide')//取消禁用 // $('.step_add_three').addClass('hide')//恢复进度 }) - $('.payModal').on('click','.payresultBtn2',function(){ - goLoadDown(data.tid,'.payModal') + $('.payModal').on('click', '.payresultBtn2', function () { + goLoadDown(data.tid, '.payModal') }) - $('.payresultBtn1').click(function(){ + $('.payresultBtn1').click(function () { // if(isPayDialog) { - location.reload(); - return; + location.reload(); + return; // } }); $('#copy_tid').unbind('click'); @@ -985,124 +1009,138 @@ $(document).ready(function() { return $('#pay_succ_tid').text(); } }); - clipboard2.on('success', function(e) { + clipboard2.on('success', function (e) { alert('复制成功') }) } - $('.step_main').on('click','.normal_step1',function(){ - window.scrollTo({ top: 200, behavior: 'smooth' }) + $('.step_main').on('click', '.normal_step1', function () { + window.scrollTo({ + top: 200, + behavior: 'smooth' + }) }) - $('.step_main').on('click','.normal_step2.success_step',function(){ - window.scrollTo({ top: 500, behavior: 'smooth' }) + $('.step_main').on('click', '.normal_step2.success_step', function () { + window.scrollTo({ + top: 500, + behavior: 'smooth' + }) }) - $('.step_main').on('click','.normal_step3.active_step',function(){ - if(check_type == '94'){ - window.scrollTo({ top: 1000, behavior: 'smooth' }) - }else{ - window.scrollTo({ top: 800, behavior: 'smooth' }) + $('.step_main').on('click', '.normal_step3.active_step', function () { + if (check_type == '94') { + window.scrollTo({ + top: 1000, + behavior: 'smooth' + }) + } else { + window.scrollTo({ + top: 800, + behavior: 'smooth' + }) } }) - function goLoadDown(tid,dom){ + + function goLoadDown(tid, dom) { $('.right_btn').removeClass('activebtn') $('.right_btn').eq(1).addClass('activebtn') $('.pageMask').addClass('hide'); - $(dom).addClass('hide');//支付弹框 + $(dom).addClass('hide'); //支付弹框 resetStep_status() clearhisText() $('.main_page_top').addClass('hide') $('.main_page').addClass('hide') $('#report_page').removeClass('hide') - $('.report_input').val(tid)//22383694321962804 + $('.report_input').val(tid) //22383694321962804 searchOrder() } - function resetStep_status (){ + + function resetStep_status() { $('.normal_step').removeClass('success_step') $('.normal_step').removeClass('active_step') $('.step_line').removeClass('suc_step_line') $('.normal_step').eq(0).addClass('active_step') } - $('.main_select li').click(function(e) { + $('.main_select li').click(function (e) { if ($('li').hasClass('active_select')) { $('li').removeClass('active_select') } $(this).addClass('active_select') - var element = $('.step_back'); - var element2 = $('.footer'); + var element = $('.step_back'); + var element2 = $('.footer'); element.removeClass('stickyStep') element2.removeClass('footer2') - clearhisText()//清空记录 + clearhisText() //清空记录 var t = $('li.active_select').attr('type'); check_type = t; //重置步骤条状态 resetStep_status() //重置ppt模板选择 - old_parent_ppt = null;//首页选择的 - new_parent_ppt = 0;//弹框内选择的 + 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']) + if (t == '94') { //字数 + setDomShow(['.form_essayWords', '.side_info', '.step_two', '.checkbox_wrap']) $('.key_words').addClass('hide') getadd_Value('94') - } else{ - setDomHide(['.form_essayWords','.side_info','.step_two','.checkbox_wrap']) + } else { + setDomHide(['.form_essayWords', '.side_info', '.step_two', '.checkbox_wrap']) $('.key_words').removeClass('hide') } - if(t == '94' || t == '82'){ - setDomShow(['[step="3"]','.btn_result','.step_two','.btn_mast']) - setDomHide(['[step="2"]','.btn_result_now']) + if (t == '94' || t == '82') { + setDomShow(['[step="3"]', '.btn_result', '.step_two', '.btn_mast']) + setDomHide(['[step="2"]', '.btn_result_now']) $('.normal_step3').removeClass('step_three') $('.payModal_main').html('') $('.pay_complete_main').html(payhtml) getCurWordsCount() - }else{ - setDomHide(['[step="3"]','.btn_result','.step_two','.btn_mast']) - setDomShow(['[step="2"]','.btn_result_now']) + } else { + setDomHide(['[step="3"]', '.btn_result', '.step_two', '.btn_mast']) + setDomShow(['[step="2"]', '.btn_result_now']) $('.normal_step3').addClass('step_three') $('.payModal_main').html(payhtml) $('.pay_complete_main').html('') } - if(t == '64'){ + if (t == '64') { $('.key_words').show() if ($('.opt-advise').css('display') !== 'none') { // 元素是隐藏的 $('.opt-advise').hide() } - }else{ + } else { $('.key_words').hide() $('.opt-advise').show() } - if (['81','85'].indexOf(t) !== -1) {// - // $('.coreContent').show(); + if (['81', '85'].indexOf(t) !== -1) { // + // $('.coreContent').show(); $('#charCount').html('0/200') - } else{ + } else { // $('.coreContent').hide(); } - if(t == '62' ||t == '63'){ + if (t == '62' || t == '63') { setInputText_length('500') - }else if(t=='82'){ + } else if (t == '82') { setInputText_length('200') getadd_Value('82') - }else{ + } else { setInputText_length('100') } - if(t == '96'){ + if (t == '96') { setInputText_length('300') $('.form_pptItem').show() $('#formInputSumbtn').html('生成答辩PPT') - }else{ + } else { $('.form_pptItem').hide() $('#formInputSumbtn').html('立即生成') } - if(t == '97' || t == '81'){ + if (t == '97' || t == '81') { setDomShow(['.form_essayWords']) var wordsData = allAiServicesData[check_type]['word_count_list']; renderWordsHtml(wordsData) - if(t == '97'){ + if (t == '97') { setInputText_length('100') } } @@ -1113,54 +1151,61 @@ $(document).ready(function() { //图表公式 var table_formula_types = getTableFormulaTypes('support_table_formula_types'); if (table_formula_types) { - if (table_formula_types.indexOf(t) !== -1) { - $('#paper-table_and_formulas-wrapper').parent().show(); - } else{ + if (table_formula_types.indexOf(t) !== -1) { + $('#paper-table_and_formulas-wrapper').parent().show(); + } else { $('#paper-table_and_formulas-wrapper').parent().hide(); } } - changeLiActive(t,'support_titleMore','.normal_recommend_title')// 标题优化 - changeLiActive(t,'support_pro','.custom-dropdown')// 专业优化 - changeLiActive(t,'support_edu','.formItem_pro')// 学历优化 - changeLiActive(t,'support_core','.coreContent')// 核心内容优化 - window.scrollTo({ top: 200, behavior: 'smooth' }) + changeLiActive(t, 'support_titleMore', '.normal_recommend_title') // 标题优化 + changeLiActive(t, 'support_pro', '.custom-dropdown') // 专业优化 + changeLiActive(t, 'support_edu', '.formItem_pro') // 学历优化 + changeLiActive(t, 'support_core', '.coreContent') // 核心内容优化 + window.scrollTo({ + top: 200, + behavior: 'smooth' + }) // if($('.custom-dropdown').hasClass('disNone') && $('.opt-advise').hasClass('disNone')){} }); - function setDomHide(arr){ - arr.forEach(item=>{ + + function setDomHide(arr) { + arr.forEach(item => { $(item).hide() }) } - function setDomShow(arr){ - arr.forEach(item=>{ + + function setDomShow(arr) { + arr.forEach(item => { $(item).show() }) } - function setInputText_length(num){ - $('.inputText').attr('max',num) - $('.inputText').text('0/'+num) + + function setInputText_length(num) { + $('.inputText').attr('max', num) + $('.inputText').text('0/' + num) } - function changeLiActive(t,attr_type,ele){ + function changeLiActive(t, attr_type, ele) { var support_titleMore = getTableFormulaTypes(attr_type); if (support_titleMore) { if (support_titleMore.indexOf(t) !== -1) { $(ele).removeClass('disNone'); - } else{ + } else { $(ele).addClass('disNone'); } } } + function getTableFormulaTypes(attr_type) { - var support_table_formula_types = $("#htmlconfig").attr(attr_type); - if (!support_table_formula_types) return ''; - var support_table_formula_types_arr = support_table_formula_types.split(","); - return support_table_formula_types_arr; + var support_table_formula_types = $("#htmlconfig").attr(attr_type); + if (!support_table_formula_types) return ''; + var support_table_formula_types_arr = support_table_formula_types.split(","); + return support_table_formula_types_arr; } - pptUrlList = pptUrlList.map((item,ind)=>{ + pptUrlList = pptUrlList.map((item, ind) => { let list = []; let num = 8; - for(let i=0;i{ - html += `
- -
预览
- -

`+item.name +`

+ let html = ''; + let pptlist = [...pptUrlList] + // ppt_item_active + pptlist.forEach((item, i) => { + html += `
+ +
预览
+ +

` + item.name + `

` - }) - $('.ppt_temList').html(html); - + }) + $('.ppt_temList').html(html); + // } //附图片 //初识设置 - function setLeftShow(key){ - if(!$('.look_PPT_modal').hasClass('hide')){ + function setLeftShow(key) { + if (!$('.look_PPT_modal').hasClass('hide')) { let html = ''; let childList = [] childList = pptUrlList[key]['list'] - childList.forEach((item,i)=>{ - html += `图片丢失。。。` + childList.forEach((item, i) => { + html += `图片丢失。。。` }) $('.gallery').html(html); $('.gallery_img').eq(child_ppt).addClass('ppt_child_active'); - $('.look_backImg').attr('src',pptUrlList[key]['bgurl']) - setBackImgUrl(childList[child_ppt],true) + $('.look_backImg').attr('src', pptUrlList[key]['bgurl']) + setBackImgUrl(childList[child_ppt], true) } } // 弹窗模版 - $('.look_right .pptImg').click(function(e){ + $('.look_right .pptImg').click(function (e) { let index = $(this).attr('index'); setLookPPT_active(index) new_parent_ppt = index; @@ -1213,49 +1258,52 @@ $(document).ready(function() { setLeftShow(new_parent_ppt) }) //页面模版 - $('.form_pptItem .pptImg').click(function(e){ + $('.form_pptItem .pptImg').click(function (e) { let index = $(this).attr('index'); setPagePPT_active(index) old_parent_ppt = new_parent_ppt = index; child_ppt = 0; setLeftShow(old_parent_ppt) }) - function setPagePPT_active(index){ + + function setPagePPT_active(index) { $('.form_pptItem .ppt_tem_item').removeClass('ppt_item_active') $('.form_pptItem .ppt_tem_item').eq(index).addClass('ppt_item_active'); } - function setLookPPT_active(index){ + + function setLookPPT_active(index) { $('.look_right .ppt_tem_item').removeClass('ppt_item_active') $('.look_right .ppt_tem_item').eq(index).addClass('ppt_item_active'); } -//子图片 + //子图片 $('.gallery_img').unbind('click') - $('.gallery').on('click','.gallery_img',function(){ - let index = $(this).attr('index'); - let src = $(this).attr('src'); - $('.gallery_img').removeClass('ppt_child_active') - $('.gallery_img').eq(index).addClass('ppt_child_active'); - child_ppt = index; - setBackImgUrl(src,false) + $('.gallery').on('click', '.gallery_img', function () { + let index = $(this).attr('index'); + let src = $(this).attr('src'); + $('.gallery_img').removeClass('ppt_child_active') + $('.gallery_img').eq(index).addClass('ppt_child_active'); + child_ppt = index; + setBackImgUrl(src, false) }) - function setBackImgUrl(url,flag){ - $('.topimg').attr('src',url) - if(!flag)return + + function setBackImgUrl(url, flag) { + $('.topimg').attr('src', url) + if (!flag) return // $('.look_backImg').attr('src',url) } - $('.lookAll').click(function(e){ + $('.lookAll').click(function (e) { $('.look_PPT_modal').removeClass('hide') if (!$('.look_PPT_modal').hasClass('hide')) { - if(old_parent_ppt !== null){ + if (old_parent_ppt !== null) { setLookPPT_active(old_parent_ppt) - }else{ + } else { setLookPPT_active(0) } setLeftShow(old_parent_ppt != null ? old_parent_ppt : 0) } }) - $('.firstlook').click(function(e){ + $('.firstlook').click(function (e) { let index = $(this).attr('index'); old_parent_ppt = index; child_ppt = 0; @@ -1263,22 +1311,22 @@ $(document).ready(function() { setLookPPT_active(old_parent_ppt) setLeftShow(old_parent_ppt) }) - $('.exitLook,.ppt_cancel').click(function(e){ + $('.exitLook,.ppt_cancel').click(function (e) { $('.look_PPT_modal').addClass('hide') }) - $('.ppt_submit').click(function(e){ + $('.ppt_submit').click(function (e) { if ($('.form_pptItem').css('display') == 'none') { - add_ppt=new_parent_ppt; + add_ppt = new_parent_ppt; $('#cur_ppt_selectName').html(pptUrlList[add_ppt]['name']) payAction() - }else{ + } else { old_parent_ppt = new_parent_ppt; setPagePPT_active(new_parent_ppt) } $('.look_PPT_modal').addClass('hide') }) - + function bindFileUpload() { var formData = new FormData(); $('.uploadShow').on('click', function (event) { @@ -1287,7 +1335,7 @@ $(document).ready(function() { $('#againBtn').on('click', function (event) { $('#fileUpload').trigger('click') }) - $('#cancleBtn').click(function(){ + $('#cancleBtn').click(function () { formData = new FormData(); $('.uploadMes').html('') }) @@ -1305,12 +1353,12 @@ $(document).ready(function() { formData.append('ver_chktype', check_type); // 使用jQuery AJAX上传文件 $.ajax({ - url: service_domain+'/upload_file', + url: service_domain + '/upload_file', type: 'POST', data: formData, dataType: 'json', - processData: false, // 告诉jQuery不要处理发送的数据 - contentType: false, // 告诉jQuery不要设置Content-Type请求头 + processData: false, // 告诉jQuery不要处理发送的数据 + contentType: false, // 告诉jQuery不要设置Content-Type请求头 xhr: function () { $(".uploadShow").addClass('hide'); $(".uploadMesShow").removeClass('hide'); @@ -1319,7 +1367,7 @@ $(document).ready(function() { var xhr = $.ajaxSettings.xhr(); if (xhr.upload) { - $(".fileName").html(file.name); + $(".fileName").html(file.name); xhr.upload.addEventListener('progress', function (e) { if (e.lengthComputable) { @@ -1339,7 +1387,7 @@ $(document).ready(function() { $("#cancleBtn").addClass('hide'); $(".uploadMes").html('上传成功'); $(".uploadMes").removeClass('hide'); - + $('#againBtn').removeClass('hide') $("#upload_file_md5").val(res.data.upload_file_md5); $("#upload_file_name").val(res.data.upload_file_name); @@ -1367,128 +1415,231 @@ $(document).ready(function() { } // 报告查找 - $('#searchReport').click(function(){ + $('#searchReport').click(function () { searchOrder() }) - + function searchOrder() { var tid = $('.report_input').val(); searchOrderByTid(tid); } - function searchOrderByTid(tid){ + function searchOrderByTid(tid) { tid = tid.trim(); - if(!tid.trim || tid.length<=0){ + if (!tid.trim || tid.length <= 0) { alert('订单编号不能为空'); return; } - + $.ajax({ - url:service_domain + '/ajax_search_order?tid='+tid, - dataType:'json', - type:'get', - success:function(res){ + url: service_domain + '/ajax_search_order?tid=' + tid, + dataType: 'json', + type: 'get', + success: function (res) { + $('.report_main').show() $('.main_top').html(''); + $('.main_top2').html(''); if (res.status && res.data.report_list) { $('.empty').hide() - $('.report_main').show() $('.downLoad').hide() - for(var i=0; i - -

`+reportinfo.tid+`

-
` - obj += `
- -

`+reportinfo.type+`

-
` - obj += `
- -

`+reportinfo.title+`

-
` - obj += `
- -

`+reportinfo.add_date+`

-
` - if(reportinfo.status.num == 1){ - obj += `
- -

完成

-
` + // var report_list =[res.data.report_list[27]]; + var report_list = res.data.report_list; + // var report_list = [ + // { + // add_date: "2025-02-27 10:29:15", + // author: "", + // check_url: "xihaha.checkcopy.com/aiessayzx", + // chk_type: "94", + // price: "0.53", + // query_time: "2025-02-28 16:58:10", + // reduce_guide: false, + // reduce_guide2: null, + // report_date: "0000-00-00 00:00:00", + // report_day: 739707, + // sid: "15884332", + // similar_rate: 0, + // status: { + // num: "1", + // str: "完成", + // color: "black", + // extra: "", + // is_change_paper: 0, + // is_report_expire: 1 + // }, + // tid: "10002174012948076", + // title: "美好的一天", + // type: "AI中文范文", + // uid: "2115", + // wordnum: "50000" + // }, + // { + // add_date: "2025-02-27 10:29:15", + // author: "", + // check_url: "xihaha.checkcopy.com/aiessayzx", + // chk_type: "94", + // price: "0.53", + // query_time: "2025-02-28 16:58:10", + // reduce_guide: false, + // reduce_guide2: null, + // report_date: "0000-00-00 00:00:00", + // report_day: 739707, + // sid: "15884332", + // similar_rate: 0, + // status: { + // num: "1", + // str: "完成", + // color: "black", + // extra: "", + // is_change_paper: 0, + // is_report_expire: 1 + // }, + // tid: "10002174012948076", + // title: "美好的一天", + // type: "AI中文范文", + // uid: "2115", + // wordnum: "50000" + // }, + // { + // add_date: "2025-02-27 10:29:15", + // author: "", + // check_url: "xihaha.checkcopy.com/aiessayzx", + // chk_type: "94", + // price: "0.53", + // query_time: "2025-02-28 16:58:10", + // reduce_guide: false, + // reduce_guide2: null, + // report_date: "0000-00-00 00:00:00", + // report_day: 739707, + // sid: "15884332", + // similar_rate: 0, + // status: { + // num: "0", + // str: "完成", + // color: "black", + // extra: "", + // is_change_paper: 0, + // is_report_expire: 1 + // }, + // tid: "10002174012948076", + // title: "美好的一天", + // type: "AI中文范文", + // uid: "2115", + // wordnum: "50000" + // } + // ]; + if (report_list.length == 1) { + $('.report_main .main_top').show() + for (var i = 0; i < report_list.length; i++) { + var reportinfo = report_list[i]; + console.log(reportinfo, 'reportinfo---'); + if (reportinfo.status.num == 5) { + continue; + } + var obj = ''; obj += `
- -

`+reportinfo.report_date+`

-
` - $('.downLoad').show() - $('.downLoad').attr('herf',service_domain+'downreport/sid/'+reportinfo.sid+'/tid/'+tid) - } - // else if(reportinfo.status.num == 2) { - // obj += '状态:取消('+reportinfo.status.extra+')'; - - // } else if(reportinfo.status.num == 6) { - // obj += '状态:暂停('+reportinfo.status.extra+')'; - - // } - else { + +

` + reportinfo.tid + `

+
` obj += `
- -

进行中,请等待

-
` + +

` + reportinfo.type + `

+
` + obj += `
+ +

` + reportinfo.title + `

+
` obj += `
- -

—— ——

-
` + +

` + reportinfo.add_date + `

+
` + if (reportinfo.status.num == 1) { + obj += `
+ +

完成

+
` + obj += `
+ +

` + reportinfo.report_date + `

+
` + $('.downLoad').show() + $('.downLoad').attr('herf', service_domain + 'downreport/sid/' + reportinfo.sid + '/tid/' + tid) + } else { + obj += `
+ +

进行中,请等待

+
` + obj += `
+ +

—— ——

+
` + } + $('.main_top').append(obj); } - $('.main_top').append(obj); - } - - if($('.main_top').html() == '') { - $('.empty').show() - $('.report_main').hide() + } else if (report_list.length > 1) { + var num = 0; + var total = report_list.length + for (var i = 0; i < report_list.length; i++) { + var reportinfo1 = report_list[i]; + + if (reportinfo1.status.num == 1) { + num += 1 + } + } + // + $('.report_main .main_top2').show() + var obj = '
订单编号:' + tid + '
已完成 ' + num + '/' + total + '
'; + for (var i = 0; i < report_list.length; i++) { + var reportinfo = report_list[i]; + if (reportinfo.status.num == 5) { + continue; + } + if (reportinfo.status.num == 1) { + obj += '

' + reportinfo.title + '

类型:' + reportinfo.type + '
上传时间:' + reportinfo.add_date + '
完成时间:' + reportinfo.report_date + '
状态:完成
' + } else { + obj += '

' + reportinfo.title + '

类型:' + reportinfo.type + '
上传时间:' + reportinfo.add_date + '
完成时间:—— ——
状态:进行中
' + } + } + $('.main_top2').append(obj); + $('.report_main .main_top2 .loadbtn').on('click', function () { + var href1 = $(this).attr('herf'); + location.href = href1 + }) } - }else{ - $('.empty').show() - $('.report_main').hide() } }, - error:function(){ + error: function () { alert('请求失败'); } }); } // $('.addListBox').on('hover','.add_item_right b',function(){ - + // $('.addListBox .add_item_right .img').removeClass('hide') // },function(){ // $('.addListBox .add_item_right .img').addClass('hide'); // }) - $('.downLoad').click(function(){ + $('.downLoad').click(function () { let href = $('.downLoad').attr('herf'); location.href = href }) - $('.report_ques').hover(function(){ + $('.report_ques').hover(function () { $('.findtid-wrap').removeClass('hide'); - },function(){ + }, function () { $('.findtid-wrap').addClass('hide'); $('.findtid-wrap').find('li').removeClass('select'); $('.findtid-wrap').find('li').eq(0).addClass('select'); $('.findtid-wrap').find('img').addClass('hide'); $('.findtid-wrap').find('img').eq(0).removeClass('hide'); }); - $('.findtid-wrap').hover(function(){ + $('.findtid-wrap').hover(function () { $('.findtid-wrap').removeClass('hide'); - },function(){ + }, function () { $('.findtid-wrap').addClass('hide'); $('.findtid-wrap').find('li').removeClass('select'); $('.findtid-wrap').find('li').eq(0).addClass('select'); $('.findtid-wrap').find('img').addClass('hide'); $('.findtid-wrap').find('img').eq(0).removeClass('hide'); }); - $('.findtid-wrap').find('li').hover(function(){ + $('.findtid-wrap').find('li').hover(function () { $('.findtid-wrap').find('li').removeClass('select'); $('.findtid-wrap').find('li').eq($(this).index()).addClass('select'); $('.findtid-wrap').find('img').addClass('hide');