main.min.js 33 KB

1
  1. !function(e){var n={};function o(a){if(n[a])return n[a].exports;var t=n[a]={i:a,l:!1,exports:{}};return e[a].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=e,o.c=n,o.d=function(e,n,a){o.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:a})},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 a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var t in e)o.d(a,t,function(n){return e[n]}.bind(null,t));return a},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="D:\\works\\2_code\\orderchannel\\src\\main\\webapp./douyin/15/cs/dist/",o(o.s=0)}([function(e,n,o){"use strict";function a(e,n,o,a){var t="";null!=a&&0!=a||(t="温馨提示");var r=$('<div class="overlay overlay-alert"></div>'),i=$('<div class="dialog-alert"><h1>'+t+'</h1><div class="content">'+e+'</div><div class="actions"> <div class="btn">'+(null==o||""==o?"关闭":o)+"</div></div></div>");$("body").css("overflow","hidden"),r.appendTo($(document.body)),i.appendTo($(document.body)),1==n&&i.find(".btn").remove(),i.close=function(){$("body").css("overflow","auto"),r.remove(),i.remove(),i=null};var l=$.Deferred();return i.find(".btn").on("click",(function(){i.close(),l.resolve(i)})),l}function t(e){window.$loading&&window.$loading.trigger("close"),$("body").css("overflow","hidden");var n=e||"处理中,请稍后...",o=$('<div class="overlay overlay-loading"></div>'),a=$('<div class="loading"> <div class="content">'+n+"</div></div>");return o.appendTo($(document.body)),a.appendTo($(document.body)),a.on("close",(function(){$("body").css("overflow","auto"),o.remove(),a.remove(),a=null})),window.$loading=a,a}function r(e){e?e.trigger("close"):window.$loading&&window.$loading.trigger("close")}function i(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}o.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 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 s={},d={},u={},f={},v=null,p=null;function m(){window.root=_(),function(){var e,n,o=window.location.search.substring(1),a=0;for(;o.length>0&&-1!=(e=o.indexOf("=",a));){-1==(n=o.indexOf("&",e+1))&&(n=o.length);var t=o.substring(a,e),r=o.substring(e+1,n);s[t]=decodeURIComponent(r),a=n+1}}(),$("#useraccount_tt").attr("value",O("freeflow_token"));var e={fes:s.fes,sou:s.sou,orderId:s.orderId},n=$.Deferred();return $.ajax({url:v+"/ini/getstyle",type:"POST",contentType:"application/json",data:JSON.stringify(e),timeout:1e4}).then((function(e){var o=JSON.parse(e);if("0000"!=o.resultCode)return window.location.href=window.root+"/404.html",n.reject(),n;for(d=o.product[0],t=0;t<o.product.length;t++)u[o.product[t].productid]=o.product[t];$("#fog_"+d.url).attr("value",d.fog);for(var a=d.icon.split(","),t=0;t<a.length;t++)0==t&&$("#sendsms_order_"+d.url).attr("value",a[t]),1==t&&$("#sendsms_cancel_"+d.url).attr("value",a[t]),2==t&&$("#sendsms_yuyue_"+d.url).attr("value",a[t]);n.resolve(o)}),(function(e,n,o){"timeout"===n&&(window.location.href=_()+"/hot.html?cb="+encodeURIComponent(window.location.href))})),n}function b(e,n,o){var t=$.Deferred();if(!(null!=e.attr("n")&&e.attr("n")>0)){var r=e.find(".usermob").val();if(null==r||""==r.trim())return a("请输入联通手机号码"),t.reject(),t;if(!r.startsWith("1")||11!=r.length)return a("手机号码格式不正确"),t.reject(),t;var i={fes:s.fes,sou:s.sou,fog:d.fog,usermob:r,smstype:n};f.usermob=r;var l=60;e.attr("n",l),$.ajax({url:v+"/sms/send",type:"POST",contentType:"application/json",data:JSON.stringify(i)}).then((function(n){if("0000"!=n.resultCode)return l=0,e.attr("n",l),void a(n.errorInfo);var o=e.find(".sendcode");o.is("input")?o.val("{}s".replace("{}",l)):o.text("{}s".replace("{}",l)),o.addClass("sendcode-wait");var t=setInterval((function(){l-=1,e.attr("n",l),o.is("input")?o.val("{}s".replace("{}",l)):o.text("{}s".replace("{}",l)),0===l&&(clearInterval(t),o.is("input")?o.val("获取验证码"):o.text("获取验证码"),e.attr("n",l),o.removeClass("sendcode-wait"))}),1e3);try{window.HtmlPageVisitor&&window.HtmlPageVisitor.setMp(f.usermob)}catch(e){}}))}}function h(e,n){var o=$.Deferred(),t=e.find(".usermob").val(),r=e.find(".smscode").val();if(null==n&&(n=!1),null==t||""==t.trim())return a("请输入联通手机号码"),o.reject(),o;if(null==r||""==r.trim())return a("请输入验证码"),o.reject(),o;if(6!=r.length)return a("短信验证码不正确"),o.reject(),o;var i={fes:s.fes,sou:s.sou,fog:d.fog,code:r,usermob:t};return $.ajax({url:v+"/checkvercode",type:"POST",contentType:"application/json",data:JSON.stringify(i)}).then((function(r){switch(e.find(".smscode").val(""),r.resultCode){case"0000":f.userid=r.userid,f.usermob=t,f.usertime=(new Date).getTime(),n||(e.find(".usermob").val(""),e.find(".usermob").val("")),o.resolve(r.userid);break;default:a(r.errorInfo),o.reject(r)}})).fail((function(e){o.reject("服务调用异常")})),o}var w=!0;function y(e,n,o,i,l,c){var u,v,p;if(w=!1,null!=e&&null==d.fog&&(d.fog=e),o||$("body").css("overflow","hidden"),window.location.href.indexOf("https://800.wo.cn/orderchannel")>=0?(u="https://800.wo.cn/cap/CAP-AUTH.html",v="https://800.wo.cn/"):window.location.href.indexOf("https://800.wo.cn/festivalchannel")>=0?(u="https://800.wo.cn/festivalcap/CAP-AUTH.html",v="https://800.wo.cn/"):window.location.href.indexOf("http://localhost")>=0?(u="http://localhost:8088/cap/CAP-AUTH.html",v="http://localhost:8088/"):window.location.href.indexOf("http://127.0.0.1")>=0?(u="http://127.0.0.1:8088/cap/CAP-AUTH.html",v="http://127.0.0.1:8088/"):window.location.href.indexOf("http://100.0.4.69:3344")>=0?(u="http://100.0.4.69:3344/cap/CAP-AUTH.html",v="http://100.0.4.69:3344/"):window.location.href.indexOf("http://100.0.4.69:8282")>=0?(u="http://100.0.4.69:8282/cap/CAP-AUTH.html",v="http://100.0.4.69:8282/"):(u="https://800.wo.cn/festivalcap/CAP-AUTH.html",v="https://800.wo.cn/"),p=$("#uniauthframe").length>=1?$("#uniauthframe").attr("src",u):$('<iframe id="uniauthframe" src="'+u+'" style="width:100%;height:100%;position:fixed;top:0;left:0;margin:0;padding:0;border:0"></iframe>'),t(),p.on("load",(function(){$capoverlay.remove(),x(e).then((function(e){r(),e.orderChannel=s.fes+"_"+s.sou,null!=n&&""!=n&&(e.productName=n),null!=c&&""!=c&&(e.capTemplet=c);try{p[0].contentWindow.postMessage(JSON.stringify(e),v)}catch(e){}}))})),navigator.userAgent.indexOf("MicroMessenger")>=0){var m;window.capTimer=setInterval((function(){m=document.documentElement.scrollTop||document.body.scrollTop,m-=1,window.top.scrollTo(0,m),m+=1,window.top.scrollTo(0,m)}),200)}window.$capoverlay=$('<div class="overlay" style="z-index: 0"></div>'),$capoverlay.appendTo($(document.body)),0==$("#uniauthframe").length?$("body").append(p):p.css("position","unset").css("min-height","10rem");var b=$.Deferred();return window.addEventListener("message",(function e(n){var o=null;try{o=JSON.parse(n.data)}catch(e){return}switch(o.resultcode){case"0":p.remove(),$capoverlay.remove(),window.removeEventListener("message",e),$("body").css("overflow","auto"),clearInterval(window.capTimer),f.token=o.token,f.userid=decodeURIComponent(o.userid),f.userid1=o.userid1,f.usermob=o.usermob,f.usertime=(new Date).getTime(),l&&g();try{window.HtmlPageVisitor&&window.HtmlPageVisitor.setMp(o.usermob)}catch(e){}b.resolve(f);break;case"9001":p.remove(),$capoverlay.remove(),window.removeEventListener("message",e),clearInterval(window.capTimer),$("body").css("overflow","auto"),b.reject(o),null!=i&&i&&!w&&("1"==s.test&&alert(navigator.userAgent),j()&&(w=!0,history.back()));break;case"0001":case"0003":case"0006":case"4444":break;case"99999":o.operid&&I(o.operid),o.ea&&WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:o.ea+$("#nanyanlabel").val(),ct:"web",pm:parseInt(O("sou"),32)});try{window.WoAnalytics&&window.WoAnalytics.setMp(o.usermob)}catch(e){}break;default:p.remove(),$capoverlay.remove(),window.removeEventListener("message",e),$("body").css("overflow","auto"),clearInterval(window.capTimer),a(o.errorinfo),b.reject(o)}})),b}function g(e){var n={fog:d.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){var n={fog:d.fog||e||"",channel:""};return $.ajax({url:v+"/ini/gensign",type:"POST",contentType:"application/json",data:JSON.stringify(n)})}function k(e){localStorage.setItem("user"+d.productid,JSON.stringify(f)),localStorage.setItem("time"+d.productid,e||(new Date).getTime()+"")}function _(){var e=window.document.location.href,n=window.document.location.pathname,o=e.indexOf(n),a=e.substring(0,o),t=n.substring(0,n.substr(1).indexOf("/")+1);return v=a+t,a+t}function O(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 a=_()+"/404.html";$(location).attr("href",a)}}else window.location.href="https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7&sou=12"}function I(e,n,o,a){var t=T("uuid"),r=T("vvid");if(null!=t&&""!=t.trim()||S("uuid",t=P(),Date.remainMillis()),null!=r&&""!=r.trim()||S("vvid",r=P(),-1),null!=e&&""!=e){var i={operid:e,uuid:t,vvid:r,fog:d.fog,userid:f.userid,fes:s.fes,sou:s.sou,url:encodeURIComponent(o||window.location.href),remark:encodeURIComponent(n||"")};$.ajax({url:v+"/burypoint/logid",type:"POST",contentType:"application/json",data:JSON.stringify(i)}).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 a=new Date;o<0?document.cookie=e+"="+escape(n):(a.setTime(a.getTime()+o),document.cookie=e+"="+escape(n)+";expires="+a.toGMTString())}function P(){return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=16*Math.random()|0;return("x"==e?n:3&n|8).toString(16)}))}function j(){var e=navigator.userAgent.indexOf("Baidu")>-1;if(e)return e;var n=navigator.userAgent.indexOf("OPR")>-1,o=navigator.userAgent.indexOf("Firefox")>-1,a=navigator.userAgent.indexOf("UCBrowser");if(!n||!o||!a)return!1;var t=navigator.userAgent.indexOf("MicroMessenger")>-1,r=navigator.userAgent.indexOf("Safari")>-1,i=navigator.userAgent.indexOf("Chrome")>-1;return t||e||r||i}o(1);var A=B("userid"),D=B("spid"),C="";function W(e){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?(b(n,"drawlogin"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_click_send_sms_code_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})):a("请输入抖音短视频账号"):a("抖音短视频账号不能含有空格")})),n.find(".login").unbind("click").on("click",(function(){var e=n.find(".usermob").val(),o=n.find(".account").val(),i=n.find(".smscode").val();if(null!=e&&""!=e){new Array;if(1==o.split(" ").length)if(null!=o&&""!=o)if(null!=o&&""!=o)if(null!=i&&""!=i){var l=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);l.find(".cancel").on("click",(function(){r()})),l.find(".okay").on("click",(function(){h(n,!0).done((function(){!function(e){t(),function(e,n,o,t){if(null==e||""==e.trim()){a("获取账号信息失败");var r=$.Deferred();return r.reject(),r}var i={fes:s.fes,sou:s.sou,fog:d.fog,userid:o||f.userid,usermob:t||f.usermob,uid:e,screen_name:n||""};return $.ajax({url:v+"/coin/draw",type:"POST",contentType:"application/json",data:JSON.stringify(i)})}(e,"").done((function(e){switch(r(),e.resultCode){case"0000":var n=$(".section-login").find(".form-group");n.find(".usermob").val(""),n.find(".smscode").val(""),n.find(".account").val(""),a("抖币充值中,详情结果以短信形式告知").then((function(){null!=s.back&&""!=s.back&&M(s.back+".html")})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"7605":a(e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"6776":a((o="")+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;default:var o="";e.errorInfo.indexOf("领取失败")<0&&(o="领取失败,"),a(o+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}})).fail((function(e){r()}))}(o)})).fail((function(e){r()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"draw_click_confirm_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}))}else a("请输入验证码");else a("请输入抖音短视频账号");else a("请输入抖音短视频账号");else a("抖音短视频账号不能含有空格")}else a("请输入联通手机号")}))}function M(e){$("#btn-order").unbind("click").on("click",(function(e){var n,o=$("#test option:selected");n=o.val(),null!=u[n]&&(d=u[n],console.log(d)),console.log(o.val()),y(null,null,!1,!1,!0).then((function(e){l(),U(e.userid,e.token,e.usermob)})).fail((function(e){l()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_click_order_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}))}function N(){if(location.href.indexOf("active.html")<0)window.location.href="active.html?fes="+s.fes+"&sou="+s.sou;else{var e=$(".section-login").find(".form-group");e.find(".sendcode").unbind("click").on("click",(function(){b(e,"activelogin")})),e.find(".login").unbind("click").on("click",(function(n){i()&&h(e).then((function(){l(),baidu.active().then((function(){a("激活成功").then((function(){k()}))}))})).fail((function(){l()}))})),window.scrollTo(0,0)}}function J(){if(location.href.indexOf("cannel20220313.html")<0)window.location.href="cannel20220313.html?fes="+s.fes+"&sou="+s.sou;else{var e=JSON.parse(window.localStorage.getItem("kye")),n=$(".section-login").find(".form-group");n.find(".sendcode").unbind("click").on("click",(function(){b(n,"cancellogin"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_click_send_sms_code_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})})),n.find(".login").unbind("click").on("click",(function(){t(),h(n).done((function(){var n,o,t,i,l;(n=null,o=null,t=e.canceltype,i=e.cancelmsg,l={fes:s.fes,sou:s.sou,fog:d.fog,userid:n||f.userid,usermob:o||f.usermob,canceltype:encodeURIComponent(t),cancelmsg:encodeURIComponent(i),useraccount:""},$.ajax({url:v+"/comm/cancel",type:"POST",contentType:"application/json",data:JSON.stringify(l)})).done((function(e){switch(r(),e.resultCode){case"0000":a("退订成功"),window.localStorage.removeItem("kye"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"7605":a(e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;default:var n="";e.errorInfo.indexOf("退订失败")<0&&(n="退订失败,"),a(n+e.errorInfo),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}})).fail((function(e){r()}))})).fail((function(e){r()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"cancel_click_confirm_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})})),window.scrollTo(0,0)}}function U(e,n,o){t("处理中,请稍后..."),function(e,n,o,a){var t={fes:s.fes,sou:s.sou,fog:d.fog,token:n,userid:e||f.userid,usermob:o||f.usermob,useraccount:"",f:s.F,ringid:a||s.ringid};return $.ajax({url:v+"/comm/order",type:"POST",contentType:"application/json",data:JSON.stringify(t)})}(e,n,o).done((function(e){switch(r(),e.resultCode){case"0000":return k(),function(e,n,o,a){var t="";null!=a&&0!=a||(t=e);var r=$('<div class="overlay overlay-alert"></div>'),i=$('<div class="dialog-alerts dialog-alert"><h1>'+t+'</h1><div class="contents"></div><div class="actionss actions"> <div class="btn">'+(null==o||""==o?"确定":o)+"</div></div></div>");$("body").css("overflow","hidden"),r.appendTo($(document.body)),i.appendTo($(document.body)),1==n&&i.find(".btn").remove();i.close=function(){$("body").css("overflow","auto"),r.remove(),i.remove(),i=null};var l=$.Deferred();i.find(".btn").on("click",(function(){i.close(),l.resolve(i)}))}("订购成功"),void WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});case"0013":a("该号码归属省分2/3G暂未开通此产品!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"6611":a("错误代码(6611),订购失败,请重试!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"6615":E("订购失败,请确定用户套餐!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"6622":a("您已经订购了本产品~"),k(),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;default:E(e.errorInfo+"订购失败,请确定用户套餐!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}})).fail((function(e){r(),console.log(e)}))}function E(e,n,o,a){var t="";null!=a&&0!=a||(t=e);var r=$('<div class="overlay overlay-alert"></div>'),i=$('<div class="dialog-alerts dialog-alert"><h1>'+t+'</h1><div class="contentss"></div><div class="actionss actions"> <div class="btn">'+(null==o||""==o?"确定":o)+"</div></div></div>");$("body").css("overflow","hidden"),r.appendTo($(document.body)),i.appendTo($(document.body)),1==n&&i.find(".btn").remove(),i.close=function(){$("body").css("overflow","auto"),r.remove(),i.remove(),i=null};var l=$.Deferred();return i.find(".btn").on("click",(function(){i.close(),l.resolve(i)})),l}function R(){var e,n,o,a=$(".section-flow"),t=$.Deferred();return(o={fes:s.fes,sou:s.sou,fog:d.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=c(JSON.parse(e.data).surplusFlow/1024/1024);a.find(".surplus").html(n+"GB");var o=parseInt(JSON.parse(e.data).usedFlow);if(o>0&&o<1024)t.resolve("剩余流量更新成功,为您免流了"+o+"KB~");else if(o>1024){var r=c(o/1024);t.resolve("剩余流量更新成功,为您免流了"+r+"MB~")}else t.resolve("剩余流量更新成功~");break;case"9201":t.resolve("您未订购百度定向流量包~");break;case"9203":t.resolve("剩余流量更新成功~"),a.find(".suplus").html("本月剩余<br>8.00GB");break;default:t.resolve("剩余流量更新成功~")}})),t}!function(){var e=localStorage.getItem("message");null!=e&&""!=e&&(a(e),localStorage.removeItem("message"));t(),m().then((function(e){r(),d=e.product[0],e.festival,function(e){if(s.userid)return f.userid=s.userid,void(f.usermob=s.usermob);try{var n=localStorage.getItem("time"+d.productid);if(n){if((new Date).getTime()<=parseFloat(n)+(e||36e5)){var o=localStorage.getItem("user"+d.productid);null!=o&&((f=JSON.parse(o)).userid=f.userid,f.usermob=f.usermob)}else localStorage.removeItem("time"+d.productid),localStorage.removeItem("user"+d.productid);return f}localStorage.removeItem("time"+d.productid),localStorage.removeItem("user"+d.productid)}catch(e){}}(),location.href.indexOf("15/index")>=0?M():function(e){null==e&&(location.href.indexOf("cs.html")>=0&&(e="order"),location.href.indexOf("cannel20220313.html")>=0&&(e="cancel"),location.href.indexOf("draw20220313.html")>=0&&(e="draw"),location.href.indexOf("active.html")>=0&&(e="active"),location.href.indexOf("flow.html")>=0&&(e="flow"));switch(e){case"active":N();break;case"cancel":J();break;case"draw":(function(e,n){var o={userid:e,fog:d.fog};null!=n&&""!=n&&(o.spid=n);var a=$.Deferred();return $.ajax({url:v+"/rights/query",type:"POST",contentType:"application/json",data:JSON.stringify(o)}).then((function(e){"2020090401"==e.productid?p="定向流量权益包(后向)":"2021091709"==e.productid?p="定向流量权益包(联通次月生效)":"2020111201"==e.productid?p="定向流量权益包(次月生效)":"2021091702"==e.productid&&(p="定向流量权益包(联通)")})).fail((function(e){a.reject("服务调用异常")})),a})(A,D).done((function(e){console.log(e),C=e.productid,"2020090401"==e.productid?name_a="定向流量权益包(后向)":"2021091709"==e.productid?name_a="定向流量权益包(联通次月生效)":"2020111201"==e.productid?name_a="定向流量权益包(次月生效)":"2021091702"==e.productid&&(name_a="定向流量权益包(联通立即生效)")})),t("处理中,请稍后..."),(n=A,o={userid:n,fog:d.fog,vipcode:"10001"},c=$.Deferred(),$.ajax({url:v+"/rights/querys",type:"POST",contentType:"application/json",data:JSON.stringify(o)}).then((function(e){switch(console.log(e),console.log(e.data[0].productid),e.resultCode){case"0000":case"1066":c.resolve(e);break;default:c.reject(e)}})).fail((function(e){c.reject("服务调用异常")})),c).done((function(e){r();var n="";e.data.forEach((function(e){"3"==e.status?(n+=1,$("#information").html("已订购,有"+n+"个权益未领取")):"2"==e.status&&""==n?($("#information").html("已订购,已领取"),$(".order_a").css("pointer-events","none"),$(".order_a").css("-webkit-filter","grayscale(100%)")):"2"!=e.status&&""==n&&"3"!=e.status&&($("#information").html("未订购此产品!"),$(".order_a").attr("class","order_ca"),$(".order_a").css("display","none"),$(".ordersak").css("display","block"),$("#btn-order").unbind("click").on("click",(function(e){i()&&(y(null,null,!1,!1,!0).then((function(e){l(),U(e.userid,e.token,e.usermob)})).fail((function(e){l()})),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_click_order_btn"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)}))})))}))})),W();break;case"flow":!function(){if(location.href.indexOf("flow.html")<0)return void(window.location.href="flow.html?fes="+s.fes+"&sou="+s.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(){R().then((function(e){l(),null!=e&&""!=e&&a(e)})).fail((function(){l()}))})),R()}();break;default:M()}var n,o,c}(),location.href.indexOf("/cancel")>=0?(I("110002"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"cancel_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})):location.href.indexOf("/draw")>=0?(I("110003"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"draw_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})):location.href.indexOf("/flow")>=0?(I("110004"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"flow_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})):location.href.indexOf("/active")>=0?(I("110005"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"active_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})):location.href.indexOf("/refund")>=0?I("110006"):(I("110001"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"open",ea:"order_open"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)}))}))}(),$("#btn_cannel").unbind("click").on("click",(function(){(function(){var e,n;e=window.location.href.indexOf("https://800.wo.cn/orderchannel")>=0?"https://800.wo.cn/orderchannel/public/libs/cancelreason/index.html":window.location.href.indexOf("https://800.wo.cn/festivalchannel")>=0?"https://800.wo.cn/festivalchannel/public/libs/cancelreason/index.html":window.location.href.indexOf("http://localhost")>=0?"http://localhost:8088/orderchannel/public/libs/cancelreason/index.html":window.location.href.indexOf("http://127.0.0.1")>=0?"http://127.0.0.1:8088/orderchannel/public/libs/cancelreason/index.html":window.location.href.indexOf("http://100.0.4.69:3344")>=0?"http://100.0.4.69:3344/orderchannel/public/libs/cancelreason/index.html":window.location.href.indexOf("http://100.0.4.69:8282")>=0?"http://100.0.4.69:8282/orderchannel/public/libs/cancelreason/index.html":"https://800.wo.cn/orderchannel/public/libs/cancelreason/index.html",window.$capoverlay=$('<div class="overlay" style="z-index: 0; background-color: rgba(0,0,0,0.4);"></div>'),$capoverlay.appendTo($(document.body)),$("body").css("overflow","hidden"),$("#reasonIframe").length>=1?n=$("#reasonIframe").attr("src",e):(n=$('<iframe id="reasonIframe" src="'+e+'"></iframe>'),$("body").append(n)),n.css({width:"100%",height:"100%",position:"fixed",top:0,left:0,margin:0,padding:0,"-webkit-overflow-scrolling":"touch",border:"0px","z-index":111});var o=$.Deferred();return window.addEventListener("message",(function e(a){var t=JSON.parse(a.data);n.remove(),$capoverlay.remove(),$("body").css("overflow","auto"),window.removeEventListener("message",e),"close"!=t.eventtype?o.resolve(t):o.reject(t)})),o})().done((function(e){var n=JSON.stringify(e);window.localStorage.setItem("kye",n),gotoUrl("douyin/15/cannel20220313")})).fail((function(){}))})),$("#btn-cancel").unbind("click").on("click",(function(){J()})),$("#btn-active").unbind("click").on("click",(function(){N()})),$("#gotoDrawPage").unbind("click").on("click",(function(){W(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;'))}));var H=0;function F(e,n,o,t){var r="",i="",l="";null!=t&&0!=t||(r="您选择的是:",i=e,l=p);var c=$('<div class="overlay overlay-alert"></div>'),s=$('<div class="dialog-alerttt"><h1 class="text_nn"><span class="text_mm ">'+r+"</span>"+i+'</h1><h1 class="text_nn text_nns"><span class="text_mm ">领取产品:</span>'+l+'</h1><input class="inputot" type="tel" maxlength="11" name="phone" placeholder="请输入领取权益的手机号码"/><div class="actions"> <div class="btns">'+(null==o||""==o?"关闭":o)+'</div> <div id="btn_orderss" class="btn btn_orderss">'+(null==o||""==o?"确定":o)+"</div></div></div>");$("body").css("overflow","hidden"),c.appendTo($(document.body)),s.appendTo($(document.body)),1==n&&s.find(".btn").remove(),$(".btns").click((function(){$("body").css("overflow","auto"),c.remove(),s.remove(),s=null})),$("#btn_orderss").click((function(){var e=s.find(".inputot").val();if(null!=e&&""!=e){switch(H){case 0:var n=10001;break;case 1:n=20001;break;case 2:n=30001;break;case 3:n=60001;break;case 4:n=50001;break;case 5:n=13004}console.log(e,n,A,D),L(e,n,A,D),$("body").css("overflow","auto"),c.remove(),s.remove(),s=null}else a("请输入手机号码")}))}function B(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=window.location.search.substr(1).match(n);return null!=o?unescape(o[2]):null}function L(e,n,o,i){t("处理中,请稍后..."),function(e,n,o,t,r){var i={userid:o,vipcode:n,vipuser:e,fog:d.fog,spid:t||"",productname:r||""};null!=t&&""!=t&&(i.spid=t),console.log(o,d.fog);var l=$.Deferred();return $.ajax({url:v+"/rights/draw",type:"POST",contentType:"application/json",data:JSON.stringify(i)}).then((function(e){switch(e.resultCode){case"0000":case"1102":case"1105":case"1015":l.resolve(e);break;default:a(e.errorInfo),l.reject(e)}})).fail((function(e){l.reject("服务调用异常")})),l}(e,n,o,i).done((function(e){switch(r(),e.resultCode){case"0000":return k(),function(e,n,o,a){var t="";null!=a&&0!=a||(t=e);var r=$('<div class="overlay overlay-alert"></div>'),i=$('<div class="dialog-alerts dialog-alert"><h1>'+t+'</h1><div class="contentsak"></div><div class="actionss actions"> <div class="btn">'+(null==o||""==o?"确定":o)+"</div></div></div>");$("body").css("overflow","hidden"),r.appendTo($(document.body)),i.appendTo($(document.body)),1==n&&i.find(".btn").remove(),i.close=function(){$("body").css("overflow","auto"),r.remove(),i.remove(),i=null};var l=$.Deferred();i.find(".btn").on("click",(function(){if(i.close(),l.resolve(i),"2020010201"!=C){console.log(C);var e,n=B("cpid"),o=B("userid"),a=B("usermob"),t=B("fes"),r=B("sou");window.location.href.indexOf("https://800.wo.cn/orderchannel")>=0?e="https://800.wo.cn/orderchannel/douyin/15/draw20220313.html?fes=jjd&sou=1m&cpid="+n+"&userid="+o+"&usermob="+a:window.location.href.indexOf("http://100.0.4.69:3344")>=0&&(e="http://100.0.4.69:3344/orderchannel/douyin/15/draw20220313.html?fes="+t+"&sou="+r+"&cpid="+n+"&userid="+o+"&usermob="+a),location.href=e}}))}("领取结果以短信为准!"),void WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_success"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});case"1102":a("用户已领取过权益,不能再领取!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;case"1015":a("用户未订购此产品!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)});break;default:E(e.errorInfo+",订购失败,请确定用户套餐!"),WoAnalytics.addPoint({ad:$("#nanyanad").val(),ett:"click",ea:"order_failure"+$("#nanyanlabel").val(),ct:"web",pm:parseInt(s.sou,32)})}})).fail((function(e){r(),console.log(e)}))}$(".beijing_a").click((function(){$(this)&&($(this).addClass("beijing_b").siblings().removeClass("beijing_b"),H=$(this).index())})),$(".order_a").click((function(){switch(H){case 0:F("优酷视频会员周卡");break;case 1:F("爱奇艺视频会员周卡");break;case 2:F("腾讯视频会员周卡");break;case 3:F("蜻蜓FM超级会员周卡");break;case 4:F("芒果TV PC移动影视会员周卡");break;case 5:F("美团外卖5元红包");break;case 6:!function(e,n,o,t){var r="",i="";null!=t&&0!=t||(r="您选择的是:",i=e);var l=$('<div class="overlay overlay-alert"></div>'),c=$('<div class="dialog-alerttt"><h1 class="text_nn"><span class="text_mm ">'+r+"</span>"+i+'</h1><input class="inputot" placeholder="请输入抖音号"/><div class="actions"> <div class="btns">'+(null==o||""==o?"关闭":o)+'</div> <div id="btn_orderss" class="btn btn_orderss">'+(null==o||""==o?"确定":o)+"</div></div></div>");$("body").css("overflow","hidden"),l.appendTo($(document.body)),c.appendTo($(document.body)),$(".btns").click((function(){$("body").css("overflow","auto"),l.remove(),c.remove(),c=null})),$("#btn_orderss").click((function(){var e=c.find(".inputot").val();new Array;if(1==e.split(" ").length)if(null!=e&&""!=e){console.log(e,"20200310",A,D),L(e,"20200310",A,D),$("body").css("overflow","auto"),l.remove(),c.remove(),c=null}else a("请输入抖音短视频账号");else a("抖音短视频账号不能含有空格")}))}("抖音币50个")}}))},function(e,n){}]);