You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2727 lines
117 KiB
2727 lines
117 KiB
<script src="{$smarty.const.CSS_URL}/js/jquery.qrcode.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="{$smarty.const.CSS_URL}/assets_v2/css/newai/pay.css?v=707" />
|
|
<script type="text/javascript"
|
|
src="{$smarty.const.FONT_CSS_URL}/assets_v2/js/common/jquery.splendid.textchange.js?v={$smarty.const.CSS_JS_VERSION}"></script>
|
|
|
|
<div class="paycom{if $pay_is_dialog} paycom-dialog pay_modal hide{/if} {if !$pay_is_dialog}flex{/if}">
|
|
{if $pay_is_dialog}
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/close.png" alt="" class="loginConClose" onclick="hidePayModel()">
|
|
{/if}
|
|
<!-- 余额充足 -->
|
|
<div class="paywrap hide">
|
|
<ul>
|
|
<li>
|
|
<span id="waitPayMoney"></span>
|
|
<span>元</span>
|
|
<span id="waitPayMoneyShiji"></span>
|
|
</li>
|
|
<li>
|
|
<span>提交后余额自动抵扣</span>
|
|
</li>
|
|
<li>
|
|
<button class="primaryBtn" id="waitPayMoneySubBtn">确认提交</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!-- 余额充足 -->
|
|
|
|
<div class="pay_main-left ">
|
|
|
|
<!-- 余额不足 -->
|
|
<!-- {if $pay_is_dialog} -->
|
|
<h1 class="paycom-dialog-title modal-title">支付订单</h1>
|
|
<!-- {/if} -->
|
|
<div class="paperInfo flex-between">
|
|
<div class="labelItem">
|
|
<span class="label">排版论文:</span>
|
|
<span id="paper_name">文件名称.docx</span>
|
|
</div>
|
|
<div class="labelItem">
|
|
<span class="label">页数:</span>
|
|
<span id="paper_name">25页</span>
|
|
</div>
|
|
<div class="labelItem">
|
|
<span class="label">排版论文:</span>
|
|
<span id="paper_name">中国人民大学-硕士-通用</span>
|
|
</div>
|
|
<div class="labelItem">
|
|
<span class="label">价格:</span>
|
|
<span id="paper_name">20 元/篇</span>
|
|
</div>
|
|
</div>
|
|
<div class="paywrap2 hide">
|
|
<ul class="item payGoodsList hide">
|
|
<li class="active" indexatt="0" goods_id="0">
|
|
<p>
|
|
<span id="payPrice"></span>
|
|
<span>元</span>
|
|
</p>
|
|
<p>不参与优惠 原价付</p>
|
|
</li>
|
|
</ul>
|
|
|
|
{if $isai2}
|
|
<div class="pay_qrcode-types">
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pay_qrcode-price flex">
|
|
|
|
<ul class="{if $isai2}payQrcodeUlai2 {/if}item payQrcodeUl hide{if $pay_is_dialog} payQrcodeUlDialog{/if} qrcode_box flex"
|
|
>
|
|
<li class="qrcode-wrap">
|
|
<div class="payQrcodeWrap">
|
|
{if !$isai2}
|
|
<img class="payQrcodeBorder" src="{$smarty.const.CSS_URL}/images/ai/wx_scan_border.png" alt="">
|
|
{else}
|
|
<img class="payQrcodeBorder" src="{$smarty.const.CSS_URL}/images/ai2/pay/qrcode_border.png" alt="">
|
|
{/if}
|
|
<div id="payQrcodeImgWrap" class="payQrcodeImg"></div>
|
|
<div class="payQrcodeMask"></div>
|
|
<img class="payQrcodeRefresh" src="{$smarty.const.CSS_URL}/images/ai/refresh.png" alt="">
|
|
<p class="payQrcodeError">点击刷新</p>
|
|
</div>
|
|
|
|
{if !$isai2}
|
|
<p class="payqrcode zfb hide">
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/zfb.png" alt="">
|
|
支付宝扫码支付
|
|
</p>
|
|
|
|
<p class="payqrcode wx hide">
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/wx3.png" alt="">
|
|
微信扫码支付
|
|
</p>
|
|
<p class="paytypeSwitch hide"></p>
|
|
{/if}
|
|
</li>
|
|
<li class="payinfoWrap">
|
|
<p>
|
|
<span id="payinfoWrapMoney"></span>
|
|
<span>元</span>
|
|
<span id="payinfoWrapRemain" class="hide"></span>
|
|
</p>
|
|
<div class="pay_warn">
|
|
<p>扫码支付自动提交,请勿刷新</p>
|
|
<p>提交成功用订单号查询结果</p>
|
|
</div>
|
|
<!-- <p>单价:¥17/千字符</p> -->
|
|
</li>
|
|
</ul>
|
|
|
|
<!-- 余额不足 -->
|
|
<!-- {if !$pay_is_dialog}
|
|
</div>
|
|
{/if} -->
|
|
<!-- {if !$pay_is_dialog}
|
|
<div class="paytips paytipstb paytipscard hide">·网站已通过备案请放心使用,如支付宝提示风险属于系统正常提示,按提示继续操作就可以,有任何疑问都可联系右侧在线客服</div>
|
|
{/if} -->
|
|
|
|
|
|
|
|
<div class="cardpayComWrap hide " style="{if $isbule_tpl}background:transparent;{/if}margin-top:0px;">
|
|
<div class="checkCardComleft pay_jck">
|
|
<div class="checkCardComleftDesc">
|
|
<h1>请输入卡号</h1>
|
|
</div>
|
|
|
|
<div class="checkCardComleftInput">
|
|
<input type="text" class="self_input" placeholder="请输入卡号" id="aiCheckCardInput">
|
|
{if $isbule_tpl}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright2.png" alt="">
|
|
{else}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright.png" alt="">
|
|
{/if}
|
|
<img class="hide error" src="{$smarty.const.CSS_URL}/images/ai2/pay/tberror.png" alt="">
|
|
</div>
|
|
|
|
<div class="checkCardComeleftError hide checkCardTidErrrorflag">
|
|
<p></p>
|
|
</div>
|
|
|
|
<button class="primary_btn cyan" id="checkCardComTbsubmit"
|
|
style="{if $isbule_tpl}background:#1675FF !important;{/if}">确认提交</button>
|
|
<button class="primary_btn cyan hide" id="checkCardComTbsubmitNoReady"
|
|
style="{if $isbule_tpl}background:#1675FF !important;{/if}">确认提交</button>
|
|
|
|
<div class="checkCardComRecharge ">
|
|
<div class="checkCardComRechargeLeft">
|
|
<img class="checkcard_zfbpay" src="{$smarty.const.CSS_URL}/images/ai2/pay/qrcode_border.png" alt="">
|
|
<img class="checkcard_wxpay" src="{$smarty.const.CSS_URL}/images/ai2/pay/wxqrcode_border.png"
|
|
alt="">
|
|
<div id="checkCardComRechargeQrcodeWrap"></div>
|
|
|
|
</div>
|
|
<div class="checkCardComRechargeRight">
|
|
<ul>
|
|
<!-- <li></li>
|
|
<li></li>
|
|
<li></li> -->
|
|
<!-- <li><span>需再支付</span><span>1888.00</span><span>元</span></li>
|
|
<li>订单金额:1888.00元</li>
|
|
<li>减免金额:1888.00元</li> -->
|
|
</ul>
|
|
<div class="checkCardComRechargePayType">
|
|
支付方式:
|
|
<img class="checkcard_zfbpay" src="{$smarty.const.CSS_URL}/images/ai2/pay/zfbpay_active.png"
|
|
alt="">
|
|
<img class="checkcard_wxpay" src="{$smarty.const.CSS_URL}/images/ai2/pay/wxpay_active.png"
|
|
alt="">
|
|
<span class="checkcard_zfbpay"></span>
|
|
<span class="checkcard_wxpay"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 增加 hide -->
|
|
<div class="checkCardComright hide">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="tbpayComWrap taobao_wrap hide" style="{if $isbule_tpl}background:#fff !important;{/if}margin-top:0px;">
|
|
|
|
<div class="comleft taobao_left flex">
|
|
<div class="comleftDesc">
|
|
<h4>已下单,填{if $_is_jd}京东{else}淘宝{/if}订单号</h4>
|
|
</div>
|
|
<div class="tb-left-mes flex">
|
|
<h3 class="comTbPiece">
|
|
<span>应拍</span><span>{$config.unit_piece}</span><span>件(1{$config.unit_name}/{$config.unit_piece}件)</span>
|
|
</h3>
|
|
<div style="position: relative;">
|
|
|
|
<h2 class="comFindTbOrder tb-right-mes"
|
|
style="{if $isbule_tpl}color:#8C919D !important;opacity: 0.9;font-size: 14px !important;{/if}">
|
|
订单号在哪?</h2>
|
|
<div class="tb_order_trianglewrap comFindTbOrderExample hide">
|
|
<div class="comFindTbOrderExample triangle tb_order_triangle hide"></div>
|
|
</div>
|
|
<div class="hide comTbOrderImg comFindTbOrderExample{if $_is_jd} comJdOrderImg{/if}">
|
|
<div class="active">
|
|
{if $_is_jd}<img src="{$smarty.const.CSS_URL}/images/ai2/pay/jdpay.png"
|
|
alt=""> 京东{else}<img src="{$smarty.const.CSS_URL}/images/ai2/pay/tbpay.png"
|
|
alt=""> 淘宝{/if}订单
|
|
</div>
|
|
{if $_is_jd}
|
|
<img src="{$smarty.const.CSS_URL}/assets_v2/images/right/jd_tips.png" alt="">
|
|
{else}
|
|
<img src="{$smarty.const.CSS_URL}/images/ai2/pay/tb_order.png" alt="">
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="comleftInput">
|
|
<div class="left-more inputWrap tb-input">
|
|
<span>淘宝订单号:</span>
|
|
<input type="text" placeholder="请输入" id="aiTaobaoTidInput1">
|
|
{if $isbule_tpl}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright2.png" alt="">
|
|
{else}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright.png" alt="">
|
|
{/if}
|
|
<img class="hide error" src="{$smarty.const.CSS_URL}/images/ai2/pay/tberror.png" alt="">
|
|
</div>
|
|
<!-- <input type="text" placeholder="请输入订单号" id="aiTaobaoTidInput1"> -->
|
|
</div>
|
|
|
|
<!-- 订单总数:3 已用数:2 可用数:1 -->
|
|
<div class="comTbTidRemain hide">
|
|
<div>订单总数:<span></span></div>
|
|
<div>已用数:<span></span></div>
|
|
<div>可用数:<span></span></div>
|
|
</div>
|
|
|
|
<div class="comleftInput">
|
|
<div class="left-more inputWrap tb-input">
|
|
<span>淘宝订单号:</span>
|
|
<input type="text" placeholder="请输入" id="aiTaobaoTidInput2">
|
|
{if $isbule_tpl}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright2.png" alt="">
|
|
{else}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright.png" alt="">
|
|
{/if}
|
|
<img class="hide error" src="{$smarty.const.CSS_URL}/images/ai2/pay/tberror.png" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="comTbTidRemain hide">
|
|
<div>订单总数:<span></span></div>
|
|
<div>已用数:<span></span></div>
|
|
<div>可用数:<span></span></div>
|
|
</div>
|
|
|
|
<div class="comleftInput">
|
|
<div class="left-more inputWrap tb-input">
|
|
<span>淘宝订单号:</span>
|
|
<input type="text" placeholder="请输入" id="aiTaobaoTidInput3">
|
|
{if $isbule_tpl}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright2.png" alt="">
|
|
{else}
|
|
<img class="hide right" src="{$smarty.const.CSS_URL}/images/ai2/pay/tbright.png" alt="">
|
|
{/if}
|
|
<img class="hide error" src="{$smarty.const.CSS_URL}/images/ai2/pay/tberror.png" alt="">
|
|
</div>
|
|
</div>
|
|
<div class="comTbTidRemain hide">
|
|
<div>订单总数:<span></span></div>
|
|
<div>已用数:<span></span></div>
|
|
<div>可用数:<span></span></div>
|
|
</div>
|
|
|
|
<div class="comeleftError hide tidErrrorflag">
|
|
<p></p>
|
|
</div>
|
|
<button class="primary_btn tb-submit-btn cyan" id="comTbsubmit"
|
|
style="{if $isbule_tpl}background:#1675FF !important;{/if}">确认提交</button>
|
|
<button class="primary_btn tb-submit-btn cyan hide" id="comTbsubmitNoReady"
|
|
style="{if $isbule_tpl}background:#1675FF !important;{/if}">确认提交</button>
|
|
</div>
|
|
|
|
<div class="comright taobao_right flex">
|
|
<h4>未下单,先购买</h4>
|
|
<div class="comrightQrcode" id="comtbQrcode"></div>
|
|
<p>{if $_is_jd}京东{else}淘宝{/if}APP扫码拍单</p>
|
|
<button class="common_btn orange tb-app-btn" id="comToTbShopBtn">跳转{if $_is_jd}京东{else}淘宝{/if}下单</button>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{if $pay_is_dialog}
|
|
</div>
|
|
{/if}
|
|
|
|
<div id="payPaperTitle" class="hide">{$smarty.get.title|@urldecode}</div>
|
|
{if $smarty.get.core}
|
|
<div id="payPaperCore" class="hide">{$smarty.get.core|@urldecode}</div>
|
|
{/if}
|
|
<div id="payCheckType" class="hide">{$config.check_type}</div>
|
|
<div id="payCheckConfig" class="hide">{$check_configs}</div>
|
|
|
|
{if $_ai_login_type}
|
|
<div id="aiNoNeedLogin" class="hide"></div>
|
|
{/if}
|
|
|
|
{if $isai2}
|
|
<div id="isai2" class="hide"></div>
|
|
{/if}
|
|
|
|
{if $pay_is_dialog}
|
|
<div id="isPayDialog" class="hide"></div>
|
|
<div id="isPayDialogMask" class="hide"></div>
|
|
<div id="typeinputDialog" class="hide">{$typeinput|@json_encode}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.aiessay_wordnum>=0}
|
|
<div id="aiessayWordnum" class="hide">{$smarty.get.aiessay_wordnum}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.table_and_formulas}
|
|
<div id="tableAndFormulas" class="hide">{$smarty.get.table_and_formulas}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.major}
|
|
<div id="aiessayMajor" class="hide">{$smarty.get.major}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.qikan_level}
|
|
<div id="aiessayQikanLevel" class="hide">{$smarty.get.qikan_level}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.edu}
|
|
<div id="aiessayEdu" class="hide">{$smarty.get.edu}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.is_detail_demand}
|
|
<div id="detailDemand" class="hide">{$smarty.get.is_detail_demand}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.is_core_content}
|
|
<div id="coreContent" class="hide">{$smarty.get.is_core_content}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.keyword}
|
|
<div id="aiessayKeyword" class="hide">{$smarty.get.keyword}</div>
|
|
{/if}
|
|
|
|
{if $smarty.get.wdm_createtype}
|
|
<div id="wdmCreatetype" class="hide">{$smarty.get.wdm_createtype}</div>
|
|
{/if}
|
|
|
|
<div class="payresultMask hide"></div>
|
|
<div id="paysuccessWrap" class="payresultWrap payresultNoGz hide">
|
|
<div class="payresultWrapHeader success_tip">
|
|
此页面信息至关重要,您可截图保存避免丢失
|
|
<img src="{$smarty.const.CSS_URL}/assets_v2/img/newai/pay_success_title.svg" alt="" style="width: 12px;height: 12px;">
|
|
</div>
|
|
<div class="pay_detail">
|
|
<div class="pay_succ_header">
|
|
提交成功!订单号是下载范文唯一凭证
|
|
</div>
|
|
<div class="pay_succ_content">
|
|
<img id="qrcode1" class="payresultQrcode payresultQrcodeClass hide" src="" alt="">
|
|
<div class="pay_succ_right">
|
|
<p class="payresultQrcodeClass hide">
|
|
微信扫码,随时获知范文生成状态
|
|
</p>
|
|
<div class="title_status ">
|
|
<p><span id="pay_essay_title"></span></p>
|
|
<p>状态:<span id="pay_essay_status">生成中......</span></p>
|
|
</div>
|
|
<p>
|
|
订单号:<span id="payresultTid">oui18287276789998899</span>
|
|
<img src="/images/ai/copy.png" alt="" id="payresultCopyTidBtn">
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="payresultBtn pay_opera_btn">
|
|
<button class="common_btn payresultBtn11 point">去下载</button>
|
|
<button class="primary_btn payresultBtn22 point"> 再生成一篇</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{literal}
|
|
<style>
|
|
|
|
</style>
|
|
{/literal}
|
|
|
|
<div class="aiCataMask hide"></div>
|
|
<div id="aiCataEdit" class="hide">
|
|
<img id="aiCataEditClose" onclick="cancelEditCata(this, event)" src="{$smarty.const.CSS_URL}/images/ai/close.png"
|
|
alt="">
|
|
<div class="aiCataEditTitle">
|
|
{if $isai2}
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/catelogue/reboot2.png" alt="">
|
|
{else}
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/catelogue/reboot.png" alt="">
|
|
{/if}
|
|
修改提纲
|
|
<img src="{$smarty.const.CSS_URL}/images/ai/catelogue/start.png" alt="">
|
|
</div>
|
|
|
|
<div class="modelDialog2Con" id="modelDialog2ConRight" style="overflow: hidden; outline: none;">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="catalogue-title-headings-out hide">
|
|
<ul>
|
|
<li class="ai2" data-level="1" onclick="changeHeading(this)">
|
|
<div class="no-select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check_no.png" alt="">H1 一级标题
|
|
</div>
|
|
<div class="select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check2.png" alt="">H1 一级标题</div>
|
|
</li>
|
|
<li class="ai2" data-level="2" onclick="changeHeading(this)">
|
|
<div class="no-select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check_no.png" alt="">H2 二级标题
|
|
</div>
|
|
<div class="select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check2.png" alt="">H2 二级标题</div>
|
|
</li>
|
|
<li class="ai2" data-level="3" onclick="changeHeading(this)">
|
|
<div class="no-select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check_no.png" alt="">H3 二级标题
|
|
</div>
|
|
<div class="select"><img src="{$smarty.const.CSS_URL}/images/ai/catelogue/check2.png" alt="">H3 二级标题</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="mask"></div>
|
|
<div class="confirmAlt">
|
|
<img class="confirmAltClose" src="{$smarty.const.CSS_URL}/images/ai/close.png" alt="">
|
|
<div class="confirmAltLine1">
|
|
<img class="confirmAltLogo" src="{$smarty.const.CSS_URL}/images/ai/catelogue/reboot{$page_aitype}.png" alt="">
|
|
取消后不会保存修改结果,确定取消吗
|
|
</div>
|
|
<div class="confirmOption">
|
|
<div class="confirmOptionCancel white primary btn">取消修改</div>
|
|
<div class="continueEdit primary btn">继续修改</div>
|
|
</div>
|
|
</div>
|
|
|
|
{if $smarty.get.iscata}
|
|
<div id="payPaperCata" class="hide"></div>
|
|
{/if}
|
|
|
|
{if $smarty.get.conenttype}
|
|
<div id="contenttype_new" class="hide"></div>
|
|
{/if}
|
|
|
|
<div id="bd_buy_click_btn" class="hide"></div>
|
|
|
|
{literal}
|
|
<script>
|
|
var paperTitle = '';
|
|
var checktype = '';
|
|
var checkConfigs = '';
|
|
var rechargeGoodsId = -1;
|
|
var remainMoneyPay = 0;
|
|
var payResultTimer = null;
|
|
var isPayDialog = false;
|
|
var orderResultTimer = null;
|
|
var orderResultTimerCount = 120;
|
|
var aiNoNeedLogin = $('#aiNoNeedLogin').length > 0 ? true : false;
|
|
var isai2 = $('#isai2').length > 0 ? true : false;
|
|
var submitRepeatTimer = null;
|
|
var hasPayPaperCata = $('#payPaperCata').length == 1 ? true : false;
|
|
|
|
var progressTimer = null
|
|
|
|
// function checkCata() {
|
|
// if(hasPayPaperCata && $('#contenttype_new').length>0) {
|
|
// var cata_2 = localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+"_2");
|
|
// var cata_new_2 = localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+"_new_content_type_2");
|
|
// if(!cata_2 || !cata_new_2) {
|
|
// var locationhref = location.href.replace('/pay', '/catalogue')
|
|
// console.log(locationhref)
|
|
// location.href = locationhref
|
|
// throw new Error('cata_2 or cata_new_2 is null')
|
|
// }
|
|
// }
|
|
// }
|
|
// checkCata()
|
|
|
|
|
|
function showProgress() {
|
|
clearInterval(progressTimer)
|
|
$('.modelDialog1').find('.aiform-progress-bar').css('width', '0%')
|
|
var progress = 1
|
|
progressTimer = setInterval(function () {
|
|
$('.modelDialog1').find('.aiform-progress-bar').css('width', progress + '%')
|
|
if (progress >= 99) {
|
|
clearInterval(progressTimer)
|
|
} else {
|
|
++progress
|
|
}
|
|
}, 1000);
|
|
}
|
|
|
|
var essayPayDescCata = $('#essay-pay-desc-cata');
|
|
if (essayPayDescCata.length > 0) {
|
|
getCatalogue();
|
|
editInit();
|
|
}
|
|
|
|
function getInsertObj(level, leveltxt) {
|
|
var inserthm = '<p data-level="' + level + '" data-leveltxt="' + leveltxt + '" class="catalogue-title catalogue-lv' + level + '"> </p>';
|
|
var insertobj = $(inserthm);
|
|
return insertobj;
|
|
}
|
|
|
|
function editCata(that, event) {
|
|
if (event == 1) {
|
|
var optionIndex = that.parents('.modelDialog2Con').find('.modelDialog2ConList').index(that);
|
|
that.parent('.leftitem ').find('.option').addClass('editing');
|
|
that.parent('.leftitem ').find('.option').removeClass('hide');
|
|
} else {
|
|
var optionIndex = $(that).parents('.modelDialog2Con').find('.option').index($(that).parent('.option'));
|
|
$(that).parent('.option').addClass('editing');
|
|
$(that).parent('.option').removeClass('hide');
|
|
}
|
|
$('.confirmAlt').attr('itemindex', optionIndex);
|
|
}
|
|
|
|
$('.continueEdit,.confirmAltClose').click(function () {
|
|
$('.confirmAlt').animate({ marginTop: '-107px' }, 200, "swing", function () {
|
|
$('.mask').hide();
|
|
$('.confirmAlt').hide();
|
|
});
|
|
});
|
|
|
|
$('.confirmOptionCancel').click(function () {
|
|
$('.confirmAlt').animate({ marginTop: '-107px' }, 200, "swing", function () {
|
|
var itemindex = $('.confirmAlt').attr('itemindex');
|
|
var modelDialog2ConIndex = $('.confirmAlt').attr('modelDialog2ConIndex');
|
|
var option = $('.modelDialog2Con').eq(modelDialog2ConIndex).find('.option').eq(itemindex);
|
|
var leftitem = option.parents('.leftitem');
|
|
// option.removeClass('editing');
|
|
// option.addClass('hide');
|
|
leftitem.find('.modelDialog2ConList').html(option.parents('.leftitem').attr('origintxt'));
|
|
catelogueInit(leftitem.find('p').eq(0));
|
|
$('.mask').hide();
|
|
$('.confirmAlt').hide();
|
|
|
|
$('.aiCataMask').addClass('hide');
|
|
$('#aiCataEdit').addClass('hide');
|
|
});
|
|
});
|
|
|
|
function cancelEditCata(that, event) {
|
|
$('.mask').show();
|
|
$('.confirmAlt').show();
|
|
$('.confirmAlt').animate({ marginTop: '-87px' }, 200, "swing", function () { });
|
|
var optionIndex = $(that).parents('.modelDialog2Con').find('.option').index($(that).parent('.option'));
|
|
var modelDialog2ConIndex = $('.modelDialog2Con').index($(that).parents('.modelDialog2Con'));
|
|
$('.confirmAlt').attr('itemindex', optionIndex);
|
|
$('.confirmAlt').attr('modelDialog2ConIndex', modelDialog2ConIndex);
|
|
}
|
|
function getCatalogueObj(data, modelDialog2ConId) {
|
|
$('#' + modelDialog2ConId).html('');
|
|
|
|
var aitype = 2;
|
|
if (!data) return false;
|
|
if (data.length <= 0) return false;
|
|
|
|
for (var index = 0; index < data.length; index++) {
|
|
var element = decodeURIComponent(data[index]);
|
|
var nomarginClass = '';
|
|
if (index < 3 && data.length <= 3) nomarginClass = ' nomargin-bottom';
|
|
|
|
var datalist = element.split("\n");
|
|
if (datalist.length <= 0) return false;
|
|
var leftitemid = 'leftitemid' + ($('.leftitem').length + 1);
|
|
var obj = '<div class="leftitem active' + nomarginClass + '">';
|
|
obj += '<div class="list modelDialog2ConList" contenteditable="true">';
|
|
obj += '</div>';
|
|
obj += '<div class="option editing">';
|
|
obj += '<img id="' + leftitemid + '" class="optionCopyBtn" src="/images/ai/catelogue/copy' + aitype + '.png" alt="">';
|
|
obj += '<img onclick="editCata(this, event)" class="optionEditBtn" src="/images/ai/catelogue/edit' + aitype + '.png" alt="">';
|
|
obj += '<div onclick="cancelEditCata(this, event)" class="hide optionCancelBtn list-submitbtn white primary btn ai' + aitype + '">取消修改</div>';
|
|
obj += '<div onclick="submitCata(this, event)" class="optionSubmitBtn list-submitbtn primary btn ai' + aitype + '">修改完成</div>';
|
|
obj += '</div>';
|
|
obj += '</div>';
|
|
var objitem = $(obj);
|
|
var chatpterCount = 0;
|
|
var chatpterLevelSecondCount = 0;
|
|
for (var i = 0; i < datalist.length; i++) {
|
|
var item = datalist[i].trim();
|
|
if (item.length <= 0) continue;
|
|
var h1reg = /第[一二三四五六七八九十]{1,2}章/i;
|
|
var h2reg = /[1234567890]{1,2}\.[1234567890]{1,2}/i;
|
|
var h3reg = /[1234567890]{1,2}\.[1234567890]{1,2}\.[1234567890]{1,2}/i;
|
|
var n = item.search(h1reg);
|
|
var catalogueMatchs = item.match(h1reg);
|
|
if (n == 0) {
|
|
var getPara = getInsertObj(1, '第一章');
|
|
getPara.html(item.substring(catalogueMatchs[0].length, item.length));
|
|
objitem.find('.modelDialog2ConList').append(getPara);
|
|
++chatpterCount;
|
|
} else {
|
|
var n = item.search(h3reg);
|
|
var catalogueMatchs = item.match(h3reg);
|
|
if (n == 0) {
|
|
var getPara = getInsertObj(3, '1.1.1');
|
|
getPara.html(item.substring(catalogueMatchs[0].length, item.length));
|
|
objitem.find('.modelDialog2ConList').append(getPara);
|
|
} else {
|
|
var n = item.search(h2reg);
|
|
var catalogueMatchs = item.match(h2reg);
|
|
if (n == 0) {
|
|
var getPara = getInsertObj(2, '1.1');
|
|
getPara.html(item.substring(catalogueMatchs[0].length, item.length));
|
|
objitem.find('.modelDialog2ConList').append(getPara);
|
|
++chatpterLevelSecondCount;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
$('#essay-pay-desc-chapter').find('span').html(toChineseNumber(chatpterCount) + '个章节');
|
|
objitem.attr('origintxt', objitem.find('.modelDialog2ConList').html());
|
|
|
|
$('#' + modelDialog2ConId).append(objitem);
|
|
objitem.find('.modelDialog2ConList').niceScroll({
|
|
cursorcolor: "#E2E2EB",
|
|
cursorwidth: "8px",
|
|
cursorborderradius: '6px',
|
|
cursorminheight: 55,
|
|
railpadding: { top: 4, right: 4, left: 0, bottom: 4 }
|
|
});
|
|
catelogueInit(objitem.find('p').eq(0));
|
|
editInit();
|
|
|
|
var modelDialog2Con = $("#" + modelDialog2ConId);
|
|
modelDialog2Con.scrollTop(modelDialog2Con.prop("scrollHeight"));
|
|
|
|
leftitemHover();
|
|
var clipboard = new Clipboard("#" + leftitemid, {
|
|
text: function (e) {
|
|
var modelDialog2ConListpObj = $(e).parents('.leftitem').find('.modelDialog2ConList').find('p');
|
|
if (modelDialog2ConListpObj.length <= 0) {
|
|
return "";
|
|
}
|
|
var lvtitleall = '';
|
|
for (var index = 0; index < modelDialog2ConListpObj.length; index++) {
|
|
var copyelement = modelDialog2ConListpObj.eq(index);
|
|
var lvtitle = copyelement.attr('data-leveltxt').replace(/H1\s*?/, "").replace(/H2\s*?/, "").replace(/H3\s*?/, "").replace("ㅤ", "").trim() + " " + copyelement.text();
|
|
lvtitleall = lvtitleall + lvtitle + "\n";
|
|
}
|
|
return lvtitleall;
|
|
}
|
|
});
|
|
|
|
clipboard.on('success', function (e) {
|
|
alert('复制成功')
|
|
});
|
|
clipboard.on('error', function (e) {
|
|
alert('复制失败')
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
function getCatalogue() {
|
|
$('#payPaperTitle').text().trim()
|
|
var data = localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+"_2");
|
|
if (!data) var data = localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim()));
|
|
if (!data) return;
|
|
// data = decodeURIComponent(data);
|
|
var list = new Array();
|
|
list.push(data);
|
|
getCatalogueObj(list, 'modelDialog2ConRight');
|
|
}
|
|
|
|
|
|
$('#get_catabtn').find('span').click(function () {
|
|
$('#lottie').show();
|
|
$('.leftitem').addClass('hide');
|
|
$('#get_catabtn').addClass('hide');
|
|
getCatalogue();
|
|
});
|
|
|
|
$(function () {
|
|
/**$("#modelDialog2Con").niceScroll({
|
|
cursorcolor:"#E2E2EB",
|
|
cursorwidth:"8px",
|
|
cursorborderradius:'6px',
|
|
cursorminheight:55,
|
|
railpadding: { top: 4, right: 4, left: 0, bottom: 4 }
|
|
});
|
|
|
|
$(".modelDialog2ConList").niceScroll({
|
|
cursorcolor:"#E2E2EB",
|
|
cursorwidth:"8px",
|
|
cursorborderradius:'6px',
|
|
cursorminheight:55,
|
|
railpadding: { top: 4, right: 4, left: 0, bottom: 4 }
|
|
});**/
|
|
});
|
|
|
|
function leftitemHover() {
|
|
// $('.leftitem').unbind('hover');
|
|
// $('.leftitem').hover(function(){
|
|
// $(this).find('.option').removeClass('hide');
|
|
// },function(){
|
|
// if(!$(this).find('.option').hasClass('editing')) $(this).find('.option').addClass('hide');
|
|
// });
|
|
}
|
|
|
|
function getOutlineData(obj) {
|
|
var pobj = obj.find('p');
|
|
var outlineList = new Array();
|
|
for (var i = 0; i < pobj.length; i++) {
|
|
var pitem = pobj.eq(i);
|
|
var item = new Object();
|
|
item.level = pitem.attr('data-level');
|
|
item.leveltxt = pitem.attr('data-leveltxt');
|
|
item.content = pitem.html().trim();
|
|
outlineList.push(item);
|
|
}
|
|
return outlineList;
|
|
}
|
|
|
|
function submitCata(that, event) {
|
|
var modelDialog2ConList = $(that).parents('.leftitem').find('.modelDialog2ConList');
|
|
var res = verifyOutlineData(modelDialog2ConList);
|
|
if (!res) return;
|
|
|
|
var modelDialog2ConListpObj = $(that).parents('.leftitem').find('.modelDialog2ConList').find('p');
|
|
if (modelDialog2ConListpObj.length <= 0) {
|
|
alert('获取提纲失败');
|
|
return "";
|
|
}
|
|
var lvtitleall = '';
|
|
var chatpterCount = 0;
|
|
for (var index = 0; index < modelDialog2ConListpObj.length; index++) {
|
|
var copyelement = modelDialog2ConListpObj.eq(index);
|
|
var level = copyelement.attr('data-level');
|
|
if (level == 1) ++chatpterCount;
|
|
var lvtitle = copyelement.attr('data-leveltxt').replace(/H1\s*?/, "").replace(/H2\s*?/, "").replace(/H3\s*?/, "").replace("ㅤ", "").trim() + " " + copyelement.text();
|
|
lvtitleall = lvtitleall + lvtitle + "\n";
|
|
}
|
|
var papertitleval = $('#payPaperTitle').text().trim();
|
|
localStorage.setItem(encodeURIComponent(papertitleval), encodeURIComponent(lvtitleall));
|
|
$('#essay-pay-desc-chapter').find('span').html(toChineseNumber(chatpterCount) + '个章节');
|
|
$('.aiCataMask').addClass('hide');
|
|
$('#aiCataEdit').addClass('hide');
|
|
getCatalogue();
|
|
|
|
location.reload();
|
|
}
|
|
|
|
$('#essay-pay-desc-cata').click(function () {
|
|
getCatalogue();
|
|
$('.aiCataMask').removeClass('hide');
|
|
$('#aiCataEdit').removeClass('hide');
|
|
});
|
|
|
|
function verifyOutlineData(obj) {
|
|
// 一级提纲最多10条
|
|
// 提纲总数最多60条
|
|
// 一级标题数量不能少于3个
|
|
// 二级标题必须有父一级标题
|
|
// 标题内容不能为空
|
|
var outlineData = getOutlineData(obj);
|
|
if (outlineData.length <= 0) {
|
|
alert('推荐大纲不能为空');
|
|
return false;
|
|
}
|
|
|
|
var pass = true;
|
|
var heading1Count = 0;
|
|
var headingAllCount = 0;
|
|
|
|
var hasErrorList = new Array();
|
|
var haserror = false;
|
|
for (var index = 0; index < outlineData.length; index++) {
|
|
// {level: '1', leveltxt: '第二章', content: ' 321321312'}
|
|
|
|
var element = outlineData[index];
|
|
++headingAllCount;
|
|
if (element.level == 1) {
|
|
++heading1Count;
|
|
}
|
|
|
|
var pobj = obj.find('p').eq(index);
|
|
if (element.content.replace(" ", "").replace("<br>", "").length <= 0) {
|
|
pass = false;
|
|
pobj.addClass('error');
|
|
continue;
|
|
} else {
|
|
pobj.removeClass('error');
|
|
}
|
|
|
|
if (index == 0) {
|
|
if (element.level == 2 || element.level != 1) {
|
|
hasErrorList.push(index);
|
|
pobj.addClass('error');
|
|
}
|
|
} else {
|
|
if (element.level == 1) {
|
|
if ((outlineData[index - 1].level != 2 && outlineData[index - 1].level != 3) || ((index + 1) < outlineData.length && outlineData[index + 1].level != 2) || index + 1 >= outlineData.length) {
|
|
hasErrorList.push(index);
|
|
pobj.addClass('error');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!pass) {
|
|
alert('大纲内容不能为空,请修改后重新提交');
|
|
return false;
|
|
}
|
|
|
|
if (heading1Count < 3) {
|
|
alert(' 一级提纲数量不可少于3个');
|
|
return false;
|
|
}
|
|
|
|
if (heading1Count > 10) {
|
|
alert(' 一级提纲数量最多10条');
|
|
return false;
|
|
}
|
|
|
|
// if(headingAllCount > 60){
|
|
// alert(' 提纲总数最多60条');
|
|
// return false;
|
|
// }
|
|
|
|
if (hasErrorList.length > 0) {
|
|
alert('一级提纲必须存在子二级提纲,二级提纲必须存在父一级提纲')
|
|
return false;
|
|
}
|
|
|
|
for (var index = 0; index < outlineData.length; index++) {
|
|
var pobj = obj.find('p').eq(index);
|
|
pobj.removeClass('error');
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function leftitemParaAct(event, obj) {
|
|
if (event.originalEvent.layerX <= 40) {
|
|
$('.catalogue-title-headings-out').css('top', event.pageY - event.originalEvent.layerY + 5);
|
|
$('.catalogue-title-headings-out').css('left', event.pageX - event.originalEvent.layerX);
|
|
|
|
if (!$('.catalogue-title-headings-out').hasClass('hide')) {
|
|
$('.catalogue-title-headings-out').addClass('hide');
|
|
} else {
|
|
$('.catalogue-title-headings-out').removeClass('hide');
|
|
$('.catalogue-title-headings-out').attr('input-index', obj.parents('.modelDialog2Con').find('.leftitem').index(obj.parents('.leftitem')));
|
|
$('.catalogue-title-headings-out').attr('p-index', obj.index());
|
|
$('.catalogue-title-headings-out').attr('modelDialog2ConIndex', $('.modelDialog2Con').index(obj.parents('.modelDialog2Con')));
|
|
}
|
|
}
|
|
}
|
|
|
|
function changeHeading(e) {
|
|
try {
|
|
event.stopPropagation();
|
|
} catch (error) {
|
|
|
|
}
|
|
$(e).parent().find('li').removeClass('active');
|
|
$(e).addClass('active');
|
|
var level = $(e).attr('data-level');
|
|
|
|
var inputIndex = $(e).parents('.catalogue-title-headings-out').attr('input-index');
|
|
var modelDialog2ConIndex = $(e).parents('.catalogue-title-headings-out').attr('modelDialog2ConIndex');
|
|
|
|
var pIndex = $(e).parents('.catalogue-title-headings-out').attr('p-index');
|
|
var pobj = $('.modelDialog2Con').eq(modelDialog2ConIndex).find('.modelDialog2ConList').eq(inputIndex).find('p').eq(pIndex);
|
|
pobj.attr('data-level', level);
|
|
pobj.removeClass('catalogue-lv1');
|
|
pobj.removeClass('catalogue-lv2');
|
|
pobj.removeClass('catalogue-lv3');
|
|
pobj.addClass('catalogue-lv' + level);
|
|
catelogueInit(pobj);
|
|
|
|
setTimeout(function () {
|
|
$('.catalogue-title-headings-out').addClass('hide');
|
|
}, 200)
|
|
}
|
|
|
|
function placeCaretAtEnd(el) { //传入光标要去的jq节点对象
|
|
el.focus();
|
|
if (typeof window.getSelection != "undefined" && typeof document.createRange != "undefined") {
|
|
var range = document.createRange();
|
|
range.selectNodeContents(el);
|
|
range.collapse(false);
|
|
var sel = window.getSelection();
|
|
sel.removeAllRanges();
|
|
sel.addRange(range);
|
|
} else if (typeof document.body.createTextRange != "undefined") {
|
|
var textRange = document.body.createTextRange();
|
|
textRange.moveToElementText(el);
|
|
textRange.collapse(false);
|
|
textRange.select();
|
|
}
|
|
}
|
|
|
|
function toChineseNumber(num) {
|
|
var numList = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
|
|
if (num < 10) return numList[num];
|
|
if (num >= 10 && num < 20) return "十" + (num % 10 > 0 ? numList[num % 10] : "");
|
|
var ten = Math.floor(num / 10);
|
|
var unit = num % 10;
|
|
if (unit === 0) return numList[ten] + "十";
|
|
return numList[ten] + "十" + numList[unit];
|
|
}
|
|
|
|
function catelogueInit(that) {
|
|
var plist = that.parents('.leftitem').find('.modelDialog2ConList').find('p');
|
|
var h1level = 1;
|
|
var h2level = 1;
|
|
var h3level = 1;
|
|
for (var index = 0; index < plist.length; index++) {
|
|
var eachObj = plist.eq(index);
|
|
if (eachObj.attr('data-level') == 1) {
|
|
var changeChapterText = 'H1 第' + toChineseNumber(h1level) + '章';
|
|
eachObj.attr('data-leveltxt', changeChapterText);
|
|
++h1level;
|
|
h2level = 1;
|
|
}
|
|
|
|
if (eachObj.attr('data-level') == 2) {
|
|
var currentH1level = h1level - 1;
|
|
if (currentH1level <= 0) {
|
|
var modelDialog2ConListtmp = that.parents('.modelDialog2ConList');
|
|
eachObj.remove();
|
|
if (modelDialog2ConListtmp.find('p').length > 0) {
|
|
catelogueInit(modelDialog2ConListtmp.find('p').eq(0));
|
|
}
|
|
break;
|
|
}
|
|
var changeChapterText = 'H2 ' + currentH1level + '.' + h2level;
|
|
eachObj.attr('data-leveltxt', changeChapterText);
|
|
++h2level;
|
|
h3level = 1
|
|
}
|
|
|
|
if (eachObj.attr('data-level') == 3) {
|
|
var currentH1level = h1level - 1;
|
|
var currentH2level = h2level - 1;
|
|
if (currentH1level <= 0 || currentH2level <= 0) {
|
|
var modelDialog2ConListtmp = that.parents('.modelDialog2ConList');
|
|
eachObj.remove();
|
|
if (modelDialog2ConListtmp.find('p').length > 0) {
|
|
catelogueInit(modelDialog2ConListtmp.find('p').eq(0));
|
|
}
|
|
break;
|
|
}
|
|
var changeChapterText = 'H3 ' + currentH1level + '.' + currentH2level + '.' + h3level;
|
|
eachObj.attr('data-leveltxt', changeChapterText);
|
|
++h3level;
|
|
}
|
|
|
|
}
|
|
|
|
that.parents('.leftitem').find('.modelDialog2ConList').find('.catalogue-title').unbind('click');
|
|
that.parents('.leftitem').find('.modelDialog2ConList').find('.catalogue-title').bind('click', function (event) {
|
|
var level = $(this).attr('data-level');
|
|
$('.catalogue-title-headings-out').find('li').removeClass('active');
|
|
$('.catalogue-title-headings-out').find('li[data-level=' + level + ']').addClass('active');
|
|
leftitemParaAct(event, $(this));
|
|
});
|
|
}
|
|
|
|
function editInit() {
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').unbind('click');
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').unbind('keyup');
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').unbind('blur');
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').unbind('keydown');
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').unbind('paste');
|
|
// $('#modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').on('keyup blur keydown paste', function(ev){
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').on('click', function (ev) {
|
|
editCata($(this), 1)
|
|
});
|
|
|
|
$('.modelDialog2Con').find('.leftitem').find('.modelDialog2ConList').on('keyup blur keydown paste', function (ev) {
|
|
var selObj = window.getSelection();
|
|
var range = selObj.getRangeAt(0);
|
|
|
|
if (ev.keyCode == 17) return;
|
|
if (ev.type == 'paste') {
|
|
var clipboardData = ev.originalEvent.clipboardData;
|
|
var content = clipboardData.getData('text');
|
|
var iscata = true;
|
|
var cataList = content.split(/\n|\r/);
|
|
if (cataList.length > 0) {
|
|
var getParaList = '';
|
|
for (var index = 0; index < cataList.length; index++) {
|
|
var pasteElement = cataList[index];
|
|
pasteElement = pasteElement.replace("ㅤ", "").trim();
|
|
if (pasteElement.trim().length <= 0) continue;
|
|
|
|
var h1reg = /第[一二三四五六七八九十]{1,2}.*?/i;
|
|
var h2reg = /[1234567890]{1,2}\.[1234567890]{1,2}/i;
|
|
var h3reg = /[1234567890]{1,2}\.[1234567890]{1,2}\.[1234567890]{1,2}/i;
|
|
var n = pasteElement.search(h1reg);
|
|
var catalogueMatchs = pasteElement.match(h1reg);
|
|
if (n == 0) {
|
|
var znh1reg = /第[一二三四五六七八九十]{1,2}章.*?/i;
|
|
if (pasteElement.search(znh1reg) == 0) {
|
|
catalogueMatchs = pasteElement.match(znh1reg);
|
|
}
|
|
|
|
var getPara = getInsertObj(1, '第一章');
|
|
getPara.html(pasteElement.substring(catalogueMatchs[0].length, pasteElement.length));
|
|
getParaList += getPara.prop("outerHTML");
|
|
} else {
|
|
var n = pasteElement.search(h3reg);
|
|
var catalogueMatchs = pasteElement.match(h3reg);
|
|
if (n == 0) {
|
|
var getPara = getInsertObj(3, '1.1.1');
|
|
getPara.html(pasteElement.substring(catalogueMatchs[0].length, pasteElement.length));
|
|
getParaList += getPara.prop("outerHTML");
|
|
} else {
|
|
var n = pasteElement.search(h2reg);
|
|
var catalogueMatchs = pasteElement.match(h2reg);
|
|
if (n == 0) {
|
|
var getPara = getInsertObj(2, '1.1');
|
|
getPara.html(pasteElement.substring(catalogueMatchs[0].length, pasteElement.length));
|
|
getParaList += getPara.prop("outerHTML");
|
|
} else {
|
|
iscata = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (iscata) {
|
|
var currentPraObj = $(range.commonAncestorContainer).parent('p');
|
|
var currentChapterTxt = currentPraObj.attr('data-leveltxt');
|
|
if (currentChapterTxt === undefined) {
|
|
currentPraObj = $(range.commonAncestorContainer);
|
|
currentChapterTxt = currentPraObj.attr('data-leveltxt');
|
|
}
|
|
|
|
if (currentChapterTxt == undefined && currentPraObj.hasClass('modelDialog2ConList') && currentPraObj.find('p').length == 1) {
|
|
currentPraObj = currentPraObj.find('p').eq(0);
|
|
currentChapterTxt = currentPraObj.attr('data-leveltxt');
|
|
}
|
|
|
|
if (currentChapterTxt !== undefined) {
|
|
var modelDialog2ConListCopy = currentPraObj.parent('.modelDialog2ConList');
|
|
var modelDialog2ConListCopyPara = currentPraObj.parent('.modelDialog2ConList').find('p');
|
|
var paraIndex = modelDialog2ConListCopyPara.index(currentPraObj);
|
|
var newParamHtml = '';
|
|
for (var index = 0; index < modelDialog2ConListCopyPara.length; index++) {
|
|
var modelDialog2ConListCopyParaElement = modelDialog2ConListCopyPara.eq(index);
|
|
newParamHtml += modelDialog2ConListCopyParaElement.prop("outerHTML");
|
|
if (index == paraIndex) newParamHtml += getParaList;
|
|
}
|
|
|
|
if (newParamHtml != '') {
|
|
setTimeout(function () {
|
|
modelDialog2ConListCopy.html('');
|
|
modelDialog2ConListCopy.html($(newParamHtml));
|
|
catelogueInit(modelDialog2ConListCopy.find('p').eq(0));
|
|
}, 200);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var modelDialog2ConList = $(this).parents('.leftitem').find('.modelDialog2ConList');
|
|
if (ev.keyCode == 13) ev.preventDefault();
|
|
|
|
var tmpinput = modelDialog2ConList.html().trim();
|
|
var dobj = modelDialog2ConList.find('p');
|
|
if (dobj.length == 0) {
|
|
var current = modelDialog2ConList.find('p').eq(0);
|
|
modelDialog2ConList.html('');
|
|
|
|
var insert = getInsertObj(1, 'H1 第一章'); // $('<p data-level="1" data-leveltxt="" contenteditable="true" class="catalogue-title catalogue-lv1"> '+tmpinput+'</p>');
|
|
modelDialog2ConList.html(insert);
|
|
if (ev.keyCode == 13) {
|
|
var insert2 = getInsertObj(1, 'H2 第二章'); //$('<p data-level="1" first="1" data-leveltxt="" contenteditable="true" class="catalogue-title catalogue-lv1"> </p>');
|
|
modelDialog2ConList.append(insert2);
|
|
placeCaretAtEnd(insert2[0]);
|
|
}
|
|
} else {
|
|
var currentPraObj = $(range.commonAncestorContainer).parent('p');
|
|
var currentChapterTxt = currentPraObj.attr('data-leveltxt');
|
|
if (currentChapterTxt === undefined) {
|
|
currentPraObj = $(range.commonAncestorContainer);
|
|
currentChapterTxt = currentPraObj.attr('data-leveltxt');
|
|
}
|
|
|
|
var outlines = getOutlineData($(this).parents('.leftitem').find('.modelDialog2ConList'));
|
|
if (ev.keyCode == 13 && ev.type == 'keydown') {
|
|
for (var i = 0; i < outlines.length; i++) {
|
|
// {level: '1', leveltxt: '第二章', content: ''}
|
|
var tmpItem = outlines[i];
|
|
if (tmpItem.leveltxt == currentChapterTxt) {
|
|
if (tmpItem.level == 1) {
|
|
var nextNumText = toArabicNumber(tmpItem.leveltxt.replace("第", "").replace("章", "")) + 1;
|
|
var nextChapter = 'H1 第' + toChineseNumber(nextNumText) + '章';
|
|
|
|
var insertobj = getInsertObj(1, nextChapter);
|
|
// var insertobj = $('<p data-level="1" first="1" data-leveltxt="'+nextChapter+'" contenteditable="true" class="catalogue-title catalogue-lv1"> </p>');
|
|
$(currentPraObj.parents('.catalogue-title-wrap').prevObject[0]).after(insertobj);
|
|
placeCaretAtEnd(insertobj[0]);
|
|
|
|
currentPraObj.parents('.modelDialog2Con').scrollTop(currentPraObj.parents('.modelDialog2Con').prop("scrollHeight"));
|
|
|
|
break;
|
|
} else if (tmpItem.level == 2) {
|
|
// var nextNumText = toArabicNumber(tmpItem.leveltxt.replace("第", "").replace("章", ""))+1;
|
|
var nextChapter = 'H2 1.1';
|
|
var insertobj = getInsertObj(2, nextChapter);
|
|
// var insertobj = $('<p data-level="1" first="1" data-leveltxt="'+nextChapter+'" contenteditable="true" class="catalogue-title catalogue-lv1"> </p>');
|
|
$(currentPraObj.parents('.catalogue-title-wrap').prevObject[0]).after(insertobj);
|
|
placeCaretAtEnd(insertobj[0]);
|
|
break;
|
|
} else if (tmpItem.level == 3) {
|
|
// var nextNumText = toArabicNumber(tmpItem.leveltxt.replace("第", "").replace("章", ""))+1;
|
|
var nextChapter = 'H3 1.1.1';
|
|
var insertobj = getInsertObj(3, nextChapter);
|
|
// var insertobj = $('<p data-level="1" first="1" data-leveltxt="'+nextChapter+'" contenteditable="true" class="catalogue-title catalogue-lv1"> </p>');
|
|
$(currentPraObj.parents('.catalogue-title-wrap').prevObject[0]).after(insertobj);
|
|
placeCaretAtEnd(insertobj[0]);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
catelogueInit($(this));
|
|
});
|
|
}
|
|
|
|
function toArabicNumber(chnStr) {
|
|
var rtn = 0;
|
|
var section = 0;
|
|
var number = 0;
|
|
var secUnit = false;
|
|
var str = chnStr.split('');
|
|
var chnNameValue = {
|
|
十: { value: 10, secUnit: false },
|
|
百: { value: 100, secUnit: false },
|
|
千: { value: 1000, secUnit: false },
|
|
万: { value: 10000, secUnit: true },
|
|
亿: { value: 100000000, secUnit: true }
|
|
}
|
|
//增加‘两’的对象,解决“两百零一”等数字的转换问题
|
|
var chnNumChar = {
|
|
零: 0,
|
|
一: 1,
|
|
二: 2,
|
|
两: 2,
|
|
三: 3,
|
|
四: 4,
|
|
五: 5,
|
|
六: 6,
|
|
七: 7,
|
|
八: 8,
|
|
九: 9
|
|
};
|
|
|
|
//因为要下载小说,所以要排除那些非正文部分章节;同时将“第十章”“第十一章”等原代码出错章节筛选出来
|
|
if (typeof chnNumChar[str[0]] !== 'undefined' || str[0] == '十') {
|
|
//将“第十章”“第十一章”等原代码出错章节进行单独处理
|
|
if (str[0] == '十') {
|
|
//因为只需要处理“十”至“十九”十个数,所以问题就很容易解决,对汉字中索引1的位置进行判断,当为空时,即为0+10=10,非空则从chnNumChar对象中取值加上10,即可得出结果。
|
|
rtn = (chnNumChar[str[1]] || 0) + 10
|
|
} else {
|
|
for (var i = 0; i < str.length; i++) {
|
|
var num = chnNumChar[str[i]];
|
|
if (typeof num !== 'undefined') {
|
|
number = num;
|
|
if (i === str.length - 1) {
|
|
section += number;
|
|
}
|
|
} else {
|
|
var unit = chnNameValue[str[i]].value;
|
|
secUnit = chnNameValue[str[i]].secUnit;
|
|
if (secUnit) {
|
|
section = (section + number) * unit;
|
|
rtn += section;
|
|
section = 0;
|
|
} else {
|
|
section += (number * unit);
|
|
}
|
|
number = 0;
|
|
}
|
|
}
|
|
}
|
|
//此处是将非正文章节的内容的序号设置为0,统一在爬虫下载完成的小说文件的起端放置作者的“感言、请假、设定等”文章
|
|
} else {
|
|
rtn = 0
|
|
section = 0
|
|
}
|
|
|
|
return rtn + section;
|
|
}
|
|
|
|
|
|
var configJson = $('#payCheckConfig').text();
|
|
if ($('#payCheckConfig').length <= 0 || !configJson || configJson == '') {
|
|
alert('站点配置错误,请联系网站管理员');
|
|
errorJump();
|
|
}
|
|
var $CONFIG = JSON.parse(configJson);
|
|
if (!$CONFIG.paytypes || $CONFIG.paytypes == "[]") {
|
|
alert('该服务未设置支付方式,请联系客服或网站管理员!');
|
|
location.href = "/";
|
|
}
|
|
|
|
if ($('#isPayDialog').length > 0) {
|
|
var typeinputConfig = $('#typeinputDialog').text();
|
|
if (!typeinputConfig) {
|
|
alert('检测服务错误');
|
|
errorJump();
|
|
}
|
|
typeinputConfig = JSON.parse(typeinputConfig);
|
|
|
|
isPayDialog = true;
|
|
}
|
|
|
|
function payError() {
|
|
$('.payqrcode').addClass('');
|
|
}
|
|
|
|
function getPayType() {
|
|
var paytype = $('.pay_qrcode-types').find('.pay_type_active').attr('paytype');
|
|
return paytype;
|
|
}
|
|
|
|
function goodsClickRepay() {
|
|
$('.payGoodsList').find('li').unbind('click');
|
|
$('.payGoodsList').find('li').click(function () {
|
|
$('.payGoodsList').find('li').removeClass('active');
|
|
$(this).addClass('active');
|
|
var paytype = getPayType();
|
|
payAction(paytype);
|
|
});
|
|
}
|
|
|
|
function getRechargeGoods(payInfo, configData) {
|
|
if (payInfo.money <= 0) {
|
|
alert('服务价格设置不正确!');
|
|
errorJump();
|
|
return;
|
|
}
|
|
|
|
var indexattr = $('.payGoodsList').find('li.active').attr('indexattr');
|
|
$('.payGoodsList').find('.paylist').remove();
|
|
if (payInfo.recharge_goods) {
|
|
var paylist = payInfo.recharge_goods.list;
|
|
for (var i = 0; i < paylist.length; i++) {
|
|
var paylistObj = '<li goods_id="' + paylist[i].id + '" class="paylist" indexattr="' + (i + 1) + '">';
|
|
if ((i + 1) == indexattr) paylistObj = '<li goods_id="' + paylist[i].id + '" class="paylist active" indexattr="' + (i + 1) + '">';
|
|
|
|
paylistObj += '<p>平台通用充值</p>';
|
|
paylistObj += '<p>';
|
|
paylistObj += '<span>得</span>';
|
|
paylistObj += '<span>' + paylist[i].money + '</span>';
|
|
paylistObj += '<span>元</span>';
|
|
paylistObj += '</p>';
|
|
paylistObj += '<p>实付 ' + paylist[i].price + ' 元</p>';
|
|
paylistObj += '</li>';
|
|
$('.payGoodsList').append(paylistObj);
|
|
}
|
|
}
|
|
goodsClickRepay();
|
|
|
|
$('#payPrice').text(configData.price);
|
|
if (!isai2) $('.payGoodsList').removeClass('hide');
|
|
|
|
$('.payQrcodeUl').removeClass('hide');
|
|
$('.tbpayComWrap').addClass('hide');
|
|
$('.cardpayComWrap').addClass('hide');
|
|
$('.paywrap').addClass('hide');
|
|
$('.paywrap2').removeClass('hide');
|
|
getRechargePayUrl(payInfo, configData);
|
|
}
|
|
|
|
function getDetailDemand(core_content){
|
|
var result = new Object()
|
|
if(core_content){
|
|
result = JSON.parse(core_content)
|
|
}
|
|
result.detail_demand = decodeURIComponent(localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+'_detail_demand'));
|
|
return JSON.stringify(result)
|
|
}
|
|
|
|
function getKeywordContent(postData) {
|
|
console.log(postData.core_content, 'core_content');
|
|
console.log(postData.aiessay_create_type, 'aiessay_create_type');
|
|
var result = new Object()
|
|
|
|
if(postData.core_content){
|
|
if (postData.aiessay_create_type == 1) {
|
|
result.core_content = postData.core_content;
|
|
} else if (postData.aiessay_create_type == 2) {
|
|
result = JSON.parse(postData.core_content)
|
|
}
|
|
}
|
|
console.log(result);
|
|
|
|
result.keyword = decodeURIComponent($('#aiessayKeyword').text());
|
|
|
|
console.log(result, 'result');
|
|
return JSON.stringify(result)
|
|
}
|
|
|
|
function getCoreContent(){
|
|
return decodeURIComponent(localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+'_core_content'));
|
|
}
|
|
|
|
function checkAiSubmit(configData) {
|
|
var paytypeSlect = 0;
|
|
var isMultPay = false;
|
|
if (configData.paytypes) {
|
|
var paytypes = JSON.parse(configData.paytypes);
|
|
if (paytypes.length > 0 && (configData.paytype == 0 || configData.paytype == 4)) {
|
|
paytypeSlect = paytypes[0];
|
|
} else {
|
|
paytypeSlect = configData.paytype;
|
|
}
|
|
if (paytypes.length > 1) isMultPay = true;
|
|
}
|
|
|
|
$('#waitPayMoneySubBtn').unbind("click");
|
|
clearTimeout(payResultTimer);
|
|
|
|
var postData = new Object();
|
|
var word_countFLag = getUrlParam('aiessay_wordnum')
|
|
var table_and_formulas_flag = getUrlParam('table_and_formulas')
|
|
postData.title = paperTitle;
|
|
if (configData.addedServicesStr != '') postData.value_added_services = configData.addedServicesStr;
|
|
if (configData.ppt_tpl != '') postData.ppt_tpl = configData.ppt_tpl;
|
|
postData.check_type = checktype;
|
|
postData.pay_type = configData.paytype;
|
|
postData.get_pay_goods = 1;
|
|
if (postData.check_type == '92') {
|
|
postData.wdm_createtype = $('.btlistypeRt').find('.item[select=1]').find('span').text();
|
|
}
|
|
if (configData.core_content) {
|
|
postData.core_content = configData.core_content;
|
|
}
|
|
|
|
postData.aiessay_create_type = 1;
|
|
if (!isPayDialog && hasPayPaperCata) {
|
|
postData.core_content = getSubmitCata();
|
|
postData.aiessay_create_type = 2;
|
|
}
|
|
|
|
if($('#coreContent').length>0){
|
|
postData.core_content = getCoreContent()
|
|
}
|
|
|
|
if($('#detailDemand').length>0){
|
|
postData.core_content = getDetailDemand(postData.core_content)
|
|
}
|
|
|
|
if ($('#aiessayKeyword').length > 0) {
|
|
postData.core_content = getKeywordContent(postData);
|
|
}
|
|
|
|
if ($('#wdmCreatetype').length > 0) {
|
|
postData.wdm_createtype = decodeURIComponent($('#wdmCreatetype').text());
|
|
}
|
|
|
|
if ($('#aiessayWordnum').length > 0) {
|
|
postData.aiessay_wordnum = $('#aiessayWordnum').text();
|
|
}
|
|
if ($('#aiessayQikanLevel').length > 0) {
|
|
postData.aiessay_qikan_level = $('#aiessayQikanLevel').text();
|
|
}
|
|
|
|
if ($('#tableAndFormulas').length > 0) {
|
|
postData.table_and_formulas = $('#tableAndFormulas').text();
|
|
}
|
|
|
|
if (configData.paytype == 1) {
|
|
$('.payQrcodeUl').addClass('hide');
|
|
}
|
|
|
|
if (postData.check_type == '96') {
|
|
var pptid = $("#ppt_tpl").val();
|
|
var upload_file_md5 = $("#upload_file_md5").val();
|
|
var upload_file_name = $("#upload_file_name").val();
|
|
var upload_file_tmpname = $("#upload_file_tmpname").val();
|
|
|
|
aiparams = JSON.parse(localStorage.getItem('aiparams'));
|
|
if (aiparams.upload_file_md5) {
|
|
upload_file_md5 = aiparams.upload_file_md5;
|
|
upload_file_name = aiparams.upload_file_name;
|
|
upload_file_tmpname = aiparams.upload_file_tmpname;
|
|
pptid = aiparams.ppt_tpl;
|
|
}
|
|
|
|
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;
|
|
}
|
|
if (postData.check_type == '97' && word_countFLag) {
|
|
postData.aiessay_wordnum = word_countFLag;
|
|
}
|
|
if (postData.check_type == '97' && table_and_formulas_flag) {
|
|
postData.table_and_formulas = table_and_formulas_flag;
|
|
}
|
|
if (postData.check_type == '81' || (!word_countFLag && postData.check_type == '97')) {
|
|
var word_count = $("input[name=word_count]:checked").val();
|
|
if (!word_count) {
|
|
alert("请选择字数");
|
|
return;
|
|
}
|
|
postData.aiessay_wordnum = word_count;
|
|
}
|
|
if (!table_and_formulas_flag && postData.check_type == '97') {
|
|
var table_and_formulas_obj = $("input[name=table_and_formulas]:checked");
|
|
var table_and_formulas='';
|
|
for (var index = 0; index < table_and_formulas_obj.length; index++) {
|
|
var table_and_formulasval = table_and_formulas_obj.eq(index).val();
|
|
if(table_and_formulas == '') {
|
|
table_and_formulas = table_and_formulasval;
|
|
continue;
|
|
}
|
|
table_and_formulas += ','+table_and_formulasval;
|
|
}
|
|
postData.table_and_formulas = table_and_formulas;
|
|
}
|
|
|
|
$.ajax({
|
|
url:configData.service_domain+'/ajax_check_aisubmit',
|
|
type:'post',
|
|
dataType:'json',
|
|
data:postData,
|
|
success:function(res){
|
|
if(res.status){
|
|
if(!isPayDialog){
|
|
$('.paywrap2').addClass('hide');
|
|
$('.paywrap').removeClass('hide');
|
|
$('#waitPayMoney').text(0);
|
|
$('#waitPayMoneyShiji').text('余额抵扣¥'+res.data.money);
|
|
var payInfoTmp = res.data;
|
|
payInfoTmp.tid = '';
|
|
payInfoTmp.addedServicesStr = configData.addedServicesStr;
|
|
$('#waitPayMoneySubBtn').click(function () {
|
|
aiSubmit(payInfoTmp, configData);
|
|
});
|
|
} else {
|
|
showProgress()
|
|
$('.modelDialog1').removeClass('hide');
|
|
$('.pageMask').removeClass('hide');
|
|
|
|
var payInfoTmp = res.data;
|
|
payInfoTmp.tid = '';
|
|
aiSubmit(payInfoTmp, configData);
|
|
}
|
|
} else {
|
|
if (res.info == "用户信息不正确") {
|
|
loginComAction(location.href);
|
|
retrun;
|
|
}
|
|
if (res.data.user_not_enough_money) {
|
|
if (isPayDialog) {
|
|
$('.paycom-dialog').removeClass('hide');
|
|
$('#isPayDialogMask').removeClass('hide');
|
|
}
|
|
$('.paywrap2').removeClass('hide');
|
|
$('.paywrap').addClass('hide');
|
|
|
|
var payInfo = res.data;
|
|
payInfo.isMultPay = isMultPay;
|
|
payInfo.pay_type = paytypeSlect;
|
|
if (configData.paytype == 2 || configData.paytype == 3) {
|
|
getRechargeGoods(payInfo, configData);
|
|
}
|
|
|
|
if (configData.paytype == 0 || configData.paytype == 4) {
|
|
$('.ai2pay_greybg').addClass('hide');
|
|
$('.payQrcodeUl').addClass('hide');
|
|
$('.cardpayComWrap').addClass('hide');
|
|
$('.tbpayComWrap').removeClass('hide');
|
|
$('.paycom-dialog').addClass('paycom-taobao');
|
|
$('.paycom-dialog-title').addClass('paycom-taobao');
|
|
} else if (configData.paytype == 1) {
|
|
$('.ai2pay_greybg').addClass('hide');
|
|
$('.payQrcodeUl').addClass('hide');
|
|
$('.tbpayComWrap').addClass('hide');
|
|
$('.cardpayComWrap').removeClass('hide');
|
|
$('.paycom-dialog').removeClass('paycom-taobao');
|
|
$('.paycom-dialog-title').removeClass('paycom-taobao');
|
|
$('.payQrcodeUl').addClass('hide');
|
|
} else {
|
|
$('.paycom-dialog').removeClass('paycom-taobao');
|
|
$('.paycom-dialog-title').removeClass('paycom-taobao');
|
|
}
|
|
|
|
return;
|
|
}
|
|
alert(res.info);
|
|
errorJump();
|
|
return;
|
|
}
|
|
},
|
|
error: function () {
|
|
alert('网络错误5');
|
|
}
|
|
});
|
|
}
|
|
|
|
function getSubmitCata() {
|
|
if($('#contenttype_new').length>0) {
|
|
var new_catas = localStorage.getItem(encodeURIComponent($('#payPaperTitle').text().trim())+'_new_content_type_2');
|
|
return decodeURIComponent(new_catas)
|
|
}
|
|
|
|
var modelDialog2ConListpObj = $('.modelDialog2ConList').eq(0).find('p');
|
|
if (modelDialog2ConListpObj.length <= 0) {
|
|
alert('获取提纲失败');
|
|
return "";
|
|
}
|
|
var lvtitleall = '';
|
|
for (var index = 0; index < modelDialog2ConListpObj.length; index++) {
|
|
var copyelement = modelDialog2ConListpObj.eq(index);
|
|
var chatpertxt = copyelement.attr('data-leveltxt').replace(/H1\s*?/, "").replace(/H2\s*?/, "").replace(/H3\s*?/, "").replace("ㅤ", "").replace("第", "").replace("章", "、").replace("\n", "").trim();
|
|
|
|
var ppayCheckType = $('#payCheckType').text();
|
|
var paraLevel = copyelement.attr('data-level');
|
|
if (ppayCheckType == 82 && paraLevel == 1) {
|
|
chatpertxt = chatpertxt.replace("、", "");
|
|
chatpertxt = toArabicNumber(chatpertxt) + '.';
|
|
}
|
|
|
|
var lvtitle = chatpertxt + " " + copyelement.text().replace("\n", "").trim();
|
|
lvtitleall = lvtitleall + lvtitle + "\n";
|
|
}
|
|
return lvtitleall;
|
|
}
|
|
|
|
function aiSubmit(payinfo, configData) {
|
|
var postData = new Object();
|
|
var word_countFLag = getUrlParam('aiessay_wordnum')
|
|
var table_and_formulas_flag = getUrlParam('table_and_formulas')
|
|
postData.title = paperTitle;
|
|
postData.value_added_services = configData.addedServicesStr;
|
|
if (configData.core_content) {
|
|
postData.core_content = configData.core_content;
|
|
}
|
|
|
|
if (configData.ppt_tpl != '') postData.ppt_tpl = configData.ppt_tpl;
|
|
|
|
var fuid = $("#hidden_params").attr("fuid");
|
|
postData.fuid = fuid;
|
|
|
|
postData.tid = payinfo.tid;
|
|
if (configData.paytype == 0 || configData.paytype == 4) {
|
|
postData.orderId1 = payinfo.orderId1;
|
|
postData.orderId2 = payinfo.orderId2;
|
|
postData.orderId3 = payinfo.orderId3;
|
|
}
|
|
|
|
postData.pay_type = configData.paytype;
|
|
postData.check_type = configData.check_type;
|
|
if (postData.check_type == '92') {
|
|
postData.wdm_createtype = $('.btlistypeRt').find('.item[select=1]').find('span').text();
|
|
}
|
|
postData.aiessay_create_type = 1;
|
|
if (!isPayDialog && hasPayPaperCata) {
|
|
postData.core_content = getSubmitCata();
|
|
postData.aiessay_create_type = 2;
|
|
}
|
|
|
|
if($('#coreContent').length>0){
|
|
postData.core_content = getCoreContent()
|
|
}
|
|
|
|
if($('#detailDemand').length>0){
|
|
postData.core_content = getDetailDemand(postData.core_content)
|
|
}
|
|
|
|
if ($('#aiessayKeyword').length > 0) {
|
|
postData.core_content = getKeywordContent(postData);
|
|
}
|
|
|
|
if ($('#wdmCreatetype').length > 0) {
|
|
postData.wdm_createtype = decodeURIComponent($('#wdmCreatetype').text());
|
|
}
|
|
|
|
if ($('#aiessayWordnum').length > 0) {
|
|
postData.aiessay_wordnum = $('#aiessayWordnum').text();
|
|
}
|
|
|
|
if ($('#aiessayQikanLevel').length > 0) {
|
|
postData.aiessay_qikan_level = $('#aiessayQikanLevel').text();
|
|
}
|
|
|
|
if ($('#tableAndFormulas').length > 0) {
|
|
postData.table_and_formulas = $('#tableAndFormulas').text();
|
|
}
|
|
|
|
|
|
|
|
if ($('#aiessayEdu').length > 0) {
|
|
postData.aiessay_edu = $('#aiessayEdu').text();
|
|
}
|
|
if ($('#aiessayMajor').length > 0) {
|
|
postData.aiessay_major = $('#aiessayMajor').text();
|
|
}
|
|
|
|
if (postData.check_type == '96') {
|
|
var pptid = $("#ppt_tpl").val();
|
|
var upload_file_md5 = $("#upload_file_md5").val();
|
|
var upload_file_name = $("#upload_file_name").val();
|
|
var upload_file_tmpname = $("#upload_file_tmpname").val();
|
|
|
|
aiparams = JSON.parse(localStorage.getItem('aiparams'));
|
|
if (aiparams.upload_file_md5) {
|
|
upload_file_md5 = aiparams.upload_file_md5;
|
|
upload_file_name = aiparams.upload_file_name;
|
|
upload_file_tmpname = aiparams.upload_file_tmpname;
|
|
pptid = aiparams.ppt_tpl;
|
|
}
|
|
|
|
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;
|
|
}
|
|
if (postData.check_type == '97') {
|
|
if (word_countFLag) {
|
|
postData.aiessay_wordnum = word_countFLag;
|
|
}else{
|
|
var word_count = $("input[name=word_count]:checked").val();
|
|
if (!word_count) {
|
|
alert("请选择字数");
|
|
return;
|
|
}
|
|
postData.aiessay_wordnum = word_count;
|
|
}
|
|
|
|
if (table_and_formulas_flag) {
|
|
postData.table_and_formulas = table_and_formulas_flag;
|
|
}else{
|
|
var table_and_formulas_obj = $("input[name=table_and_formulas]:checked");
|
|
var table_and_formulas='';
|
|
for (var index = 0; index < table_and_formulas_obj.length; index++) {
|
|
var table_and_formulasval = table_and_formulas_obj.eq(index).val();
|
|
if(table_and_formulas == '') {
|
|
table_and_formulas = table_and_formulasval;
|
|
continue;
|
|
}
|
|
table_and_formulas += ','+table_and_formulasval;
|
|
}
|
|
postData.table_and_formulas = table_and_formulas;
|
|
}
|
|
}
|
|
|
|
$.ajax({
|
|
url: configData.service_domain + '/aisubmit',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
data: postData,
|
|
success: function (res) {
|
|
if (res.info == "用户信息不正确") {
|
|
loginComAction(location.href);
|
|
retrun;
|
|
}
|
|
if (res.status) {
|
|
if (isPayDialog) {
|
|
showProgress()
|
|
$('.modelDialog1').removeClass('hide');
|
|
$('.pageMask').removeClass('hide');
|
|
}
|
|
getAiNoNeedLoginSubmitResult(res);
|
|
localStorage.setItem('aiparams', '')
|
|
} else {
|
|
if (configData.paytype != 1) {
|
|
alert(res.info);
|
|
return;
|
|
}
|
|
|
|
var cardpaytypes = JSON.parse(configData.paytypes);
|
|
if (cardpaytypes.length > 0) {
|
|
var cardpaytype = -1;
|
|
for (var i = 0; i < cardpaytypes.length; i++) {
|
|
if (cardpaytypes[i] == 2 || cardpaytypes[i] == 3) {
|
|
cardpaytype = cardpaytypes[i];
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (cardpaytype == -1) {
|
|
alert(res.info);
|
|
return;
|
|
}
|
|
|
|
payinfo.pay_type = configData.paytype = cardpaytype;
|
|
configData.recharge_checkcard_total_fee = 0;
|
|
|
|
var cardmsg = res.info;
|
|
if (cardmsg.indexOf("检测卡支付金额不足") > -1) {
|
|
// 检测卡支付金额不足(0.01元),还需补<span> 0.07 </span>元 。<a target='_blank' style='color:blue;text-decoration:underline' href='/reward/for_enough?tid=10002168809175168&needpay=0.08'>去补款</a>|enougherr
|
|
var reg = /金额不足(\s*(.*?)\s*元)/;
|
|
var result = cardmsg.match(reg);
|
|
if (!result) {
|
|
alert(res.info + '|check card remain error');
|
|
return;
|
|
}
|
|
|
|
var reg2 = /还需补\<span\>\s*(.*?)\s*\<\/span\>元/;
|
|
var result2 = cardmsg.match(reg2);
|
|
if (!result2) {
|
|
alert(res.info + '|check card need pay error');
|
|
return;
|
|
}
|
|
|
|
var reg3 = /\&needpay\=\s*(.*?)\s*'/;
|
|
var result3 = cardmsg.match(reg3);
|
|
if (!result3) {
|
|
alert(res.info + '|order original pay error');
|
|
return;
|
|
}
|
|
|
|
configData.recharge_checkcard_total_fee = result2[1];
|
|
var checkcard_recharge_html = '<li><span>需再支付</span><span>' + result2[1] + '</span><span>元</span></li>';
|
|
checkcard_recharge_html += '<li>订单金额:' + result3[1] + '元</li>';
|
|
checkcard_recharge_html += '<li>检测卡余额抵扣:' + result[1] + '元</li>';
|
|
} else if (cardmsg.indexOf("折扣卡补款") > -1) {
|
|
// 折扣卡补款。0.08。5.0。0.04。|enougherr
|
|
var rechargeinfo = cardmsg.split('。');
|
|
configData.recharge_checkcard_total_fee = rechargeinfo[3];
|
|
checkcard_recharge_html = '<li><span>需再支付</span><span>' + rechargeinfo[3] + '</span><span>元</span></li>';
|
|
checkcard_recharge_html += '<li>订单金额:' + rechargeinfo[1] + '元</li>';
|
|
checkcard_recharge_html += '<li>订单折扣:' + rechargeinfo[2] + '折</li>';
|
|
} else if (cardmsg.indexOf("满减卡补款") > -1) {
|
|
// 满减卡补款。0.08。0.01。0.07。(满0.03减免0.01)|enougherr
|
|
// <!-- <li><span>需再支付</span><span>1888.00</span><span>元</span></li> -->
|
|
// <!-- <li>订单金额:1888.00元</li>
|
|
// <li>减免金额:1888.00元</li> -->
|
|
var rechargeinfo = cardmsg.split('。');
|
|
configData.recharge_checkcard_total_fee = rechargeinfo[3];
|
|
checkcard_recharge_html = '<li><span>需再支付</span><span>' + rechargeinfo[3] + '</span><span>元</span></li>';
|
|
checkcard_recharge_html += '<li>订单金额:' + rechargeinfo[1] + '元</li>';
|
|
checkcard_recharge_html += '<li>减免金额:' + rechargeinfo[2] + '元' + (rechargeinfo[4].replaceAll('|enougherr', '')) + '</li>';
|
|
} else {
|
|
alert(res.info);
|
|
return;
|
|
}
|
|
|
|
// cid=10002168803531919:444327&card_recharge=0.02
|
|
configData.cid = payinfo.tid;
|
|
configData.card_recharge = configData.recharge_checkcard_total_fee;
|
|
configData.recharge_checkcard_html = checkcard_recharge_html;
|
|
configData.recharge_card_type = 1;
|
|
getRechargePayUrl(payinfo, configData);
|
|
} else {
|
|
alert(res.info);
|
|
return;
|
|
}
|
|
}
|
|
},
|
|
error: function () {
|
|
alert('网络错误4');
|
|
}
|
|
});
|
|
}
|
|
|
|
function paytypeSwitch() {
|
|
$('.paytypeSwitch').unbind('click');
|
|
$('.paytypeSwitch').click(function () {
|
|
clearTimeout(payResultTimer);
|
|
var paytype = $('.paytypeSwitch').attr('paytype');
|
|
payAction(paytype);
|
|
});
|
|
}
|
|
|
|
function ai2PaytypeSwitch() {
|
|
$('.pay_qrcode-types').find('.pay_qrcode-type-item').unbind('click');
|
|
$('.pay_qrcode-types').find('.pay_qrcode-type-item').click(function () {
|
|
$('.pay_qrcode-types').find('.pay_qrcode-type-item').removeClass('pay_type_active');
|
|
$('.paycom-dialog').removeClass('paycom-checkcard');
|
|
$(this).addClass('pay_type_active');
|
|
clearTimeout(payResultTimer);
|
|
var paytype = $(this).attr('paytype');
|
|
payAction(paytype);
|
|
});
|
|
}
|
|
|
|
function getRechargePayUrl(payInfo, configData) {
|
|
var bd_buy_click_btn = $('#bd_buy_click_btn').text()
|
|
if (bd_buy_click_btn != 1) {
|
|
$.ajax({
|
|
type: "post",
|
|
url: '/bd_buy_click_log',
|
|
success: function (cc) {
|
|
}
|
|
});
|
|
$('#bd_buy_click_btn').text('1')
|
|
}
|
|
|
|
$('.tbpayComWrap').addClass('hide');
|
|
|
|
// $('.payQrcodeUl').addClass('hide');
|
|
var postData = new Object();
|
|
var word_countFLag = getUrlParam('aiessay_wordnum')
|
|
var table_and_formulas_flag = getUrlParam('table_and_formulas')
|
|
postData.type = checktype;
|
|
postData.pay_type = payInfo.pay_type;
|
|
postData.value_added_services = configData.addedServicesStr;
|
|
if (configData.ppt_tpl != '') postData.ppt_tpl = configData.ppt_tpl;
|
|
postData.recharge_goods_id = configData.goods_id;
|
|
postData.title = paperTitle;
|
|
postData.core_content = configData.core_content;
|
|
|
|
if (postData.type == '92') {
|
|
postData.wdm_createtype = $('.btlistypeRt').find('.item[select=1]').find('span').text();
|
|
}
|
|
|
|
if (configData.recharge_card_type) {
|
|
postData.cid = configData.cid;
|
|
postData.card_recharge = configData.card_recharge;
|
|
} else {
|
|
$('.ai2pay_greybg').removeClass('hide');
|
|
}
|
|
|
|
if (payInfo.pay_type == 0) {
|
|
alert('该服务未设置支付方式!');
|
|
return;
|
|
}
|
|
var fuid = $("#hidden_params").attr("fuid");
|
|
postData.fuid = fuid;
|
|
|
|
postData.aiessay_create_type = 1;
|
|
if (!isPayDialog && hasPayPaperCata) {
|
|
postData.core_content = getSubmitCata();
|
|
postData.aiessay_create_type = 2;
|
|
}
|
|
|
|
if($('#coreContent').length>0){
|
|
postData.core_content = getCoreContent()
|
|
}
|
|
|
|
if($('#detailDemand').length>0){
|
|
postData.core_content = getDetailDemand(postData.core_content)
|
|
}
|
|
|
|
if ($('#aiessayKeyword').length > 0) {
|
|
postData.core_content = getKeywordContent(postData);
|
|
}
|
|
|
|
if ($('#wdmCreatetype').length > 0) {
|
|
postData.wdm_createtype = decodeURIComponent($('#wdmCreatetype').text());
|
|
}
|
|
|
|
if ($('#aiessayWordnum').length > 0) {
|
|
postData.aiessay_wordnum = $('#aiessayWordnum').text();
|
|
}
|
|
|
|
if ($('#aiessayQikanLevel').length > 0) {
|
|
postData.aiessay_qikan_level = $('#aiessayQikanLevel').text();
|
|
}
|
|
|
|
if ($('#tableAndFormulas').length > 0) {
|
|
postData.table_and_formulas = $('#tableAndFormulas').text();
|
|
}
|
|
|
|
if ($('#aiessayEdu').length > 0) {
|
|
postData.aiessay_edu = $('#aiessayEdu').text();
|
|
}
|
|
if ($('#aiessayMajor').length > 0) {
|
|
postData.aiessay_major = $('#aiessayMajor').text();
|
|
}
|
|
|
|
if (postData.type == '96') {
|
|
var pptid = $("#ppt_tpl").val();
|
|
var upload_file_md5 = $("#upload_file_md5").val();
|
|
var upload_file_name = $("#upload_file_name").val();
|
|
var upload_file_tmpname = $("#upload_file_tmpname").val();
|
|
|
|
aiparams = JSON.parse(localStorage.getItem('aiparams'));
|
|
if (aiparams.upload_file_md5) {
|
|
upload_file_md5 = aiparams.upload_file_md5;
|
|
upload_file_name = aiparams.upload_file_name;
|
|
upload_file_tmpname = aiparams.upload_file_tmpname;
|
|
pptid = aiparams.ppt_tpl;
|
|
}
|
|
|
|
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;
|
|
}
|
|
if (postData.type == '97' && word_countFLag) {
|
|
postData.aiessay_wordnum = word_countFLag;
|
|
}
|
|
if (postData.type == '97' && table_and_formulas_flag) {
|
|
postData.table_and_formulas = table_and_formulas_flag;
|
|
}
|
|
if (postData.type == '81' || (!word_countFLag && postData.type == '97')) {
|
|
var word_count = $("input[name=word_count]:checked").val();
|
|
if (!word_count) {
|
|
alert("请选择字数");
|
|
return;
|
|
}
|
|
postData.aiessay_wordnum = word_count;
|
|
}
|
|
|
|
if (!table_and_formulas_flag && postData.type == '97') {
|
|
var table_and_formulas_obj = $("input[name=table_and_formulas]:checked");
|
|
var table_and_formulas='';
|
|
for (var index = 0; index < table_and_formulas_obj.length; index++) {
|
|
var table_and_formulasval = table_and_formulas_obj.eq(index).val();
|
|
if(table_and_formulas == '') {
|
|
table_and_formulas = table_and_formulasval;
|
|
continue;
|
|
}
|
|
table_and_formulas += ','+table_and_formulasval;
|
|
}
|
|
postData.table_and_formulas = table_and_formulas;
|
|
}
|
|
|
|
$.ajax({
|
|
url: configData.service_domain + '/ajax_get_ai_pay_url',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
data: postData,
|
|
success: function (res) {
|
|
if (res.status) {
|
|
if (configData.recharge_card_type) {
|
|
checkCardRechargeAct(res.data, configData);
|
|
} else {
|
|
if (postData.recharge_goods_id == '0') $('#payinfoWrapMoney').text(payInfo.user_not_enough_money);
|
|
$('#payinfoWrapRemain').addClass('hide');
|
|
$('#payinfoWrapRemain').text('');
|
|
if (payInfo.user_remain_money > 0 && postData.recharge_goods_id == '0') {
|
|
$('#payinfoWrapRemain').removeClass('hide');
|
|
$('#payinfoWrapRemain').text('余额抵扣¥' + payInfo.user_remain_money);
|
|
} else {
|
|
$('#payinfoWrapMoney').text(res.data.total_fee);
|
|
}
|
|
|
|
$('.paytypeSwitch').text('');
|
|
if (payInfo.pay_type == 2) {
|
|
$('.payqrcode.zfb').addClass('hide');
|
|
$('.payqrcode.wx').removeClass('hide');
|
|
$('.paytypeSwitch').removeClass('hide');
|
|
if (payInfo.isMultPay) {
|
|
$('.paytypeSwitch').text('切换支付宝');
|
|
$('.paytypeSwitch').attr('paytype', 3);
|
|
paytypeSwitch()
|
|
}
|
|
}
|
|
if (payInfo.pay_type == 3) {
|
|
$('.payqrcode.wx').addClass('hide');
|
|
$('.payqrcode.zfb').removeClass('hide');
|
|
$('.paytypeSwitch').removeClass('hide');
|
|
if (payInfo.isMultPay) {
|
|
$('.paytypeSwitch').text('切换微信');
|
|
$('.paytypeSwitch').attr('paytype', 2);
|
|
paytypeSwitch();
|
|
}
|
|
}
|
|
$('#payQrcodeImgWrap').html('');
|
|
$('#payQrcodeImgWrap').attr('tid', res.data.tid);
|
|
$('#payQrcodeImgWrap').attr('paytype', postData.pay_type);
|
|
jQuery("#payQrcodeImgWrap").qrcode({
|
|
text: res.data.qrcode_url,
|
|
width: 112,
|
|
height: 112
|
|
});
|
|
}
|
|
|
|
res.data.paytype = postData.pay_type;
|
|
getRechargePayResult(res.data, configData);
|
|
} else {
|
|
alert(res.info);
|
|
$('.ai2pay_greybg').addClass('hide');
|
|
$('.payQrcodeUl').addClass('hide');
|
|
}
|
|
},
|
|
error: function () {
|
|
alert('网络错误1');
|
|
}
|
|
});
|
|
}
|
|
|
|
function checkCardRechargeAct(rsdata, configData) {
|
|
$('#checkCardComRechargeQrcodeWrap').html('');
|
|
$('.paycom-dialog').addClass('paycom-checkcard');
|
|
jQuery("#checkCardComRechargeQrcodeWrap").qrcode({
|
|
text: rsdata.qrcode_url,
|
|
width: 112,
|
|
height: 112
|
|
});
|
|
|
|
$('#checkCardComTbsubmit').addClass('hide');
|
|
$('#checkCardComTbsubmitNoReady').addClass('hide');
|
|
clearTimeout(submitRepeatTimer);
|
|
$('.checkCardComRecharge').removeClass('wxpayactive');
|
|
$('.checkCardComRecharge').removeClass('zfbpayactive');
|
|
if (configData.paytype == 2) $('.checkCardComRecharge').addClass('wxpayactive');
|
|
if (configData.paytype == 3) $('.checkCardComRecharge').addClass('zfbpayactive');
|
|
|
|
$('.checkCardComRechargeRight').find('ul').html(configData.recharge_checkcard_html);
|
|
$('.checkCardComRecharge').removeClass('hide');
|
|
}
|
|
|
|
function getAiNoNeedLoginSubmitResult(res) {
|
|
// 注释小工具实时出结果
|
|
/**if (isPayDialog && res.data.data.check_type != 81 && res.data.data.check_type != 85 && res.data.data.check_type != 83 && res.data.data.check_type != 62 && res.data.data.check_type != 63 && res.data.data.check_type != 91 && res.data.data.check_type != 95 && res.data.data.check_type != 96 && res.data.data.check_type != 97) {
|
|
getOrderResult(res.data.data.paper_id, res.data.data.check_type, res);
|
|
return;
|
|
}
|
|
|
|
if (res.data.data.check_type == 81 || res.data.data.check_type == 85 || res.data.data.check_type == 83 || res.data.data.check_type == 62 || res.data.data.check_type == 63 || res.data.data.check_type == 91 || res.data.data.check_type == 95 || res.data.data.check_type == 96 || res.data.data.check_type == 97) {
|
|
$('#isPayDialogMask').addClass('hide');
|
|
$('.modelDialog1').addClass('hide');
|
|
$('.pageMask').addClass('hide');
|
|
$('.paycom-dialog').addClass('hide');
|
|
}**/
|
|
// 注释小工具实时出结果
|
|
|
|
$('#isPayDialogMask').addClass('hide');
|
|
$('.modelDialog1').addClass('hide');
|
|
$('.pageMask').addClass('hide');
|
|
$('.paycom-dialog').addClass('hide');
|
|
|
|
payresultAction(res);
|
|
}
|
|
|
|
function payresultAction(res) {
|
|
var data = res.data;
|
|
$('#payresultTid').text(data.tid);
|
|
if (data.wechat_qrcode_url) {
|
|
$('.payresultWrap').removeClass('payresultNoGz');
|
|
$('.payresultQrcode').attr('src', data.wechat_qrcode_url);
|
|
$('.payresultQrcodeClass').removeClass('hide');
|
|
}
|
|
$('.payresultMask').removeClass('hide');
|
|
$('.payresultWrap').removeClass('hide');
|
|
if(paperTitle){
|
|
$('#pay_essay_title').html('标题:' + paperTitle)
|
|
}else{
|
|
$('#pay_essay_title').html('服务:小红书文案')
|
|
}
|
|
$('.payresultBtn11').unbind('click');
|
|
$('.payresultBtn22').unbind('click');
|
|
$('.payresultBtn11').click(function () {
|
|
location.href = "/report2?oid=" + data.tid;
|
|
});
|
|
$('.payresultBtn22').click(function () {
|
|
if (isPayDialog) {
|
|
location.reload();
|
|
return;
|
|
}
|
|
|
|
var configData = $('#payCheckConfig').text();
|
|
configData = JSON.parse(configData);
|
|
|
|
location.href = "/"+configData.check_flag
|
|
});
|
|
|
|
$('#payresultCopyTidBtn').unbind('click');
|
|
var clipboard2 = new Clipboard('#payresultCopyTidBtn', {
|
|
text: function () {
|
|
return $('#payresultTid').text();
|
|
}
|
|
});
|
|
clipboard2.on('success', function (e) {
|
|
alert('复制成功')
|
|
})
|
|
}
|
|
|
|
|
|
function getRechargePayResult(payinfo, configData) {
|
|
clearTimeout(payResultTimer);
|
|
|
|
var ptid = $('#payQrcodeImgWrap').attr('tid');
|
|
// 支付页面默认打开支付方式 再次点击检测卡 然后需要补款 查询支付结果订单号为默认打开支付方式订单号
|
|
if ($('.ai2_cardpay.pay_type_active').length == 1 && payinfo.tid) {
|
|
ptid = payinfo.tid;
|
|
}
|
|
|
|
var ppaytype = $('#payQrcodeImgWrap').attr('paytype');
|
|
$.ajax({
|
|
url: configData.service_domain + '/ajax_get_ai_pay_result',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
data: { tid: ptid, pay_type: ppaytype },
|
|
success: function (res) {
|
|
if (res.status) {
|
|
if (res.data.pay_status == 'NOTPAY') {
|
|
payResultTimer = setTimeout(function () {
|
|
getRechargePayResult(payinfo, configData);
|
|
}, 2000);
|
|
return;
|
|
}
|
|
|
|
if (isPayDialog) {
|
|
showProgress()
|
|
$('.modelDialog1').removeClass('hide');
|
|
$('.pageMask').removeClass('hide');
|
|
}
|
|
|
|
if (aiNoNeedLogin) {
|
|
getAiNoNeedLoginSubmitResult(res);
|
|
} else {
|
|
aiSubmit(payinfo, configData);
|
|
}
|
|
clearTimeout(payResultTimer);
|
|
return;
|
|
}
|
|
|
|
clearTimeout(payResultTimer);
|
|
alert(res.info);
|
|
},
|
|
error: function (err) {
|
|
alert('网络错误2');
|
|
}
|
|
});
|
|
}
|
|
|
|
function payGetConfig(paytype) {
|
|
var addServiceSelectObj = $('#essay-pay-service-list .active-service').find('img');
|
|
var addedServicesStr = '';
|
|
var ppt_tpl = '';
|
|
for (var index = 0; index < addServiceSelectObj.length; index++) {
|
|
var element = addServiceSelectObj.eq(index);
|
|
if (!element.hasClass('hide') && element.attr('show') == '1') {
|
|
if (element.attr('type') == 96) ppt_tpl = $('.page-ppt') && $('.page-ppt').attr('ppt_id');
|
|
// if (element.attr('type') == 96) ppt_tpl = $('.pptTplListBoxItem.active').attr('tlpid');
|
|
if (addedServicesStr == '') {
|
|
addedServicesStr = element.attr('type');
|
|
continue;
|
|
}
|
|
addedServicesStr += ',' + element.attr('type');
|
|
}
|
|
}
|
|
var configData = $('#payCheckConfig').text();
|
|
if ($('#payCheckConfig').length <= 0 || !configData || configData == '') {
|
|
alert('站点配置错误,请联系网站管理员');
|
|
errorJump();
|
|
return;
|
|
}
|
|
|
|
configData = JSON.parse(configData);
|
|
|
|
if (!configData.service_domain) {
|
|
alert('站点配置错误,请联系网站管理员!');
|
|
errorJump();
|
|
return;
|
|
}
|
|
|
|
var selectGoods = $('.payGoodsList').find('li.active');
|
|
if (selectGoods.length <= 0) {
|
|
alert('请选择支付订单类型!');
|
|
return;
|
|
}
|
|
|
|
var goods_id = selectGoods.attr('goods_id');
|
|
configData.goods_id = goods_id;
|
|
configData.paytype = paytype;
|
|
if (isai2 && paytype < 0) {
|
|
paytypes = JSON.parse(configData.paytypes);
|
|
if (paytypes && paytypes.length > 0) {
|
|
var paytab = '';
|
|
for (var i = 0; i < paytypes.length; i++) {
|
|
if (i == 0) {
|
|
configData.paytype = paytypes[i];
|
|
if ((configData.paytype == 0 || configData.paytype == 4) && configData.guide_url && configData.guide_url != '') {
|
|
$('#comtbQrcode').html('');
|
|
jQuery("#comtbQrcode").qrcode({
|
|
text: configData.guide_url,
|
|
width: 130,
|
|
height: 130
|
|
});
|
|
verifyTid($('#aiTaobaoTidInput1'));
|
|
verifyTid($('#aiTaobaoTidInput2'));
|
|
verifyTid($('#aiTaobaoTidInput3'));
|
|
}
|
|
|
|
if (configData.paytype == 1) verifyTid($('#aiCheckCardInput'));
|
|
|
|
if (configData.paytype == 0 || configData.paytype == 1 || configData.paytype == 4) {
|
|
$('.paytipszfb').addClass('hide');
|
|
$('.paytipstb').removeClass('hide');
|
|
if ($('.paytipszfb').length == 0) {
|
|
setTimeout(function () {
|
|
$('.paytipszfb').addClass('hide');
|
|
}, 80);
|
|
}
|
|
} else {
|
|
$('.paytipstb').addClass('hide');
|
|
$('.paytipszfb').removeClass('hide');
|
|
if ($('.paytipszfb').length == 0) {
|
|
setTimeout(function () {
|
|
$('.paytipszfb').removeClass('hide');
|
|
}, 80);
|
|
}
|
|
}
|
|
}
|
|
if (paytypes[i] == 0) paytab += '<div paytype="0" class="pay_qrcode-type-item ai2_tbpay' + (i == 0 ? ' pay_type_active' : '') + '"><i></i>淘宝订单号</div>';
|
|
if (paytypes[i] == 1) paytab += '<div paytype="1" class="pay_qrcode-type-item ai2_cardpay' + (i == 0 ? ' pay_type_active' : '') + '"><i></i>检测卡</div>';
|
|
if (paytypes[i] == 2) paytab += '<div paytype="2" class="pay_qrcode-type-item ai2_wxpay' + (i == 0 ? ' pay_type_active' : '') + '"><i></i>微信支付</div>';
|
|
if (paytypes[i] == 3) paytab += '<div paytype="3" class="pay_qrcode-type-item ai2_zfbpay' + (i == 0 ? ' pay_type_active' : '') + '"><i></i>支付宝</div>';
|
|
if (paytypes[i] == 4) paytab += '<div paytype="4" class="pay_qrcode-type-item ai2_jdpay ai2_tbpay' + (i == 0 ? ' pay_type_active' : '') + '"><i></i>京东</div>';
|
|
}
|
|
$('.pay_qrcode-types').html(paytab);
|
|
ai2PaytypeSwitch();
|
|
}
|
|
}
|
|
|
|
if (paytype >= 0) {
|
|
if (paytype == 0 || paytype == 1 || paytype == 4) {
|
|
$('.paytipszfb').addClass('hide');
|
|
$('.paytipstb').removeClass('hide');
|
|
if ($('.paytipszfb').length == 0) {
|
|
setTimeout(function () {
|
|
$('.paytipszfb').addClass('hide');
|
|
}, 80);
|
|
}
|
|
} else {
|
|
$('.paytipstb').addClass('hide');
|
|
$('.paytipszfb').removeClass('hide');
|
|
if ($('.paytipszfb').length == 0) {
|
|
setTimeout(function () {
|
|
$('.paytipszfb').removeClass('hide');
|
|
}, 80);
|
|
}
|
|
}
|
|
}
|
|
|
|
if ((paytype == 0 && configData.paytype == 0) || configData.paytype == 4) {
|
|
if (configData.guide_url && configData.guide_url != '') {
|
|
$('#comtbQrcode').html('');
|
|
jQuery("#comtbQrcode").qrcode({
|
|
text: configData.guide_url,
|
|
width: 130,
|
|
height: 130
|
|
});
|
|
verifyTid($('#aiTaobaoTidInput1'));
|
|
verifyTid($('#aiTaobaoTidInput2'));
|
|
verifyTid($('#aiTaobaoTidInput3'));
|
|
}
|
|
verifyTid($('#aiTaobaoTidInput1'));
|
|
verifyTid($('#aiTaobaoTidInput2'));
|
|
verifyTid($('#aiTaobaoTidInput3'));
|
|
}
|
|
|
|
if (configData.paytype == 0 || configData.paytype == 4) {
|
|
$('#comTbsubmit').unbind('click');
|
|
$('#comTbsubmit').click(function () {
|
|
$('#comTbsubmit').addClass('hide');
|
|
$('#comTbsubmitNoReady').removeClass('hide');
|
|
setTimeout(function () {
|
|
$('#comTbsubmit').removeClass('hide');
|
|
$('#comTbsubmitNoReady').addClass('hide');
|
|
}, 3000);
|
|
|
|
var tid = $('#aiTaobaoTidInput1').val();
|
|
var res = verifyTaobaoTid($('#aiTaobaoTidInput1'), tid);
|
|
|
|
var tid2 = $('#aiTaobaoTidInput2').val();
|
|
var res2 = verifyTaobaoTid($('#aiTaobaoTidInput2'), tid2);
|
|
|
|
var tid3 = $('#aiTaobaoTidInput3').val();
|
|
var res3 = verifyTaobaoTid($('#aiTaobaoTidInput3'), tid3);
|
|
if (!res && !res2 && !res3) return;
|
|
if ($('.tidErrrorflag').css('display') != 'none') return;
|
|
|
|
var payInfoTmp = new Object();
|
|
payInfoTmp.orderId1 = $('#aiTaobaoTidInput1').val().trim();
|
|
payInfoTmp.orderId2 = $('#aiTaobaoTidInput2').val().trim();
|
|
payInfoTmp.orderId3 = $('#aiTaobaoTidInput3').val().trim();
|
|
payInfoTmp.addedServicesStr = configData.addedServicesStr;
|
|
|
|
if (ppt_tpl != '') payInfoTmp.ppt_tpl = ppt_tpl
|
|
aiSubmit(payInfoTmp, configData);
|
|
});
|
|
}
|
|
|
|
if (paytype == 1 && configData.paytype == 1) verifyTid($('#aiCheckCardInput'));
|
|
|
|
if (configData.paytype == 1) {
|
|
$('#checkCardComTbsubmit').unbind('click');
|
|
$('#checkCardComTbsubmit').click(function () {
|
|
$('#checkCardComTbsubmit').addClass('hide');
|
|
$('#checkCardComTbsubmitNoReady').removeClass('hide');
|
|
submitRepeatTimer = setTimeout(function () {
|
|
if (!$('#checkCardComTbsubmitNoReady').hasClass('hide')) $('#checkCardComTbsubmit').removeClass('hide');
|
|
$('#checkCardComTbsubmitNoReady').addClass('hide');
|
|
}, 3000);
|
|
|
|
var cardnum = $('#aiCheckCardInput').val();
|
|
var res = verifyCheckCardTid($('#aiCheckCardInput'), cardnum);
|
|
if (!res) return;
|
|
if ($('.checkCardTidErrrorflag').css('display') != 'none') return;
|
|
|
|
var payInfoTmp = new Object();
|
|
payInfoTmp.tid = $('#aiCheckCardInput').val().trim();
|
|
payInfoTmp.addedServicesStr = configData.addedServicesStr;
|
|
if (ppt_tpl != '') payInfoTmp.ppt_tpl = ppt_tpl
|
|
configData.paytype = getPayType();
|
|
aiSubmit(payInfoTmp, configData);
|
|
});
|
|
}
|
|
|
|
configData.addedServicesStr = addedServicesStr;
|
|
if (ppt_tpl != '') configData.ppt_tpl = ppt_tpl
|
|
if (isPayDialog) {
|
|
if ((typeinputConfig.title && typeinputConfig.content) || (!typeinputConfig.title && typeinputConfig.content)) {
|
|
var contentDesc = $('.textAreaForWordCount').val().trim();
|
|
configData.core_content = contentDesc;
|
|
}
|
|
} else {
|
|
if ($('#payPaperCore').length > 0) configData.core_content = $('#payPaperCore').text().trim();
|
|
}
|
|
|
|
checkAiSubmit(configData);
|
|
}
|
|
function getUrlParam(name) {
|
|
var searchParams = new URLSearchParams(window.location.search);
|
|
return searchParams.get(name);
|
|
}
|
|
function payAction(paytype) {
|
|
clearTimeout(payResultTimer);
|
|
clearTimeout(submitRepeatTimer);
|
|
$('.checkCardComRecharge').addClass('hide');
|
|
$('#checkCardComTbsubmit').removeClass('hide');
|
|
var word_countFLag = getUrlParam('aiessay_wordnum')
|
|
checktype = $('#payCheckType').text();
|
|
if (isPayDialog) {
|
|
if (typeinputConfig.title && !typeinputConfig.content) {
|
|
paperTitle = $('#formTitle').val();
|
|
}
|
|
if ((typeinputConfig.title && typeinputConfig.content) || (!typeinputConfig.title && typeinputConfig.content)) {
|
|
paperTitle = $('#formTitle').val();
|
|
var contentDesc = $('.textAreaForWordCount').val().trim();
|
|
if ((contentDesc == '' || !contentDesc) && typeinputConfig.content_min_limit > 0) {
|
|
alert(typeinputConfig.content + '不能为空');
|
|
errorJump();
|
|
return;
|
|
}
|
|
}
|
|
} else {
|
|
paperTitle = $('#payPaperTitle').text().trim();
|
|
}
|
|
|
|
if (paperTitle == '' || !paperTitle) {
|
|
if (isPayDialog) {
|
|
if (typeinputConfig.title) {
|
|
alert('提交' + typeinputConfig.title + '不能为空');
|
|
errorJump();
|
|
return;
|
|
}
|
|
} else {
|
|
alert('提交标题不能为空');
|
|
errorJump();
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (checktype == '') {
|
|
alert('提交类型不合法');
|
|
errorJump();
|
|
return false;
|
|
}
|
|
|
|
if (checktype == '96') {
|
|
// var pptid = $("#ppt_tpl").val();
|
|
var pptid =$('.page-ppt') && $('.page-ppt').attr('ppt_tpl')
|
|
if(!pptid) pptid = $("#ppt_tpl").val();
|
|
var upload_file_md5 = $("#upload_file_md5").val();
|
|
var upload_file_name = $("#upload_file_name").val();
|
|
var upload_file_tmpname = $("#upload_file_tmpname").val();
|
|
|
|
aiparams = JSON.parse(localStorage.getItem('aiparams'));
|
|
if (aiparams.upload_file_md5) {
|
|
upload_file_md5 = aiparams.upload_file_md5;
|
|
upload_file_name = aiparams.upload_file_name;
|
|
upload_file_tmpname = aiparams.upload_file_tmpname;
|
|
pptid = aiparams.ppt_tpl;
|
|
}
|
|
|
|
if (!upload_file_md5 || !upload_file_name || !upload_file_tmpname) {
|
|
alert("请上传论文文件");
|
|
errorJump();
|
|
return;
|
|
}
|
|
if (!pptid) {
|
|
alert("请选择ppt模板");
|
|
errorJump();
|
|
return;
|
|
}
|
|
}
|
|
|
|
if (checktype == '97' && !word_countFLag) {
|
|
var word_count = $("input[name=word_count]:checked").val();
|
|
if (!word_count) {
|
|
alert("请选择字数");
|
|
errorJump();
|
|
return;
|
|
}
|
|
}
|
|
|
|
payGetConfig(paytype);
|
|
}
|
|
|
|
if ($('#userIsLogined').length > 0) {
|
|
if ($('#isPayDialog').length == 0) {
|
|
payAction(-1);
|
|
} else {
|
|
$('#formInputSumbtn,#formSumbtn').click(function () {
|
|
var that = $(this);
|
|
$(this).addClass('hide');
|
|
var btnid = $(this).attr('id');
|
|
$('#' + btnid + '2').removeClass('hide');
|
|
setTimeout(function () {
|
|
that.removeClass('hide');
|
|
$('#' + btnid + '2').addClass('hide');
|
|
}, 4000);
|
|
payAction(-1);
|
|
});
|
|
}
|
|
} else {
|
|
if ($('#isPayDialog').length > 0) {
|
|
// loginComAction();
|
|
$('#formInputSumbtn,#formSumbtn').click(function () {
|
|
loginComAction();
|
|
});
|
|
}
|
|
}
|
|
|
|
if ($('#isPayDialog').length > 0) {
|
|
// loginComAction();
|
|
$('#formInputSumbtn,#formSumbtn').click(function () {
|
|
loginComAction();
|
|
});
|
|
}
|
|
|
|
function hidePayModel() {
|
|
$('.paycom-dialog').addClass('hide');
|
|
$('#isPayDialogMask').addClass('hide');
|
|
clearTimeout(payResultTimer);
|
|
}
|
|
|
|
function errorJump() {
|
|
if (isPayDialog) {
|
|
//location.reload();
|
|
return;
|
|
}
|
|
location.href = '/';
|
|
}
|
|
|
|
function getOrderResult(paper_id, type, callbackres) {
|
|
clearTimeout(orderResultTimer);
|
|
//ai范文直接跳转报告列表页面
|
|
if (type == 61 || type == 81) {
|
|
location.href = "/report";
|
|
return;
|
|
}
|
|
$('.paycom-dialog').addClass('hide');
|
|
$('.isPayDialogMask').addClass('hide');
|
|
orderResultTimer = setTimeout(function () {
|
|
if (orderResultTimerCount <= 0) {
|
|
if (aiNoNeedLogin) {
|
|
$('#isPayDialogMask').addClass('hide');
|
|
$('.modelDialog1').addClass('hide');
|
|
$('.pageMask').addClass('hide');
|
|
payresultAction(callbackres);
|
|
return;
|
|
}
|
|
alert('AI正在分析,请在“我的报告”等待出结果后下载结果!');
|
|
location.href = '/report';
|
|
return;
|
|
}
|
|
|
|
--orderResultTimerCount;
|
|
--orderResultTimerCount;
|
|
|
|
var postData = new Object();
|
|
postData.paper_id = paper_id;
|
|
if (aiNoNeedLogin) postData.tid = callbackres.data.tid;
|
|
$.ajax({
|
|
url: '/ajax_get_ai_result',
|
|
type: 'post',
|
|
dataType: 'json',
|
|
data: postData,
|
|
success: function (res) {
|
|
if (!res.status) {
|
|
getOrderResult(paper_id, type, callbackres); //
|
|
return;
|
|
}
|
|
if (res.data.timeuse) $("#timeuse").html(res.data.timeuse);
|
|
|
|
$('.modelDialog1').addClass('hide');
|
|
$('.modelDialog2').removeClass('hide');
|
|
$('#modelDialog2Con').html(res.data.res);
|
|
},
|
|
error: function (err) {
|
|
clearTimeout(orderResultTimer);
|
|
alert('网络错误2');
|
|
location.reload();
|
|
}
|
|
});
|
|
}, 2000);
|
|
}
|
|
$('#comToTbShopBtn').click(function () {
|
|
var configData = $('#payCheckConfig').text();
|
|
if ($('#payCheckConfig').length <= 0 || !configData || configData == '') {
|
|
alert('站点配置错误,请联系网站管理员');
|
|
errorJump();
|
|
return;
|
|
}
|
|
configData = JSON.parse(configData);
|
|
if (configData.guide_url && configData.guide_url != '') {
|
|
window.open(configData.guide_url);
|
|
}
|
|
});
|
|
|
|
function verifyTid(ele) {
|
|
ele.unbind("textchange");
|
|
ele.bind("textchange", function () {
|
|
var tid = $.trim(ele.val());
|
|
var objData = {};
|
|
var _that = ele;
|
|
showTaoBaoTidRemain(new Object(), ele);
|
|
doCheckQueryOrder(_that, tid);
|
|
});
|
|
}
|
|
|
|
function doCheckQueryOrder(ele, tid) {
|
|
var myPayType = getPayType();
|
|
if (((myPayType == 0 || myPayType == 4) && verifyTaobaoTid(ele, tid)) || (myPayType == 1 && verifyCheckCardTid(ele, tid))) {
|
|
var objData = { "pay_type": myPayType, "tid": tid };
|
|
checkQueryOrder(ele, objData)
|
|
}
|
|
}
|
|
|
|
function taobaoTidVerifyAct(iserror, ele, msg) {
|
|
var eleid = ele.attr('id');
|
|
var isshowError = false;
|
|
if ((eleid == 'aiTaobaoTidInput2' || eleid == 'aiTaobaoTidInput3') && !ele.val()) {
|
|
ele.parent().find('.right').addClass('hide');
|
|
ele.css('border', '1px solid #E1E2E2');
|
|
ele.parent().find('.error').addClass('hide');
|
|
|
|
if (!$('#aiTaobaoTidInput1').parent().find('.right').hasClass('hide') && !$('#aiTaobaoTidInput2').val() && !$('#aiTaobaoTidInput3').val()) {
|
|
$('.comeleftError').addClass('hide');
|
|
}
|
|
return;
|
|
}
|
|
|
|
if (iserror) {
|
|
if (!msg && msg != '') return;
|
|
$('.comeleftError').removeClass('hide');
|
|
ele.css('border', '1px solid #FE5500');
|
|
$('.comeleftError').attr('title', msg);
|
|
ele.parent().find('.error').removeClass('hide');
|
|
ele.parent().find('.right').addClass('hide');
|
|
$('.comeleftError').find('p').html(msg);
|
|
} else {
|
|
$('.comeleftError').addClass('hide');
|
|
ele.css('border', '1px solid #E1E2E2');
|
|
ele.parent().find('.error').addClass('hide');
|
|
ele.parent().find('.right').removeClass('hide');
|
|
$('.comeleftError').find('p').html("");
|
|
}
|
|
}
|
|
|
|
function verifyTaobaoTid(ele, tid) {
|
|
tid = tid.trim();
|
|
var pageMyPayType = getPayType();
|
|
var tidmax = 19;
|
|
var tidmin = 13;
|
|
if (pageMyPayType == 4) {
|
|
tidmax = 12;
|
|
tidmin = 11;
|
|
}
|
|
|
|
if (tid.length > tidmax || tid.length < tidmin) {
|
|
taobaoTidVerifyAct(true, ele, "请输入" + tidmin + "-" + tidmax + "位订单编号");
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
function checkCardNumVerifyAct(iserror, ele, msg) {
|
|
if (iserror) {
|
|
if (!msg && msg != '') return;
|
|
$('.checkCardComeleftError').removeClass('hide');
|
|
ele.css('border', '1px solid #FE5500');
|
|
$('.checkCardComeleftError').attr('title', msg);
|
|
$('.checkCardComleftInput').find('.error').removeClass('hide');
|
|
$('.checkCardComleftInput').find('.right').addClass('hide');
|
|
$('.checkCardComeleftError').find('p').html(msg);
|
|
} else {
|
|
$('.checkCardComeleftError').addClass('hide');
|
|
ele.css('border', '1px solid #E1E2E2');
|
|
$('.checkCardComleftInput').find('.error').addClass('hide');
|
|
$('.checkCardComleftInput').find('.right').removeClass('hide');
|
|
$('.checkCardComeleftError').find('p').html("");
|
|
}
|
|
}
|
|
|
|
function verifyCheckCardTid(ele, cardnum) {
|
|
ctid = cardnum.trim();
|
|
if (ctid.length != 13 && ctid.length != 15 && ctid.length != 22 && ctid.length != 23 && ctid.length != 24) {
|
|
checkCardNumVerifyAct(true, ele, "请输入13位/15位/22位/23位/24位卡号");
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
function showTaoBaoTidRemain(data, ele) {
|
|
try {
|
|
var comTbTidRemain = ele.parent().next();
|
|
if (data.remains || data.totals || data.useds) {
|
|
var totals = data.totals ? data.totals : 0;
|
|
var useds = data.useds ? data.useds : 0;
|
|
var remains = data.remains ? data.remains : 0;
|
|
comTbTidRemain.find('span').eq(0).text(totals);
|
|
comTbTidRemain.find('span').eq(1).text(useds);
|
|
comTbTidRemain.find('span').eq(2).text(remains);
|
|
comTbTidRemain.removeClass('hide');
|
|
} else {
|
|
comTbTidRemain.addClass('hide');
|
|
}
|
|
} catch (e) { }
|
|
}
|
|
|
|
function checkQueryOrder(ele, objData) {
|
|
clearTimeout(payResultTimer);
|
|
clearTimeout(submitRepeatTimer);
|
|
$('.checkCardComRecharge').addClass('hide');
|
|
$('#checkCardComTbsubmit').removeClass('hide');
|
|
$('.paycom-dialog').removeClass('paycom-checkcard');
|
|
|
|
$.ajax({
|
|
type: "get", cache: false, url: $CONFIG.service_domain + "/ajax_check_order", data: objData,
|
|
success: function (jsondata) {
|
|
var paytypes = $CONFIG.paytypes;
|
|
var myPayType = getPayType();
|
|
jsondata = JSON.parse(jsondata);
|
|
var mesg = jsondata.info;
|
|
alertMsg = mesg;
|
|
tid = objData.tid;
|
|
if (objData.pay_type == 0 || objData.pay_type == 4) {
|
|
showTaoBaoTidRemain(jsondata.data, ele);
|
|
}
|
|
|
|
if (jsondata.status) {
|
|
if (objData.pay_type == 0 || objData.pay_type == 4) {
|
|
taobaoTidVerifyAct(false, ele, '');
|
|
} else if (objData.pay_type == 1) {
|
|
checkCardNumVerifyAct(false, ele, '');
|
|
}
|
|
} else {
|
|
if (jsondata.info.indexOf("class='down_report_a'") > -1) {
|
|
if (objData.pay_type == 0 || objData.pay_type == 4) {
|
|
taobaoTidVerifyAct(true, ele, jsondata.info);
|
|
$('.comeleftError').find('.down_report_a').click(function () {
|
|
window.open("/report2?oid=" + objData.tid);
|
|
});
|
|
} else if (objData.pay_type == 1) {
|
|
checkCardNumVerifyAct(true, ele, jsondata.info);
|
|
$('.checkCardComeleftError').find('.down_report_a').click(function () {
|
|
window.open("/report2?oid=" + objData.tid);
|
|
});
|
|
}
|
|
} else {
|
|
if (objData.pay_type == 0 || objData.pay_type == 4) {
|
|
taobaoTidVerifyAct(true, ele, jsondata.info);
|
|
} else if (objData.pay_type == 1) {
|
|
checkCardNumVerifyAct(true, ele, jsondata.info);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|
|
$('.comFindTbOrder,.comFindTbOrderExample').hover(function () {
|
|
$('.comFindTbOrderExample').removeClass('hide');
|
|
}, function () {
|
|
$('.comFindTbOrderExample').addClass('hide');
|
|
});
|
|
</script>
|
|
{/literal}
|