123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta content="width=device-width,height=device-height,maximum-scale=1.0,user-scalable=no" name="viewport">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta content="black" name="apple-mobile-web-app-status-bar-style">
- <meta content="telephone=no" name="format-detection">
- <title>联通头条流量包</title>
- <link rel="stylesheet" href="/orderchannel/tt/css/base.css">
- <link rel="stylesheet" href="/orderchannel/tt/hd/css/pagerz201908.css">
- <script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
- <script src="https://s3.pstatp.com/inapp/toutiao.js"></script>
- <style>
- /* 将取号页面显示在订购页面之上 */
- iframe {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- border: 0px;
- }
- </style>
- <script>
- //头条获取设备号。
- $(document).ready(function() {
- getDeviceId(
- function (device_id) {
- $("#useraccount_tt").attr("value",device_id);
- }
- );
- });
- </script>
- </head>
- <body class="dg_body">
- <input type="hidden" id="useraccount_tt" value="" />
- <input type="hidden" id="fog_tt" />
- <div class="info_banner">
- <script type="text/javascript">
- document.write('<img src="/orderchannel/common/img/ttbanner201908.png?timestamp='+new Date().getTime()+'">');
- </script>
- </div>
- <div class="info_main">
- <ul class="info_data">
- <li class="btn"><input type="button" id="major" value="立即开通" class="red_btn"></li>
- <li id="jh"><p>若您已经订购,请 <a onclick="gotoUrlC('tt/activate')">点击激活</a></p></li>
- </ul>
- <div class="info_notice" >
- <a id="info_a" onclick="on_off_hint()">了解更多产品信息</a>
- </div>
- </div>
- <div class="hint_shadow" style="display:none">
- </div>
- <div class="hint_mian" style="display:none">
- <ul>
- <li class="tips_item" onclick="on_off_hint()"> <span>【活动说明:】</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>1.活动时间:2019年8月1日-8月31日; </span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>2.活动期间订购成功的用户均可享受活动回馈;</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>3.参加活动的用户按9元/月扣费,成功订购用户7个工作日内返还9元话费至订购手机号码(联通OCS智能网用户,不参与此次赠送话费活动);</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>4.参加活动的用户持续订购,次月起不再返还话费;</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>5.话费返还到账请留意短信通知,关于活动如有疑问请咨询联通客服:10010。</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>【免流说明:】</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>1.定向免流量包适用范围包含:抖音APP、今日头条、西瓜视频、火山小视频、多闪、懂车帝、图虫APP。免流内容不包含第三方提供的广告、视频、图片及直播类视频上传、在线观看/下载/缓存第三方视频所产生的流量; </span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>2.UNINET、3GNET 、WONET接入点访问能使用该定向流量,其他接入点不能免流使用;</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>3.如您为头条相关免流卡用户,如蚂蚁宝卡、阿里宝卡、钉钉宝卡或工商银行e卡等其他免头条系产品卡类,将优先使用免流卡产品的流量,免流卡流量用罄后将消耗定向流量包的流量;</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>4.用户成功订购该头条系流量包后,如果遇到页面提示不免流,敬请忽略,正常使用;</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>【业务说明:】</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>1.中国联通手机4G(除冰激凌套餐、懂我卡等)用户,上海、广东、吉林、安徽、浙江、湖北、山东、河南、四川2/3G用户均可订购,4G套餐中的共享类套餐不共享该月包,需单独订购(暂不支持携号转网用户订购);</span></li>
- <li class="tips_item"> <span>2.如您已成功订购流量包,点此<a onclick="gotoUrlC('tt/cancel')" style="color: #ffeb3b">退订</a>。</span></li>
- <li class="tips_item" onclick="on_off_hint()"> <span>关于免流量如有疑问请咨询联通客服:10010。</span></li>
- </ul>
- </div>
- </body>
- <script>
- $('#major').unbind('click').on('click',
- function() {
- //获取用户头条标示
- $("#useraccount_tt").attr("value",getDecice());
- //判断是否能获取到设备号
- //能获取到设备号根据设备号获取手机号
- //获取不到手机号
- $("#major").attr('disabled',true);
- $("body").css("overflow","hidden");
- var $iframe = $('<iframe id="uniauthframe" src="https://cap.chinaunicom.cn/CAP-AUTH/auth-tt.html?_=1480405186462"></iframe>')
- //var $iframe = $('<iframe id="uniauthframe" src="https://cap.chinaunicom.cn/CAP-AUTH/auth-studycode.html?_=1480405186463"></iframe>')
- var params = {
- "PRODUCT_NAME" : "今日头条定向流量9元10G月包",
- "PRODUCT_PRICE" : "9.00元",
- "CLIENT_ID" : "",
- "CLIENT" : "3",
- "SERVICE_ID" : "",
- "AUTH_NO" : "",
- "CLIENT_SECRET" : "",
- "VERSION" : "1.0",
- "SERVICE_PHONE" : "",
- "THEME" : "",
- "PRODUCT_ID" : "8434545",
- "PRODUCT_TYPE" : "1"
- }
- $iframe.on('load',function() {
- $.ajax({
- //请求后项定向服务获取
- url : getRootPath() + "-s1api" + "/ini/clientsecret",
- dataType : "JSON",
- method : "GET",
- success : function(data) {
- params.CLIENT_ID = data.client_id;
- params.AUTH_NO = data.auth_no;
- params.CLIENT_SECRET = data.client_secret;
- console.log(JSON.stringify(params))
- $('#uniauthframe')[0].contentWindow.postMessage(
- JSON.stringify(params),
- "https://cap.chinaunicom.cn/CAP-AUTH/")
- }
- })
- })
- $('body').append($iframe);
- //监听统一认证结果
- window.addEventListener('message', function(e) {
- var data = JSON.parse(e.data);
- switch (data.RSP.RSP_CODE) {
- case "0000": //处理成功 $("body").css("overflow","auto");
- $('iframe').remove();
- order(data, 'tt');
- break;
- case "0001"://auth_no无效 (入参流水)
- $("#major").val("认证失败!");
- $("#major").attr('disabled',false);
- case "0003"://client_id不存在 (注册id存在问题)
- $("#major").val("认证失败!");
- $("#major").attr('disabled',false);
- case "4444"://服务暂时不可用(系统忙/系统队列满)
- $("#major").val("服务暂时不可用!");
- $("#major").attr('disabled',false);
- case "9001"://关闭H5认证页面
- $("#major").attr('disabled',false);
- $('iframe').remove();
- $("body").css("overflow","auto");
- break;
- }
- }, false);
- })
- </script>
- <script type="text/javascript">
- document.write('<link rel="stylesheet" href="/orderchannel/tt/hd/css/order201908.css?timestamp='+new Date().getTime()+'" charset="utf-8">');
- document.write('<script src="/orderchannel/tt/js/tuil.js?timestamp='+new Date().getTime()+'" type="text/javascript" charset="utf-8"><\/script>');
- document.write('<script src="/orderchannel/tt/js/order.js?timestamp='+new Date().getTime()+'" type="text/javascript" charset="utf-8"><\/script>');
- document.write('<script src="/orderchannel/tt/hd/js/hint.js?timestamp='+new Date().getTime()+'" type="text/javascript" charset="utf-8"><\/script>');
- </script>
- </html>
|