Browse Source

立即生成校验信息提示及吸顶效果修改

pull/1/head
zq 7 months ago
parent
commit
5dca485c4c
  1. 79
      home.html
  2. 99
      style/css/index.css
  3. 1
      style/img/AI_title_icon.svg
  4. 1
      style/img/changeMore_tit.svg
  5. 292
      style/js/index.js

79
home.html

@ -77,7 +77,7 @@
</dd> </dd>
</dl> </dl>
<div class="step_line"></div> <div class="step_line"></div>
<dl class="normal_step"> <dl class="normal_step step_two">
<dt> <dt>
<img src="./style/img/step_2.svg" alt=""> <img src="./style/img/step_2.svg" alt="">
</dt> </dt>
@ -86,10 +86,11 @@
<span>生成论文初稿</span> <span>生成论文初稿</span>
</dd> </dd>
</dl> </dl>
<div class="step_line"></div> <div class="step_line step_two"></div>
<dl class="normal_step"> <dl class="normal_step">
<dt> <dt>
<img src="./style/img/step_3.svg" alt=""> <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>
<dd> <dd>
<span class="nor_step_title">下载论文</span> <span class="nor_step_title">下载论文</span>
@ -135,7 +136,7 @@
<span>文献综述</span> <span>文献综述</span>
<img src="./style/img/select_icon.svg" alt="" class="select_icon"> <img src="./style/img/select_icon.svg" alt="" class="select_icon">
</li> </li>
<li type="96" class="no-click"> <li type="96" >
<img src="./style/img/ppt_more.svg" alt="" class="li_icon"> <img src="./style/img/ppt_more.svg" alt="" class="li_icon">
<span>答辩PPT</span> <span>答辩PPT</span>
<img src="./style/img/select_icon.svg" alt="" class="select_icon"> <img src="./style/img/select_icon.svg" alt="" class="select_icon">
@ -155,7 +156,7 @@
<div class="formOne opt-block"> <div class="formOne opt-block">
<input id="htmlconfig" type="hidden" content_min_limit="0" <input id="htmlconfig" type="hidden" content_min_limit="0"
support_table_formula_types="61,84,93,94" support_titleMore="85,81,94" support_table_formula_types="61,84,93,94" support_titleMore="85,81,94"
support_edu="63,96,82,94" support_pro="94,63" support_pro="94,63"> support_edu="63,96,82,94" support_pro="82,94" support_pro="94,63">
<input value="3000,5000,8000,10000,15000,20000" type="hidden" id="word_list_str94"> <input value="3000,5000,8000,10000,15000,20000" type="hidden" id="word_list_str94">
<input type="hidden" id="cur_title" value=""> <input type="hidden" id="cur_title" value="">
<input type="hidden" id="cur_title_type" value="0"> <input type="hidden" id="cur_title_type" value="0">
@ -178,11 +179,11 @@
<option value="9">其它(自动识别)</option> <option value="9">其它(自动识别)</option>
</select> </select>
</div> </div>
<div class="oneRight"> <div class="oneRight opt-advise">
<img src="./style/img/input_icon.svg" alt=""> <img src="./style/img/input_icon.svg" alt="">
<input type="text" class="inputChange" placeholder="输入完整的论文标题,获得更好的生成效果"> <input type="text" class="inputChange " placeholder="输入完整的论文标题,获得更好的生成效果">
<div class="total_length"> <div class="total_length">
<span class="inputText">0/50</span> <span class="inputText" max="100" min="1">0/100</span>
</div> </div>
<div class="normal_recommend_title"> <div class="normal_recommend_title">
<img src="./style/img/title_icon.svg" alt=""> <img src="./style/img/title_icon.svg" alt="">
@ -205,7 +206,7 @@
</div> </div>
</div> </div>
<div class="posFooter"> <div class="posFooter">
<div class="ignoreBtn" onclick="hideDom('aititlePos')">忽略</div> <div class="ignoreBtn" onclick="hideOptArea()">忽略</div>
<div class="startBtn" onclick="startGetTitle('aititlePos')">开始优化</div> <div class="startBtn" onclick="startGetTitle('aititlePos')">开始优化</div>
</div> </div>
</div> </div>
@ -235,11 +236,11 @@
<div class="change-yes" onclick="hideTitleChange();adviseTitle(true)"></div> <div class="change-yes" onclick="hideTitleChange();adviseTitle(true)"></div>
<div class="change-no" onclick="hideTitleChange();"></div> <div class="change-no" onclick="hideTitleChange();"></div>
</div> </div>
<div class="advise-header"><img src="//css.kuailelunwen.com/images/ai2/modelessay/star_light.png" alt="">智能优化标题</div> <div class="advise-header"><img src="./style/img/AI_title_icon.svg" alt="">智能优化标题</div>
<div id="advise-ul"></div> <div id="advise-ul"></div>
<div class="advise-refresh"> <div class="advise-refresh">
<span style="width: 120px;" onclick="adviseTitle(true)"> <span style="width: 120px;" onclick="adviseTitle(true)">
<img src="//css.kuailelunwen.com/images/ai2/modelessay/loading_refresh.png" alt="">换一批 <img src="./style/img/changeMore_tit.svg" alt="">换一批
</span> </span>
</div> </div>
</div> </div>
@ -275,7 +276,7 @@
<div class="formItem key_words hide"> <div class="formItem key_words hide">
<div class="formLeft">关键词</div> <div class="formLeft">关键词</div>
<div class="formRight textAreaRight"> <div class="formRight textAreaRight">
<input type="text" name="title" class="key_words_input" maxlength="50" minlength="2"> <input type="text" name="title" placeholder="请输入选题关键词,例如:广告设计(2-50字内)" class="key_words_input" maxlength="50" minlength="2">
</div> </div>
</div> </div>
<div class="formItem side_info hide"> <div class="formItem side_info hide">
@ -285,11 +286,22 @@
placeholder="请输入相关的辅助信息,帮助论文生成的更加准确!(非必填)"></textarea> placeholder="请输入相关的辅助信息,帮助论文生成的更加准确!(非必填)"></textarea>
</div> </div>
</div> </div>
<div class="formItem coreContent hide"> <div class="formItem coreContent "style="display: none;">
<div class="formLeft">核心内容</div> <div class="formLeft">核心内容</div>
<div class="formRight textAreaRight"> <div class="formRight textAreaRight">
<textarea name="coreContent" class="coreWordCount" id="side_textarea" maxlength="200" <textarea name="coreContent" class="coreWordCount" id="coreTextarea" maxlength="200"
placeholder="请写出需要在论文中包含的要点。"></textarea> placeholder="请写出需要在论文中包含的要点。"></textarea>
<div id="charCount" class="char-count">0/200</div>
<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>
</div> </div>
</div> </div>
<div class="formItem form_essayWords"> <div class="formItem form_essayWords">
@ -385,8 +397,8 @@
</div> </div>
</div> </div>
</form> </form>
<button class="btn_result" onclick="showCreateCatalogue()">生成论文大纲</button> <button class="btn_result point" onclick="showCreateCatalogue()">生成论文大纲</button>
<button class="btn_result_now" id="formInputSumbtn">立即生成</button> <button class="btn_result_now point" id="formInputSumbtn">立即生成</button>
<div class="checkbox_wrap"> <div class="checkbox_wrap">
<p class="active agree-item">我已阅读并同意:生成的论文范文仅用于参考,不作为毕业论文使用</p> <p class="active agree-item">我已阅读并同意:生成的论文范文仅用于参考,不作为毕业论文使用</p>
</div> </div>
@ -517,7 +529,6 @@
//第三步 等待第二步动画加载完成 开启加载动画 //第三步 等待第二步动画加载完成 开启加载动画
let ani3 = stepLoading(3, 'analysis') let ani3 = stepLoading(3, 'analysis')
debugger
if ($('#advise-ul').html()) { if ($('#advise-ul').html()) {
//如果推荐已存在 销毁加载动画 开启完成动画 //如果推荐已存在 销毁加载动画 开启完成动画
ani3.destroy(); ani3.destroy();
@ -562,6 +573,7 @@ debugger
} }
$('.opt-advise input').on('input', function() { $('.opt-advise input').on('input', function() {
console.log('------input');
if ($(this).val() !== window.title) { if ($(this).val() !== window.title) {
showTitleChange() showTitleChange()
} }
@ -637,7 +649,9 @@ debugger
}); });
} }
function confirmTitle(obj){ function confirmTitle(obj){
console.log(obj.innerText.length,'obj.innerText.length');
$('.inputChange').val(obj.innerHTML); $('.inputChange').val(obj.innerHTML);
$('.inputText').text(obj.innerText.length + '/100');
hideOptArea(); hideOptArea();
} }
function checkAiTitle() { function checkAiTitle() {
@ -726,6 +740,7 @@ debugger
$(this).addClass('active') $(this).addClass('active')
}); });
function checkTitle(title) { function checkTitle(title) {
console.log('0000000000');
title = title.replace(/\n/g, '\r\n').replace(/^[\n\r\f\t\v\x20]+/, '').replace(/[\n\r\f\t\v\x20]+$/, ''); title = title.replace(/\n/g, '\r\n').replace(/^[\n\r\f\t\v\x20]+/, '').replace(/[\n\r\f\t\v\x20]+$/, '');
if (title.length == 0) { if (title.length == 0) {
alert('请输入标题'); alert('请输入标题');
@ -736,7 +751,7 @@ debugger
alert('标题不能少于' + title_min_limit + '字'); alert('标题不能少于' + title_min_limit + '字');
return false; return false;
} }
var title_max_limit = 50; var title_max_limit = 100;
if (title.length > title_max_limit) { if (title.length > title_max_limit) {
alert('标题不能多于' + title_max_limit + '字'); alert('标题不能多于' + title_max_limit + '字');
return false; return false;
@ -771,6 +786,7 @@ debugger
return; return;
} }
var chkType = $('li.active_select').attr('type'); var chkType = $('li.active_select').attr('type');
console.log(chkType,'chkType====');
$.ajax({ $.ajax({
type: "post", type: "post",
url: 'http://aitest.chachongz.com/ajax_get_config', url: 'http://aitest.chachongz.com/ajax_get_config',
@ -785,6 +801,11 @@ debugger
alert(data.info); alert(data.info);
return; return;
} }
var service_domain = 'http://aitest.chachongz.com/'
let pathType = {
'94':'aiessayzx',
'82':'aiessayen'
}
var title = $(".inputChange").val(); var title = $(".inputChange").val();
var r = checkTitle(title); var r = checkTitle(title);
if (!r) return; if (!r) return;
@ -798,7 +819,7 @@ debugger
alert("请选择您的学历"); alert("请选择您的学历");
return; return;
} }
if (!$('.form_essayWords').hasClass('hide')) { if (chkType != '82' && !$('.form_essayWords').hasClass('hide')) {
var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val()); var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val());
if (wordnums <= 0 || isNaN(wordnums)) { if (wordnums <= 0 || isNaN(wordnums)) {
alert("请选择您的字数"); alert("请选择您的字数");
@ -806,8 +827,6 @@ debugger
} }
} }
var major = parseInt($('#project_select').find('option:selected').val()); var major = parseInt($('#project_select').find('option:selected').val());
var selectedValue = $("#project_select").find("option:selected").val();
console.log(selectedValue,'selectedValue',major);
if (major <= 0 || !major) { if (major <= 0 || !major) {
alert("请选择您的专业"); alert("请选择您的专业");
return; return;
@ -823,7 +842,7 @@ debugger
table_and_formulas += ',' + table_and_formulasval; table_and_formulas += ',' + table_and_formulasval;
} }
//固定外部链接 //固定外部链接
var url = 'http://aitest.chachongz.com/aiessayzx' + "/catalogue?title=" + encodeURIComponent(title); var url = service_domain+ pathType[chkType] + "/catalogue?title=" + encodeURIComponent(title);
// var url = data.data.agent_domain + "/catalogue?title=" + encodeURIComponent(title); // var url = data.data.agent_domain + "/catalogue?title=" + encodeURIComponent(title);
var content_min_limit = $("#htmlconfig").attr('content_min_limit'); var content_min_limit = $("#htmlconfig").attr('content_min_limit');
if (!$('.coreContent').hasClass('hide')) { if (!$('.coreContent').hasClass('hide')) {
@ -905,14 +924,14 @@ debugger
<div class="pay_content " mes="网站已通过备案请放心使用,如支付宝提示风险属于系统正常提示,按提示继续操作就可以,有任何疑问都可联系右侧在线客服"> <div class="pay_content " mes="网站已通过备案请放心使用,如支付宝提示风险属于系统正常提示,按提示继续操作就可以,有任何疑问都可联系右侧在线客服">
<div id="qrcode"></div> <div id="qrcode"></div>
<script> <script>
new QRCode(document.getElementById("qrcode"), { // new QRCode(document.getElementById("qrcode"), {
text: "weixin://wxpay/bizpayurl?pr=ShA8gdVz3", // text: "weixin://wxpay/bizpayurl?pr=ShA8gdVz3",
width: 135, // width: 135,
height: 135, // height: 135,
colorDark: "#000000", // colorDark: "#000000",
colorLight: "#ffffff", // colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H // correctLevel: QRCode.CorrectLevel.H
}); // });
</script> </script>
<div class="pay_type"> <div class="pay_type">

99
style/css/index.css

@ -417,6 +417,10 @@ header .right div{
color: #3D3D3D; color: #3D3D3D;
font-size: 14px; font-size: 14px;
} }
header .right div a{
text-decoration: none;
color: #3D3D3D;
}
header .right .activebtn{ header .right .activebtn{
font-weight: bold; font-weight: bold;
font-variation-settings: "opsz" auto; font-variation-settings: "opsz" auto;
@ -551,24 +555,50 @@ header .right .activebtn{
} }
.main_content .step_back{ .main_content .step_back{
margin-bottom: 12px ; margin-bottom: 12px ;
padding: 10px 0; /* padding: 10px 0; */
width: 100%; width: 100%;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
display: flex; display: flex;
justify-content: center; justify-content: center;
transition:all .7s;
} }
.main_content .stickyStep{ .main_content .stickyStep{
position: sticky; position: sticky;
top: 64px; top: 64px;
opacity: 1; opacity: 1;
padding: 0;
z-index: 9; z-index: 9;
background: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.8);
box-sizing: border-box; box-sizing: border-box;
border-width: 0px 0px 1px 0px; border-width: 0px 0px 1px 0px;
border-style: solid; border-style: solid;
border-image: linear-gradient(270deg, rgba(114, 119, 244, 0) 8%, #7177F4 47%, rgba(117, 119, 245, 0) 89%) 0 0 1 0; border-image: linear-gradient(270deg, rgba(114, 119, 244, 0) 8%, #7177F4 47%, rgba(117, 119, 245, 0) 89%) 0 0 1 0;
backdrop-filter: blur(20px); backdrop-filter: blur(20px);
transition:all .5s;
}
.stickyStep .step_main{
padding: 0 164px;
transition: all .5s;
}
.stickyStep.step_back{
padding: 0 0;
transition: all .5s;
}
.stickyStep .step_main dd{
font-size: 12px;
transition: all .5s;
line-height: 25px;
}
.stickyStep .step_main .active_step_title{
font-size: 14px;
transition: all .5s;
}
.stickyStep .step_main .nor_step_title{
font-size: 14px;
transition: all .5s;
margin-bottom: 0;
} }
.main_content .step_back .step_line{ .main_content .step_back .step_line{
min-width: 70px; min-width: 70px;
@ -662,6 +692,7 @@ header .right .activebtn{
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #3D3D3D; color: #3D3D3D;
letter-spacing: 0.01em;
} }
.step_main dl{ .step_main dl{
display: flex; display: flex;
@ -673,6 +704,7 @@ header .right .activebtn{
margin: 0 0 0 12px; margin: 0 0 0 12px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
letter-spacing: 0.06em;
color: #626573; color: #626573;
} }
.main_select{ .main_select{
@ -789,6 +821,10 @@ li .select_icon, .pay_every .pay_icon{
width: 186px; width: 186px;
margin-right: 22px; margin-right: 22px;
} }
.key_words{
line-height: 45px !important;
margin-top: -40px;
}
.key_words input{ .key_words input{
display: flex; display: flex;
flex: 1; flex: 1;
@ -796,7 +832,7 @@ li .select_icon, .pay_every .pay_icon{
align-items: center; align-items: center;
background-color: #fff; background-color: #fff;
border: 1px solid #E8E8E8; border: 1px solid #E8E8E8;
padding: 8px 8px 8px 12px; padding: 14px 8px 14px 12px;
border-radius: 6px; border-radius: 6px;
} }
.oneRight{ .oneRight{
@ -948,18 +984,55 @@ li .select_icon, .pay_every .pay_icon{
.opt-block .advise-li{ .opt-block .advise-li{
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #282828;
line-height: 20px; line-height: 20px;
padding: 8px 17px; padding: 8px 17px;
color: #3D3D3D;
transition: all .3s;
} }
.opt-block .advise-li:hover{ .opt-block .advise-li:hover{
background: #ECF5FF; background: #F1F4FF;
border-radius: 6px; border-radius: 6px;
transition: all .3s;
}
.opt-block .title-change{
display: flex;
/* width: 374px; */
height: 31px;
background: rgba(0, 0, 0, 0.7531);
border-radius: 6px;
line-height: 20px;
padding: 5px 7px;
position: absolute;
top:10px;
left: 50%;
margin-left: -180px;
opacity: 0; /* 初始状态为完全透明 */
transition: opacity 1s ease-in-out; /* 设置透明度过渡 */
font-family: Microsoft YaHei UI;
align-items: center;
justify-content: center;
}
.opt-block .title-change.fade{
opacity: 1;
}
.opt-block .change-text{
font-weight: 400;
font-size: 13px;
color: #FFFFFF;
margin-right: 7px;
font-family: Microsoft YaHei UI;
}
.opt-block .change-yes, .change-no{
font-weight: 400;
font-size: 13px;
color: #FFCE5C;
margin: 0 7px;
font-family: Microsoft YaHei UI;
} }
.opt-block .advise-refresh{ .opt-block .advise-refresh{
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #1675FF; color: #5B6FF6;
line-height: 20px; line-height: 20px;
padding-top: 8px; padding-top: 8px;
text-align: right; text-align: right;
@ -1159,12 +1232,12 @@ li .select_icon, .pay_every .pay_icon{
transition: all .3s; transition: all .3s;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%); background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
} }
.btn_result:hover{ .btn_result:hover, .btn_result_now:hover{
transition: all .3s; transition: all .3s;
opacity: 0.8; opacity: 0.8;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%); background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
} }
.btn_result:active{ .btn_result:active,.btn_result_now:active{
transition: all .3s; transition: all .3s;
opacity: 1; opacity: 1;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%); background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
@ -1267,8 +1340,16 @@ li .select_icon, .pay_every .pay_icon{
} }
.textAreaRight{ .textAreaRight{
display: flex; display: flex;
position: relative;
}
.char-count {
position: absolute;
bottom: 5px; /* 根据需要调整距离底部的位置 */
right: 10px; /* 根据需要调整距离右侧的位置 */
font-size: 12px; /* 根据需要调整字体大小 */
} }
#side_textarea{ #side_textarea, #coreTextarea{
flex: 1; flex: 1;
/* width: 100%; */ /* width: 100%; */
padding: 14px 12px; padding: 14px 12px;

1
style/img/AI_title_icon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="16" viewBox="0 0 14 16"><g><g><path d="M9.81603,5.47502L6.64146,7.40958L4.90682,10.9474L3.17218,7.40958L0,5.47502L3.17218,3.54046L4.90682,0L6.64146,3.54046L9.81603,5.47502Z" fill="#FF7800" fill-opacity="1"/></g><g><path d="M14.000004891052246,12.632397844543457L12.046414891052246,13.822897844543457L10.978944891052246,15.999997844543458L9.911474891052245,13.822897844543457L7.959364891052246,12.632397844543457L9.911474891052245,11.441897844543456L10.978944891052246,9.263157844543457L12.046414891052246,11.441897844543456L14.000004891052246,12.632397844543457Z" fill="#FF7800" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 739 B

1
style/img/changeMore_tit.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.6 KiB

292
style/js/index.js

@ -4,10 +4,11 @@ $(document).ready(function() {
var notChecked = ''; var notChecked = '';
var checked = ''; var checked = '';
var payResultTimer = null; var payResultTimer = null;
var service_domain = 'http://aitest.chachongz.com/'
var isPayDialog = false var isPayDialog = false
var allPostData=new Object() var allPostData=new Object()
$.get('你的接口URL', function(response) { //获取服务项目具体信息
$.ajax(service_domain +'ajax_get_ai_services', function(response) {
// 请求成功时的回调函数 // 请求成功时的回调函数
console.log(response); console.log(response);
}).fail(function(xhr, status, error) { }).fail(function(xhr, status, error) {
@ -34,15 +35,15 @@ $(document).ready(function() {
} }
//标题输入字数 //标题输入字数
$('.inputChange').on('input', function() { $('.inputChange').on('input', function() {
// var maxLength = $(this).attr('maxlength'); var maxLength = $('.inputText').attr('max');
var currentLength = $(this).val().length; var currentLength = $(this).val().length;
if(currentLength > 0){ if(currentLength > 0){
$('.normal_recommend_title').addClass('recommend_title') $('.normal_recommend_title').addClass('recommend_title')
}else{ }else{
$('.normal_recommend_title').removeClass('recommend_title') $('.normal_recommend_title').removeClass('recommend_title')
} }
$('.inputText').text(currentLength + '/' + '50'); $('.inputText').text(currentLength + '/' + maxLength);
if(currentLength >50){ if(currentLength >maxLength){
$('.inputText').addClass('warnInputText') $('.inputText').addClass('warnInputText')
}else{ }else{
$('.inputText').removeClass('warnInputText') $('.inputText').removeClass('warnInputText')
@ -63,82 +64,6 @@ $(document).ready(function() {
function hideOptArea(){ function hideOptArea(){
$('.opt-area').css('display','none'); $('.opt-area').css('display','none');
} }
function getAiTitleList(){
let title = $('.inputChange').val();
let title_type = $('#project_select').val()
console.log($('#project_select'),title_type);
$.ajax({
type: "post",
url: 'http://aitest.chachongz.com/ajax_advise_ai_title',
data: {
title: title,
title_type: title_type
},
success: function(jsondata) {
// $('#cur_request').val(0)
var res = JSON.parse(jsondata);
console.log(res,'=====');
// if(!res.status){
// alert(res.info);
// return false;
// }
// if(res.data.title != $('#cur_title').val()){
// return false;
// }
// if(res.data.list.length>0){
// let html = ''
// res.data.list.forEach(function(item) {
// html += '<div onclick="confirmTitle(this)" class="advise-li">'+item+'</div>';
// });
// $('#advise-ul').html(html);
// let ani3 = stepLoading(3, 'done')
// ani3.addEventListener('complete', function() {
// stepDone(3, ani3)
// //第四步默认完成
// let ani4 = stepLoading(4, 'done')
// ani4.addEventListener('complete', function() {
// ani4.destroy();
// });
// showAdviseList()
// });
// }
}
});
}
function checkAiTitle() {
let title = $('.inputChange').val();
$.ajax({
type: "post",
url: '/ajax_check_ai_title',
data: {
title: title
},
success: function (jsondata) {
var res = JSON.parse(jsondata);
if (!res.status) {
alert(res.info);
return false;
}
$('#cur_title_type').val(res.data);
if (res.status && res.data != 1) {
if($('#loading').css('display') == 'none'){
showOptArea('not-title');
}
}
}
});
}
function showAdviseTitle(){
console.log('haha');
}
function getWordCountList(){ function getWordCountList(){
var chkType = $('li.active_select').attr('type'); var chkType = $('li.active_select').attr('type');
var word_list_str = $("#word_list_str"+chkType).val(); var word_list_str = $("#word_list_str"+chkType).val();
@ -176,8 +101,6 @@ $(document).ready(function() {
$('.pay_content').removeClass('hide') $('.pay_content').removeClass('hide')
} }
clearTimeout(payResultTimer); clearTimeout(payResultTimer);
// clearInterval()
}) })
function getPayType() { function getPayType() {
var paytype = $('.pay_active').attr('pay_type'); var paytype = $('.pay_active').attr('pay_type');
@ -187,7 +110,7 @@ $(document).ready(function() {
let check_type = $('li.active_select').attr('type'); let check_type = $('li.active_select').attr('type');
let check_flag = $('li.active_select').attr('check_flag'); let check_flag = $('li.active_select').attr('check_flag');
let pay_type = getPayType(); let pay_type = getPayType();
let title = $('.inputChange').val(); let title = $('.inputChange').val().trim();
// goods_id 0 // goods_id 0
// const postData = { // const postData = {
// title:'88', // title:'88',
@ -198,22 +121,85 @@ $(document).ready(function() {
// // recharge_goods_id:'0', // // recharge_goods_id:'0',
// // value_added_services:''//增值服务 // // value_added_services:''//增值服务
// } // }
if(check_type == '') {
alert('提交类型不合法');
errorJump();
return false;
}
const postData = { const postData = {
title: '123', title,
check_type: '94', check_type,
pay_type, pay_type,
get_pay_goods: '1', get_pay_goods: '1',
aiessay_wordnum: '3000'
} }
allPostData = {...allPostData,check_flag,recharge_goods_id:'0',...postData} if ($('.opt-advise').css('display') !== 'none') {
if(title == ''){
if(check_type == '94'){ alert('提交标题不能为空');
return;
}
if(check_type == '62' ||check_type == '63'){
if(title.length >500){
alert('论文标题不得多于500字');
// errorJump();
$('.inputChange').val('')//重置输入框文本
$('.inputText').text('0/500')
return;
}
}
if(title.length >100){
alert('论文标题不得多于100字');
$('.inputChange').val('')//重置输入框文本
$('.inputText').text('0/100')
return;
}
} }
if(check_type == '64'){
title = $('.key_words_input').val().trim()
if(title == ''){
alert('关键词不能为空');
return;
}
if(title.length >50){
alert('关键词不得多于50字');
$('.inputChange').val('')//重置输入框文本
return;
}
postData.title = title
}
if(!$('.custom-select').hasClass('disNone')){
var major = parseInt($('#project_select').find('option:selected').val());
if (major <= 0 || !major) {
alert("请选择您的专业");
return;
}
}
if ($('.form_essayWords').css('display') !== 'none') {
var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val());
if (wordnums <= 0 || isNaN(wordnums)) {
alert("请选择您的字数");
return;
}
}
allPostData = {...allPostData,check_flag,recharge_goods_id:'0',...postData}
//检验信息 //检验信息
getPayQrcode(postData) getPayQrcode(postData)
} }
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')
}
function errorJump() {
// if(isPayDialog) {
location.reload();
return;
// }
// location.href = '/';
}
$('#formInputSumbtn').on('click',function(e){ $('#formInputSumbtn').on('click',function(e){
payAction() payAction()
}) })
@ -222,7 +208,7 @@ $(document).ready(function() {
$.ajax({ $.ajax({
type: "post", type: "post",
dataType:'json', dataType:'json',
url: 'http://aitest.chachongz.com/'+ allPostData.check_flag+'/ajax_check_aisubmit', url: service_domain + allPostData.check_flag+'/ajax_check_aisubmit',
data: { data: {
...postData ...postData
}, },
@ -253,41 +239,41 @@ $(document).ready(function() {
// if(configData.ppt_tpl != '') postData1.ppt_tpl = configData.ppt_tpl;//ppt // if(configData.ppt_tpl != '') postData1.ppt_tpl = configData.ppt_tpl;//ppt
// postData1.recharge_goods_id = '0'; // postData1.recharge_goods_id = '0';
postData1.title = allPostData.title; postData1.title = allPostData.title;
postData1.core_content = core_content; // postData1.core_content = core_content;
// type==94 // if(postData1.type == '63'){
// var edu= parseInt($('#paper-edu-wrapper').find('input[type="radio"]:checked').val()); // postData1.major = parseInt($('#project_select').find('option:selected').val());
// if(edu<=0 || !edu) {
// alert("请选择您的学历");
// return;
// }
// if(!$('.form_essayWords').hasClass('hide')){
// var wordnums= parseInt($('.textLength').find('input[type="radio"]:checked').val());
// if(wordnums<=0 || isNaN(wordnums)) {
// alert("请选择您的字数");
// return;
// }
// }
// var major = parseInt($('#paper-major-wrapper').find('option:selected').val());
// if(major<=0 || !major) {
// alert("请选择您的专业");
// return;
// } // }
if(!$('.custom-select').hasClass('disNone')){
var major = parseInt($('#project_select').find('option:selected').val());
postData1.aiessay_major = major
}
if(!$('.formItem_pro').hasClass('disNone')){
var edu = parseInt($('#educationRight').find('input[type="radio"]:checked').val());
postData1.aiessay_edu = edu
}
if ($('.form_essayWords').css('display') !== 'none') {
var wordnums = parseInt($('input[type="radio"][name="wordnums"]:checked').val());
postData1.aiessay_wordnum = wordnums
}
if(postData1.type == '94'){
postData1.core_content = $('.core_content').val().trim()//核心内容
}
$.ajax({ $.ajax({
url:"http://aitest.chachongz.com/"+allPostData.check_flag+'/ajax_get_ai_pay_url', url:service_domain+allPostData.check_flag+'/ajax_get_ai_pay_url',
type:'post', type:'post',
dataType:'json', dataType:'json',
// data:{...postData1}, data:{...postData1},
data:{ // data:{
type: '94', // type: '94',
pay_type: postData1.pay_type, // pay_type: postData1.pay_type,
value_added_services: '', // value_added_services: '',
recharge_goods_id: '0', // recharge_goods_id: '0',
title: '123', // title: '123',
fuid: '', // fuid: '',
aiessay_wordnum: '3000', // aiessay_wordnum: '3000',
aiessay_edu: '2', // aiessay_edu: '2',
aiessay_major: '1' // aiessay_major: '1'
}, // },
success:function(res){ success:function(res){
if(res.status){ if(res.status){
$('#qrcode').html(''); $('#qrcode').html('');
@ -311,20 +297,21 @@ $(document).ready(function() {
alert('网络错误1'); alert('网络错误1');
} }
}); });
// console.log(allPostData,'allPostData====');
} }
function getRechargePayResult(payinfo){ function getRechargePayResult(payinfo){
console.log(payinfo,'payinfo');
clearTimeout(payResultTimer); clearTimeout(payResultTimer);
if (payinfo.tid) { if (payinfo.tid) {
ptid = payinfo.tid; ptid = payinfo.tid;
} }
$.ajax({ $.ajax({
url:"http://aitest.chachongz.com/"+ allPostData.check_flag +'/ajax_get_ai_pay_result', url:service_domain+ allPostData.check_flag +'/ajax_get_ai_pay_result',
type:'post', type:'post',
dataType:'json', dataType:'json',
data:{ data:{
tid:ptid, tid:ptid,
pay_type:'2'}, pay_type:getPayType()
},
success:function(res){ success:function(res){
if(res.status){ if(res.status){
if(res.data.pay_status == 'NOTPAY') { if(res.data.pay_status == 'NOTPAY') {
@ -359,12 +346,12 @@ $(document).ready(function() {
var data = res.data; var data = res.data;
if(data.wechat_qrcode_url){ if(data.wechat_qrcode_url){
$('#pay_succ_tid').text(data.tid) $('#pay_succ_tid').text(data.tid)
// $('#qrcode1').attr('src', data.wechat_qrcode_url); $('#qrcode1').attr('src', data.wechat_qrcode_url);
$('#qrcode1').attr('src', "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQFX8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyZ0dySDRYMTVmZmsxTHM4ODFEY3YAAgTcO2FnAwQAjScA"); // $('#qrcode1').attr('src', "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQFX8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyZ0dySDRYMTVmZmsxTHM4ODFEY3YAAgTcO2FnAwQAjScA");
} }
$('.payresultBtn2').click(function(){ $('.payresultBtn2').click(function(){
location.href = "http://aitest.chachongz.com/report2?oid="+data.tid; location.href = `${service_domain}report2?oid=${data.tid}`;
}); });
$('.payresultBtn1').click(function(){ $('.payresultBtn1').click(function(){
console.log(isPayDialog,'isPayDialog----'); console.log(isPayDialog,'isPayDialog----');
@ -393,33 +380,65 @@ $(document).ready(function() {
$('li').removeClass('active_select') $('li').removeClass('active_select')
} }
$(this).addClass('active_select') $(this).addClass('active_select')
getWordCountList(); // getWordCountList();
clearhisText()//清空记录
var t = $('li.active_select').attr('type'); var t = $('li.active_select').attr('type');
console.log(t,'=======ttttt'); if(t =='96'){
location.href = 'http://aitest.chachongz.com/aippt'
return
}
if(t =='94'){//字数 if(t =='94'){//字数
$('.form_essayWords').show(); $('.form_essayWords').show();
$('.side_info').show(); $('.side_info').show();
$('.btn_result').show() $('.step_two').show()
$('.btn_result_now').hide()
$('.key_words').addClass('hide') $('.key_words').addClass('hide')
$('.checkbox_wrap').show()
} else{ } else{
$('.btn_result').hide() $('.checkbox_wrap').hide()
$('.btn_result_now').show() $('.step_two').hide()
$('.form_essayWords').hide(); $('.form_essayWords').hide();
$('.side_info').hide(); $('.side_info').hide();
$('.key_words').removeClass('hide') $('.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()
}else{
$('.btn_result').hide()
$('.btn_result_now').show()
$('.step_two').hide()
$('[step="2"]').show()
$('[step="3"]').hide()
}
if(t == '64'){ if(t == '64'){
$('.key_words').show() $('.key_words').show()
$('.key_words').show()
if ($('.opt-advise').css('display') !== 'none') {
// 元素是隐藏的
$('.opt-advise').hide()
}
}else{ }else{
$('.key_words').hide() $('.key_words').hide()
$('.opt-advise').show()
} }
if (['81','85'].indexOf(t) !== -1) {// if (['81','85'].indexOf(t) !== -1) {//
$('.coreContent').show(); $('.coreContent').show();
} else{ } else{
$('.coreContent').hide(); $('.coreContent').hide();
} }
if(t == '62' ||t == '63'){
$('.inputText').attr('max','500')
$('.inputText').text('0/500')
}else if(t==82){
$('.inputText').attr('max','200')
$('.inputText').text('0/200')
}else{
$('.inputText').attr('max','100')
$('.inputText').text('0/100')
}
// $("#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');
@ -433,6 +452,7 @@ $(document).ready(function() {
changeLiActive(t,'support_titleMore','.normal_recommend_title')// 标题优化 changeLiActive(t,'support_titleMore','.normal_recommend_title')// 标题优化
changeLiActive(t,'support_pro','.custom-select')// 专业优化 changeLiActive(t,'support_pro','.custom-select')// 专业优化
changeLiActive(t,'support_edu','.formItem_pro')// 学历优化 changeLiActive(t,'support_edu','.formItem_pro')// 学历优化
// if($('.custom-select').hasClass('disNone') && $('.opt-advise').hasClass('disNone')){}
}); });
function changeLiActive(t,attr_type,ele){ function changeLiActive(t,attr_type,ele){

Loading…
Cancel
Save