|
@@ -0,0 +1,638 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html>
|
|
|
+
|
|
|
+<head>
|
|
|
+ <title>陪你学一夏,全能宝贝大比拼</title>
|
|
|
+ <!--#include virtual="/h5v2/htm2/head.htm" -->
|
|
|
+ <style type="text/css">
|
|
|
+ body {
|
|
|
+ width: 1280px;
|
|
|
+ height: 720px;
|
|
|
+ overflow: hidden;
|
|
|
+ background: url(img/bg.jpg) no-repeat 0 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_focus_btn {
|
|
|
+ border: 3px solid #fff;
|
|
|
+ border-radius: 20px;
|
|
|
+ box-shadow: 0px 0px 10px #3794e2;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea {
|
|
|
+ width: 175px;
|
|
|
+ height: 258px;
|
|
|
+ border: 4px solid #fff8d3;
|
|
|
+ border-radius: 15px;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_focus_midea {
|
|
|
+ border: 4px solid #51a546;
|
|
|
+ box-shadow: 0px 0px 10px #3794e2;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea_0 {
|
|
|
+ width: 176px;
|
|
|
+ height: 258px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ left: 123px;
|
|
|
+ top: 394px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea_1 {
|
|
|
+ width: 176px;
|
|
|
+ height: 258px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ left: 338px;
|
|
|
+ top: 394px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea_2 {
|
|
|
+ width: 176px;
|
|
|
+ height: 258px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ left: 552px;
|
|
|
+ top: 394px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea_3 {
|
|
|
+ width: 176px;
|
|
|
+ height: 258px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ left: 767px;
|
|
|
+ top: 394px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .midea_4 {
|
|
|
+ width: 176px;
|
|
|
+ height: 258px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: absolute;
|
|
|
+ left: 980px;
|
|
|
+ top: 394px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #mideaGroup img {
|
|
|
+ width: 100%;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ div#default_tip_css {
|
|
|
+ position: absolute;
|
|
|
+ left: 340px;
|
|
|
+ top: 325px;
|
|
|
+ padding: 30px 50px;
|
|
|
+ width: 600px;
|
|
|
+ height: 150px;
|
|
|
+ background-color: #4c4a4b;
|
|
|
+ border-radius: 10px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 36px;
|
|
|
+ color: #ffffff;
|
|
|
+ border: solid 2px #ffffff;
|
|
|
+ margin: auto;
|
|
|
+ z-index: 333;
|
|
|
+ visibility: hidden;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+
|
|
|
+ <div id="indexDiv"></div>
|
|
|
+ <div id="mideaGroup"></div>
|
|
|
+ <div id="ruleDiv" style="visibility:hidden;"></div>
|
|
|
+
|
|
|
+ <!--#include virtual="/h5v2/htm2/foot.htm" -->
|
|
|
+ <!--#include virtual="activity_cfg.htm" -->
|
|
|
+ <script type="text/javascript">
|
|
|
+ // 记录用户
|
|
|
+ function addUser(fn) {
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?m=Home&c=DuduApi&a=addUser",
|
|
|
+ data: {
|
|
|
+ uid: uid,
|
|
|
+ UserToken: UserToken
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ fn && fn(res);
|
|
|
+ },
|
|
|
+ error: function() {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ // 主题统计
|
|
|
+ function addData(fn) {
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?m=Home&c=ThemeData&a=addData",
|
|
|
+ data: {
|
|
|
+ uid: uid,
|
|
|
+ theme_code: 'looktv'
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ fn && fn(res);
|
|
|
+ },
|
|
|
+ error: function() {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //鉴权
|
|
|
+ function authorization(fn) {
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?m=Home&c=order&a=contentCTCAuth",
|
|
|
+ data: {
|
|
|
+ contentcode: ACTIVITY_CFG.CONTENT_CODE,
|
|
|
+ userid: uid, //1.0
|
|
|
+ uid: uid, //2.0
|
|
|
+ usertoken: UserToken,
|
|
|
+ mac: mac,
|
|
|
+ version: version,
|
|
|
+ fromsource: fromsource
|
|
|
+ },
|
|
|
+ type: "post",
|
|
|
+ dataType: "json",
|
|
|
+ success: function(res) {
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data.result == 0) {
|
|
|
+ dudu_is_vip = 1;
|
|
|
+ } else {
|
|
|
+ dudu_is_vip = 0;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ dudu_is_vip = 0;
|
|
|
+ }
|
|
|
+ fn && fn();
|
|
|
+ },
|
|
|
+ error: function() {
|
|
|
+ fn && fn();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ //统计
|
|
|
+ function payResult() {
|
|
|
+ if (dudu_is_vip == 1) {
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?m=Home&c=DuduApi&a=payResult",
|
|
|
+ data: {
|
|
|
+ uid: uid,
|
|
|
+ product_id: mid_product_id,
|
|
|
+ pay_result: 0
|
|
|
+ },
|
|
|
+ success: function(res) {},
|
|
|
+ error: function() {}
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function fullscreenPlay(mid, idx) {
|
|
|
+ idx = idx || 0;
|
|
|
+ var playIntent = {
|
|
|
+ package: "com.hunantv.operator",
|
|
|
+ action: "mangotv://com.hunantv.operator/player/vod",
|
|
|
+ data: "",
|
|
|
+ extras: {
|
|
|
+ "video_index": idx,
|
|
|
+ "media_asset_id": mid, //媒资包
|
|
|
+ },
|
|
|
+ flags: []
|
|
|
+ };
|
|
|
+ Webview.sendIntent("startActivity", playIntent);
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ function stopPlay() {
|
|
|
+ try {
|
|
|
+ starcorExt.stopVideo();
|
|
|
+ } catch (e) {}
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ starcorExt.setHandler("Resume", function(isResumed) {
|
|
|
+ if (isResumed) { //从全屏或设置键回来
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (e) {}
|
|
|
+ var uid = PageH5.getParam('uid') || '0100834547692768574';
|
|
|
+ var usertoken = "00139025650832263889980824152950"
|
|
|
+ var mac = 'OC-41-E9-DD-EC-DE'
|
|
|
+ var version = "YYS.4.6.15.266.5.HNDX.0.0_Release"
|
|
|
+ try {
|
|
|
+ uid = Webview.readSystemProp('user.id'); //用户ID
|
|
|
+ UserToken = Webview.readSystemProp('user.token'); //用户令牌
|
|
|
+ mac = Webview.readSystemProp('device.mac'); //机顶盒mac地址
|
|
|
+ version = Webview.readSystemProp('app.version'); //APK版本号
|
|
|
+ } catch (e) {}
|
|
|
+ var linkImage = CONFIG.SPACER; //透明图片
|
|
|
+ var buttons = []; //按钮数组
|
|
|
+
|
|
|
+ var act_id = ACTIVITY_CFG.ACT_ID,
|
|
|
+ act_code = ACTIVITY_CFG.ACT_CODE; //活动id及code
|
|
|
+
|
|
|
+ var fromsource = ACTIVITY_CFG.FROM_SOURCE, //来源,电信4,联通5
|
|
|
+ dudu_is_vip = 0, //1是会员,0是非会员
|
|
|
+ mid_product_id = '', //记录订购成功时候用
|
|
|
+ ruleDivIsShow = false, //规则是否展开
|
|
|
+ remainTimes = 0; //游戏剩余次数
|
|
|
+ var prizeImg = ''; //获奖时的图片
|
|
|
+ var isLock = false; //是否锁住按键
|
|
|
+
|
|
|
+ var title_idx = PageH5.getParam('titleIdx') ? PageH5.getParam('titleIdx') : 0; //titleIdx
|
|
|
+ var f = PageH5.getParam('f');
|
|
|
+ if (PageH5.cookie.get('focusMark')) {
|
|
|
+ var focusMark = JSON.parse(PageH5.cookie.get('focusMark'));
|
|
|
+ if (focusMark.title_idx)
|
|
|
+ title_idx = focusMark.title_idx;
|
|
|
+ if (focusMark.focus)
|
|
|
+ f = focusMark.focus;
|
|
|
+ PageH5.cookie.set('focusMark', '');
|
|
|
+ }
|
|
|
+
|
|
|
+ var midea = [
|
|
|
+ [{ //语言
|
|
|
+ 'name': '可爱巧虎岛 第五季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000048000000082109',
|
|
|
+ }, {
|
|
|
+ 'name': '小猪佩奇 全集',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000043000000296717',
|
|
|
+ }, {
|
|
|
+ 'name': '超级宝贝JOJO',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000025000000333852',
|
|
|
+ }, {
|
|
|
+ 'name': '我的汤姆猫短片',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000014000000323353',
|
|
|
+ }, {
|
|
|
+ 'name': '海绵宝宝 第九季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000030000000345063',
|
|
|
+ }],
|
|
|
+ [{ //国学
|
|
|
+ 'name': '宝宝巴士之奇妙汉字 第一季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000043000000266913',
|
|
|
+ }, {
|
|
|
+ 'name': '贝乐虎古诗',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000031000000254351',
|
|
|
+ }, {
|
|
|
+ 'name': '贝乐虎三字经',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000015000000381334',
|
|
|
+ }, {
|
|
|
+ 'name': '猫小帅古诗',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000028000000271453',
|
|
|
+ }, {
|
|
|
+ 'name': '兔小贝成语学堂',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000032000000022865',
|
|
|
+ }],
|
|
|
+ [{ //才艺
|
|
|
+ 'name': '超级飞侠唱儿歌',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000032000000022701',
|
|
|
+ }, {
|
|
|
+ 'name': '超级飞侠画世界',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000036000000264704',
|
|
|
+ }, {
|
|
|
+ 'name': '超级飞侠彩笔画 第二季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000040000000325516',
|
|
|
+ }, {
|
|
|
+ 'name': '小鸡彩虹舞台秀第六季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000037000000327175',
|
|
|
+ }, {
|
|
|
+ 'name': '芭比之梦想豪宅全集',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000002000000074481',
|
|
|
+ }],
|
|
|
+ [{ //巧手
|
|
|
+ 'name': '小伶玩具',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000007000000166844',
|
|
|
+ }, {
|
|
|
+ 'name': '和小鹿问问一起做手工',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000047000000295791',
|
|
|
+ }, {
|
|
|
+ 'name': '和迷你卡车学习',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000045000000170689',
|
|
|
+ }, {
|
|
|
+ 'name': '阿哦玩具',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000038000000446889',
|
|
|
+ }, {
|
|
|
+ 'name': '超级飞侠欢乐玩粘土',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000003000000092944',
|
|
|
+ }],
|
|
|
+ [{ //科学
|
|
|
+ 'name': '猪猪侠之恐龙日记 第二季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000025000000316080',
|
|
|
+ }, {
|
|
|
+ 'name': '汪汪队立大功之百科知识',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000014000000236195',
|
|
|
+ }, {
|
|
|
+ 'name': '百变马丁 第六季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000032000000375988',
|
|
|
+ }, {
|
|
|
+ 'name': '阿U学科学 第二季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000001000000000007000000081017',
|
|
|
+ }, {
|
|
|
+ 'name': '超级飞侠大百科 第一季',
|
|
|
+ 'img': '',
|
|
|
+ 'id': '00000000000000000001000000001002',
|
|
|
+ }]
|
|
|
+ ]
|
|
|
+
|
|
|
+ var typeArr = ['gx', 'yy', 'cy', 'ds', 'kx'];
|
|
|
+
|
|
|
+ PageH5.eventHandler = function(keyCode) {
|
|
|
+ if (keyCode == KEY_LEFT && (!isLock)) {
|
|
|
+ PageH5.Button.move('left');
|
|
|
+ } else if (keyCode == KEY_RIGHT && (!isLock)) {
|
|
|
+ PageH5.Button.move('right');
|
|
|
+ } else if (keyCode == KEY_UP && (!isLock)) {
|
|
|
+ PageH5.Button.move('up');
|
|
|
+ } else if (keyCode == KEY_DOWN && (!isLock)) {
|
|
|
+ PageH5.Button.move('down');
|
|
|
+ } else if (keyCode == KEY_ENTER && (!isLock)) {
|
|
|
+ PageH5.Button.click();
|
|
|
+ } else if ((keyCode == KEY_BACK || keyCode == KEY_EXIT) && (!isLock)) {
|
|
|
+ back();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function init() {
|
|
|
+ PageH5.cookie.set('activity_userid', uid);
|
|
|
+ PageH5.cookie.set('activity_is_vip', dudu_is_vip);
|
|
|
+
|
|
|
+ var html = '';
|
|
|
+ html += '<div style="position:absolute;left:1110px;top:18px;"><img id="back" src="./img/btn_back.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:1110px;top:62px;"><img id="rule" src="./img/btn_rules.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:1110px;top:106px;"><img id="medal" src="./img/btn_medal.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:1110px;top:150px;"><img id="check" src="./img/btn_check.png"/></div>';
|
|
|
+
|
|
|
+ html += '<div style="position:absolute;left:114px;top:220px;"><img src="./img/title_0.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:324px;top:220px;"><img src="./img/title_1.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:538px;top:220px;"><img src="./img/title_2.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:748px;top:220px;"><img src="./img/title_3.png"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:960px;top:220px;"><img src="./img/title_4.png"/></div>';
|
|
|
+
|
|
|
+ html += '<div style="position:absolute;left:110px;top:216px;"><img id="title_0" src="' + linkImage + '"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:320px;top:216px;"><img id="title_1" src="' + linkImage + '"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:534px;top:216px;"><img id="title_2" src="' + linkImage + '"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:744px;top:216px;"><img id="title_3" src="' + linkImage + '"/></div>';
|
|
|
+ html += '<div style="position:absolute;left:956px;top:216px;"><img id="title_4" src="' + linkImage + '"/></div>';
|
|
|
+
|
|
|
+ html += '<div class="midea" style="position:absolute;left:120px;top:390px;" id="midea0"></div>';
|
|
|
+ html += '<div class="midea" style="position:absolute;left:335px;top:390px;" id="midea1"></div>';
|
|
|
+ html += '<div class="midea" style="position:absolute;left:549px;top:390px;" id="midea2"></div>';
|
|
|
+ html += '<div class="midea" style="position:absolute;left:764px;top:390px;" id="midea3"></div>';
|
|
|
+ html += '<div class="midea" style="position:absolute;left:977px;top:390px;" id="midea4"></div>';
|
|
|
+ G('indexDiv').innerHTML = html;
|
|
|
+
|
|
|
+ var ruleDivHTML = '<div style="position:absolute;left:0px;top:0px;"><img src="img/rulePopup.jpg" width="1280" height="720"/></div>';
|
|
|
+ ruleDivHTML += '<div style="position:absolute;left:572px;top:645px;"><img id="guize_btn" src="./img/btn_back.png"/></div>';
|
|
|
+ G('ruleDiv').innerHTML = ruleDivHTML;
|
|
|
+
|
|
|
+
|
|
|
+ var guizeBtn = {
|
|
|
+ id: 'guize_btn',
|
|
|
+ action: goGuizeBtn,
|
|
|
+ left: '',
|
|
|
+ right: '',
|
|
|
+ up: '',
|
|
|
+ down: '',
|
|
|
+ focusClass: 'btn',
|
|
|
+ };
|
|
|
+ buttons.push(guizeBtn);
|
|
|
+
|
|
|
+ buttons.push({
|
|
|
+ id: 'back',
|
|
|
+ action: goAction,
|
|
|
+ left: 'start',
|
|
|
+ right: '',
|
|
|
+ up: '',
|
|
|
+ down: 'rule',
|
|
|
+ focusClass: 'btn'
|
|
|
+ });
|
|
|
+ buttons.push({
|
|
|
+ id: 'rule',
|
|
|
+ action: goAction,
|
|
|
+ left: 'start',
|
|
|
+ right: '',
|
|
|
+ up: 'back',
|
|
|
+ down: 'medal',
|
|
|
+ focusClass: 'btn'
|
|
|
+ });
|
|
|
+ buttons.push({
|
|
|
+ id: 'medal',
|
|
|
+ action: goAction,
|
|
|
+ left: '',
|
|
|
+ right: '',
|
|
|
+ up: 'rule',
|
|
|
+ down: 'check',
|
|
|
+ focusClass: 'btn'
|
|
|
+ });
|
|
|
+ buttons.push({
|
|
|
+ id: 'check',
|
|
|
+ action: goAction,
|
|
|
+ left: '',
|
|
|
+ right: '',
|
|
|
+ up: 'medal',
|
|
|
+ down: '',
|
|
|
+ focusClass: 'btn',
|
|
|
+ beforeMove: upBeforeMove,
|
|
|
+ });
|
|
|
+
|
|
|
+ for (var i = 0; i < 5; i++) {
|
|
|
+ var obj = {
|
|
|
+ id: 'title_' + i,
|
|
|
+ index: i,
|
|
|
+ right: 'title_' + (i < 4 ? (i + 1) : i),
|
|
|
+ left: 'title_' + (i > 0 ? (i - 1) : i),
|
|
|
+ up: 'check',
|
|
|
+ down: 'midea' + i,
|
|
|
+ focusHandler: tab,
|
|
|
+ blurHandler: mark,
|
|
|
+ focusImage: './img/title_sel.png'
|
|
|
+ };
|
|
|
+ buttons.push(obj);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < 5; i++) {
|
|
|
+ var obj = {
|
|
|
+ id: 'midea' + i,
|
|
|
+ action: goAction,
|
|
|
+ index: i,
|
|
|
+ right: 'midea' + (i < 4 ? (i + 1) : i),
|
|
|
+ left: 'midea' + (i > 0 ? (i - 1) : i),
|
|
|
+ up: '',
|
|
|
+ down: '',
|
|
|
+ focusClass: 'midea',
|
|
|
+ beforeMove: upBeforeMove,
|
|
|
+ };
|
|
|
+ buttons.push(obj);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (location.search.indexOf('haochuanBag') >= 0) {} else if (location.search.indexOf('childsBag') >= 0) {}
|
|
|
+ PageH5.btn.init([f, 'title_0'], buttons, '', false);
|
|
|
+ PageH5.cookie.del('activity_prize_name');
|
|
|
+ }
|
|
|
+
|
|
|
+ function mark(button) {
|
|
|
+ title_idx = button.index;
|
|
|
+ }
|
|
|
+
|
|
|
+ function upBeforeMove(dir, current) {
|
|
|
+ if ("down" === dir && current.id == "check") {
|
|
|
+ PageH5.btn.set('title_' + title_idx);
|
|
|
+ return false;
|
|
|
+ } else if ("up" === dir && current.id.indexOf('midea') >= 0) {
|
|
|
+ PageH5.btn.set('title_' + title_idx);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function tab(button) {
|
|
|
+ var midea = document.getElementsByClassName('midea');
|
|
|
+ var _html = '';
|
|
|
+ for (var i = 0; i < midea.length; i++) {
|
|
|
+ _html += '<div class="midea_' + i + '"><img src="./img/midea/midea' + button.index + '/' + i + '.jpg" /></div>';
|
|
|
+ }
|
|
|
+ G('mideaGroup').innerHTML = _html;
|
|
|
+ }
|
|
|
+
|
|
|
+ function ajaxWinning(type, status, idx, focusId) {
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?c=Home&c=Activityv2&a=collect",
|
|
|
+ data: {
|
|
|
+ uid: uid,
|
|
|
+ act_code: act_id,
|
|
|
+ type: type,
|
|
|
+ is_vip: dudu_is_vip,
|
|
|
+ run: status,
|
|
|
+ },
|
|
|
+ success: function(res) {
|
|
|
+ if (res.code == 0) {
|
|
|
+ goResult('yes', idx, focusId);
|
|
|
+ } else {
|
|
|
+ goResult('no', idx, focusId);
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ error: function() {
|
|
|
+ goUnusual();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function goResult(result, idx, focusId) {
|
|
|
+ if (result == 'yes') {
|
|
|
+ location.href = './gift.html?prizeImg=./img/title_' + idx + '.png&f=' + focusId + '&titleIdx=' + idx;
|
|
|
+ } else {
|
|
|
+ location.href = './noGift.html?f=' + focusId + '&titleIdx=' + idx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function goUnusual() {
|
|
|
+ location.href = './index.html';
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function goAction(button) {
|
|
|
+ if (button.id == 'back') { //返回
|
|
|
+ back();
|
|
|
+ } else if (button.id == 'rule') { //活动规则
|
|
|
+ S('ruleDiv');
|
|
|
+ ruleDivIsShow = true;
|
|
|
+ PageH5.btn.set('guize_btn');
|
|
|
+ } else if (button.id == 'medal') { //我的勋章
|
|
|
+ location.href = './medalInfo.html?f=' + button.id;
|
|
|
+ } else if (button.id == 'check') { //我的勋章
|
|
|
+ location.href = './winningInfo.html?f=' + button.id;
|
|
|
+ } else if (button.id.indexOf('midea') >= 0) { //内容
|
|
|
+ if (dudu_is_vip == 1) {
|
|
|
+ setInterval(function() {
|
|
|
+ ajaxWinning(typeArr[title_idx], 'uncomplate', title_idx, button.id);
|
|
|
+ }, 10000)
|
|
|
+ fullscreenPlay(midea[title_idx][button.index].id);
|
|
|
+ } else {
|
|
|
+ PageH5.tip('需要订购“少儿包”,才能观看此内容噢!正在跳转订购,请稍等……', 4);
|
|
|
+ setTimeout(function() {
|
|
|
+ order(button.id)
|
|
|
+ }, 4000)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function order(focusId) {
|
|
|
+ PageH5.cookie.set('focusMark', JSON.stringify({
|
|
|
+ 'focus': focusId,
|
|
|
+ 'title_idx': title_idx
|
|
|
+ }));
|
|
|
+ goMyCommonOrder(webUrl + 'h5v2/' + ACTIVITY_CFG.ACT_CODE + '/index.html?haochuanBag=' + uid)
|
|
|
+ }
|
|
|
+
|
|
|
+ function goGuizeBtn(button) {
|
|
|
+ H('ruleDiv');
|
|
|
+ ruleDivIsShow = false;
|
|
|
+ PageH5.btn.set('rule');
|
|
|
+ }
|
|
|
+
|
|
|
+ function back() {
|
|
|
+ if (ruleDivIsShow) {
|
|
|
+ goGuizeBtn(PageH5.btn.get('guize_btn'));
|
|
|
+ } else {
|
|
|
+ var url = ''; // 优先获取url上携带的返回地址
|
|
|
+ var backUrl2 = PageH5.getParam('returnUrl');
|
|
|
+ if (backUrl2 && backUrl2 != 'undefined' && backUrl2 != 'null') {
|
|
|
+ url = backUrl2;
|
|
|
+ } else {
|
|
|
+ Webview.closeBrwoser("返回");
|
|
|
+ // url = CONFIG.CONTEXT_PATH + 'h5v2/index.html?Activity=' + act_id;
|
|
|
+ }
|
|
|
+ location.href = url;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ window.onload = function() {
|
|
|
+ if (!PageH5.getParam('f')) {
|
|
|
+ addUser();
|
|
|
+ addData();
|
|
|
+ }
|
|
|
+ authorization(function() {
|
|
|
+ init();
|
|
|
+ var midea = document.getElementsByClassName('midea');
|
|
|
+ var _html = '';
|
|
|
+ for (var i = 0; i < midea.length; i++) {
|
|
|
+ _html += '<div class="midea_' + i + '"><img src="./img/midea/midea' + title_idx + '/' + i + '.jpg" /></div>';
|
|
|
+ }
|
|
|
+ G('mideaGroup').innerHTML = _html;
|
|
|
+ if (location.search.indexOf('haochuanBag') >= 0) {
|
|
|
+ mid_product_id = ACTIVITY_CFG.PRODUCT_ID;
|
|
|
+ payResult();
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+
|
|
|
+</html>
|