main.min.js 18 KB

1
  1. !function(e){var n={};function o(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=e,o.c=n,o.d=function(e,n,t){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,n){if(1&n&&(e=o(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)o.d(t,i,function(n){return e[n]}.bind(null,i));return t},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/Users/jiangtao/Documents/Creator/Directional/Code/orderchannel/src/main/webapp./baidu/202007/dist/",o(o.s=0)}([function(e,n,o){"use strict";function t(e,n){var o=$('<div class="overlay"></div>'),t=$('<div class="dialog-alert"><h1>温馨提示</h1><div class="content">'+e+'</div><div class="actions"> <div class="btn">关闭</div></div></div>');$("body").css("overflow","hidden"),o.appendTo($(document.body)),t.appendTo($(document.body)),1==n&&t.find(".btn").remove(),t.close=function(){$("body").css("overflow","auto"),o.remove(),t.remove(),t=null};var i=$.Deferred();return t.find(".btn").on("click",(function(){t.close(),i.resolve(t)})),i}function i(e){window.$loading&&window.$loading.trigger("close");var n=e||"处理中,请稍后...",o=$('<div class="overlay"></div>'),t=$('<div class="loading"> <div class="content">'+n+"</div></div>");return o.appendTo($(document.body)),t.appendTo($(document.body)),$("body").addClass("lockScroll"),t.on("close",(function(){o.remove(),t.remove(),t=null,$("body").removeClass("lockScroll")})),window.$loading=t,t}function r(e){e?e.trigger("close"):window.$loading&&window.$loading.trigger("close")}function a(e){return"1"!=$(e||document.body).data("use")&&($(e||document.body).data("use","1"),!0)}function s(e){$(e||document.body).data("use","0")}function l(e){var n=(e=Math.round(100*parseFloat(e))/100).toString().split(".");return 1==n.length?e=e.toString()+".00":n.length>1?(n[1].length<2&&(e=e.toString()+"0"),e):void 0}o.r(n),Date.prototype.from=function(e){var n=e.replace(/-/g,"/");return n=n.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/,"$1/$2/$3 $4:$5:$6"),new Date(n)},Date.prototype.format=function(e){var n={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var o in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e};var c={},u={},d={},f={},v=null;function m(){O(),function(){var e,n,o=window.location.search.substring(1),t=0;for(;o.length>0&&-1!=(e=o.indexOf("=",t));){-1==(n=o.indexOf("&",e+1))&&(n=o.length);var i=o.substring(t,e),r=o.substring(e+1,n);c[i]=decodeURIComponent(r),t=n+1}}(),$("#useraccount_tt").attr("value",x("freeflow_token"));var e={fes:c.fes,sou:c.sou},n=$.Deferred();return $.ajax({url:v+"/ini/getstyle",type:"POST",contentType:"application/json",data:JSON.stringify(e)}).then((function(e){var o=JSON.parse(e);if("0000"!=o.resultCode)return n.reject(),n;for(u=o.product[0],i=0;i<o.product.length;i++)d[o.product[i].productid]=o.product[i];$("#fog_"+u.url).attr("value",u.fog);for(var t=u.icon.split(","),i=0;i<t.length;i++)0==i&&$("#sendsms_order_"+u.url).attr("value",t[i]),1==i&&$("#sendsms_cancel_"+u.url).attr("value",t[i]),2==i&&$("#sendsms_yuyue_"+u.url).attr("value",t[i]);n.resolve(o)})),n}function p(e,n,o){var i=$.Deferred();if(!(null!=e.attr("n")&&e.attr("n")>0)){var r=e.find(".usermob").val();if(null==r||""==r.trim())return t("请输入联通手机号码"),i.reject(),i;if(!r.startsWith("1")||11!=r.length)return t("手机号码格式不正确"),i.reject(),i;var a={fes:c.fes,sou:c.sou,fog:u.fog,usermob:r,smstype:n};f.usermob=r;var s=60;e.attr("n",s),$.ajax({url:v+"/sms/send",type:"POST",contentType:"application/json",data:JSON.stringify(a)}).then((function(n){if("0000"!=n.resultCode)return s=0,e.attr("n",s),void t(n.errorInfo);var o=e.find(".sendcode");o.text("重新发送({}s)".replace("{}",s)),o.addClass("sendcode-wait");var i=setInterval((function(){s-=1,e.attr("n",s),o.text("重新发送({}s)".replace("{}",s)),0===s&&(clearInterval(i),o.text("获取验证码"),e.attr("n",s),o.removeClass("sendcode-wait"))}),1e3)}))}}function g(e,n){var o=$.Deferred(),i=e.find(".usermob").val(),r=e.find(".smscode").val();if(null==n&&(n=!1),null==i||""==i.trim())return t("请输入联通手机号码"),o.reject(),o;if(null==r||""==r.trim())return t("请输入验证码"),o.reject(),o;if(6!=r.length)return t("短信验证码不正确"),o.reject(),o;var a={fes:c.fes,sou:c.sou,fog:u.fog,code:r,usermob:i};return $.ajax({url:v+"/checkvercode",type:"POST",contentType:"application/json",data:JSON.stringify(a)}).then((function(r){switch(e.find(".smscode").val(""),r.resultCode){case"0000":f.userid=r.userid,f.usermob=i,f.usertime=(new Date).getTime(),n||(e.find(".usermob").val(""),e.find(".usermob").val("")),o.resolve(r.userid);break;default:t(r.errorInfo),o.reject(r)}})).fail((function(e){o.reject("服务调用异常")})),o}var h=!0;function w(e,n,o,a,s,l){h=!1;var d,m="http://800.wo.cn/cap/CAP-AUTH.html",p="http://800.wo.cn/";if(window.location.href.indexOf("https")>=0&&(m="https://800.wo.cn/cap/CAP-AUTH.html",p="https://800.wo.cn/"),window.location.href.indexOf("festivalchannel")>=0&&(m="https://800.wo.cn/festivalcap/CAP-AUTH.html",p="https://800.wo.cn/"),(d=$("#uniauthframe").length>=1?$("#uniauthframe").attr("src",m):$('<iframe id="uniauthframe" src="'+m+'"></iframe>')).css({width:"100%",height:"100%",position:"fixed",top:0,left:0,margin:0,padding:0,"-webkit-overflow-scrolling":"touch",border:"0px"}),i(),d.on("load",(function(){$capoverlay.remove(),function(e){var n={fog:u.fog||e||"",channel:""};return $.ajax({url:v+"/ini/gensign",type:"POST",contentType:"application/json",data:JSON.stringify(n)})}(e).then((function(e){r(),e.orderChannel=c.fes+"_"+c.sou,null!=n&&""!=n&&(e.productName=n),null!=l&&""!=l&&(e.capTemplet=l),d[0].contentWindow.postMessage(JSON.stringify(e),p)}))})),navigator.userAgent.indexOf("MicroMessenger")>=0){var g;window.capTimer=setInterval((function(){g=document.documentElement.scrollTop||document.body.scrollTop,g-=1,window.top.scrollTo(0,g),g+=1,window.top.scrollTo(0,g)}),200)}window.$capoverlay=$('<div class="overlay" style="z-index: 0"></div>'),$capoverlay.appendTo($(document.body)),0==$("#uniauthframe").length?$("body").append(d):d.css("position","unset").css("min-height","10rem"),o||$("body").css("overflow","hidden");var w=$.Deferred();return window.addEventListener("message",(function(e){var n=JSON.parse(e.data);switch(n.resultcode){case"0":d.remove(),$capoverlay.remove(),$("body").css("overflow","auto"),clearInterval(window.capTimer),f.token=n.token,f.userid=decodeURIComponent(n.userid),f.userid1=n.userid1,f.usermob=n.usermob,f.usertime=(new Date).getTime(),s&&b(),w.resolve(f);break;case"9001":d.remove(),$capoverlay.remove(),clearInterval(window.capTimer),$("body").css("overflow","auto"),w.reject(n),null!=a&&a&&!h&&("1"==c.test&&alert(navigator.userAgent),function(){var e=navigator.userAgent.indexOf("Baidu")>-1;if(e)return e;var n=navigator.userAgent.indexOf("OPR")>-1,o=navigator.userAgent.indexOf("Firefox")>-1,t=navigator.userAgent.indexOf("UCBrowser");if(!n||!o||!t)return!1;var i=navigator.userAgent.indexOf("MicroMessenger")>-1,r=navigator.userAgent.indexOf("Safari")>-1,a=navigator.userAgent.indexOf("Chrome")>-1;return i||e||r||a}()&&(h=!0,history.back()));break;case"0001":case"0003":case"0006":case"4444":break;default:d.remove(),$capoverlay.remove(),$("body").css("overflow","auto"),clearInterval(window.capTimer),t(n.errorinfo),w.reject(n)}})),w}function b(e){var n={fog:u.fog||fog||"",userid:e||f.userid};$.ajax({url:v+"/decodeUserid",type:"POST",contentType:"application/json",data:JSON.stringify(n)}).then((function(e){"0"==e.resultCode&&(f.usermob=e.usermob)}))}function y(e){localStorage.setItem("user",JSON.stringify(f)),localStorage.setItem("time",e||(new Date).getTime()+"")}function O(){var e=window.document.location.href,n=window.document.location.pathname,o=e.indexOf(n),t=e.substring(0,o),i=n.substring(0,n.substr(1).indexOf("/")+1);return v=t+i,t+i}function x(e){if("https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7"!=window.location.href){window.location.href.indexOf("jiangtao")>=0&&alert(window.location.href);var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=window.location.search.substr(1).match(n);if(null!=o)return o[2];switch(e){case"con":return"1";case"freeflow_token":return"";default:var t=O()+"/404.html";$(location).attr("href",t)}}else window.location.href="https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7&sou=12"}o(1);function T(e){switch(null==e&&(location.href.indexOf("202007.html")>=0&&(e="order"),location.href.indexOf("cancel.html")>=0&&(e="cancel"),location.href.indexOf("active.html")>=0&&(e="active"),location.href.indexOf("flow.html")>=0&&(e="flow")),e){case"active":!function(){if(location.href.indexOf("active.html")<0)return void(window.location.href="active.html?fes="+c.fes+"&sou="+c.sou+"&F="+c.F+"&page=active");var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){p(e,"activelogin")})),e.find(".login").unbind("click").on("click",(function(n){a()&&g(e).then((function(){s(),new Promise((function(e,n){WeiboJSBridge.invoke("unicomFreeTraffic",{type:0},{success:function(n){e(n)},fail:function(e,o){n(e,o)},final:function(e){n(e)}})})).then((function(){t("激活成功").then((function(){y(),S()}))}))})).fail((function(){s()}))})),window.scrollTo(0,0)}();break;case"cancel":P();break;case"draw":alert("参数错误");break;case"flow":S();break;default:k()}}function k(){function e(){a()&&w(null,null,!1,!0).then((function(e){var n,o,a;s(),n=e.userid,o=e.token,a=e.usermob,i("处理中,请稍后..."),function(e,n,o){var t={fes:c.fes,sou:c.sou,fog:u.fog,token:n,userid:e||f.userid,usermob:o||f.usermob,useraccount:"",f:c.F};return $.ajax({url:v+"/comm/order",type:"POST",contentType:"application/json",data:JSON.stringify(t)})}(n,o,a).then((function(e){switch(r(),e.resultCode){case"0000":return y(),void S();case"0013":t("该号码归属省分2/3G暂未开通此产品!");break;case"6611":t("错误代码(6611),订购失败,请重试!");break;case"6615":t("订购失败,请确定用户套餐!");break;case"6622":localStorage.setItem("message","您已经订购了本产品~"),y(),S();break;default:t(e.errorInfo+",订购失败,请确定用户套餐!")}})).fail((function(e){console.log(e)}))})).fail((function(e){s()}))}"none"==$(".section-order").css("display")?e():$(".btn-order").unbind("click").on("click",(function(n){e()}))}function S(){if(location.href.indexOf("flow.html")<0)return console.log("flow.html?fes="+c.fes+"&sou="+c.sou+"&userid="+f.userid+"&usermob="+f.usermob+"&usertime="+(f.usertime||(new Date).getTime())),void(window.location.href="flow.html?fes="+c.fes+"&sou="+c.sou+"&userid="+f.userid+"&usermob="+f.usermob+"&usertime="+(f.usertime||(new Date).getTime()));var e=$(".section-flow"),n=f.usermob;e.find(".phone").html(n.substring(0,3)+"xxxx"+n.substring(7,11)),e.find(".btn").unbind("click").on("click",(function(){j().then((function(e){s(),null!=e&&""!=e&&t(e)})).fail((function(){s()}))})),j()}function P(){if(location.href.indexOf("cancel.html")<0)window.location.href="cancel.html?fes="+c.fes+"&sou="+c.sou;else{var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){p(e,"cancellogin")})),e.find(".login").unbind("click").on("click",(function(){i(),g(e).done((function(){var e,n,o;(o={fes:c.fes,sou:c.sou,fog:u.fog,userid:e||f.userid,usermob:n||f.usermob,useraccount:""},$.ajax({url:v+"/comm/cancel",type:"POST",contentType:"application/json",data:JSON.stringify(o)})).done((function(e){switch(r(),e.resultCode){case"0000":t("您已成功退订该商品,退订次月生效",(function(){S()}));break;case"7605":t(e.errorInfo,(function(){S()}));break;default:var n="";e.errorInfo.indexOf("退订失败")<0&&(n="退订失败,"),t(n+e.errorInfo)}})).fail((function(e){r()}))})).fail((function(e){r()}))})),window.scrollTo(0,0)}}function j(){var e=$(".section-flow");i("处理中,请稍后...");var n,o,t,a=$.Deferred();return(t={fes:c.fes,sou:c.sou,fog:u.fog,userid:n||f.userid,usermob:o||f.usermob},$.ajax({url:v+"/flow/query",type:"POST",contentType:"application/json",data:JSON.stringify(t)})).then((function(n){switch(r(),n.resultCode){case"0000":var o=l(JSON.parse(n.data).surplusFlow/1024/1024);e.find(".surplus").html(o+"GB");var t=parseInt(JSON.parse(n.data).usedFlow);if(t>0&&t<1024)a.resolve("剩余流量更新成功,为您免流了"+t+"KB~");else if(t>1024){var i=l(t/1024);a.resolve("剩余流量更新成功,为您免流了"+i+"MB~")}else a.resolve("剩余流量更新成功~");break;case"9201":a.resolve("您未订购百度定向流量包~"),e.find(".phone").html("用户未订购此产品!");break;case"9203":a.resolve("剩余流量更新成功~"),e.find(".suplus").html("本月剩余<br>8.00GB");break;default:a.resolve("剩余流量更新成功~")}})),a}s(),$((function(){var e=!1;window.addEventListener("pageshow",(function(){e&&window.location.reload()})),window.addEventListener("pagehide",(function(){e=!0}))})),function(){try{var e=localStorage.getItem("message");null!=e&&""!=e&&(e.indexOf("您已经订购"),t(e),localStorage.removeItem("message"))}catch(e){}i(),m().then((function(e){r(),u=e.product[0],e.festival,function(e){if(c.userid)return f.userid=c.userid,void(f.usermob=c.usermob);try{var n=localStorage.getItem("time");if(n)if((new Date).getTime()<=parseFloat(n)+(e||36e5)){var o=localStorage.getItem("user");(f=JSON.parse(o)).userid=f.userid,f.usermob=f.usermob,"18674842761"==f.usermob&&setTimeout((function(){alert(n+e||36e5)}),100)}else localStorage.removeItem("time"),localStorage.removeItem("user")}catch(e){}}(),location.href.indexOf("202007.html")>=0?f.userid?T("flow"):k():T()}))}(),$(".section-agr").find(".footer").on("click",(function(){$($(".section-agr .scope").find("li")[2]).hasClass("hidden")?$(".section-agr .scope").find("li").each((function(e,n){$(n).removeClass("hidden")})):$(".section-agr .scope").find("li").each((function(e,n){e>=0&&$(n).addClass("hidden")}))})),$(".showmore").find(".open").off("click").on("click",(function(){var e,n;e=$('<div class="overlay"></div>'),n=$('<section class="dialog-agr"> <div class="close"></div> <h2></h2> <div class="container"> <div class="title">业务说明:</div> <div class="content"> <ul> <li> <p>1. 百度定向流量包包含8GB百度系产品专属流量,资费9元/月,自动续订,每月从话费中扣除;</p> </li> <li> <p>2. 流量包订购成功后即刻生效,月底失效,下月自动续费,该产品不支持重复订购;已经成功订购的用户申请退订9元8GB流量包,退订成功后次月生效,且当月不支持再次订购,如有需求请于次月重新发起订购;</p> </li> <li> <p>3. 如您需要退订业务,请<a id="btn-cancel" class="btn-cancel">点此退订</a>;</p> </li> <li> <p>4. 针对不包含在“专属流量”内的适用范围:</p> <ul class="sub-ul scope"> <li>(1)所有APP内的第三方提供的网页、视频、图片、广告、应用下载等服务,例如手机新闻网、搜狗、携程、京东等非百度业务;在无线上网卡、移动WiFi、MiFi、平板电脑(如iPad)等设备使用;手机号码作为手机热点使用;</li> <li>(2)百度APP内除小说外的所有频道(右上角)及第三方小说;个性化资讯推荐版块的动漫、逛逛、畅听;个人中心内的小程序;</li> <li>(3)百度APP内的应用中心不免流;</li> <li>(4)百度APP内通过搜索(试用版)打开的以下内容:</li> <li> <ul style="margin-left: 0.2rem;"> <li><div class="list-dish"></div>通过搜索打开的所有音频文件;</li> <li><div class="list-dish"></div>通过搜索进行下载的文件、图片、音频、手机应用(调起前往百度助手下载的除外)等下载类目;</li> <li><div class="list-dish"></div>苹果系统iOS11以下(不包含iOS11),百度APP版本10.7.5以下(不包含10.7.5)不在免流范围内;</li> </ul> </li> <li class="hidden">(5)百度贴吧APP内的第三方链接等;</li> <li class="hidden">(6)百度地图APP内的共享单车、车主服务等模块;</li> <li class="hidden">(7)百度网盘APP内的看吧、应用备份、推荐应用下载、广告、视频播放插件安装、皮肤下载、云冲印、图片修图等;百度网盘非超级会员用户,无法享受百度网盘APP的“专属流量”特权;</li> <li class="hidden">(8)好看视频APP内的离线下载。</li> </ul> </li> <li> <p>5. 使用UNINET、3GNET、 WONET接入点访问可使用该定向流量,请不要安装和使用任何流量监控、上网代理及VPN类软件和插件,可能会产生高额流量费用;</p> </li> <li> <p>6. 中国联通手机4G用户均可订购,4G套餐中的共享类套餐不共享该月包,需单独订购(暂不支持携号转网用户订购);</p> </li> <li> <p>7. 关于免流量如有疑问请咨询联通客服:10010。</p> </li> </ul> </div> </div> </div></div></section>'),e.appendTo($(document.body)),n.appendTo($(document.body)),n.find(".close").on("click",(function(){n.close()})),e.on("click",(function(){n.close()})),$("body").css("overflow","hidden"),n.close=function(){e.remove(),n.remove(),n=null,$("body").css("overflow","auto")},$("#btn-cancel").on("click",(function(){P()}))}))},function(e,n){}]);