main.min.js 17 KB

1
  1. !function(e){var n={};function t(o){if(n[o])return n[o].exports;var a=n[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(o,a,function(n){return e[n]}.bind(null,a));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="D:\\works\\2_code\\orderchannel\\src\\main\\webapp./douyin/15/20220704/dist/",t(t.s=0)}([function(e,n,t){"use strict";function o(e,n,t,o){var a="";null!=o&&0!=o||(a="温馨提示");var i=$('<div class="overlay overlay-alert"></div>'),r=$('<div class="dialog-alert"><h1>'+a+'</h1><div class="content">'+e+'</div><div class="actions"> <div class="btn">'+(null==t||""==t?"关闭":t)+"</div></div></div>");$("body").css("overflow","hidden"),i.appendTo($(document.body)),r.appendTo($(document.body)),1==n&&r.find(".btn").remove(),r.close=function(){$("body").css("overflow","auto"),i.remove(),r.remove(),r=null};var l=$.Deferred();return r.find(".btn").on("click",(function(){r.close(),l.resolve(r)})),l}function a(e){window.$loading&&window.$loading.trigger("close"),$("body").css("overflow","hidden");var n=e||"处理中,请稍后...",t=$('<div class="overlay overlay-loading"></div>'),o=$('<div class="loading"> <div class="content">'+n+"</div></div>");return t.appendTo($(document.body)),o.appendTo($(document.body)),o.on("close",(function(){$("body").css("overflow","auto"),t.remove(),o.remove(),o=null})),window.$loading=o,o}function i(e){e?e.trigger("close"):window.$loading&&window.$loading.trigger("close")}function r(e){return"1"!=$(e||document.body).data("use")&&($(e||document.body).data("use","1"),!0)}function l(e){$(e||document.body).data("use","0")}function c(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}t.r(n),Date.remainMillis=function(){var e=new Date;return 60*(23-e.getHours())*60*1e3+60*(59-e.getMinutes())*1e3+1e3*(59-e.getSeconds())},Date.remainMillisMonth=function(){var e=new Date,n=e.getMonth();return e.setMonth(n+1),e.setDate(0),e.getDate(),e.getDate()-(new Date).getDate()},Date.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 t in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+t+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[t]:("00"+n[t]).substr((""+n[t]).length)));return e};var d={},s={},u={},f={},v=null;function m(){window.root=h(),function(){var e,n,t=window.location.search.substring(1),o=0;for(;t.length>0&&-1!=(e=t.indexOf("=",o));){-1==(n=t.indexOf("&",e+1))&&(n=t.length);var a=t.substring(o,e),i=t.substring(e+1,n);d[a]=decodeURIComponent(i),o=n+1}}(),$("#useraccount_tt").attr("value",b("freeflow_token"));var e={fes:d.fes,sou:d.sou,orderId:d.orderId},n=$.Deferred();return $.ajax({url:v+"/ini/getstyle",type:"POST",contentType:"application/json",data:JSON.stringify(e),timeout:1e4}).then((function(e){var t=JSON.parse(e);if("0000"!=t.resultCode)return window.location.href=window.root+"/404.html",n.reject(),n;for(s=t.product[0],a=0;a<t.product.length;a++)u[t.product[a].productid]=t.product[a];$("#fog_"+s.url).attr("value",s.fog);for(var o=s.icon.split(","),a=0;a<o.length;a++)0==a&&$("#sendsms_order_"+s.url).attr("value",o[a]),1==a&&$("#sendsms_cancel_"+s.url).attr("value",o[a]),2==a&&$("#sendsms_yuyue_"+s.url).attr("value",o[a]);n.resolve(t)}),(function(e,n,t){"timeout"===n&&(window.location.href=h()+"/hot.html?cb="+encodeURIComponent(window.location.href))})),n}function p(e,n,t){var a=$.Deferred();if(!(null!=e.attr("n")&&e.attr("n")>0)){var i=e.find(".usermob").val();if(null==i||""==i.trim())return o("请输入联通手机号码"),a.reject(),a;if(!i.startsWith("1")||11!=i.length)return o("手机号码格式不正确"),a.reject(),a;var r={fes:d.fes,sou:d.sou,fog:s.fog,usermob:i,smstype:n};f.usermob=i;var l=60;e.attr("n",l),$.ajax({url:v+"/sms/send",type:"POST",contentType:"application/json",data:JSON.stringify(r)}).then((function(n){if("0000"!=n.resultCode)return l=0,e.attr("n",l),void o(n.errorInfo);var t=e.find(".sendcode");t.is("input")?t.val("{}s".replace("{}",l)):t.text("{}s".replace("{}",l)),t.addClass("sendcode-wait");var a=setInterval((function(){l-=1,e.attr("n",l),t.is("input")?t.val("{}s".replace("{}",l)):t.text("{}s".replace("{}",l)),0===l&&(clearInterval(a),t.is("input")?t.val("获取验证码"):t.text("获取验证码"),e.attr("n",l),t.removeClass("sendcode-wait"))}),1e3);try{window.HtmlPageVisitor&&window.HtmlPageVisitor.setMp(f.usermob)}catch(e){}}))}}function w(e,n){var t=$.Deferred(),a=e.find(".usermob").val(),i=e.find(".smscode").val();if(null==n&&(n=!1),null==a||""==a.trim())return o("请输入联通手机号码"),t.reject(),t;if(null==i||""==i.trim())return o("请输入验证码"),t.reject(),t;if(6!=i.length)return o("短信验证码不正确"),t.reject(),t;var r={fes:d.fes,sou:d.sou,fog:s.fog,code:i,usermob:a};return $.ajax({url:v+"/checkvercode",type:"POST",contentType:"application/json",data:JSON.stringify(r)}).then((function(i){switch(e.find(".smscode").val(""),i.resultCode){case"0000":f.userid=i.userid,f.usermob=a,f.usertime=(new Date).getTime(),n||(e.find(".usermob").val(""),e.find(".usermob").val("")),t.resolve(i.userid);break;default:o(i.errorInfo),t.reject(i)}})).fail((function(e){t.reject("服务调用异常")})),t}function g(e){localStorage.setItem("user"+s.productid,JSON.stringify(f)),localStorage.setItem("time"+s.productid,e||(new Date).getTime()+"")}function h(){var e=window.document.location.href,n=window.document.location.pathname,t=e.indexOf(n),o=e.substring(0,t),a=n.substring(0,n.substr(1).indexOf("/")+1);return v=o+a,o+a}function b(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+"=([^&]*)(&|$)"),t=window.location.search.substr(1).match(n);if(null!=t)return t[2];switch(e){case"con":return"1";case"freeflow_token":return"";default:var o=h()+"/404.html";$(location).attr("href",o)}}else window.location.href="https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7&sou=12"}function y(e,n,t,o){var a=x("uuid"),i=x("vvid");if(null!=a&&""!=a.trim()||k("uuid",a=O(),Date.remainMillis()),null!=i&&""!=i.trim()||k("vvid",i=O(),-1),null!=e&&""!=e){var r={operid:e,uuid:a,vvid:i,fog:s.fog,userid:f.userid,fes:d.fes,sou:d.sou,url:encodeURIComponent(t||window.location.href),remark:encodeURIComponent(n||"")};$.ajax({url:v+"/burypoint/logid",type:"POST",contentType:"application/json",data:JSON.stringify(r)}).then((function(e){}))}}function x(e){var n,t=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(n=document.cookie.match(t))?unescape(n[2]):null}function k(e,n,t){t=null==t?0:t;var o=new Date;t<0?document.cookie=e+"="+escape(n):(o.setTime(o.getTime()+t),document.cookie=e+"="+escape(n)+";expires="+o.toGMTString())}function O(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(16)}))}t(1);function I(e){if(location.href.indexOf("draw.html")<0)window.location.href="draw.html?fes="+d.fes+"&sou="+d.sou+"&back="+(null==e?"":e);else{var n=$(".section-login").find(".form-group");n.find(".sendcode").unbind("click").on("click",(function(){var e=n.find(".account").val();new Array;1==e.split(" ").length?null!=e&&""!=e?(p(n,"drawlogin"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_click_send_sms_code_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})):o("请输入抖音短视频账号"):o("抖音短视频账号不能含有空格")})),n.find(".login").unbind("click").on("click",(function(){var e=n.find(".usermob").val(),t=n.find(".account").val(),r=n.find(".smscode").val();if(null!=e&&""!=e){new Array;if(1==t.split(" ").length)if(null!=t&&""!=t)if(null!=t&&""!=t)if(null!=r&&""!=r){var l=function(e){var n=$('<div class="overlay"></div>'),t=$('<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)),t.appendTo($(document.body)),t.find(".btn").on("click",(function(){n.remove(),t.remove(),t=null})),t.close=function(){n.remove(),t.remove(),t=null},t}(t);l.find(".cancel").on("click",(function(){i()})),l.find(".okay").on("click",(function(){w(n,!0).done((function(){!function(e){a(),function(e,n,t,a){if(null==e||""==e.trim()){o("获取账号信息失败");var i=$.Deferred();return i.reject(),i}var r={fes:d.fes,sou:d.sou,fog:s.fog,userid:t||f.userid,usermob:a||f.usermob,uid:e,screen_name:n||""};return $.ajax({url:v+"/coin/draw",type:"POST",contentType:"application/json",data:JSON.stringify(r)})}(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(""),o("抖币充值中,详情结果以短信形式告知").then((function(){null!=d.back&&""!=d.back&&_(d.back+".html")})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)});break;case"7605":o(e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)});break;case"6776":o((t="")+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)});break;default:var t="";e.errorInfo.indexOf("领取失败")<0&&(t="领取失败,"),o(t+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})}})).fail((function(e){i()}))}(t)})).fail((function(e){i()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_click_confirm_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})}))}else o("请输入验证码");else o("请输入抖音短视频账号");else o("请输入抖音短视频账号");else o("抖音短视频账号不能含有空格")}else o("请输入联通手机号")}))}}function _(e){if(location.href.indexOf("15/index")<0)return null!=e&&""!=e||(e="index.html"),void(window.location.href=e+"?fes="+d.fes+"&sou="+d.sou);$("#btn-order").unbind("click").on("click",(function(e){}))}function S(){if(location.href.indexOf("active.html")<0)window.location.href="active.html?fes="+d.fes+"&sou="+d.sou;else{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){r()&&w(e).then((function(){l(),baidu.active().then((function(){o("激活成功").then((function(){g()}))}))})).fail((function(){l()}))})),window.scrollTo(0,0)}}function j(){if(location.href.indexOf("cancel.html")<0)window.location.href="cancel.html?fes="+d.fes+"&sou="+d.sou;else{var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){p(e,"cancellogin"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_click_send_sms_code_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})})),e.find(".login").unbind("click").on("click",(function(){a(),w(e).done((function(){var e,n,t,a,r;(r={fes:d.fes,sou:d.sou,fog:s.fog,userid:e||f.userid,usermob:n||f.usermob,canceltype:encodeURIComponent(t),cancelmsg:encodeURIComponent(a),useraccount:""},$.ajax({url:v+"/comm/cancel",type:"POST",contentType:"application/json",data:JSON.stringify(r)})).done((function(e){switch(i(),e.resultCode){case"0000":o("退订成功"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)});break;case"7605":o(e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)});break;default:var n="";e.errorInfo.indexOf("退订失败")<0&&(n="退订失败,"),o(n+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})}})).fail((function(e){i()}))})).fail((function(e){i()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_click_confirm_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})})),window.scrollTo(0,0)}}function P(){var e,n,t,o=$(".section-flow"),a=$.Deferred();return(t={fes:d.fes,sou:d.sou,fog:s.fog,userid:e||f.userid,usermob:n||f.usermob},$.ajax({url:v+"/flow/query",type:"POST",contentType:"application/json",data:JSON.stringify(t)})).then((function(e){switch(e.resultCode){case"0000":var n=c(JSON.parse(e.data).surplusFlow/1024/1024);o.find(".surplus").html(n+"GB");var t=parseInt(JSON.parse(e.data).usedFlow);if(t>0&&t<1024)a.resolve("剩余流量更新成功,为您免流了"+t+"KB~");else if(t>1024){var i=c(t/1024);a.resolve("剩余流量更新成功,为您免流了"+i+"MB~")}else a.resolve("剩余流量更新成功~");break;case"9201":a.resolve("您未订购百度定向流量包~"),o.find(".phone").html("用户未订购此产品!");break;case"9203":a.resolve("剩余流量更新成功~"),o.find(".suplus").html("本月剩余<br>8.00GB");break;default:a.resolve("剩余流量更新成功~")}})),a}$((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&&(o(e),localStorage.removeItem("message"));a(),m().then((function(e){i(),s=e.product[0],e.festival,function(e){if(d.userid)return f.userid=d.userid,void(f.usermob=d.usermob);try{var n=localStorage.getItem("time"+s.productid);if(n){if((new Date).getTime()<=parseFloat(n)+(e||36e5)){var t=localStorage.getItem("user"+s.productid);null!=t&&((f=JSON.parse(t)).userid=f.userid,f.usermob=f.usermob)}else localStorage.removeItem("time"+s.productid),localStorage.removeItem("user"+s.productid);return f}localStorage.removeItem("time"+s.productid),localStorage.removeItem("user"+s.productid)}catch(e){}}(),location.href.indexOf("15/index")>=0?_():function(e){null==e&&(location.href.indexOf("index.html")>=0&&(e="order"),location.href.indexOf("cancel.html")>=0&&(e="cancel"),location.href.indexOf("draw.html")>=0&&(e="draw"),location.href.indexOf("active.html")>=0&&(e="active"),location.href.indexOf("flow.html")>=0&&(e="flow"));switch(e){case"active":S();break;case"cancel":j();break;case"draw":I();break;case"flow":!function(){if(location.href.indexOf("flow.html")<0)return void(window.location.href="flow.html?fes="+d.fes+"&sou="+d.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){l(),null!=e&&""!=e&&o(e)})).fail((function(){l()}))})),P()}();break;default:_()}}(),location.href.indexOf("/cancel")>=0?(y("110002"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"cancel_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})):location.href.indexOf("/draw")>=0?(y("110003"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"draw_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})):location.href.indexOf("/flow")>=0?(y("110004"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"flow_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})):location.href.indexOf("/active")>=0?(y("110005"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"active_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)})):location.href.indexOf("/refund")>=0?y("110006"):(y("110001"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"order_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(d.sou,32)}))}))}(),$("#btn-cancel").unbind("click").on("click",(function(){j()})),$("#btn-active").unbind("click").on("click",(function(){S()})),$("#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">&gt;')):($(".section-agr .scope").find("li").each((function(e,n){e>=1&&$(n).addClass("hidden")})),$(".section-agr").find(".footer").html('查看更多专属流量适用范围<span class="arrow">&gt;'))}))},function(e,n){}]);