CINXE.COM

ACT杂志电子索阅表

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta http-equiv=Cache-Control content="no-cache, no-store, must-revalidate"> <meta http-equiv=Pragma content=no-cache> <meta http-equiv=Expires content=0> <meta name="title" itemprop="title" content="ACT杂志电子索阅表"> <meta name="image" itemprop="image" content="https://www.sbs-mag.com/assets/img/icon/freesub.jpg"> <meta name="description" itemprop="description" content="杂志及会议服务于机器视觉设计、电子制造、激光/光电子、射频/微波、化合物半导体、半导体制造、洁净及污染控制、电磁兼容等领域的约二十多万专业读者及与会者。"> <script src="https://ilacmag-sz.oss-cn-shenzhen.aliyuncs.com/res/js/jquery.min.js" type="text/javascript"> </script> <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js" type="text/javascript"></script> <script src="https://ilacmag-sz.oss-cn-shenzhen.aliyuncs.com/js/shareSMTC.js"></script> <title>ACT杂志电子索阅表</title> <link rel="stylesheet" href="/js/layui/css/layui.css?v=20210127"> </head> <style> * { /*color: #313131;*/ font-family: '思源黑体 CN Regular', '思源黑体 CN', Arial, Helvetica, sans-serif; } .layui-form-pane .layui-form-label, .layui-form-checkbox[lay-skin="primary"] span { color: #313131 !important; } .layui-btn-primary { width: 140px !important; color: #313131; border-color: #313131; /*font-weight: 580;*/ } .layui-body { background-color: #ffffff; } .container { width: 1200px; margin: auto; } .layui-form-item .layui-inline { margin: unset !important; } .sub_title { font-size: 16px; margin-top: 30px; font-weight: bold; color: #313131; /*margin-left: 10px;*/ } .mag_box { /*border: 1px solid #EEEEEE;*/ /*padding: 10px;*/ margin-top: 10px; /*box-shadow: #EEEEEE;*/ margin-bottom: 10px; color: #808080; font-size: 16px } .question_title { background-color: #F5F5F5; height: auto; padding: 10px 6px; box-sizing: border-box; /*font-weight: bold;*/ font-size: 14px; color: #313131; /*border-top-left-radius: 10px;*/ /*border-top-right-radius: 10px;*/ /*margin-left: 20px;*/ } .question_box { border: 1px solid #eeeeee; /*border-radius: 10px;*/ margin: 10px 0px; } .question_content { padding: 10px 0px 10px 0px; box-sizing: border-box; font-size: 13px } .space { margin: 4px 0px; } .sub_mag { margin: 10px 0px; } .question_box .layui-form-radio { line-height: 20px !important; margin: 0px 6px 0 8px !important; } .imp { color: #FF0000; } .layui-col-md6 .layui-form-item { margin-bottom: 0px !important; } .border_color { border-color: #009688; } .title_name { margin: 8px 0px 8px 8px; } .selected { background: url('/static/image/mianbaoban/subscription/okay.svg') no-repeat right bottom rgba(43, 122, 205, 0.1); background-size: auto; background-size: 21px 21px; color: #2b7acd; border: 1px solid #2b7acd; } .layui-btn-primary:hover { border-color: #2b7acd !important; color: #2b7acd !important; background: url('/static/image/mianbaoban/subscription/okay.svg') no-repeat right bottom rgba(43, 122, 205, 0.1); background-size: auto; background-size: 21px 21px; } .layui-btn:hover { opacity: .8; filter: alpha(opacity=80); } .layui-form-radio>i:hover, .layui-form-radioed>i { color: #2b7acd !important; } .layui-form-checked[lay-skin="primary"] i { border-color: #2b7acd !important; background-color: #2b7acd; color: #fff; } .layui-form-checkbox[lay-skin="primary"]:hover i { border-color: #2b7acd !important; color: #fff; } .service .layui-form-checkbox { margin: 4px 0px 4px 0px !important; /*margin-top: 4px;*/ } .footer-cookie { display: flex; width: 1200px; margin: 0 auto; justify-content: space-around; align-items: center; flex-wrap: wrap; } #accepts { position: fixed; bottom: 0; left: 0; background: #fff; z-index: 9; width: 100%; border-top: 1px solid #eee; padding: 20px; font-size: 16px; } .service .layui-form-checkbox { margin-top: unset !important; } .service a { color: #66b1ff } #mm .layui-input { width: 178px !important; text-align: left; overflow: hidden; } .shareImg { /*width: 100%;*/ height: 550px; } @media screen and (max-width: 768px) { .space .layui-unselect { /*width: 300px!important;*/ display: flex; } .footer-cookie { width: 100%; } #accepts { padding: 10px; font-size: 14px; } #mm .layui-input { width: 284px !important; text-align: left; } .shareImg { width: 100%; /* height: 500px; */ } .layui-layer { left: 10%!important; right: 10%!important; } } </style> <body> <div class="container-fluid"> <div id="top_banner"><img src="/assets/img/icon/subscrib_top_bg.jpg" style="width:100%" id="top_img"></div> <div class="layui-container"> <div class="layui-row"> <form class="layui-form layui-form-pane" action="post"> <div class="layui-row sub_title">请选择您要订阅的杂志</div> <div class="layui-row mag_box"> <!--<div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag">--> <!--<button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="18"--> <!--lay-filter="changeMag" text_value="ILAC">工业激光应用--> <!--</button>--> <!--</div>--> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="7" lay-filter="changeMag" text_value="SMTC">一步步新技术 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="8" lay-filter="changeMag" text_value="SISC">半导体芯科技 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="12" lay-filter="changeMag" text_value="VSDC">视觉系统设计 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="9" lay-filter="changeMag" text_value="CSC">化合物半导体 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="10" lay-filter="changeMag" text_value="MWJC">微波杂志 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="3" lay-filter="changeMag" text_value="LFWC">激光世界 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg " btn_value="1" lay-filter="changeMag" text_value="CRC">洁净室 </button> </div> <div class="layui-col-lg3 layui-col-md3 layui-col-sm4 layui-col-xs6 sub_mag"> <button type="button" class="layui-btn layui-btn-primary layui-btn-lg" btn_value="20" lay-filter="changeMag" text_value="AIM">工业AI </button> </div> </div> <div class="layui-container service" style="padding:0px!important;margin-top: 10px"> <div class="layui-row"> <div class="layui-form-item"> <div class="layui-col-md6 layui-col-xs12"> <!--<div class="layui-input-inline">--> <input type="checkbox" lay-skin="primary" class="layui-input" name="isebook"> <span style="display:inline-block;margin-right: 10px">订阅电子版</span> <input type="checkbox" lay-skin="primary" class="layui-input" name="isbook"> <span style="display:inline-block">订阅纸质版</span> <!--</div>--> </div> <!--<div class="layui-input-inline">--> <!----> <!--</div>--> </div> </div> </div> <div class="layui-row"> <div class="layui-block layui-col-md-12" style="font-size:16px;color:#EC2B29;font-weight: bold;margin:4px 0px"> 请如实填写资料,以确保您能收到杂志 </div> <div class="layui-block layui-col-md-12" style="margin-bottom:20px;color:#313131;font-size:14px"> 如您继续订阅其他杂志,可直接填入手机号进行验证,系统将会自动读取您的基本信息。 </div> </div> <div class="layui-row layui-col-space20"> <div class="layui-col-md6"> <div class="layui-form-item"> <div class="layui-inline" style="display: flex;"> <!--<label class="layui-form-label" style="min-width: 110px;">手机号码<span class="imp"> *</span></label> --> <div class="layui-input-block" style="max-width: 110px;margin-left: unset;" id="mm"> <!--<script id='m' type="text/html">--> <select lay-search id="area_code"> <option value="86" selected>大陆+86</option> <option value="852">香港+852</option> <option value="853">澳门+853</option> <option value="886">台湾+886</option> </select> <!--<div id="mm"></div>--> </div> <div class="layui-input-block" style="margin-left: unset;width: 100%"> <input type="text" name="mobile" class="layui-input" lay-verify="required|phone" autocomplete="off" id="mobile"> </div> <input class="layui-form-label" id="code-btn" style="min-width: 102px;" type="button" value="发送验证码"> <!--<span class="layui-form-label"--> <!--id="code-btn" style="min-width: 102px;">发送验证码</span>--> <!--<div>发送验证码</div>--> </div> </div> </div> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">验证码<span class="imp"> *</span></label> <div class="layui-input-block"> <input type="text" name="code" class="layui-input" id="checkCode" lay-verify="required|number" maxlength="4" autocomplete="off"> </div> </div> </div> </div> <div class="layui-row layui-col-space20"> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">姓名<span class="imp">*</span></label> <div class="layui-input-block"> <input type="text" name="truename" class="layui-input" lay-verify="required|namecount" autocomplete="off"> </div> </div> </div> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">公司<span class="imp"> *</span></label> <div class="layui-input-block"> <input type="text" name="company_name" class="layui-input" lay-verify="required|companycount" maxlength="50" autocomplete="off"> </div> </div> </div> <!-- <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">称谓</label> <div class="layui-input-block" style="z-index: 1100"> <select name="sex"> <option value="1" selected>先生</option> <option value="0">女士</option> </select> </div> </div> </div> --> </div> <!-- <div class="layui-row layui-col-space20"> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">国家</label> <div class="layui-input-block"> <input type="text" name="country" class="layui-input"> </div> </div> </div> </div> --> <div class="layui-row layui-col-space20"> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">部门<span class="imp"> *</span></label> <div class="layui-input-block"> <input type="text" name="department" class="layui-input" lay-verify="required" maxlength="20" autocomplete="off"> </div> </div> </div> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">职位<span class="imp"> *</span></label> <div class="layui-input-block"> <input type="text" name="postion" class="layui-input" lay-verify="required" maxlength="20" autocomplete="off"> </div> </div> </div> </div> <!-- <div class="layui-row layui-col-space20"> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">地址类型<span class="imp">*</span></label> <div class="layui-input-block"> <select name="address_type"> <option value="0" selected>公司</option> <option value="1">住址</option> </select> </div> </div> </div> <div class="layui-col-md12"> <div class="layui-form-item"> <label class="layui-form-label">邮编</label> <div class="layui-input-block"> <input type="text" name="postcode" class="layui-input" maxlength="12" autocomplete="off"> </div> </div> </div> </div> --> <div class="layui-row layui-col-space20" id="area-picker-sub"> <div class="layui-col-md6 "> <div class="layui-form-item"> <label class="layui-form-label">省份<span class="imp">*</span></label> <div class="layui-input-block"> <select name="province" class="province-selector" lay-filter="province-1" id="province" data-value=""> <option value="">请选择省</option> </select> </div> </div> </div> <div class="layui-col-md6 "> <div class="layui-form-item"> <label class="layui-form-label">城市<span class="imp">*</span></label> <div class="layui-input-block"> <select name="city" class="city-selector" lay-filter="city-1" id="city" data-value=""> <option value="">请选择市</option> </select> </div> </div> </div> </div> <!-- lay-verify="required|addresscount" --> <div class="layui-row layui-col-space20"> <div class="layui-col-md6 "> <div class="layui-form-item"> <label class="layui-form-label">地址<span class="imp"> </span></label> <div class="layui-input-block"> <input type="text" name="address" class="layui-input" maxlength="100" autocomplete="off"> </div> </div> </div> <div class="layui-col-md6"> <div class="layui-form-item"> <label class="layui-form-label">工作邮箱<span class="imp"> *</span></label> <div class="layui-input-block"> <input type="text" name="email" class="layui-input" lay-verify="required|email" autocomplete="off"> </div> </div> </div> </div> <script id='demo' type="text/html"> {{# layui.each(d.data, function(index, item){ }} <div class="layui-row question_box"> <div class="layui-col-md12 question_title"> {{index+1}}.{{item.question.title}}<span class="imp"> *</span> </div> <div class="layui-col-md12 question_content"> {{# if(item.question.option_type ==1){ }} {{# layui.each(item.answer_data, function(indexs, items){ }} <!--<div class="layui-col-md12 space">--> <!--<input type="radio" name="submit_info[{{item.question.id}}]" value="{{items.number}}"--> <!--title="{{items.word}}">--> <!--</div>--> {{# if(items['child']!=undefined){ }} <div style="height: 20px;width: 100%;float:left"></div> <h4 class="title_name">{{items.word}}</h4> {{# layui.each(items['child'], function(indexs, itemss){ }} <div class="layui-col-md12 space"> <input type="radio" name="submit_info[{{item.question.id}}]" value="{{itemss.number}}" title="{{itemss.word}}" lay-filter='radio_select'> {{# if(itemss.number == '10143'){ }} <input type="text" name="submit_info_other[{{item.question.id}}]" value="" style="display: none;height: 30px;padding-left: 10px;box-sizing: border-box"> {{# } }} </div> {{# }) }} {{# }else{ }} <div class="layui-col-md12 space"> <input type="radio" name="submit_info[{{item.question.id}}]" value="{{items.number}}" title="{{items.word}}" lay-filter='radio_select'> {{# if(items.number == '10143'){ }} <input type="text" name="submit_info_other[{{item.question.id}}]" value="" style="display: none;height: 30px;padding-left: 10px;box-sizing: border-box"> {{# } }} </div> {{# } }} {{# }) }} {{# }else if(item.question.option_type ==2){ }} {{# layui.each(item.answer_data, function(indexs, items){ }} {{# if(items['child']!=undefined){ }} <div style="height: 20px;width: 100%;float:left"></div> <h4 class="title_name">{{items.word}}</h4> {{# layui.each(items['child'], function(indexs, itemss){ }} <div class="layui-col-md12 space"> <input type="checkbox" name="submit_info[{{item.question.id}}][]" value="{{itemss.number}}" title="{{itemss.word}}" lay-skin="primary" lay-filter='checkbox_select'> {{# if(itemss.number == '10143'){ }} <input type="text" name="submit_info_other[{{item.question.id}}]" value="" style="display: none;height: 30px;padding-left: 10px;box-sizing: border-box"> {{# } }} </div> {{# }) }} {{# }else{ }} <div class="layui-col-md12 space"> <input type="checkbox" name="submit_info[{{item.question.id}}][]" value="{{items.number}}" title="{{items.word}}" lay-skin="primary" lay-filter='checkbox_select'> {{# if(items.number =='10143'){ }} <input type="text" name="submit_info_other[{{item.question.id}}]" value="" style="display: none;height: 30px;padding-left: 10px;box-sizing: border-box"> {{# } }} </div> {{# } }} {{# }) }} {{# } }} </div> </div> {{# }) }} </script> <div id="view"></div> <div class="layui-container service" style="padding:0px!important;margin-top: 10px"> <div class="layui-row"> <div class="layui-form-item"> <div class="layui-col-md12 layui-col-xs12"> <input type="checkbox" lay-skin="primary" class="layui-input" id="service" name="service"> <span style="display:inline-block">我已阅读并同意 <a href="./Home/pages/tk.html" target="_blank">服务条款</a> 和 <a href="./Home/pages/privacy.html" target="_blank">隐私声明</a></span> </div> </div> <div class="layui-form-item"> <div class="layui-col-md12 layui-col-xs12"> <input type="checkbox" lay-skin="primary" class="layui-input" id="service2" name="service2"> 我同意主办方收集、管理及使用我的订阅信息(包括杂志发行及向您提供相关会议通知等),如有个人敏感信息,请与工作人员联系,联系方式:15012907629 </div> </div> </div> </div> <!--</div>--> <div class="layui-form-item"> <div class="layui-block" style="text-align:center;"> <button class="layui-btn " lay-submit="" lay-filter="submit" style="background-color: #2B7ACD;color:#fff;padding: 1px 24px;margin-bottom: 60px">立即提交 </button> <!-- <button type="reset" class="layui-btn layui-btn-primary">重置</button> --> </div> </div> </form> </div> </div> </div> <script> </script> <script src="/js/layui/layui.all.js"></script> <!--<script src="./layer.js"></script>--> <script src="/js/layarea.js"></script> <script> layui.use(['table', 'form', 'laytpl', 'layarea', 'layedit'], function() { var $ = layui.$ // , admin = layui.admin , layer = layui.layer, form = layui.form, layarea = layui.layarea, layedit = layui.layedit, laytpl = layui.laytpl; form.render(); form.verify({ namecount: function(value, item) { //value:表单的值、item:表单的DOM对象 if (value.length <= 1) { return '请填写正确的姓名'; } if (/^\d+\d+\d$/.test(value)) { return '姓名不能为数字'; } }, addresscount: function(value, item) { //value:表单的值、item:表单的DOM对象 if (value.length <= 2) { return '请填写完整的地址'; } if (/^\d+\d+\d$/.test(value)) { return '地址不能为数字'; } }, companycount: function(value, item) { //value:表单的值、item:表单的DOM对象 if (value.length <= 2) { return '请填写完整的公司名称'; } if (/^\d+\d+\d$/.test(value)) { return '公司名称不能为数字'; } }, }); layarea.render({ elem: '#area-picker-sub', data: { province: '请选择', city: '', county: '', }, change: function(res) { //选择结果 // console.log(res); } }); //自定义验证规则 // form.verify({ // otherReq: function (value, item) { // var $ = layui.$; // var verifyName = $(item).attr('name') // , verifyType = $(item).attr('type') // , formElem = $(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话 // , verifyElem = formElem.find('input[name=' + verifyName + ']')//获取需要校验的元素 // , isTrue = verifyElem.is(':checked')//是否命中校验 // , focusElem = verifyElem.next().find('i.layui-icon');//焦点元素 // if (!isTrue || !value) { // //定位焦点 // focusElem.css(verifyType == 'radio' ? {"color": "#FF5722"} : {"border-color": "#FF5722"}); // //对非输入框设置焦点 // focusElem.first().attr("tabIndex", "1").css("outline", "0").blur(function () { // focusElem.css(verifyType == 'radio' ? {"color": ""} : {"border-color": ""}); // }).focus(); // return '必填项不能为空'; // } // } // }); layer.ready(function() { var invitation_code = getURLString('invitation_code') if (invitation_code != null) { window.sessionStorage.setItem("sub_invitation", invitation_code); } //var accepts = sessionStorage.getItem("Tongyi"); // if (accepts == 1) { //document.getElementById('accepts').style.display = 'none' //} if (isPc() == false) { $('#top_img').attr('src', '/assets/img/icon/subscrib_top_bg_m.jpg'); } var name = getURLString('name'); switch (name) { case 'SMTC': var mag_id = '7'; break; case 'SISC': var mag_id = '8'; document .querySelector('meta[name="title"]') .setAttribute("content", "《半导体芯科技》杂志电子索阅表"); document .querySelector('meta[name="description"]') .setAttribute("content", "杂志内容覆盖“半导体领域”制造、测试、封装相关的前沿技术报道,欢迎免费订阅收藏!"); break; case 'CSC': var mag_id = '9'; document .querySelector('meta[name="title"]') .setAttribute("content", "《化合物半导体》杂志电子索阅表"); document .querySelector('meta[name="description"]') .setAttribute("content", "杂志内容重点介绍国外先进技术和产业化经验,促进国内产业发展,欢迎免费订阅收藏!"); break; case 'CRC': var mag_id = '1'; break; case 'AIM': var mag_id = '20'; break; case 'ILAC': var mag_id = '18'; break; case 'LFWC': var mag_id = '3'; break; case 'VSDC': var mag_id = '12'; break; case 'MWJC': var mag_id = '10'; break; default: var mag_id = '7'; break; } // $('body').find('button[btn_value=' + mag_id + ']').css('border-color', '#2b7acd'); // $('body').find('.layui-btn-lg').eq(0).css('border-color', '#009688'); $('body').find('button[btn_value=' + mag_id + ']').addClass('selected'); // var mag_id = $('body').find('.layui-btn-lg').eq(0).attr('btn_value'); // $.ajax({ url: 'https://oa.lwc.cn/api/user/magApi4', method: 'POST', data: { mag_id: mag_id }, success: function(res) { if (res.code === 0) { var getTpl = demo.innerHTML, view = document.getElementById('view'); laytpl(getTpl).render(res, function(html) { view.innerHTML = html; }); form.render(); } else { var getTpl = demo.innerHTML, view = document.getElementById('view'); laytpl(getTpl).render(res, function(html) { view.innerHTML = html; }); form.render(); } } }); }); $('input[name="code"]').blur(function() { var mobile = $('#mobile').val(); if (mobile == '') { return false; } var code = $('input[name="code"]').val(); $.ajax({ url: 'https://oa.lwc.cn/api/User/getUserinfo', method: 'POST', data: { mobile: mobile }, success: function(res) { if (res.code == 0) { layer.open({ content: '您是已订阅用户,可直接提取订阅基本信息。', btn: ['需要', '不需要'], yes: function(index, layero) { $('input[name="truename"]').val(res.data.truename); // if (res.data.sex == 0) { // $(".selector").find("option[text='先生']").attr("selected", true); // } else { // $(".selector").find("option[text='女士']").attr("selected", true); // } $('input[name="company_name"]').val(res.data.company_name); $('input[name="department"]').val(res.data.department); $('input[name="postion"]').val(res.data.postion); $('input[name="postcode"]').val(res.data.postcode); if (res.data.province != '' && res.data.city != '') { layarea.render({ elem: '#area-picker-sub', data: { province: res.data.province, city: res.data.city, // county: res.data.county, }, change: function(res) { //选择结果 // console.log(res); } }); } $('input[name="address"]').val(res.data.address); $('input[name="email"]').val(res.data.email); layer.closeAll(); }, btn2: function(index, layero) { //按钮【按钮二】的回调 //return false 开启该代码可禁止点击该按钮关闭 } , cancel: function() { //右上角关闭回调 //return false 开启该代码可禁止点击该按钮关闭 } }); } else { //layer.msg(res.msg, {icon: 5, time: 2000}); } } }) }) //监听锁定操作 form.on('radio(radio_select)', function(obj) { if (this.value == '10143') { $(this).next().next().show(); } else { // $(this).parent('div').children('input[type="text"]').hide(); //$(this).siblings().last().val(''); //$(this).siblings().last().hide(); // $(this).siblings("input[type='text']").val(''); // $(this).siblings("input[type='text']").hide(); $(this).parent('div').siblings().children("input[type='text']").val(''); $(this).parent('div').siblings().children("input[type='text']").hide(); } }) form.on('checkbox(checkbox_select)', function(obj) { if (this.value == '10143') { $(this).next().next().show(); } else { console.log($(this).parent('div').siblings().children("input[type='text']")); // $(this).parent('div').children('input[type="text"]').hide(); $(this).parent('div').siblings().children("input[type='text']").val(''); $(this).parent('div').siblings().children("input[type='text']").hide(); // $(this).siblings("input[type='text']").val(''); // $(this).siblings("input[type='text']").hide(); } }) $('.layui-btn-lg').click(function() { layer.load(1); var mag_id = $(this).attr('btn_value'); var inval = $(this).attr('text_value'); //调用结果如下: var url = window.location.href; console.log(url); window.location.href = changeURLArg(url, "name", inval); // $(this).css('border-color', '#009688'); // $(this).addClass('selected'); // $(this).parent('div').siblings().children('button').removeClass('selected'); // $(this).parent('div').siblings().children('button').css('border-color', '#c9c9c9'); // $(this).siblings().css('border-color', 'none'); // var type = $(this).data('type'); // active[type] ? active[type].call(this) : ''; }); $('#code-btn').click(function() { getCode(); }) $('#agree').click(function() { closeT(); }) function closeT() { document.getElementById('accepts').style.display = 'none'; sessionStorage.setItem("Tongyi", 1); } function isPc() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod" ]; var flag = true; for (var v = 0; v < Agents.length; v++) { if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; } function getURLString(arg) { var reg = new RegExp("(^|&)" + arg + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } function changeURLArg(url, arg, arg_val) { var pattern = arg + '=([^&]*)'; var replaceText = arg + '=' + arg_val; if (url.match(pattern)) { var tmp = '/(' + arg + '=)([^&]*)/gi'; tmp = url.replace(eval(tmp), replaceText); return tmp; } else { if (url.match('[\?]')) { return url + '&' + replaceText; } else { return url + '?' + replaceText; } } } function getCode() { var count = 60; var mobile = $("input[name='mobile']").val(); //手机号码 // let reg_mobile = ''; var zh = $("#area_code option:selected").val(); if (mobile == '') { layer.msg("请填写正确的手机号码"); return false; } $.ajax({ url: 'https://oa.lwc.cn/api/Subinfo/mobileVerify', method: 'POST', data: { zh: zh, mobile: mobile }, success: function(res) { if (res.code == -1) { layer.msg("请填写正确的手机号码"); return false; // var reg_mobile = res.data; // alert(reg_mobile);return false; // if (!reg_mobile.test(mobile)) { //验证手机是否符合格式 // layer.msg("请填写正确的手机号码"); // return false; // } } else { $("#code-btn").val(count + "s"); $("#code-btn").attr('disabled', true); var timer = setInterval(function() { count--; $("#code-btn").val(count + "s"); if (count == 0) { clearInterval(timer); $("#code-btn").attr("disabled", false); //启用按钮 $("#code-btn").val("重新发送验证码"); // code = "";//清除验证码。如果不清除,过时间后,输入收到的验证码依然有效 } }, 1000); $.ajax({ url: 'https://act.lwc.cn/api/Subscribe/sendmessage', method: 'POST', data: { mobile: mobile, type: 5 }, success: function(res) { if (res.code === 1) { layer.msg('验证码发送成功', { icon: 6, time: 2000 }, function() { }); } else { layer.msg(res.msg, { icon: 5, time: 2000 }); } } }); } } }); } form.on('submit(submit)', function(obj) { var isclick2 = true; if (isclick2) { isclick2 = false; var service = $("input[name='service']").prop('checked'); var service2 = $("input[name='service2']").prop('checked'); if (service == false) { layer.msg('必须勾选并阅读服务条款和隐私声明!', { icon: 5, time: 2000 }); return false; } if (service2 == false) { layer.msg('必须同意我方收集、管理及使用订阅个人信息!', { icon: 5, time: 2000 }); return false; } if ($('#province').siblings('.layui-unselect').children('.layui-select-title').children('.layui-input').val() == '请选择' || $('#province').siblings('.layui-unselect').children('.layui-select-title').children('.layui-input').val() == '') { layer.msg("请填写省份信息"); return false; } var name = getURLString('name'); // var invitation_code = getURLString('invitation_code'); var mag_link = ''; var invitation_code = getURLString('invitation_code') var uid = getURLString('uid') if (uid != null) { obj.field.uid = uid } if (invitation_code != null) { obj.field.invitation_code = invitation_code } console.log(obj.field) obj.field.mag_id = $('.selected').attr('btn_value'); obj.field.province = $('#province').siblings('.layui-unselect').children('.layui-select-title').children('.layui-input').val(); obj.field.city = $('#city').siblings('.layui-unselect').children('.layui-select-title').children('.layui-input').val(); $.ajax({ url: 'https://act.lwc.cn/api/Subscribe/register', method: 'POST', data: obj.field, success: function(res) { if (res.code === 0) { if (getURLString('invitation_code') != null && getURLString('invitation_code') == 'active') { layer.open({ content: '尊敬的用户,您已成功提交CSC系列电子专刊订阅信息,生成您的专属订阅海报,即可通过短信链接获取专刊下载权限。', btn: ['送书给朋友'], // yes: function(index, layero) { //layer.closeAll(); // if (res.data != '') { //location.href = res.data //} else { // location.reload(); // } //}, yes: function() { var isclick2 = true; if (isclick2 == true) { isclick2 = false; $.ajax({ type: "post", url: "https://act.lwc.cn/api/Subscribe/sharePoster", data: { id: res.id, magName: getURLString('name') //id: 162359 }, success: function(r) { setTimeout(function() { isclick2 = true; }, 3000) layer.open({ type: 1, title: '请自行保存此图', offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset , id: 'layershare' //防止重复弹出 , content: '<div style="padding: 20px 10px;"><img src="' + r.data + '" class="shareImg"></div>', btn: '长按图片保存', btnAlign: 'c' //按钮居中 , shade: 0 //不显示遮罩 , yes: function() { //layer.closeAll(); //location.reload(); }, cancel: function() { layer.closeAll(); location.reload(); } }); } }); } else { layer.msg('请勿重复点击!', { icon: 5, time: 3000 }); } }, cancel: function() { layer.closeAll(); if (res.data != '') { location.href = res.data } else { location.reload(); } } }); } else { layer.open({ content: res.msg, btn: ['确认'], yes: function(index, layero) { layer.closeAll(); if (res.data != '') { setTimeout(function() { location.href = res.data; }, 500); } else { location.reload(); } //window.location.href = mag_link; }, cancel: function() { layer.closeAll(); if (res.data != '') { location.href = res.data } else { location.reload(); } //window.location.href = mag_link; } }); } } else { layer.msg(res.msg, { icon: 5, time: 3000 }); } } }); setTimeout(function() { isclick2 = true; }, 3000); //return false; } else { layer.msg('请勿重复点击!'); } return false; }); }); </script> </body> </html>