1 |
- !function(e){var n={};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.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 r in e)o.d(t,r,function(n){return e[n]}.bind(null,r));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/hd/Dy/202011/js/",o(o.s=0)}([function(e,n,o){"use strict";function t(e,n,o,t){var r="";null!=t&&0!=t||(r="温馨提示");var i=$('<div class="overlay"></div>'),a=$('<div class="dialog-alert"><h1>'+r+'</h1><div class="content">'+e+'</div><div class="actions"> <div class="btn">'+(null==o||""==o?"关闭":o)+"</div></div></div>");$("body").css("overflow","hidden"),i.appendTo($(document.body)),a.appendTo($(document.body)),1==n&&a.find(".btn").remove(),a.close=function(){$("body").css("overflow","auto"),i.remove(),a.remove(),a=null};var c=$.Deferred();return a.find(".btn").on("click",(function(){a.close(),c.resolve(a)})),c}function r(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 i(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 c(e){$(e||document.body).data("use","0")}function s(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 l={},u={},d={},f={},v=null;function m(){y(),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 r=o.substring(t,e),i=o.substring(e+1,n);l[r]=decodeURIComponent(i),t=n+1}}(),$("#useraccount_tt").attr("value",k("freeflow_token"));var e={fes:l.fes,sou:l.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],r=0;r<o.product.length;r++)d[o.product[r].productid]=o.product[r];$("#fog_"+u.url).attr("value",u.fog);for(var t=u.icon.split(","),r=0;r<t.length;r++)0==r&&$("#sendsms_order_"+u.url).attr("value",t[r]),1==r&&$("#sendsms_cancel_"+u.url).attr("value",t[r]),2==r&&$("#sendsms_yuyue_"+u.url).attr("value",t[r]);n.resolve(o)})),n}function g(e,n,o){var r=$.Deferred();if(!(null!=e.attr("n")&&e.attr("n")>0)){var i=e.find(".usermob").val();if(null==i||""==i.trim())return t("请输入联通手机号码"),r.reject(),r;if(!i.startsWith("1")||11!=i.length)return t("手机号码格式不正确"),r.reject(),r;var a={fes:l.fes,sou:l.sou,fog:u.fog,usermob:i,smstype:n};f.usermob=i;var c=60;e.attr("n",c),$.ajax({url:v+"/sms/send",type:"POST",contentType:"application/json",data:JSON.stringify(a)}).then((function(n){if("0000"!=n.resultCode)return c=0,e.attr("n",c),void t(n.errorInfo);var o=e.find(".sendcode");o.text("重新发送({}s)".replace("{}",c)),o.addClass("sendcode-wait");var r=setInterval((function(){c-=1,e.attr("n",c),o.text("重新发送({}s)".replace("{}",c)),0===c&&(clearInterval(r),o.text("获取验证码"),e.attr("n",c),o.removeClass("sendcode-wait"))}),1e3)}))}}function p(e,n){var o=$.Deferred(),r=e.find(".usermob").val(),i=e.find(".smscode").val();if(null==n&&(n=!1),null==r||""==r.trim())return t("请输入联通手机号码"),o.reject(),o;if(null==i||""==i.trim())return t("请输入验证码"),o.reject(),o;if(6!=i.length)return t("短信验证码不正确"),o.reject(),o;var a={fes:l.fes,sou:l.sou,fog:u.fog,code:i,usermob:r};return $.ajax({url:v+"/checkvercode",type:"POST",contentType:"application/json",data:JSON.stringify(a)}).then((function(i){switch(e.find(".smscode").val(""),i.resultCode){case"0000":f.userid=i.userid,f.usermob=r,f.usertime=(new Date).getTime(),n||(e.find(".usermob").val(""),e.find(".usermob").val("")),o.resolve(i.userid);break;default:t(i.errorInfo),o.reject(i)}})).fail((function(e){o.reject("服务调用异常")})),o}var h=!0;function w(e,n,o,a,c,s){h=!1;var d,m="http://800.wo.cn/cap/CAP-AUTH.html",g="http://800.wo.cn/";if(window.location.href.indexOf("https")>=0&&(m="https://800.wo.cn/cap/CAP-AUTH.html",g="https://800.wo.cn/"),window.location.href.indexOf("festivalchannel")>=0&&(m="https://800.wo.cn/festivalcap/CAP-AUTH.html",g="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"}),r(),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){i(),e.orderChannel=l.fes+"_"+l.sou,null!=n&&""!=n&&(e.productName=n),null!=s&&""!=s&&(e.capTemplet=s),d[0].contentWindow.postMessage(JSON.stringify(e),g)}))})),navigator.userAgent.indexOf("MicroMessenger")>=0){var p;window.capTimer=setInterval((function(){p=document.documentElement.scrollTop||document.body.scrollTop,p-=1,window.top.scrollTo(0,p),p+=1,window.top.scrollTo(0,p)}),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(),c&&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"==l.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 r=navigator.userAgent.indexOf("MicroMessenger")>-1,i=navigator.userAgent.indexOf("Safari")>-1,a=navigator.userAgent.indexOf("Chrome")>-1;return r||e||i||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 x(e){localStorage.setItem("user",JSON.stringify(f)),localStorage.setItem("time",e||(new Date).getTime()+"")}function y(){var e=window.document.location.href,n=window.document.location.pathname,o=e.indexOf(n),t=e.substring(0,o),r=n.substring(0,n.substr(1).indexOf("/")+1);return v=t+r,t+r}function k(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=y()+"/404.html";$(location).attr("href",t)}}else window.location.href="https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7&sou=12"}function O(e,n,o){var t,r,i=T("uuid"),a=T("vvid");if(null!=i&&""!=i.trim()||S("uuid",i=j(),(t=new Date,r=t.from(t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" 23:59:59"),console.log(r.getTime()-t),r.getTime()-t.getTime())),null!=a&&""!=a.trim()||S("vvid",a=j(),-1),null!=e&&""!=e){var c={operid:e,uuid:i,vvid:a,fog:u.fog,userid:f.userid,fes:l.fes,sou:l.sou,url:encodeURIComponent(o||window.location.href),remark:encodeURIComponent(n||"")};$.ajax({url:v+"/burypoint/logid",type:"POST",contentType:"application/json",data:JSON.stringify(c)}).then((function(e){}))}}function T(e){var n,o=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(n=document.cookie.match(o))?unescape(n[2]):null}function S(e,n,o){o=null==o?0:o;var t=new Date;o<0?document.cookie=e+"="+escape(n):(t.setTime(t.getTime()+o),document.cookie=e+"="+escape(n)+";expires="+t.toGMTString())}function j(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(16)}))}o(1);function I(e){if(location.href.indexOf("draw.html")<0)window.location.href="draw.html?fes="+l.fes+"&sou="+l.sou+"&back="+(null==e?"":e);else{var n=$(".section-login").find(".form-group");n.find(".sendcode").unbind("click").on("click",(function(){g(n,"drawlogin")})),n.find(".login").unbind("click").on("click",(function(){var e=n.find(".usermob").val(),o=n.find(".account").val(),a=n.find(".smscode").val();if(null!=e&&""!=e)if(null!=o&&""!=o)if(null!=a&&""!=a){var c=function(e){var n=$('<div class="overlay"></div>'),o=$('<div class="dialog dialog-confirm"> <div class="content">请确认是否领取抖音币到'+e+'账号?</div> <div class="actions"> <div class="btn cancel">取消</div> <div class="btn okay">确认</div> </div></div>');return n.appendTo($(document.body)),o.appendTo($(document.body)),o.find(".btn").on("click",(function(){n.remove(),o.remove(),o=null})),o.close=function(){n.remove(),o.remove(),o=null},o}(o);c.find(".cancel").on("click",(function(){i()})),c.find(".okay").on("click",(function(){p(n,!0).done((function(){!function(e){r(),function(e,n,o,r){if(null==e||""==e.trim()){t("获取账号信息失败");var i=$.Deferred();return i.reject(),i}var a={fes:l.fes,sou:l.sou,fog:u.fog,userid:o||f.userid,usermob:r||f.usermob,uid:e,screen_name:n||""};return $.ajax({url:v+"/coin/draw",type:"POST",contentType:"application/json",data:JSON.stringify(a)})}(e,"").done((function(e){switch(i(),e.resultCode){case"0000":var n=$(".section-login").find(".form-group");n.find(".usermob").val(""),n.find(".smscode").val(""),n.find(".account").val(""),t("抖币充值中,详情结果以短信形式告知").then((function(){null!=l.back&&""!=l.back&&C(l.back+".html")}));break;case"7605":t(e.errorInfo);break;default:var o="";e.errorInfo.indexOf("领取失败")<0&&(o="领取失败,"),t(o+e.errorInfo)}})).fail((function(e){i()}))}(o)})).fail((function(e){i()}))}))}else t("请输入验证码");else t("请输入抖音短视频账号");else t("请输入联通手机号")}))}}function C(e){if(location.href.indexOf("/index")<0)return null!=e&&""!=e||(e="order.html"),void(window.location.href=e+"?fes="+l.fes+"&sou="+l.sou);$("#btn-order").unbind("click").on("click",(function(e){a()&&w(null,null,!1,!1,!0).then((function(e){var n,o,a;c(),n=e.userid,o=e.token,a=e.usermob,r("处理中,请稍后..."),function(e,n,o){var t={fes:l.fes,sou:l.sou,fog:u.fog,token:n,userid:e||f.userid,usermob:o||f.usermob,useraccount:"",f:l.F};return $.ajax({url:v+"/comm/order",type:"POST",contentType:"application/json",data:JSON.stringify(t)})}(n,o,a).done((function(e){switch(i(),e.resultCode){case"0000":return x(),void t("订购成功");case"0013":t("该号码归属省分2/3G暂未开通此产品!");break;case"6611":t("错误代码(6611),订购失败,请重试!");break;case"6615":t("订购失败,请确定用户套餐!");break;case"6622":t("您已经订购了本产品~"),x();break;default:t(e.errorInfo+",订购失败,请确定用户套餐!")}})).fail((function(e){i(),console.log(e)}))})).fail((function(e){c()}))}))}function D(){if(location.href.indexOf("active.html")<0)window.location.href="active.html?fes="+l.fes+"&sou="+l.sou;else{var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){g(e,"activelogin")})),e.find(".login").unbind("click").on("click",(function(n){a()&&p(e).then((function(){c(),baidu.active().then((function(){t("激活成功").then((function(){x()}))}))})).fail((function(){c()}))})),window.scrollTo(0,0)}}function M(){if(location.href.indexOf("cancel.html")<0)window.location.href="cancel.html?fes="+l.fes+"&sou="+l.sou;else{var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){g(e,"cancellogin")})),e.find(".login").unbind("click").on("click",(function(){r(),p(e).done((function(){var e,n,o;(o={fes:l.fes,sou:l.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(i(),e.resultCode){case"0000":t("退订成功");break;case"7605":t(e.errorInfo);break;default:var n="";e.errorInfo.indexOf("退订失败")<0&&(n="退订失败,"),t(n+e.errorInfo)}})).fail((function(e){i()}))})).fail((function(e){i()}))})),window.scrollTo(0,0)}}function P(){var e,n,o,t=$(".section-flow"),r=$.Deferred();return(o={fes:l.fes,sou:l.sou,fog:u.fog,userid:e||f.userid,usermob:n||f.usermob},$.ajax({url:v+"/flow/query",type:"POST",contentType:"application/json",data:JSON.stringify(o)})).then((function(e){switch(e.resultCode){case"0000":var n=s(JSON.parse(e.data).surplusFlow/1024/1024);t.find(".surplus").html(n+"GB");var o=parseInt(JSON.parse(e.data).usedFlow);if(o>0&&o<1024)r.resolve("剩余流量更新成功,为您免流了"+o+"KB~");else if(o>1024){var i=s(o/1024);r.resolve("剩余流量更新成功,为您免流了"+i+"MB~")}else r.resolve("剩余流量更新成功~");break;case"9201":r.resolve("您未订购百度定向流量包~"),t.find(".phone").html("用户未订购此产品!");break;case"9203":r.resolve("剩余流量更新成功~"),t.find(".suplus").html("本月剩余<br>8.00GB");break;default:r.resolve("剩余流量更新成功~")}})),r}$((function(){var e=!1;if(window.addEventListener("pageshow",(function(){e&&window.location.reload()})),window.addEventListener("pagehide",(function(){e=!0})),window.location.href.indexOf("draw.html")>=0){var n=JSON.parse(localStorage.getItem("user"));null!=n&&$(".usermob").val(n.usermob)}})),function(){var e=localStorage.getItem("message");null!=e&&""!=e&&(t(e),localStorage.removeItem("message"));r(),m().then((function(e){i(),u=e.product[0],e.festival,function(e){if(l.userid)return f.userid=l.userid,void(f.usermob=l.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("/index")>=0?C():function(e){switch(e){case"active":D();break;case"cancel":M();break;case"draw":I();break;case"flow":!function(){if(location.href.indexOf("flow.html")<0)return void(window.location.href="flow.html?fes="+l.fes+"&sou="+l.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(){P().then((function(e){c(),null!=e&&""!=e&&t(e)})).fail((function(){c()}))})),P()}();break;default:C()}}(),location.href.indexOf("/cancel")>=0?O("110002"):location.href.indexOf("/draw")>=0?O("110003"):location.href.indexOf("/flow")>=0?O("110004"):location.href.indexOf("/active")>=0?O("110005"):location.href.indexOf("/refund")>=0?O("110006"):O("110001")}))}(),$("#btn-cancel").unbind("click").on("click",(function(){M()})),$("#btn-active").unbind("click").on("click",(function(){D()})),$("#gotoDrawPage").unbind("click").on("click",(function(){I(window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.lastIndexOf(".")))})),$(".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").find(".footer").html('隐藏<span class="arrow">>')):($(".section-agr .scope").find("li").each((function(e,n){e>=1&&$(n).addClass("hidden")})),$(".section-agr").find(".footer").html('查看更多专属流量适用范围<span class="arrow">>'))}))},function(e,n){}]);
|