123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- import * as unicom from "../../../public/js/unicom.js";
- import * as douyin from "../../../public/js/douyin.js";
- import * as compnt from "../../../public/js/compnt.js";
- $(document).ready(function() {
- var newVisitor = isNewVisitor(); // 如果是新访客
- if (newVisitor === true) {
- // 动画弹出消息框
- compnt.showAlertlt('活动期间成功订购产品,可返5元话费。快来参与吧!');
- // 标记:已经向该访客弹出过消息。2个月之内不要再弹
- setCookie("gznotes-visited9", "true", 93);
- }
- });
- function isNewVisitor() {
- // 从cookie读取“已经向访客提示过消息”的标志位
- var flg = getCookie("gznotes-visited9");
- if (flg === "") {
- return true;
- } else {
- return false;
- }
- }
- // 写cookie
- function setCookie(cname, cvalue, exdays) {
- var d = new Date();
- d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
- var expires = "expires=" + d.toUTCString();
- document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/";
- }
- // 读cookie
- function getCookie(cname) {
- var name = cname + "=";
- var ca = document.cookie.split(';');
- for (var i = 0; i < ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') c = c.substring(1);
- if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
- }
- return "";
- }
- unicom.query.fes = unicom.getUrlParam('fes');
- unicom.query.sou = unicom.getUrlParam('sou');
- //unicom.query.activityid = unicom.getUrlParam('activityid');
- unicom.getRootPath();
- var prouctName = '';
- var fes = unicom.getUrlParam("fes");
- var sou = unicom.getUrlParam("sou");
- var activityid = window.activityid || '';
- // 2020春节活动页面
- if (unicom.getNowFormatDate() < 20200220) {
- if (window.location.href.indexOf("hd/Dy/order.html") > 0) {
- /* 春节活动
- if (fes == "9uq" &&
- (sou == "2h" || sou == "1g" || sou == "1h" || sou == "15" || sou == "47"
- || sou == "2k" || sou == "18" || sou == "4a" || sou == "12")) {
- window.location.href = 'https://800.wo.cn/orderchannel/hd/Dy/spring.html?fes=9uq&sou=' + sou;
- }*/
- /* 为武汉助力活动 */
- //if (fes == '9on' && (sou=='1m' || sou == '4d' || sou == '2l' || sou == '4g')) {//短彩
- // window.location.href = 'https://800.wo.cn/orderchannel/hd/Dy/order20200131.html?fes=9on&sou=' + sou;
- //}
- }
- }
- // 抗击疫情,温暖同行,2020-02-12
- // 根据fes 判断应该显示 9元9G,一版是9元10G
- if (unicom.getNowFormatDate() < 20200630) {
- if ((window.location.href.indexOf("hd/Dy/order.html") > 0) && (fes == "jh3" || fes == "jh4")) {
- window.location.href = 'https://800.wo.cn/orderchannel/hd/Dy/order20200212.html?fes=' + fes + '&sou=' + sou;
- } else if (window.location.href.indexOf("hd/Dy/order20200212.html") > 0) {
- if (fes == "jh3") {
- $('.banner img').attr('src', '../../hd/Dy/images/wntx-9g.png');
- prouctName = '9元9G今日头条国内定向流量';
- } else {
- $('.banner img').attr('src', '../../hd/Dy/images/wntx-10g.png');
- prouctName = '9元10G今日头条国内定向流量';
- }
- }
- }
- if (window.location.href.indexOf("order.html") && unicom.getUrlParam("fes") == '9on') {
- if (unicom.getUrlParam("sou") == '3k' || unicom.getUrlParam("sou") == '3l') {
- window.location.href = 'https://800.wo.cn/orderchannel/hd/Dy/ordersfty.html?fes=9p3&sou=' + unicom.getUrlParam("sou");
- }
- }
- if (window.location.href.indexOf("order.html") && unicom.getUrlParam("fes") == '9p4') {
- if (unicom.getUrlParam("sou") == '2l') {
- window.location.href = 'https://800.wo.cn/orderchannel/hd/Dy/orderqh.html?fes=9p4&sou=2l'
- }
- }
- WoAnalytics.addPoint({ ad: $('#nanyanad').val(), ett: 'open', ea: 'order_open' + $('#nanyanlabel').val(), ct: 'web', pm: parseInt(unicom.getUrlParam("sou"), 32) })
- $('#major').unbind('click').on('click', function() {
- var fog = $('#fog_tt').val();
- unicom.showCapPage(fog, prouctName).then(function(user) {
- if (unicom.getNowFormatDate() < 20200128) {
- $('#sendsms_order_tt').val('910');
- }
- user.usermob = "17601768237";
- douyin.order(user, 'tt', activityid);
- }).fail(function(response) {
- $('iframe').remove();
- $("body").css("overflow", "auto");
- })
- WoAnalytics.addPoint({ ad: $('#nanyanad').val(), ett: 'click', ea: 'order_click_order_btn' + $('#nanyanlabel').val(), ct: 'web', pm: parseInt(unicom.getUrlParam("sou"), 32) })
- })
|