Browse Source

替换图片、提取部分公共逻辑

pull/3/head
zq 5 months ago
parent
commit
7231224929
  1. 62
      home.html
  2. 34
      style/css/index.css
  3. BIN
      style/img/AIGC_preview.png
  4. BIN
      style/img/kaiti_preview.png
  5. BIN
      style/img/renwushu_preview.png
  6. 124
      style/js/index.js

62
home.html

@ -66,11 +66,8 @@
<div class="step_back">
<div class="step_main">
<!-- success_step -->
<dl class="normal_step normal_step1 active_step " stepNum="1">
<dt>
<!-- <img src="./style/img/step_1.svg" alt=""> -->
</dt>
<dt></dt>
<dd>
<span class="nor_step_title ">输入论文题目</span>
<span>生成千字大纲</span>
@ -78,9 +75,7 @@
</dl>
<div class="step_line "></div>
<dl class="normal_step normal_step2 step_two" stepNum="2">
<dt>
<!-- <img src="./style/img/step_2.svg" alt=""> -->
</dt>
<dt></dt>
<dd>
<span class="nor_step_title">编辑大纲</span>
<span>生成论文初稿</span>
@ -88,10 +83,7 @@
</dl>
<div class="step_line step_two"></div>
<dl class="normal_step normal_step3" stepNum="3">
<dt>
<!-- <img src="./style/img/step_3.svg" step="3" alt=""> -->
<!-- <img src="./style/img/step_2.svg" style="display: none;" step="2" alt=""> -->
</dt>
<dt></dt>
<dd>
<span class="nor_step_title">下载论文</span>
<span>一键快速下载论文</span>
@ -513,7 +505,6 @@
function showDropdown() {
var dropdownContent = document.getElementById("myDropdown");
dropdownContent.style.display = "block";
// var major = parseInt($('.dropdown-input').attr('selected_val'));
}
// 当用户点击其他地方时隐藏下拉框
@ -564,10 +555,6 @@
}
});
}
// function toggleSelect() {
// var select = document.getElementById('project_select');
// select.size = select.size ? 0 : 3; // 切换展开/收起状态
// }
function hideDom(dom) {
if ($(dom).hasClass('disBlock')) $(dom).removeClass('disBlock')
$(dom).addClass('disNone')
@ -577,7 +564,6 @@
$(dom).addClass('disBlock')
}
function startGetTitle() {
// hideDom('.aititlePos')
adviseTitle(true)
}
$('.inputChange').on('blur', function () {
@ -616,7 +602,6 @@
});
showOptArea('loading');
// showDom('#loading');
//第一步 默认完成
let obj = document.getElementById('loading-step1');
@ -677,42 +662,6 @@
}
});
}
// loading 测试
// var progressTimer = null
// test()
// function showProgress(num) {
// clearInterval(progressTimer)
// var progress = num
// progressTimer = setInterval(function() {
// $('.loading-text').text('加载中...'+progress+'%')
// if(progress + 3 >= 99) {
// console.log(progress,'progress=====');
// clearInterval(progressTimer)
// }else{
// progress += 3
// }
// }, 1000);
// }
// function test(){
// showProgress(8)
// var ani5 = stepLoading(5, 'analysis')
// $.ajax({
// type:'post',
// url:'https://aitest.chachongz.com/get_aiessay_catalog',
// dataType:'json',
// data: {
// type: '94',
// title: '辣条的辣味研究',
// aiessay_wordnum: '50000'
// },
// success:function(res){
// ani5.destroy();
// showProgress(100);
// clearInterval(progressTimer)
// }
// });
// }
function stepLoading(step, status = 'analysis') {
let obj = document.getElementById('loading-step' + step);
obj.innerHTML = '';
@ -723,7 +672,6 @@
container: obj, //dom元素的容器
loop: true, //循环播放
autoplay: true, //自动播放
// path: "./style/img/loding.json", // AE 导出JSON文件
path: "http://css.chachongz.com/images/ai2/modelessay/loading_analysis.json", // AE 导出JSON文件
});
} else {
@ -732,7 +680,6 @@
loop: false, //循环播放
autoplay: true, //自动播放
path: "http://css.chachongz.com/images/ai2/modelessay/loading_done.json", // AE 导出JSON文件
// path: "./style/img/loading_done.json", // AE 导出JSON文件
});
}
}
@ -805,10 +752,7 @@
$('#cur_title_type').val(res.data);
if (res.status && res.data != 1) {
// console.log('----', $('#loading').hasClass('disNone'));
if ($('#loading').css('display') == 'none') {
// if ($('#loading').hasClass('disNone')) {
// showDom('.aititlePos')
showOptArea('not-title');
}

34
style/css/index.css

@ -3,11 +3,6 @@ body,p,div{
font-size: 14px;
font-family: MicrosoftYaHeiUI;
}
@media screen and (min-width:1200px) and (max-width:1440px){
.right_back{
/* right: calc((100% - 1680px) / 2); */
}
}
#loading-animation {
width: 50px;
@ -312,6 +307,9 @@ body,p,div{
font-size: 16px;
font-weight: bold;
}
.pay_header h4{
margin: 0;
}
.pay_header .close_modal{
position: absolute;
right: 0px;
@ -945,7 +943,7 @@ li .select_icon, .pay_every .pay_icon{
max-width: 1118px;
margin: 0 130px;
border-radius: 8px;
opacity: 0.9;
opacity: 1;
background: rgba(255, 255, 255, 0.9);
}
.backColorAdd{
@ -1800,7 +1798,7 @@ li .select_icon, .pay_every .pay_icon{
cursor: pointer;
outline: none;
background: #FFFFFF;
border: 1px solid #E8E8E8;
border: 1px solid #E8E8E8;
}
/* 自定义图标 */
@ -2373,11 +2371,6 @@ footer a{
.pay_completeDetailMes {
display: flex;
flex-wrap: wrap;
/* display: grid;
gap: 22px 39px;
grid-template-columns: repeat(auto-fill,minmax(166px,1fr)); */
/* margin-bottom: 20px; */
/* flex-wrap: wrap; */
}
.detailMesItem{
min-width: 30%;
@ -2385,7 +2378,7 @@ footer a{
/* margin: 0 40px 22px 0; */
}
.detailMesItem:first-child{
/* flex: 1; */
flex: 1;
}
.detailMesItem span{
min-width: 80px;
@ -2582,10 +2575,6 @@ span.normalPrice{
width: calc(100% + 220px);
}
.top_left{
/* width: ; */
/* height: px; */
/* min-width: 498px;
max-width: 594px; */
width: calc(calc(100% / 2) - 57px);
padding: 13px 26px;
display: flex;
@ -2615,13 +2604,14 @@ span.normalPrice{
}
.top_left div{
flex: 1;
width: 70%;
}
#mainText{
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 340px;
max-width: 70%;
}
.top_left .notNormalBZ{
display: inline-block;
@ -2683,11 +2673,9 @@ span.normalPrice{
opacity: 0;
position: absolute;
left: 0;
top: -290px;
top: -275px;
border-radius: 12px;
z-index: 100;
background: #F2F3FE;
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16);
}
.addListBox .add_item_right:hover .img{
display: block !important;
@ -2696,12 +2684,12 @@ span.normalPrice{
.addListBox .add_item img{
}
.addListBox .add_item .img .preview{
height: 306px;
height: 320px;
}
.addListBox .add_item .img .preview_icon{
position: absolute;
left: 185px;
bottom: -15px;
bottom: -14px;
}
.addListBox .pos_top{
padding: 3px 13px;

BIN
style/img/AIGC_preview.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
style/img/kaiti_preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 42 KiB

BIN
style/img/renwushu_preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 31 KiB

124
style/js/index.js

@ -101,28 +101,6 @@ $(document).ready(function() {
</div>`
})
$('.serviceds_bottom').html(servicedsHtml)
// var stepList = [
// {
// step:1,
// title:'输入论文题目',
// desc:'生成千字大纲'
// },
// {
// step:2,
// title:'编辑大纲',
// desc:'生成论文初稿'
// },
// {
// step:3,
// title:'下载论文',
// desc:'一键快速下载论文'
// },
// ]
// $('step_main').html('');
// var step_html = '';
// stepList.forEach(item=>{
// step_html+= ``
// })
var payhtml = `<div class="pay_content flex" include-html="pay.html" mes="网站已通过备案请放心使用,如支付宝提示风险属于系统正常提示,按提示继续操作就可以,有任何疑问都可联系右侧在线客服">
<div id="qrcode" class="qrcode"></div>
<div class="pay_type">
@ -193,6 +171,7 @@ $(document).ready(function() {
'62':'./style/img/kaiti_preview.png',
'63':'./style/img/renwushu_preview.png',
'96':'',
'AIGC':'./style/img/AIGC_preview.png'
}
getadd_Value('94')
function getadd_Value(type){
@ -222,7 +201,6 @@ $(document).ready(function() {
<span class="add_item_right">预览
<div class="img">
<img class="preview" src=`+add_item_valueUrl[item.type]+` alt="">
<img src="./style/img/sanjiao.svg" class="preview_icon" alt="">
</div>
</span>
</div>`
@ -328,7 +306,7 @@ $(document).ready(function() {
html1 +=` <div class="detailMesItem flex">
<span class="lable">论文金额</span>
<span class="content textPrice">255.4</span>
<span class="content textPrice">---</span>
</div>`
if(check_type == '94'){
html1 +=`<div class="detailMesItem flex">
@ -360,9 +338,6 @@ $(document).ready(function() {
})
//step监听滚动位置
// $('.pay_complete_main').html(payhtml)
// $('.payModal_main').html(payhtml)
// new QRCode(document.getElementById("qrcode"), {
// text: 'weixin://wxpay/bizpayurl?pr=BbrGBgBz3',
// width: 135,
@ -500,7 +475,6 @@ $(document).ready(function() {
})
function getPayType() {
var paytype = $('.pay_active').attr('pay_type');
console.log(paytype,'===000000');
return paytype;
}
function payAction(){
@ -509,16 +483,6 @@ $(document).ready(function() {
let check_flag = $('li.active_select').attr('check_flag');
let pay_type = getPayType();
let title = $('.inputChange').val().trim();
// goods_id 0
// const postData = {
// title:'88',
// check_type,
// pay_type,
// get_pay_goods:'1',
// aiessay_wordnum:'3000',
// // recharge_goods_id:'0',
// // value_added_services:''//增值服务
// }
if(check_type == '') {
alert('提交类型不合法');
errorJump();
@ -541,13 +505,15 @@ $(document).ready(function() {
// errorJump();
$('.inputChange').val('')//重置输入框文本
$('.inputText').text('0/500')
$('.inputText').removeClass('warnInputText')
return;
}
}else if(check_type == '96'){
if(title.length >100){
alert('论文标题不得多于200字');
alert('论文标题不得多于300字');
$('.inputChange').val('')//重置输入框文本
$('.inputText').text('0/200')
$('.inputText').text('0/300')
$('.inputText').removeClass('warnInputText')
return;
}
}
@ -555,6 +521,7 @@ $(document).ready(function() {
alert('论文标题不得多于100字');
$('.inputChange').val('')//重置输入框文本
$('.inputText').text('0/100')
$('.inputText').removeClass('warnInputText')
return;
}
}
@ -861,14 +828,21 @@ $(document).ready(function() {
$('.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
searchOrder()
}
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) {
if ($('li').hasClass('active_select')) {
$('li').removeClass('active_select')
@ -878,15 +852,11 @@ $(document).ready(function() {
var element2 = $('.footer');
element.removeClass('stickyStep')
element2.removeClass('footer2')
// getWordCountList();
clearhisText()//清空记录
var t = $('li.active_select').attr('type');
check_type = t;
//重置步骤条状态
$('.normal_step').removeClass('success_step')
$('.normal_step').removeClass('active_step')
$('.step_line').removeClass('suc_step_line')
$('.normal_step').eq(0).addClass('active_step')
resetStep_status()
//重置ppt模板选择
old_parent_ppt = null;//首页选择的
new_parent_ppt = 0;//弹框内选择的
@ -896,42 +866,28 @@ $(document).ready(function() {
$('.step_add_three').addClass('hide')
}
if(t =='94'){//字数
$('.form_essayWords').show();
$('.side_info').show();
$('.step_two').show()
setDomShow(['.form_essayWords','.side_info','.step_two','.checkbox_wrap'])
$('.key_words').addClass('hide')
$('.checkbox_wrap').show()
getadd_Value('94')
} else{
$('.checkbox_wrap').hide()
$('.step_two').hide()
$('.form_essayWords').hide();
$('.side_info').hide();
setDomHide(['.form_essayWords','.side_info','.step_two','.checkbox_wrap'])
$('.key_words').removeClass('hide')
}
if(t == '94' || t == '82'){
$('[step="3"]').show()
$('[step="2"]').hide()
$('.btn_result').show()
$('.btn_result_now').hide()
$('.step_two').show()
setDomShow(['[step="3"]','.btn_result','.step_two'])
setDomHide(['[step="2"]','.btn_result_now'])
$('.normal_step3').removeClass('step_three')
$('.payModal_main').html('')
$('.pay_complete_main').html(payhtml)
}else{
$('.btn_result').hide()
$('.btn_result_now').show()
$('.step_two').hide()
$('[step="2"]').show()
setDomHide(['[step="3"]','.btn_result','.step_two'])
setDomShow(['[step="2"]','.btn_result_now'])
$('.normal_step3').addClass('step_three')
$('[step="3"]').hide()
$('.payModal_main').html(payhtml)
$('.pay_complete_main').html('')
}
if(t == '64'){
$('.key_words').show()
$('.key_words').show()
if ($('.opt-advise').css('display') !== 'none') {
// 元素是隐藏的
$('.opt-advise').hide()
@ -945,22 +901,17 @@ $(document).ready(function() {
$('#charCount').html('0/200')
} else{
$('.coreContent').hide();
}
if(t == '62' ||t == '63'){
$('.inputText').attr('max','500')
$('.inputText').text('0/500')
setInputText_length('500')
}else if(t=='82'){
$('.inputText').attr('max','200')
$('.inputText').text('0/200')
setInputText_length('200')
getadd_Value('82')
}else{
$('.inputText').attr('max','100')
$('.inputText').text('0/100')
setInputText_length('100')
}
if(t == '96'){
$('.inputText').attr('max','300')
$('.inputText').text('0/300')
setInputText_length('300')
$('.form_pptItem').show()
$('#formInputSumbtn').html('生成答辩PPT')
}else{
@ -983,23 +934,34 @@ $(document).ready(function() {
window.scrollTo({ top: 200, behavior: 'smooth' })
// if($('.custom-dropdown').hasClass('disNone') && $('.opt-advise').hasClass('disNone')){}
});
function setDomHide(arr){
arr.forEach(item=>{
$(item).hide()
})
}
function setDomShow(arr){
arr.forEach(item=>{
$(item).show()
})
}
function setInputText_length(num){
$('.inputText').attr('max',num)
$('.inputText').text('0/'+num)
}
function changeLiActive(t,attr_type,ele){
var support_titleMore = getTableFormulaTypes(attr_type);
if (support_titleMore) {
if (support_titleMore.indexOf(t) !== -1) {
$(ele).removeClass('disNone');
// $(ele).css('display','block')
} else{
$(ele).addClass('disNone');
// $(ele).css('display','none')
}
}
}
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;
}
@ -1112,7 +1074,6 @@ $(document).ready(function() {
$('.ppt_submit').click(function(e){
if ($('.form_pptItem').css('display') == 'none') {
add_ppt=new_parent_ppt;
// console.log(pptUrlList,add_ppt);
$('#cur_ppt_selectName').html(pptUrlList[add_ppt]['name'])
}else{
old_parent_ppt = new_parent_ppt;
@ -1141,7 +1102,6 @@ $(document).ready(function() {
var fileInput = $(this);
var files = fileInput.prop('files');
var file = files[0]; // 获取文件
// console.log(files,file.name,'======');
if (file) {
// 这里可以添加上传文件之前的逻辑,例如文件验证
// 创建FormData对象
@ -1336,6 +1296,4 @@ $(document).ready(function() {
$('.findtid-wrap').find('img').addClass('hide');
$('.findtid-wrap').find('img').eq($(this).index()).removeClass('hide');
});
});
Loading…
Cancel
Save