核心内容
+
{$access_stats_code}
diff --git a/style/css/index.css b/style/css/index.css
index 61f22f7..f62b638 100644
--- a/style/css/index.css
+++ b/style/css/index.css
@@ -305,6 +305,25 @@ body,p,div{
height: 20px;
top: 0;
}
+
+.payModal .pay_message{
+ display: flex;
+ align-items: center;
+ margin-top: 22px;
+ color: #3D3D3D;
+}
+.payModal .pay_message span{
+ font-size: 16px;
+ display: inline-block;
+ margin-right: 10px;
+}
+.payModal .pay_message p{
+ margin-right: 39px;
+ max-width: 170px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
.payModal .pay_content{
display: flex;
}
@@ -581,7 +600,7 @@ header .right .activebtn{
left: 0;
top: 0; */
}
-.bb{
+.main_page_top{
position: relative;
height: 454px;
}
@@ -1362,18 +1381,17 @@ li .select_icon, .pay_every .pay_icon{
/* margin-top: 12px; */
}
.ppt_tem_item .pptImg{
- width: 164px;
+ width: 162px;
height: 93px;
border-radius: 8px;
- /* border: 2px solid #FFFFFF; */
+ border: 2px solid #E8E9EA;
transition: all .5s ease;
-
}
.ppt_tem_item .ppt_select{
position: absolute;
- right: 4px;
+ right: 0px;
top: 0;
display: none;
width: 25px;
@@ -1382,14 +1400,14 @@ li .select_icon, .pay_every .pay_icon{
.ppt_item_active .pptImg{
border-radius: 8px;
opacity: 1;
- box-sizing: border-box;
+ /* box-sizing: border-box; */
border: 2px solid #697CF7;
}
.ppt_item_active .ppt_select{
display: block;
}
.ppt_tem_item .firstlook{
- width: 164px;
+ width: 166px;
/* width: 100%; */
height: 0px;
/* line-height: 24px; */
@@ -1405,7 +1423,7 @@ li .select_icon, .pay_every .pay_icon{
border-radius: 8px;
opacity: 1;
/* width: 166px; */
- box-sizing: border-box;
+ /* box-sizing: border-box; */
border: 2px solid #697CF7;
transition: all .5s ease;
}
@@ -1420,6 +1438,9 @@ li .select_icon, .pay_every .pay_icon{
color: #3D4B54;
text-align: center;
}
+.uploadfile-error {
+ color: #FF1414;
+}
/* ppt end */
.educationRight{
display: flex;
@@ -1474,7 +1495,7 @@ li .select_icon, .pay_every .pay_icon{
.tableChart_active div{
background: url(../img/checked_icon.svg);
}
-.btn_result,.btn_result_now{
+.btn_result,.btn_result_now,.downLoad{
width: 200px;
height: 50px;
font-size: 15px;
@@ -1487,12 +1508,12 @@ li .select_icon, .pay_every .pay_icon{
transition: all .3s ease;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
}
-.btn_result:hover, .btn_result_now:hover{
+.btn_result:hover, .btn_result_now:hover,.downLoad:hover{
transition: all .3s ease;
opacity: 0.8;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
}
-.btn_result:active,.btn_result_now:active{
+.btn_result:active,.btn_result_now:active,.downLoad:active{
transition: all .3s ease;
opacity: 1;
background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
@@ -1772,3 +1793,134 @@ footer a{
color: black;
text-decoration: none;
}
+/* 报告下载start */
+
+#report_page{
+ width: 100%;
+ height: calc(100% - 64px);
+ position: absolute;
+ margin: 0 auto;
+ width: 100%;
+ min-width: 1200px;
+ z-index: 66;
+ top: 64px;
+ display: flex;
+ flex-direction: column;
+ font-family: Microsoft YaHei UI;
+}
+.report_box{
+ width: 100%;
+ flex-direction: column;
+}
+.report_content{
+ width: 600px;
+ text-align: center;
+ /* display: flex;
+ flex-direction: column;
+ justify-content: center; */
+}
+.report_content h3{
+ margin: 36px 0 30px;
+ font-size: 22px;
+ font-weight: bold;
+ line-height: normal;
+ letter-spacing: 1.04px;
+ font-variation-settings: "opsz" auto;
+ color: #3D3D3D;
+}
+.report_content .search_report{
+ font-size: 14px;
+ color: #3D3D3D;
+ border-radius: 6px;
+ background: #FFFFFF;
+ border: 1px solid #E8E8E8;
+ padding: 16px 20px;
+ display: flex;
+ line-height: 20px;
+}
+.report_content .search_report .report_input{
+ color: #3D3D3D;
+ margin-right: 10px;
+ flex: 1;
+ border: none;
+}
+.report_content .search_report .report_input::placeholder{
+ color: #8C919D;
+
+}
+.report_content .search_report .report_input:focus-visible{
+ outline: none;
+}
+.report_content #searchReport{
+ color: #5B6FF6;
+ margin-left: 16px;
+}
+.report_content .report_ques{
+ color: #5B6FF6;
+ margin: 16px 0 30px;
+}
+.report_content .report_detail{
+ width: 600px;
+ height: 360px;
+ border-radius: 6px;
+ opacity: 1;
+ background: rgba(255, 255, 255, 0.8);
+ margin-bottom: 19px;
+}
+.empty img{
+ width: 60px;
+ height: 60px;
+ margin-bottom: 16px;
+}
+.report_content .report_detail .empty{
+ flex-direction: column;
+ color: #1D2837;
+ height: 100%;
+}
+.report_box .report_mes{
+ color: #EE7000;
+ border-radius: 6px;
+ background: rgba(236, 133, 51, 0.12);
+ padding: 8px 16px;
+}
+.report_main{
+ width: calc(100% - 52px);
+ height: calc(100% - 52px);
+ padding: 26px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+.report_main .main_item{
+ display: flex;
+ text-align: left;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 20px;
+ letter-spacing: 0px;
+ color: #2C394B;
+ margin-bottom: 20px;
+}
+.main_item label{
+ width: 70px;
+ margin-right: 20px;
+ color: #5C6E86;
+}
+.main_item p{
+ flex: 1;
+}
+.report_main .main_top{
+ flex: 1;
+}
+.report_main .downLoad{
+ width: 130px;
+ padding: 11px 0;
+ border-radius: 8px;
+ line-height: 18px;
+ color: #FFFFFF;
+ margin: 0;
+ height: auto;
+ background: linear-gradient(270deg, #6C69F5 0%, #3467E5 100%);
+}
+/* 报告下载end */
+
diff --git a/style/img/mes.svg b/style/img/mes.svg
new file mode 100644
index 0000000..4c2cec1
--- /dev/null
+++ b/style/img/mes.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/style/img/question.svg b/style/img/question.svg
new file mode 100644
index 0000000..82234c7
--- /dev/null
+++ b/style/img/question.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/style/img/report_null.svg b/style/img/report_null.svg
new file mode 100644
index 0000000..1b3b8ba
--- /dev/null
+++ b/style/img/report_null.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/style/js/index.js b/style/js/index.js
index 7b2269c..cb31b71 100644
--- a/style/js/index.js
+++ b/style/js/index.js
@@ -4,17 +4,88 @@ $(document).ready(function() {
var notChecked = '';
var checked = '';
var payResultTimer = null;
- var service_domain = location.origin+'/'
+ // var service_domain = location.origin+'/'
+ var service_domain = 'https://aitest.chachongz.com/'
var isPayDialog = false
var allPostData=new Object()
+ var old_parent_ppt = null;
+ var new_parent_ppt = 0;
+ var child_ppt = 0;
+ var child_src = ''
+ // var cssurl= '{$priv_style}/img/'
+ var cssurl= './style/img/'//dev
+ var pptUrlList = [
+ {
+ name:'清新绿意通用模版',
+ url:'',
+ list:[],
+ ppt_id:'2'
+ },
+ {
+ name:'蓝色启航通用模版',
+ ppt_id:'3'
+ },
+ {
+ name:'蓝色梦境通用模版',
+ ppt_id:'5'
+ },
+ {
+ name:'棕韵蓝调通用模版',
+ ppt_id:'6'
+ },
+ {
+ name:'绿野金辉通用模版',
+ ppt_id:'7'
+ },
+ {
+ name:'深邃星空通用模版',
+ ppt_id:'8'
+ },
+ {
+ name:'毕业庆典通用模版',
+ ppt_id:'9'
+ },
+ {
+ name:'生命之链通用模版',
+ ppt_id:'10'
+ },
+ {
+ name:'云水之间通用模版',
+ ppt_id:'11'
+ },
+ {
+ name:'金色地标通用模版',
+ ppt_id:'12'
+ },
+
+
+ ]
+ var checkTypeList={
+ '94':'毕业论文',
+ '81':'课程论文',
+ '85':'职称论文',
+ '62':'开题报告',
+ '64':'论文选题',
+ '91':'文献综述',
+ '96':'答辩PPT',
+ '63':'任务书',
+ '82':'英文论文',
+ }
//获取服务项目具体信息
- $.ajax(service_domain +'ajax_get_ai_services', function(response) {
- // 请求成功时的回调函数
- console.log(response);
- }).fail(function(xhr, status, error) {
- // 请求失败时的回调函数
- console.log(error);
- });
+ // $.ajax(service_domain +'ajax_get_ai_services', function(response) {
+ // // 请求成功时的回调函数
+ // console.log(response);
+ // }).fail(function(xhr, status, error) {
+ // // 请求失败时的回调函数
+ // console.log(error);
+ // });
+ // $.ajax(service_domain +'//ajax_get_valid_pay_types', function(response) {
+ // // 请求成功时的回调函数
+ // console.log(response);
+ // }).fail(function(xhr, status, error) {
+ // // 请求失败时的回调函数
+ // console.log(error);
+ // });
//step监听滚动位置
scrollView()
function scrollView(){
@@ -24,6 +95,7 @@ $(document).ready(function() {
// console.log($(this).scrollTop(),'$(this).scrollTop()');
var distanceToTop = element.offset().top - $(this).scrollTop();
if(distanceToTop <= 64){
+ if($('.main_page_top').hasClass('hide'))return
element.addClass('stickyStep')
element2.addClass('footer2')
@@ -33,14 +105,27 @@ $(document).ready(function() {
}
});
}
- function getFormData() {
- var formData = new FormData(document.querySelector('form'));
- var data = {};
- for (var [key, value] of formData.entries()) {
- data[key] = value;
+ $('.right_btn').click(function(){
+ $('.right_btn').removeClass('activebtn')
+ $(this).addClass('activebtn')
+ if($(this).attr('type') == '1'){
+ $('.main_page_top').removeClass('hide')
+ $('.main_page').removeClass('hide')
+ $('#report_page').addClass('hide')
+ }else{
+ $('.main_page_top').addClass('hide')
+ $('.main_page').addClass('hide')
+ $('#report_page').removeClass('hide')
}
- console.log(data);
- }
+ })
+ // function getFormData() {
+ // var formData = new FormData(document.querySelector('form'));
+ // var data = {};
+ // for (var [key, value] of formData.entries()) {
+ // data[key] = value;
+ // }
+ // console.log(data);
+ // }
//标题输入字数
$('.inputChange').on('input', function() {
var maxLength = $('.inputText').attr('max');
@@ -156,6 +241,13 @@ $(document).ready(function() {
$('.inputText').text('0/500')
return;
}
+ }else if(check_type == '96'){
+ if(title.length >100){
+ alert('论文标题不得多于200字');
+ $('.inputChange').val('')//重置输入框文本
+ $('.inputText').text('0/200')
+ return;
+ }
}
if(title.length >100){
alert('论文标题不得多于100字');
@@ -191,6 +283,26 @@ $(document).ready(function() {
return;
}
}
+ if(check_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();
+
+ if (!upload_file_md5 || !upload_file_name || !upload_file_tmpname) {
+ alert("请上传论文文件");
+ return;
+ }
+ if (!pptid) {
+ alert("请选择ppt模板");
+ return;
+ }
+
+ postData.ppt_tpl = pptid;
+ postData.upload_file_md5 = upload_file_md5;
+ postData.upload_file_name = upload_file_name;
+ postData.upload_file_tmpname = upload_file_tmpname;
+ }
allPostData = {...allPostData,check_flag,recharge_goods_id:'0',...postData}
//检验信息
@@ -215,7 +327,6 @@ $(document).ready(function() {
payAction()
})
function getPayQrcode(postData){
-
$.ajax({
type: "post",
dataType:'json',
@@ -231,6 +342,11 @@ $(document).ready(function() {
}
$('.pageMask').removeClass('hide');
$('.payModal').removeClass('hide');
+ // $('.pay_message').html = `
写作题目:`+ postData.title+`
+ //
写作类型:`+ checkTypeList[postData.check_type]+`
+ //
订单金额:10元
`
+ // $('.payCode').removeClass('hide');
+ // $('.pay_content').html = $('#payCode').html
isPayDialog = true
if(postData.pay_type == 2 || postData.pay_type == 3){
getRechargePayUrl()
@@ -241,7 +357,6 @@ $(document).ready(function() {
});
}
function getRechargePayUrl(){
- console.log(allPostData,'allPostData');
var core_content = $('.coreWordCount').val();
var postData1 = new Object();
postData1.type = allPostData.check_type;
@@ -269,6 +384,17 @@ $(document).ready(function() {
if(postData1.type == '94'){
postData1.core_content = $('.core_content').val().trim()//核心内容
}
+ 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.upload_file_md5 = upload_file_md5;
+ postData1.upload_file_name = upload_file_name;
+ postData1.upload_file_tmpname = upload_file_tmpname;
+ }
$.ajax({
url:service_domain+allPostData.check_flag+'/ajax_get_ai_pay_url',
type:'post',
@@ -291,6 +417,8 @@ $(document).ready(function() {
$('#qrcode').attr('tid', res.data.tid);
$('#qrcode').attr('paytype', postData1.pay_type);
$('#totalMoney').text(res.data.total_fee)
+ // $('#pay_money').text(res.data.total_fee + '元')
+
var qrcode = new QRCode(document.getElementById("qrcode"), {
text: res.data.qrcode_url,
width: 135,
@@ -309,6 +437,7 @@ $(document).ready(function() {
}
});
}
+
function getRechargePayResult(payinfo){
console.log(payinfo,'payinfo');
clearTimeout(payResultTimer);
@@ -352,7 +481,7 @@ $(document).ready(function() {
});
}
- payresultAction({data:{tid:'99237482378','wechat_qrcode_url':'iuyeriuweyi'}})
+ // payresultAction({data:{tid:'99237482378','wechat_qrcode_url':'iuyeriuweyi'}})
function payresultAction(res) {
var data = res.data;
if(data.wechat_qrcode_url){
@@ -396,10 +525,10 @@ $(document).ready(function() {
// getWordCountList();
clearhisText()//清空记录
var t = $('li.active_select').attr('type');
- if(t =='96'){
- location.href = location.origin+'/aippt'
- return
- }
+ // if(t =='96'){
+ // location.href = location.origin+'/aippt'
+ // return
+ // }
if(t =='94'){//字数
$('.form_essayWords').show();
$('.side_info').show();
@@ -445,18 +574,20 @@ $(document).ready(function() {
if(t == '62' ||t == '63'){
$('.inputText').attr('max','500')
$('.inputText').text('0/500')
- }else if(t=='82'){
+ }else if(t=='82' ||t == '96'){
$('.inputText').attr('max','200')
$('.inputText').text('0/200')
}else{
$('.inputText').attr('max','100')
$('.inputText').text('0/100')
}
- // if(t == '96'){
- // $('.form_pptItem').show()
- // }else{
- // $('.form_pptItem').hide()
- // }
+ if(t == '96'){
+ $('.form_pptItem').show()
+ $('#formInputSumbtn').html('生成答辩PPT')
+ }else{
+ $('.form_pptItem').hide()
+ $('#formInputSumbtn').html('立即生成')
+ }
// $("#downdemo").attr('href', '/downreportdemo/type/'+t);
//图表公式
var table_formula_types = getTableFormulaTypes('support_table_formula_types');
@@ -493,4 +624,208 @@ $(document).ready(function() {
var support_table_formula_types_arr = support_table_formula_types.split(",");
return support_table_formula_types_arr;
}
+ pptUrlList = pptUrlList.map((item,ind)=>{
+ let list = [];
+ let num = 8;
+ for(let i=0;i
{
+ html += `
+

+
预览
+

+
`+item.name +`
+
`
+ })
+ $('.ppt_temList').html(html);
+
+ // }
+ //附图片
+ //初识设置
+ function setLeftShow(key){
+ if(!$('.look_PPT_modal').hasClass('hide')){
+ let html = '';
+ let childList = []
+ childList = pptUrlList[key]['list']
+ childList.forEach((item,i)=>{
+ html += `
`
+ })
+ $('.gallery').html(html);
+ $('.gallery_img').eq(child_ppt).addClass('ppt_child_active');
+ setBackImgUrl(childList[child_ppt],true)
+ }
+ }
+ // 弹窗模版
+ $('.look_right .pptImg').click(function(e){
+ let index = $(this).attr('index');
+ setLookPPT_active(index)
+ new_parent_ppt = index;
+ child_ppt = 0;
+ setLeftShow(new_parent_ppt)
+ })
+ //页面模版
+ $('.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){
+ $('.form_pptItem .ppt_tem_item').removeClass('ppt_item_active')
+ $('.form_pptItem .ppt_tem_item').eq(index).addClass('ppt_item_active');
+ }
+ 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)
+ })
+ function setBackImgUrl(url,flag){
+ $('.topimg').attr('src',url)
+ if(!flag)return
+ $('.look_backImg').attr('src',url)
+ }
+
+ $('.lookAll').click(function(e){
+ $('.look_PPT_modal').removeClass('hide')
+ if (!$('.look_PPT_modal').hasClass('hide')) {
+ if(old_parent_ppt !== null){
+ setLookPPT_active(old_parent_ppt)
+ }else{
+ setLookPPT_active(0)
+ }
+ setLeftShow(old_parent_ppt != null ? old_parent_ppt : 0)
+ }
+ })
+ $('.firstlook').click(function(e){
+ let index = $(this).attr('index');
+ old_parent_ppt = index;
+ child_ppt = 0;
+ $('.look_PPT_modal').removeClass('hide')
+ setLookPPT_active(old_parent_ppt)
+ setLeftShow(old_parent_ppt)
+ })
+ $('.exitLook,.ppt_cancel').click(function(e){
+ $('.look_PPT_modal').addClass('hide')
+ })
+ $('.ppt_submit').click(function(e){
+ old_parent_ppt = new_parent_ppt;
+ setPagePPT_active(old_parent_ppt)
+ $('.look_PPT_modal').addClass('hide')
+ })
+
+ $(function(){
+ bindFileUpload();
+ });
+ function bindFileUpload() {
+ var formData = new FormData();
+ $('.uploadShow').on('click', function (event) {
+ $('#fileUpload').trigger('click')
+ })
+ $('#againBtn').on('click', function (event) {
+ $('#fileUpload').trigger('click')
+ })
+ $('#cancleBtn').click(function(){
+ formData = new FormData();
+ $('.uploadMes').html('')
+ })
+ $('#fileUpload').on('change', function () {
+ $('#againBtn').addClass('hide')
+ var fileInput = $(this);
+ var files = fileInput.prop('files');
+ var file = files[0]; // 获取文件
+ console.log(files,file.name,'======');
+ if (file) {
+ // 这里可以添加上传文件之前的逻辑,例如文件验证
+ // 创建FormData对象
+ formData.append('paper_file', file);
+ formData.append('paper_type', '1');
+ formData.append('is_asynch', '1');
+ formData.append('ver_chktype', $("#ppt_type").val());
+ // 使用jQuery AJAX上传文件
+ $.ajax({
+ url: 'https://aitest.chachongz.com'+'/upload_file',
+ type: 'POST',
+ data: formData,
+ dataType: 'json',
+ processData: false, // 告诉jQuery不要处理发送的数据
+ contentType: false, // 告诉jQuery不要设置Content-Type请求头
+ xhr: function () {
+ $(".uploadShow").addClass('hide');
+ $(".uploadMesShow").removeClass('hide');
+ $(".uploadMes").removeClass('hide');
+ $('#cancleBtn').removeClass('hide')
+
+ var xhr = $.ajaxSettings.xhr();
+ if (xhr.upload) {
+ $(".fileName").html(file.name);
+
+ xhr.upload.addEventListener('progress', function (e) {
+ if (e.lengthComputable) {
+ var progress = Math.ceil((e.loaded / e.total) * 100);
+ console.log('progress', progress)
+ $('.uploadMes').html('上传中......' + progress + '%');
+ }
+ }, false);
+ }
+ return xhr;
+ },
+ success: function (res) {
+ // 成功回调
+ // res = fileMockData
+ console.log('File uploaded successfully:', res);
+ if (res.status) {
+ $(".uploadShow").addClass('hide');
+ $("#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);
+ $("#upload_file_tmpname").val(res.data.upload_file_tmpname);
+ } else {
+ $(".uploadShow").addClass('hide');
+ $(".uploadMes").html(res.info);
+ $("#cancleBtn").addClass('hide');
+ $('#againBtn').removeClass('hide')
+ $('.uploadMes').addClass("uploadfile-error");
+ $(".uploadMes").removeClass('hide');
+ }
+ },
+ error: function (jqXHR, textStatus, errorThrown) {
+ // 错误回调
+ console.log('File upload failed:', textStatus);
+ $(".uploadShow").addClass('hide');
+ $('.uploadMes').html('解析失败!请检查文件重新上传');
+ $('.uploadMes').addClass("uploadfile-error");
+ $(".uploadMes").removeClass('hide');
+ $('#againBtn').removeClass('hide')
+ }
+ });
+ }
+ });
+ }
});
\ No newline at end of file