main.min.js 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. ! function(e) {
  2. var n = {};
  3. 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 }
  4. 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) {
  5. if (1 & n && (e = t(e)), 8 & n) return e;
  6. if (4 & n && "object" == typeof e && e && e.__esModule) return e;
  7. var o = Object.create(null);
  8. if (t.r(o), Object.defineProperty(o, "default", { enumerable: !0, value: e }), 2 & n && "string" != typeof e)
  9. for (var a in e) t.d(o, a, function(n) { return e[n] }.bind(null, a));
  10. return o
  11. }, 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/poly/v1/dist/", t(t.s = 0)
  12. }([function(e, n, t) {
  13. "use strict";
  14. function o(e, n, t, o) {
  15. var a = "";
  16. null != o && 0 != o || (a = "温馨提示");
  17. var i = $('<div class="overlay overlay-alert"></div>'),
  18. 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>");
  19. $("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 };
  20. var l = $.Deferred();
  21. return r.find(".btn").on("click", (function() { r.close(), l.resolve(r) })), l
  22. }
  23. function a(e) {
  24. window.$loading && window.$loading.trigger("close"), $("body").css("overflow", "hidden");
  25. var n = e || "处理中,请稍后...",
  26. t = $('<div class="overlay overlay-loading"></div>'),
  27. o = $('<div class="loading"> <div class="content">' + n + "</div></div>");
  28. 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
  29. }
  30. function i(e) { e ? e.trigger("close") : window.$loading && window.$loading.trigger("close") }
  31. function r(e) { $(e || document.body).data("use", "0") }
  32. 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() {
  33. var e = new Date,
  34. n = e.getMonth();
  35. return e.setMonth(n + 1), e.setDate(0), e.getDate(), e.getDate() - (new Date).getDate()
  36. }, 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 };
  37. var l = {},
  38. c = {},
  39. d = {},
  40. s = {},
  41. u = null;
  42. function f() {
  43. window.root = b(),
  44. function() {
  45. var e, n, t = window.location.search.substring(1),
  46. o = 0;
  47. for (; t.length > 0 && -1 != (e = t.indexOf("=", o));) {
  48. -1 == (n = t.indexOf("&", e + 1)) && (n = t.length);
  49. var a = t.substring(o, e),
  50. i = t.substring(e + 1, n);
  51. l[a] = decodeURIComponent(i), o = n + 1
  52. }
  53. }(), $("#useraccount_tt").attr("value", y("freeflow_token"));
  54. var e = { fes: l.fes, sou: l.sou, orderId: l.orderId },
  55. n = $.Deferred();
  56. return $.ajax({ url: u + "/ini/getstyle", type: "POST", contentType: "application/json", data: JSON.stringify(e), timeout: 1e4 }).then((function(e) {
  57. var t = JSON.parse(e);
  58. if ("0000" != t.resultCode) return window.location.href = window.root + "/404.html", n.reject(), n;
  59. for (c = t.product[0], a = 0; a < t.product.length; a++) d[t.product[a].productid] = t.product[a];
  60. $("#fog_" + c.url).attr("value", c.fog);
  61. for (var o = c.icon.split(","), a = 0; a < o.length; a++) 0 == a && $("#sendsms_order_" + c.url).attr("value", o[a]), 1 == a && $("#sendsms_cancel_" + c.url).attr("value", o[a]), 2 == a && $("#sendsms_yuyue_" + c.url).attr("value", o[a]);
  62. n.resolve(t)
  63. }), (function(e, n, t) { "timeout" === n && (window.location.href = b() + "/hot.html?cb=" + encodeURIComponent(window.location.href)) })), n
  64. }
  65. function v(e, n, t) {
  66. var a = $.Deferred();
  67. if (!(null != e.attr("n") && e.attr("n") > 0)) {
  68. var i = e.find(".usermob").val();
  69. if (null == i || "" == i.trim()) return o("请输入联通手机号码"), a.reject(), a;
  70. if (!i.startsWith("1") || 11 != i.length) return o("手机号码格式不正确"), a.reject(), a;
  71. var r = { fes: l.fes, sou: l.sou, fog: c.fog, usermob: i, smstype: n };
  72. s.usermob = i;
  73. var d = 60;
  74. e.attr("n", d), $.ajax({ url: u + "/sms/send", type: "POST", contentType: "application/json", data: JSON.stringify(r) }).then((function(n) {
  75. if ("0000" != n.resultCode) return d = 0, e.attr("n", d), void o(n.errorInfo);
  76. var t = e.find(".sendcode");
  77. t.is("input") ? t.val("{}s".replace("{}", d)) : t.text("{}s".replace("{}", d)), t.addClass("sendcode-wait");
  78. var a = setInterval((function() { d -= 1, e.attr("n", d), t.is("input") ? t.val("{}s".replace("{}", d)) : t.text("{}s".replace("{}", d)), 0 === d && (clearInterval(a), t.is("input") ? t.val("获取验证码") : t.text("获取验证码"), e.attr("n", d), t.removeClass("sendcode-wait")) }), 1e3);
  79. try { window.HtmlPageVisitor && window.HtmlPageVisitor.setMp(s.usermob) } catch (e) {}
  80. }))
  81. }
  82. }
  83. function p(e, n) {
  84. var t = $.Deferred(),
  85. a = e.find(".usermob").val(),
  86. i = e.find(".smscode").val();
  87. if (null == n && (n = !1), null == a || "" == a.trim()) return o("请输入联通手机号码"), t.reject(), t;
  88. if (null == i || "" == i.trim()) return o("请输入验证码"), t.reject(), t;
  89. if (6 != i.length) return o("短信验证码不正确"), t.reject(), t;
  90. var r = { fes: l.fes, sou: l.sou, fog: c.fog, code: i, usermob: a };
  91. return $.ajax({ url: u + "/checkvercode", type: "POST", contentType: "application/json", data: JSON.stringify(r) }).then((function(i) {
  92. switch (e.find(".smscode").val(""), i.resultCode) {
  93. case "0000":
  94. s.userid = i.userid, s.usermob = a, s.usertime = (new Date).getTime(), n || (e.find(".usermob").val(""), e.find(".usermob").val("")), t.resolve(i.userid);
  95. break;
  96. default:
  97. o(i.errorInfo), t.reject(i)
  98. }
  99. })).fail((function(e) { t.reject("服务调用异常") })), t
  100. }
  101. var m = !0;
  102. function h(e) {
  103. var n = { fog: c.fog || fog || "", userid: e || s.userid };
  104. $.ajax({ url: u + "/decodeUserid", type: "POST", contentType: "application/json", data: JSON.stringify(n) }).then((function(e) { "0" == e.resultCode && (s.usermob = e.usermob) }))
  105. }
  106. function w(e) { var n = { fog: c.fog || e || "", channel: "" }; return $.ajax({ url: u + "/ini/gensign", type: "POST", contentType: "application/json", data: JSON.stringify(n) }) }
  107. function g(e) { localStorage.setItem("user" + c.productid, JSON.stringify(s)), localStorage.setItem("time" + c.productid, e || (new Date).getTime() + "") }
  108. function b() {
  109. var e = window.document.location.href,
  110. n = window.document.location.pathname,
  111. t = e.indexOf(n),
  112. o = e.substring(0, t),
  113. a = n.substring(0, n.substr(1).indexOf("/") + 1);
  114. return u = o + a, o + a
  115. }
  116. function y(e) {
  117. if ("https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7" != window.location.href) {
  118. window.location.href.indexOf("jiangtao") >= 0 && alert(window.location.href);
  119. var n = new RegExp("(^|&)" + e + "=([^&]*)(&|$)"),
  120. t = window.location.search.substr(1).match(n);
  121. if (null != t) return t[2];
  122. switch (e) {
  123. case "con":
  124. return "1";
  125. case "freeflow_token":
  126. return "";
  127. default:
  128. var o = b() + "/404.html";
  129. $(location).attr("href", o)
  130. }
  131. } else window.location.href = "https://800.wo.cn/orderchannel/hd/Dy/order202005.html?fes=jh7&sou=12"
  132. }
  133. function x(e, n, t, o) {
  134. var a = k("uuid"),
  135. i = k("vvid");
  136. if (null != a && "" != a.trim() || O("uuid", a = I(), Date.remainMillis()), null != i && "" != i.trim() || O("vvid", i = I(), -1), null != e && "" != e) {
  137. var r = { operid: e, uuid: a, vvid: i, fog: c.fog, userid: s.userid, fes: l.fes, sou: l.sou, url: encodeURIComponent(t || window.location.href), remark: encodeURIComponent(n || "") };
  138. $.ajax({ url: u + "/burypoint/logid", type: "POST", contentType: "application/json", data: JSON.stringify(r) }).then((function(e) {}))
  139. }
  140. }
  141. function k(e) { var n, t = new RegExp("(^| )" + e + "=([^;]*)(;|$)"); return (n = document.cookie.match(t)) ? unescape(n[2]) : null }
  142. function O(e, n, t) {
  143. t = null == t ? 0 : t;
  144. var o = new Date;
  145. t < 0 ? document.cookie = e + "=" + escape(n) : (o.setTime(o.getTime() + t), document.cookie = e + "=" + escape(n) + ";expires=" + o.toGMTString())
  146. }
  147. function I() { return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, (function(e) { var n = 16 * Math.random() | 0; return ("x" == e ? n : 3 & n | 8).toString(16) })) }
  148. function T() {
  149. var e = navigator.userAgent.indexOf("Baidu") > -1;
  150. if (e) return e;
  151. var n = navigator.userAgent.indexOf("OPR") > -1,
  152. t = navigator.userAgent.indexOf("Firefox") > -1,
  153. o = navigator.userAgent.indexOf("UCBrowser");
  154. if (!n || !t || !o) return !1;
  155. var a = navigator.userAgent.indexOf("MicroMessenger") > -1,
  156. i = navigator.userAgent.indexOf("Safari") > -1,
  157. r = navigator.userAgent.indexOf("Chrome") > -1;
  158. return a || e || i || r
  159. }
  160. t(1);
  161. function S(e) {
  162. if (location.href.indexOf("/index") < 0) return null != e && "" != e || (e = "index.html"), void(window.location.href = e + "?fes=" + l.fes + "&sou=" + l.sou);
  163. $("#btn-order").unbind("click").on("click", (function(e) {
  164. var n;
  165. "1" != $(n || document.body).data("use") && ($(n || document.body).data("use", "1"), 1) && (function(e, n, t, r, d, u) {
  166. var f, v, p, g;
  167. m = !1, null != e && null == c.fog && (c.fog = e), t || $("body").css("overflow", "hidden"), window.location.href.indexOf("https://800.wo.cn/orderchannel") >= 0 ? (f = "https://800.wo.cn/cap/CAP-AUTH.html", v = "https://800.wo.cn/") : window.location.href.indexOf("https://800.wo.cn/festivalchannel") >= 0 ? (f = "https://800.wo.cn/festivalcap/CAP-AUTH.html", v = "https://800.wo.cn/") : window.location.href.indexOf("http://localhost") >= 0 ? (f = "http://localhost:8088/cap/CAP-AUTH.html", v = "http://localhost:8088/") : window.location.href.indexOf("http://127.0.0.1") >= 0 ? (f = "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 ? (f = "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 ? (f = "http://100.0.4.69:8282/cap/CAP-AUTH.html", v = "http://100.0.4.69:8282/") : (f = "https://800.wo.cn/festivalcap/CAP-AUTH.html", v = "https://800.wo.cn/"), null != $("#nanyanad").val() && (f += "?ad=" + $("#nanyanad").val()), (p = $("#uniauthframe").length >= 1 ? $("#uniauthframe").attr("src", f) : $('<iframe id="uniauthframe" src="' + f + '"></iframe>')).css({ width: "100%", height: "100%", position: "fixed", top: 0, left: 0, margin: 0, padding: 0, "-webkit-overflow-scrolling": "touch", border: "0px" }), a(), p.on("load", (function() { $capoverlay.remove(), w(e).then((function(e) { i(), e.orderChannel = l.fes + "_" + l.sou, null != n && "" != n && (e.productName = n), null != u && "" != u && (e.capTemplet = u); try { p[0].contentWindow.postMessage(JSON.stringify(e), v) } catch (e) {} })) })), navigator.userAgent.indexOf("MicroMessenger") >= 0 && (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));
  168. 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");
  169. var b = $.Deferred();
  170. return window.addEventListener("message", (function e(n) {
  171. var t = JSON.parse(n.data);
  172. switch (t.resultcode) {
  173. case "0":
  174. p.remove(), $capoverlay.remove(), window.removeEventListener("message", e), $("body").css("overflow", "auto"), clearInterval(window.capTimer), s.token = t.token, s.userid = decodeURIComponent(t.userid), s.userid1 = t.userid1, s.usermob = t.usermob, s.usertime = (new Date).getTime(), d && h();
  175. try { window.HtmlPageVisitor && window.HtmlPageVisitor.setMp(t.usermob) } catch (e) {}
  176. b.resolve(s);
  177. break;
  178. case "9001":
  179. p.remove(), $capoverlay.remove(), window.removeEventListener("message", e), clearInterval(window.capTimer), $("body").css("overflow", "auto"), b.reject(t), null != r && r && !m && ("1" == l.test && alert(navigator.userAgent), T() && (m = !0, history.back()));
  180. break;
  181. case "0001":
  182. case "0003":
  183. case "0006":
  184. case "4444":
  185. break;
  186. case "99999":
  187. t.operid && x(t.operid), t.ea && WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: t.ea + $("#nanyanlabel").val(), ct: "web", pm: parseInt(y("sou"), 32) });
  188. break;
  189. default:
  190. p.remove(), $capoverlay.remove(), window.removeEventListener("message", e), $("body").css("overflow", "auto"), clearInterval(window.capTimer), o(t.errorinfo), b.reject(t)
  191. }
  192. })), b
  193. }(null, null, !1, !1, !0).then((function(e) {
  194. var n, t, o;
  195. r(), n = e.userid, t = e.token, o = e.usermob, a("处理中,请稍后..."),
  196. function(e, n, t, o) { var a = { fes: l.fes, sou: l.sou, fog: c.fog, token: n, userid: e || s.userid, usermob: t || s.usermob, useraccount: "", f: l.F, ringid: o || l.ringid }; return $.ajax({ url: u + "/comm/order", type: "POST", contentType: "application/json", data: JSON.stringify(a) }) }(n, t, o).done((function(e) {
  197. switch (i(), e.resultCode) {
  198. case "0000":
  199. return g(), j("订购成功!"), void WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_success" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  200. case "0013":
  201. j("该号码归属省分2/3G暂未开通此产品!"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  202. break;
  203. case "6611":
  204. j("错误代码(6611),订购失败,请重试!"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  205. break;
  206. case "6615":
  207. j("订购失败,请确定用户套餐!"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  208. break;
  209. case "6622":
  210. j("您已经订购了本产品~"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) }), g();
  211. break;
  212. default:
  213. j(e.errorInfo + ",订购失败,请确定用户套餐!")
  214. }
  215. })).fail((function(e) { i(), console.log(e) }))
  216. })).fail((function(e) { r() })), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "order_click_order_btn" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) }))
  217. }))
  218. }
  219. function _(e) {
  220. if (location.href.indexOf("draw.html") < 0) window.location.href = "draw.html?fes=" + l.fes + "&sou=" + l.sou + "&back=" + (null == e ? "" : e) + "&pid=" + c.productid;
  221. else {
  222. c = d[2020010201];
  223. var n = $(".section-login").find(".form-group");
  224. n.find(".sendcode").unbind("click").on("click", (function() {
  225. var e = n.find(".account").val();
  226. new Array;
  227. 1 == e.split(" ").length ? null != e && "" != e ? (v(n, "drawlogin", d[2020010201]), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_click_send_sms_code_btn" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })) : o("请输入抖音短视频账号") : o("抖音短视频账号不能含有空格")
  228. })), n.find(".login").unbind("click").on("click", (function() {
  229. var e = n.find(".usermob").val(),
  230. t = n.find(".account").val(),
  231. r = n.find(".smscode").val();
  232. if (null != e && "" != e) {
  233. new Array;
  234. if (1 == t.split(" ").length)
  235. if (null != t && "" != t)
  236. if (null != r && "" != r) {
  237. var d = function(e) {
  238. var n = $('<div class="overlay"></div>'),
  239. 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>');
  240. 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
  241. }(t);
  242. d.find(".cancel").on("click", (function() { i() })), d.find(".okay").on("click", (function() {
  243. p(n, !0).done((function() {
  244. ! function(e) {
  245. a(),
  246. function(e, n, t, a) { if (null == e || "" == e.trim()) { o("获取账号信息失败"); var i = $.Deferred(); return i.reject(), i } var r = { fes: l.fes, sou: l.sou, fog: c.fog, userid: t || s.userid, usermob: a || s.usermob, uid: e, screen_name: n || "" }; return $.ajax({ url: u + "/coin/draw", type: "POST", contentType: "application/json", data: JSON.stringify(r) }) }(e, "").done((function(e) {
  247. switch (i(), e.resultCode) {
  248. case "0000":
  249. var n = $(".section-login").find(".form-group");
  250. n.find(".usermob").val(""), n.find(".smscode").val(""), n.find(".account").val(""), j("抖币充值中,详情结果以短信形式告知").then((function() { null != l.back && "" != l.back && S(l.back + ".html") })), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_success" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  251. break;
  252. case "7605":
  253. j(e.errorInfo), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  254. break;
  255. case "6776":
  256. j((t = "") + e.errorInfo), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  257. break;
  258. default:
  259. var t = "";
  260. e.errorInfo.indexOf("领取失败") < 0 && (t = "领取失败,"), j(t + e.errorInfo), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })
  261. }
  262. })).fail((function(e) { i() }))
  263. }(t)
  264. })).fail((function(e) { i() })), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "draw_click_confirm_btn" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })
  265. }))
  266. } else o("请输入验证码");
  267. else o("请输入抖音短视频账号");
  268. else o("抖音短视频账号不能含有空格")
  269. } else o("请输入联通手机号")
  270. }))
  271. }
  272. }
  273. function P() {
  274. var e = JSON.parse(window.localStorage.getItem("kye"));
  275. if (location.href.indexOf("cancel202204.html") < 0) window.location.href = "cancel202204.html?fes=" + l.fes + "&sou=" + l.sou + "&pid=" + c.productid;
  276. else {
  277. var n = $(".section-login").find(".form-group");
  278. n.find(".sendcode").unbind("click").on("click", (function() { v(n, "cancellogin"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "cancel_click_send_sms_code_btn" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) }) })), n.find(".login").unbind("click").on("click", (function() {
  279. a(), p(n).done((function() {
  280. var n, t, o, a, r;
  281. (n = null, t = null, o = e.canceltype, a = e.cancelmsg, r = { fes: l.fes, sou: l.sou, fog: c.fog, userid: n || s.userid, usermob: t || s.usermob, canceltype: encodeURIComponent(o), cancelmsg: encodeURIComponent(a), useraccount: "" }, $.ajax({ url: u + "/comm/cancel", type: "POST", contentType: "application/json", data: JSON.stringify(r) })).done((function(e) {
  282. switch (i(), e.resultCode) {
  283. case "0000":
  284. j("退订成功!"), window.localStorage.clear(), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "cancel_success" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  285. break;
  286. case "7605":
  287. j(e.errorInfo), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "cancel_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) });
  288. break;
  289. default:
  290. var n = "";
  291. e.errorInfo.indexOf("退订失败") < 0 && (n = "退订失败,"), j(n + e.errorInfo), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "cancel_failure" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })
  292. }
  293. })).fail((function(e) { i() }))
  294. })).fail((function(e) { i() })), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "click", ea: "cancel_click_confirm_btn" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })
  295. })), window.scrollTo(0, 0)
  296. }
  297. }
  298. function A(e) { null != d[e] && (c = d[e], "2018072301" == e ? ($("body").addClass("body-9"), $(".banner-text").addClass("banner-text-9")) : ($("body").removeClass("body-9"), $(".banner-text").removeClass("banner-text-9")), window.location.href.indexOf("/index") >= 0 ? (localStorage.setItem("pid", e), localStorage.setItem("pidtime", (new Date).getTime()), "2018072301" == e ? ($("body").addClass("body-9"), $(".item-15").addClass("item-15-inactive"), $(".item-9").removeClass("item-9-inactive"), x("200010")) : ($("body").removeClass("body-9"), $(".item-15").removeClass("item-15-inactive"), $(".item-9").addClass("item-9-inactive"), x("200011"))) : window.location.href.indexOf("cancel.html") >= 0 && ("2018072301" == e ? ($(".agr-15").css({ display: "none" }), $(".agr-9").css({ display: "block" })) : ($(".agr-15").css({ display: "block" }), $(".agr-9").css({ display: "none" })))) }
  299. function j(e) {
  300. var n = $('<div class="overlay"></div>'),
  301. t = $('<div class="dialog dialog-message"> <div class="content">' + e + '</div> <div class="actions"> <div class="btn"></div> </div></div>');
  302. n.appendTo($(document.body)), t.appendTo($(document.body)), $("body").css("overflow", "hidden"), t.find(".btn").unbind("click").on("click", (function() { t.close() }));
  303. var o = $.Deferred();
  304. return t.close = function() { n.remove(), t.remove(), t = null, $("body").css("overflow", "auto"), o.resolve(t) }, o
  305. }
  306. $((function() {
  307. var e = !1;
  308. if (window.addEventListener("pageshow", (function() { e && window.location.reload() })), window.addEventListener("pagehide", (function() { e = !0 })), window.location.href.indexOf("draw.html") >= 0) {
  309. var n = JSON.parse(localStorage.getItem("user"));
  310. null != n && $(".usermob").val(n.usermob)
  311. }
  312. })),
  313. function() {
  314. var e = localStorage.getItem("message");
  315. null != e && "" != e && (o(e), localStorage.removeItem("message"));
  316. a(), f().then((function(e) {
  317. if (i(), function(e) {
  318. if (l.userid) return s.userid = l.userid, void(s.usermob = l.usermob);
  319. try {
  320. var n = localStorage.getItem("time" + c.productid);
  321. if (n) {
  322. if ((new Date).getTime() <= parseFloat(n) + (e || 36e5)) {
  323. var t = localStorage.getItem("user" + c.productid);
  324. null != t && ((s = JSON.parse(t)).userid = s.userid, s.usermob = s.usermob)
  325. } else localStorage.removeItem("time" + c.productid), localStorage.removeItem("user" + c.productid);
  326. return s
  327. }
  328. localStorage.removeItem("time" + c.productid), localStorage.removeItem("user" + c.productid)
  329. } catch (e) {}
  330. }(), location.href.indexOf("/index") >= 0) {
  331. var n = localStorage.getItem("pid"),
  332. t = localStorage.getItem("pidtime"),
  333. o = "2020010201";
  334. null != t && (new Date).getTime() - t < 12e4 && null != d[n] && (o = n), location.href.indexOf("/index.html") >= 0 || location.href.indexOf("/index9.html") >= 0 ? o = "2018072301" : location.href.indexOf("/index15.html") >= 0 && (o = "2020010201"), A(o), S()
  335. } else ! function(e) {
  336. null == e && (location.href.indexOf("/index") >= 0 && (e = "order"), location.href.indexOf("cancel202204.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"));
  337. switch (e) {
  338. case "cancel":
  339. P();
  340. break;
  341. case "draw":
  342. _();
  343. break;
  344. default:
  345. S()
  346. }
  347. A(l.pid)
  348. }();
  349. location.href.indexOf("/cancel202204") >= 0 ? (x("110002"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: "cancel_open" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })) : location.href.indexOf("/draw") >= 0 ? (x("110003"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: "draw_open" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })) : location.href.indexOf("/flow") >= 0 ? (x("110004"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: "flow_open" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })) : location.href.indexOf("/active") >= 0 ? (x("110005"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: "active_open" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) })) : location.href.indexOf("/refund") >= 0 ? x("110006") : (x("110001"), WoAnalytics.addPoint({ ad: $("#nanyanad").val(), ett: "open", ea: "order_open" + $("#nanyanlabel").val(), ct: "web", pm: parseInt(l.sou, 32) }))
  350. }))
  351. }(), $(".gotoCancelPage").each((function(e, n) {
  352. $(n).unbind("click").on("click", (function() {
  353. (function() {
  354. var e, n;
  355. window.location.href.indexOf("https://800.wo.cn/orderchannel") >= 0 ? (e = "https://800.wo.cn/orderchannel/public/libs/cancelreason/indexs.html", "https://800.wo.cn/") : window.location.href.indexOf("https://800.wo.cn/festivalchannel") >= 0 ? (e = "https://800.wo.cn/festivalchannel/public/libs/cancelreason/indexs.html", "https://800.wo.cn/") : window.location.href.indexOf("http://localhost") >= 0 ? (e = "http://localhost:8088/orderchannel/public/libs/cancelreason/indexs.html", "http://localhost:8088/") : window.location.href.indexOf("http://127.0.0.1") >= 0 ? (e = "http://127.0.0.1:8088/orderchannel/public/libs/cancelreason/indexs.html", "http://127.0.0.1:8088/") : window.location.href.indexOf("http://100.0.4.69:3344") >= 0 ? (e = "http://100.0.4.69:3344/orderchannel/public/libs/cancelreason/indexs.html", "http://100.0.4.69:3344/") : window.location.href.indexOf("http://100.0.4.69:8282") >= 0 ? (e = "http://100.0.4.69:8282/orderchannel/public/libs/cancelreason/indexs.html", "http://100.0.4.69:8282/") : (e = "https://800.wo.cn/orderchannel/public/libs/cancelreason/indexs.html", "https://800.wo.cn/");
  356. window.$capoverlay = $('<div class="overlay" style="z-index: 0; background-color: rgba(0,0,0,0.0)!important;"></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));
  357. 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 });
  358. var t = $.Deferred();
  359. return window.addEventListener("message", (function e(o) {
  360. var a = JSON.parse(o.data);
  361. n.remove(), $capoverlay.remove(), $("body").css("overflow", "auto"), window.removeEventListener("message", e), "close" != a.eventtype ? t.resolve(a) : t.reject(a)
  362. })), t
  363. })().done((function(e) {
  364. var n = JSON.stringify(e);
  365. window.localStorage.setItem("kye", n), P()
  366. }))
  367. }))
  368. })), $("#gotoDrawPage").unbind("click").on("click", (function() { _(window.location.href.substring(window.location.href.lastIndexOf("/") + 1, window.location.href.lastIndexOf("."))) })), $(".product-slider").delegate(".item-9", "click", (function() { A("2018072301") })), $(".product-slider").delegate(".item-15", "click", (function() { A("2020010201") }));
  369. var C = 0,
  370. D = 0;
  371. $(".slider").unbind("touchstart").on("touchstart", (function(e) {
  372. var n = e.targetTouches[0];
  373. C = n.pageX, n.pageY
  374. })), $(".slider").unbind("touchmove").on("touchmove", (function(e) {
  375. var n = e.targetTouches[0];
  376. D = n.pageX, n.pageY
  377. })), $(".slider").unbind("touchend").on("touchend", (function(e) { D - C >= 100 ? A("2020010201") : C - D >= 100 && A("2018072301") }))
  378. }, function(e, n) {}]);