|
@@ -3,7 +3,7 @@
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<meta name="page-view-size" content="1280*720" />
|
|
|
- <link rel="stylesheet" type="text/css" href="./css/page.css?v=201908"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="./css/page.css?v=201909"/>
|
|
|
<title>移动-明侦盲盒活动</title>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -134,29 +134,19 @@
|
|
|
|
|
|
var init = {
|
|
|
prize:0,
|
|
|
- act_id:5,
|
|
|
+ act_id:1,
|
|
|
gameNum:0,
|
|
|
canPrize:0,
|
|
|
oursProduct_isVip:0,
|
|
|
othersProduct_isVip:0,
|
|
|
- contentcode:"D00000001201808211755370019993899",//内容标识
|
|
|
- contentcode1:"D00000001201911281044560065291302"
|
|
|
+ contentcode:"00000001000000000018000000431421",//内容标识
|
|
|
+ contentcode1:"00000001000000000029000000278889",
|
|
|
}
|
|
|
|
|
|
var pageItem = ["box","myBox_btn","page_btn","order_btn"];
|
|
|
// var popupItem = ["rulesBtn","myBoxBtn","unExchangeBtn","unExchangeBtn","exchangeBtn","phoneNum","markDownBtn","unWinToyBtn","unWinToyVipBtn","poster","winToyBtn"]
|
|
|
|
|
|
- var webUrl = '';
|
|
|
- try {
|
|
|
- Webview.setInputTypeTextFlag("true");
|
|
|
- webUrl = 'http://10.255.1.98:8090/DuduToy_v2/';
|
|
|
- } catch (e) {
|
|
|
- if (location.href.indexOf('10.255.1.98:8090') >= 0) {
|
|
|
- webUrl = 'http://10.255.1.98:8090/DuduToy_v2/';
|
|
|
- } else if (location.href.indexOf('10.200.10.28:28090') >= 0) {
|
|
|
- webUrl = 'http://10.200.10.28:28090/DuduToy_v2/';
|
|
|
- }
|
|
|
- }
|
|
|
+ var webUrl = 'http://111.23.13.123:8091/';
|
|
|
|
|
|
try{
|
|
|
var uid = Webview.readSystemProp('user.id');
|
|
@@ -164,10 +154,10 @@
|
|
|
var mac = Webview.readSystemProp('device.mac');//机顶盒mac地址
|
|
|
var version = Webview.readSystemProp('app.version');//APK版本号
|
|
|
} catch(e) {
|
|
|
- var uid = getStr("uid") || '6830011';
|
|
|
- var usertoken = "00139025650832263889980824152950"
|
|
|
- var mac = 'OC-41-E9-DD-EC-DE'
|
|
|
- var version = "YYS.4.6.15.266.5.HNDX.0.0_Release"
|
|
|
+ var uid = getStr("uid") || '0100834547692768574';
|
|
|
+ var usertoken = "CB89C105577A4E5344E7EC39F993A4B6"
|
|
|
+ var mac = 'OC-49-33-BF-10-A6'
|
|
|
+ var version = "YYS.5.7.7.Y3.4.HNYD.0.0_Beta"
|
|
|
}
|
|
|
|
|
|
var backUrl = webUrl+'h5v2/yd20191203/index.html';
|
|
@@ -282,22 +272,26 @@
|
|
|
},
|
|
|
phoneNum:{
|
|
|
line:6,
|
|
|
- // up:["exchangeBtn",0],
|
|
|
down:["exchangeBtn",1],
|
|
|
onEnterPress:function(){
|
|
|
- if(this.currentIndex<=9){
|
|
|
- if(G("phone").innerHTML.length>10) return;
|
|
|
- if(this.currentIndex == 9){
|
|
|
- G("phone").innerHTML += 0;
|
|
|
- }else{
|
|
|
- G("phone").innerHTML += this.currentIndex*1+1;
|
|
|
+ try{
|
|
|
+ alert('phoneNum'+this.currentIndex+this.className+G("phone").innerHTML.length);
|
|
|
+ if(this.currentIndex<=9){
|
|
|
+ if(G("phone").innerHTML.length>10) return;
|
|
|
+ if(this.currentIndex == 9){
|
|
|
+ G("phone").innerHTML += 0;
|
|
|
+ }else{
|
|
|
+ G("phone").innerHTML += this.currentIndex*1+1;
|
|
|
+ }
|
|
|
+ }else if(this.currentIndex == 10){
|
|
|
+ if(G("phone").innerHTML.length>0)
|
|
|
+ G("phone").innerHTML = G("phone").innerHTML.slice(0,-1);
|
|
|
+ }else if(this.currentIndex == 11){
|
|
|
+ if(G("phone").innerHTML.length>0)
|
|
|
+ G("phone").innerHTML = "";
|
|
|
}
|
|
|
- }else if(this.currentIndex == 10){
|
|
|
- if(G("phone").innerHTML.length>0)
|
|
|
- G("phone").innerHTML = G("phone").innerHTML.slice(0,-1);
|
|
|
- }else if(this.currentIndex == 11){
|
|
|
- if(G("phone").innerHTML.length>0)
|
|
|
- G("phone").innerHTML = "";
|
|
|
+ }catch(e){
|
|
|
+ alert(e)
|
|
|
}
|
|
|
},
|
|
|
onPress:cellphoneNum,
|
|
@@ -342,6 +336,7 @@
|
|
|
H("unWinToyPopup");
|
|
|
this.reSetClass("box");
|
|
|
}else{
|
|
|
+ setCookie("unWinToy","unWinToyPopup");
|
|
|
order(this.currentIndex);
|
|
|
}
|
|
|
},
|
|
@@ -399,7 +394,6 @@
|
|
|
}else if(index==2){
|
|
|
fullscreenPlay("00000001000000000029000000278889")
|
|
|
}
|
|
|
- window.location.href = url;
|
|
|
},
|
|
|
onBack:function(){
|
|
|
H("unWinToyVipPopup");
|
|
@@ -504,30 +498,44 @@
|
|
|
// }
|
|
|
|
|
|
function order(idx){
|
|
|
- var product_id = "11187";
|
|
|
- var price = "125";
|
|
|
- var name = "少儿包";
|
|
|
- var bag = "se_bag";
|
|
|
+ var pid = "8801000079";
|
|
|
var mark = "oursBag";
|
|
|
- if(idx==1){
|
|
|
- product_id = "8801000077";
|
|
|
- price = "15";
|
|
|
- name = "影视包"
|
|
|
- bag = "ys_bag";
|
|
|
+ if(idx == 1){
|
|
|
+ pid = "8801000077";
|
|
|
mark = "othersBag";
|
|
|
}
|
|
|
- var product_list={
|
|
|
- "product_id":product_id,
|
|
|
- "time":"30",
|
|
|
- "product_type":"1",
|
|
|
- "price":price,
|
|
|
- "button_name":name,
|
|
|
- "name":name,
|
|
|
- "bag":bag,
|
|
|
- "back_url":backUrl+'?'+mark+'='+uid,
|
|
|
+ var orderBack = backUrl+'?'+mark+'='+uid;
|
|
|
+ if(version.indexOf("5a.7") || version.indexOf("5a.8")){
|
|
|
+ var product_list={
|
|
|
+ "product_id":pid,
|
|
|
+ "video_name":"",
|
|
|
+ "video_type":"",
|
|
|
+ "product_type":"2",
|
|
|
+ "cat_id":"",
|
|
|
+ "channel_id":"",
|
|
|
+ }
|
|
|
+ window.location.href = "https://hnydorder.yys.mgtv.com:8080/order/index.html?product_list="+JSON.stringify(product_list)+"&exitStr="+escape(orderBack);
|
|
|
+ }else{
|
|
|
+ var playIntent = {
|
|
|
+ package: "com.hunantv.operator",
|
|
|
+ action: "mangotv://com.hunantv.operator/order",
|
|
|
+ data: "",
|
|
|
+ extras: {
|
|
|
+ product: {
|
|
|
+ "id": pid,
|
|
|
+ "time": "",
|
|
|
+ "price": "",
|
|
|
+ "type": "",
|
|
|
+ "name": "",
|
|
|
+ "bag": "",
|
|
|
+ "back_url":orderBack,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ flags: []
|
|
|
+ };
|
|
|
+ Webview.sendIntent("startActivity", playIntent);
|
|
|
}
|
|
|
- window.location.href = "https://hnydorder.yys.mgtv.com:8080/v2.0_new/order/index.html?product_list="+JSON.stringify(product_list);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
function fullscreenPlay(mid) {
|
|
|
var playIntent = {
|
|
@@ -654,42 +662,47 @@
|
|
|
}
|
|
|
|
|
|
function exchangePopups(){
|
|
|
- if(this.currentIndex==1){
|
|
|
- H("exchangePopup");
|
|
|
- G("phone").innerHTML = "";
|
|
|
- this.reSetClass(heguiItem);
|
|
|
- }else if(this.currentIndex==0){
|
|
|
- var phone = G("phone").innerText;
|
|
|
- var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
|
|
|
- if(!myreg.test(phone)){
|
|
|
- tips('手机号码格式有误!');
|
|
|
- }else{
|
|
|
- ajax({
|
|
|
- url: webUrl + "index.php?m=Home&c=Activityv2&a=setUserInfo",
|
|
|
- data: {
|
|
|
- uid: uid,
|
|
|
- act_id: init.act_id,
|
|
|
- is_vip: init.oursProduct_isVip+init.othersProduct_isVip,
|
|
|
- phone: phone
|
|
|
- },
|
|
|
- success: function (res) {
|
|
|
- if(res.code == 0){
|
|
|
- H("exchangePopup");
|
|
|
- G("phone").innerHTML = "";
|
|
|
- S("markDownPopup");
|
|
|
- main.reSetClass("markDownBtn");
|
|
|
- }else{
|
|
|
- tips(res.msg);
|
|
|
+ try{
|
|
|
+ alert('exchangePopups'+this.currentIndex+this.className);
|
|
|
+ if(this.currentIndex==1){
|
|
|
+ H("exchangePopup");
|
|
|
+ G("phone").innerHTML = "";
|
|
|
+ this.reSetClass(heguiItem);
|
|
|
+ }else if(this.currentIndex==0){
|
|
|
+ var phone = G("phone").innerText;
|
|
|
+ var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
|
|
|
+ if(!myreg.test(phone)){
|
|
|
+ tips('手机号码格式有误!');
|
|
|
+ }else{
|
|
|
+ ajax({
|
|
|
+ url: webUrl + "index.php?m=Home&c=Activityv2&a=setUserInfo",
|
|
|
+ data: {
|
|
|
+ uid: uid,
|
|
|
+ act_id: init.act_id,
|
|
|
+ is_vip: init.oursProduct_isVip+init.othersProduct_isVip,
|
|
|
+ phone: phone
|
|
|
+ },
|
|
|
+ success: function (res) {
|
|
|
+ if(res.code == 0){
|
|
|
+ H("exchangePopup");
|
|
|
+ G("phone").innerHTML = "";
|
|
|
+ S("markDownPopup");
|
|
|
+ main.reSetClass("markDownBtn");
|
|
|
+ }else{
|
|
|
+ tips(res.msg);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ }catch(e){
|
|
|
+ alert(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function cellphoneNum(){
|
|
|
- console.log(this.event.keyCode)
|
|
|
if(G("phone").innerHTML.length>10) return;
|
|
|
var key = this.event.keyCode;
|
|
|
try {
|
|
@@ -747,7 +760,7 @@
|
|
|
|
|
|
function addData(fn) {
|
|
|
ajax({
|
|
|
- url:webUrl+"index.php?m=Home&c=ThemeData&addData&a=addData",
|
|
|
+ url:webUrl+"index.php?m=Home&c=ThemeData&a=addData",
|
|
|
data:{
|
|
|
uid: uid,
|
|
|
theme_id: 1
|
|
@@ -784,7 +797,7 @@
|
|
|
usertoken:usertoken,
|
|
|
mac:mac,
|
|
|
version:version,
|
|
|
- fromsource:4
|
|
|
+ fromsource:15
|
|
|
},
|
|
|
type: "post",
|
|
|
dataType: "json",
|
|
@@ -894,13 +907,19 @@
|
|
|
addClass(G("oursP"),'hasOrder');
|
|
|
addClass(G("oursProduct"),'hasOrder');
|
|
|
if(!!getStr("oursBag")){
|
|
|
- payResult(init.oursProduct_isVip,uid,"11187");
|
|
|
+ payResult(init.oursProduct_isVip,uid,"8801000077");
|
|
|
}
|
|
|
}else{
|
|
|
init.oursProduct_isVip = 0;
|
|
|
if(!!getStr("oursBag")){
|
|
|
- pageConf.focusItem = "order_btn";
|
|
|
- pageConf.focusIdx = 1;
|
|
|
+ if(!!getCookie("unWinToy")){
|
|
|
+ pageConf.focusItem = "unWinToyBtn";
|
|
|
+ S("unWinToyPopup")
|
|
|
+ setCookie("unWinToy",'');
|
|
|
+ }else{
|
|
|
+ pageConf.focusItem = "order_btn";
|
|
|
+ }
|
|
|
+ pageConf.focusIdx = 0;
|
|
|
}
|
|
|
}
|
|
|
authorization(init.contentcode1,uid,usertoken,mac,version,function(res){
|
|
@@ -910,13 +929,19 @@
|
|
|
addClass(G("othersP"),'hasOrder');
|
|
|
addClass(G("othersProduct"),'hasOrder');
|
|
|
if(!!getStr("othersBag")){
|
|
|
- payResult(init.othersProduct_isVip,uid,"10664")
|
|
|
+ payResult(init.othersProduct_isVip,uid,"8801000079")
|
|
|
}
|
|
|
}else{
|
|
|
othersProduct_isVip = 0;
|
|
|
if(!!getStr("othersBag")){
|
|
|
- pageConf.focusItem = "order_btn";
|
|
|
- pageConf.focusIdx = 0;
|
|
|
+ if(!!getCookie("unWinToy")){
|
|
|
+ pageConf.focusItem = "unWinToyBtn";
|
|
|
+ S("unWinToyPopup")
|
|
|
+ setCookie("unWinToy",'');
|
|
|
+ }else{
|
|
|
+ pageConf.focusItem = "order_btn";
|
|
|
+ }
|
|
|
+ pageConf.focusIdx = 1;
|
|
|
}
|
|
|
}
|
|
|
var vv = init.oursProduct_isVip+init.othersProduct_isVip;
|