Wang 5 年之前
父节点
当前提交
0648942af7
共有 73 个文件被更改,包括 4079 次插入0 次删除
  1. 二进制
      h5v2/mw_20200108_act.zip
  2. 263 0
      h5v2/mw_20200108_act/css/page.css
  3. 664 0
      h5v2/mw_20200108_act/css/page1.css
  4. 110 0
      h5v2/mw_20200108_act/css/page2.css
  5. 二进制
      h5v2/mw_20200108_act/img/bg.jpg
  6. 二进制
      h5v2/mw_20200108_act/img/bg01.jpg
  7. 二进制
      h5v2/mw_20200108_act/img/bg02.jpg
  8. 二进制
      h5v2/mw_20200108_act/img/bg1.jpg
  9. 二进制
      h5v2/mw_20200108_act/img/bg2.jpg
  10. 二进制
      h5v2/mw_20200108_act/img/btn_back_def.png
  11. 二进制
      h5v2/mw_20200108_act/img/btn_back_sel.png
  12. 二进制
      h5v2/mw_20200108_act/img/btn_bigBag_def.png
  13. 二进制
      h5v2/mw_20200108_act/img/btn_bigBag_hasOrder.png
  14. 二进制
      h5v2/mw_20200108_act/img/btn_bigBag_sel.png
  15. 二进制
      h5v2/mw_20200108_act/img/btn_cancel_cov.png
  16. 二进制
      h5v2/mw_20200108_act/img/btn_cancel_nor.png
  17. 二进制
      h5v2/mw_20200108_act/img/btn_confirm_def.png
  18. 二进制
      h5v2/mw_20200108_act/img/btn_confirm_sel.png
  19. 二进制
      h5v2/mw_20200108_act/img/btn_exchange_cov.png
  20. 二进制
      h5v2/mw_20200108_act/img/btn_exchange_nor.png
  21. 二进制
      h5v2/mw_20200108_act/img/btn_find_def.png
  22. 二进制
      h5v2/mw_20200108_act/img/btn_find_sel.png
  23. 二进制
      h5v2/mw_20200108_act/img/btn_miniBag_def.png
  24. 二进制
      h5v2/mw_20200108_act/img/btn_miniBag_hasOrder.png
  25. 二进制
      h5v2/mw_20200108_act/img/btn_miniBag_sel.png
  26. 二进制
      h5v2/mw_20200108_act/img/btn_play.png
  27. 二进制
      h5v2/mw_20200108_act/img/btn_rules_def.png
  28. 二进制
      h5v2/mw_20200108_act/img/btn_rules_sel.png
  29. 二进制
      h5v2/mw_20200108_act/img/btn_video_se1l.png
  30. 二进制
      h5v2/mw_20200108_act/img/btn_video_sel.png
  31. 二进制
      h5v2/mw_20200108_act/img/content0.jpg
  32. 二进制
      h5v2/mw_20200108_act/img/content1.jpg
  33. 二进制
      h5v2/mw_20200108_act/img/content2.jpg
  34. 二进制
      h5v2/mw_20200108_act/img/content_f.png
  35. 二进制
      h5v2/mw_20200108_act/img/demo.jpg
  36. 二进制
      h5v2/mw_20200108_act/img/ip_01.png
  37. 二进制
      h5v2/mw_20200108_act/img/ip_01_sel.png
  38. 二进制
      h5v2/mw_20200108_act/img/ip_02.png
  39. 二进制
      h5v2/mw_20200108_act/img/ip_02_sel.png
  40. 二进制
      h5v2/mw_20200108_act/img/ip_03.png
  41. 二进制
      h5v2/mw_20200108_act/img/ip_03_sel.png
  42. 二进制
      h5v2/mw_20200108_act/img/ip_04.png
  43. 二进制
      h5v2/mw_20200108_act/img/ip_04_sel.png
  44. 二进制
      h5v2/mw_20200108_act/img/ip_05.png
  45. 二进制
      h5v2/mw_20200108_act/img/ip_05_sel.png
  46. 二进制
      h5v2/mw_20200108_act/img/ip_06.png
  47. 二进制
      h5v2/mw_20200108_act/img/ip_06_sel.png
  48. 二进制
      h5v2/mw_20200108_act/img/lottery.png
  49. 二进制
      h5v2/mw_20200108_act/img/page_03.png
  50. 二进制
      h5v2/mw_20200108_act/img/page_04.png
  51. 二进制
      h5v2/mw_20200108_act/img/page_05.png
  52. 二进制
      h5v2/mw_20200108_act/img/page_06.png
  53. 二进制
      h5v2/mw_20200108_act/img/page_07.png
  54. 二进制
      h5v2/mw_20200108_act/img/page_08.png
  55. 二进制
      h5v2/mw_20200108_act/img/page_09.png
  56. 二进制
      h5v2/mw_20200108_act/img/page_10.png
  57. 二进制
      h5v2/mw_20200108_act/img/piaoshu.png
  58. 二进制
      h5v2/mw_20200108_act/img/rules.png
  59. 二进制
      h5v2/mw_20200108_act/img/sort/bg.jpg
  60. 二进制
      h5v2/mw_20200108_act/img/sort/btn_play.png
  61. 二进制
      h5v2/mw_20200108_act/img/sort/icon.png
  62. 二进制
      h5v2/mw_20200108_act/img/sort/icon_01.png
  63. 二进制
      h5v2/mw_20200108_act/img/sort/icon_02.png
  64. 二进制
      h5v2/mw_20200108_act/img/sort/icon_03.png
  65. 二进制
      h5v2/mw_20200108_act/img/sort/icon_04.png
  66. 二进制
      h5v2/mw_20200108_act/img/sort/icon_05.png
  67. 二进制
      h5v2/mw_20200108_act/img/tit1.png
  68. 445 0
      h5v2/mw_20200108_act/index.html
  69. 1132 0
      h5v2/mw_20200108_act/index1.html
  70. 180 0
      h5v2/mw_20200108_act/index2.html
  71. 385 0
      h5v2/mw_20200108_act/js/comm.js
  72. 653 0
      h5v2/mw_20200108_act/js/tvSysBtnBind.v2.js
  73. 247 0
      h5v2/mw_20200108_act/js/webview.js

二进制
h5v2/mw_20200108_act.zip


+ 263 - 0
h5v2/mw_20200108_act/css/page.css

@@ -0,0 +1,263 @@
+
+/* @Author: Wang
+* @Date:   2020-01-09 15:27:23
+* @Last Modified by:   Marte
+* @Last Modified time: 2020-01-16 23:35:39
+*/
+html, body, ul, li, p, img { margin:0; padding:0; }
+ul, ol { list-style:none; }
+img {border:none; padding:0;margin:0;outline-style:none; border:0; vertical-align:middle; display:block;} 
+html{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+}
+body{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+    font-size:20px;
+    color: #f1f1f1;
+    overflow: hidden;
+    font-family:'Microsoft Yahei;Arial';
+}
+
+@-webkit-keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+@keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+.current{
+    -webkit-animation: pulse .3s .02s ease both;
+    -moz-animation: pulse .4s .02 ease both;
+}
+
+.pulse {
+  -webkit-animation-name: pulse;
+  animation-name: pulse;
+}
+
+.main{
+    width:1280px;
+    height:720px;
+    background: url("../img/bg.jpg") no-repeat center;
+    background-attachment: fixed;
+    background-size: 100%;\
+    position: relative;
+}
+
+.page_btn{
+    position: absolute;
+}
+
+.pg0{
+     width: 154px;
+    height: 50px;
+    top: 20px;
+    left: 1100px;
+    background: url("../img/btn_back_def.png") no-repeat center;
+}
+
+.pg0.current{
+    background: url("../img/btn_back_sel.png") no-repeat center;
+}
+
+.pg1{
+    width: 154px;
+    height: 50px;
+    top: 80px;
+    left: 1100px;
+    background: url("../img/btn_rules_def.png") no-repeat center;
+}
+
+.pg1.current{
+    background: url("../img/btn_rules_sel.png") no-repeat center;
+}
+
+.pg2{
+    width: 589px;
+    height: 336px;
+    top: 172px;
+    left: 339px;
+    /*-webkit-transition:all .5s; 
+    -moz-transition:all .5s;
+    -o-transition:all .5s;*/
+}
+
+.pg2.current{
+/*    -webkit-transform:scale(1.05); 
+    -moz-transform:scale(1.05); 
+    -o-transform:scale(1.05); */
+    background: url("../img/btn_video_sel.png") no-repeat center;
+}
+
+.pg3,.pg4{
+    width: 301px;
+    height: 96px;
+    top: 520px;
+}
+
+.pg3{
+    left: 485px;
+    background: url("../img/btn_bigBag_def.png") no-repeat center;
+}
+
+.pg3.current{
+    background: url("../img/btn_bigBag_sel.png") no-repeat center;
+}
+
+.pg3.hasOrder{
+    background: url("../img/btn_bigBag_hasOrder.png") no-repeat center;
+}
+
+.pg4{
+    left: 650px;
+    background: url("../img/btn_miniBag_def.png") no-repeat center;
+}
+
+.pg4.current{
+    background: url("../img/btn_miniBag_sel.png") no-repeat center;
+}
+
+.pg4.hasOrder{
+    background: url("../img/btn_miniBag_hasOrder.png") no-repeat center;
+}
+}
+
+.pg4.current{
+    background: url("../img/btn_miniBag_sel.png") no-repeat center;
+}
+
+.pg4.hasOrder{
+    background: url("../img/btn_miniBag_hasOrder.png") no-repeat center;
+}
+
+.list{
+    width: 1160px;
+    height: 158px;
+    overflow: hidden;
+    position: absolute;
+    top: 560px;
+    left: 60px;
+}
+
+.list li{
+    position: absolute;
+    top: 60px;
+    left: 0;
+}
+.ip_btn{
+    width: 152px;
+    height: 148px;
+}
+
+.list li.current{
+    top: 0;
+}
+
+.list .ip1{
+    background: url("../img/ip_01.png") no-repeat center;
+}
+.list .ip2{
+    left: 202px;
+    background: url("../img/ip_02.png") no-repeat center;
+}
+.list .ip3{
+    left: 404px;
+    background: url("../img/ip_03.png") no-repeat center;
+}
+.list .ip4{
+    left: 606px;
+    background: url("../img/ip_04.png") no-repeat center;
+}
+.list .ip5{
+    left: 808px;
+    background: url("../img/ip_05.png") no-repeat center;
+}
+.list .ip6{
+    left: 1010px;
+    background: url("../img/ip_06.png") no-repeat center;
+}
+
+.list .ip1.current{
+    background: url("../img/ip_01_sel.png") no-repeat center;
+}
+.list .ip2.current{
+    background: url("../img/ip_02_sel.png") no-repeat center;
+}
+.list .ip3.current{
+    background: url("../img/ip_03_sel.png") no-repeat center;
+}
+.list .ip4.current{
+    background: url("../img/ip_04_sel.png") no-repeat center;
+}
+.list .ip5.current{
+    background: url("../img/ip_05_sel.png") no-repeat center;
+}
+.list .ip6.current{
+    background: url("../img/ip_06_sel.png") no-repeat center;
+}
+
+.popup{
+    width: 1280px;
+    height: 1831px;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 99; 
+    visibility: hidden;
+}
+
+#rulesPopup{
+    background: url('../img/rules.png') no-repeat center;
+}
+
+.bar{
+    width: 12px;
+    height: 600px;
+    background-color: #fff8ca;
+    position: fixed;
+    top: 86px;
+    left: 1200px;
+    border-radius: 6px;
+}
+
+.progress{
+    display: inline-block;
+    width: 12px;
+    height: 200px;
+    border-radius: 6px;
+    background-color: #fcba1f;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.code{
+    width: 220px;
+    height: 260px;
+    position: absolute;
+    top: 180px;
+    left: 938px;
+    text-align: center;
+}
+
+.code img{
+    width: 180px;
+    height: 180px;
+    margin: 0 auto 14px;
+}
+
+.code span{
+    display: block;
+    font-size: 22px;
+    font-weight: bold;
+    line-height: 30px;
+}

+ 664 - 0
h5v2/mw_20200108_act/css/page1.css

@@ -0,0 +1,664 @@
+/* 
+* @Author: Marte
+* @Date:   2020-01-14 09:57:52
+* @Last Modified by:   Marte
+* @Last Modified time: 2020-01-15 17:40:41
+*/
+html, body, ul, li, p, img { margin:0; padding:0; }
+ul, ol { list-style:none; }
+img {border:none; padding:0;margin:0;outline-style:none; border:0; vertical-align:middle; display:block;} 
+s,i,em{font-style:normal;text-decoration:none;}
+html{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+}
+body{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+    font-size:20px;
+    color: #f1f1f1;
+    overflow: hidden;
+    font-family:'Microsoft Yahei;Arial';
+}
+
+@-webkit-keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+@keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+.current{
+    -webkit-animation: pulse .3s .02s ease both;
+    -moz-animation: pulse .4s .02 ease both;
+}
+
+.pulse {
+  -webkit-animation-name: pulse;
+  animation-name: pulse;
+}
+
+.main{
+    width:1280px;
+    height:720px;
+    overflow: hidden;
+   /* background: url("../img/bg1.jpg") no-repeat center;
+    background-attachment: fixed;
+    background-size: 100%;*/
+    position: relative;
+}
+
+#scrollCont{
+    width:1280px;
+    height:798px;
+    background: url("../img/bg1.jpg") no-repeat center;
+    /*background-attachment: fixed;*/
+    background-size: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.page_btn{
+    position: absolute;
+}
+
+.pg0{
+     width: 154px;
+    height: 50px;
+    top: 20px;
+    left: 1100px;
+    background: url("../img/btn_back_def.png") no-repeat center;
+}
+
+.pg0.current{
+    background: url("../img/btn_back_sel.png") no-repeat center;
+}
+
+.pg1{
+    width: 154px;
+    height: 50px;
+    top: 80px;
+    left: 1100px;
+    background: url("../img/btn_rules_def.png") no-repeat center;
+}
+
+.pg1.current{
+    background: url("../img/btn_rules_sel.png") no-repeat center;
+}
+.pg2{
+    width: 154px;
+    height: 50px;
+    top: 140px;
+    left: 1100px;
+    background: url("../img/btn_find_def.png") no-repeat center;
+}
+
+.pg2.current{
+    background: url("../img/btn_find_sel.png") no-repeat center;
+}
+
+.pg3{
+    width: 589px;
+    height: 336px;
+    top: 172px;
+    left: 339px;
+}
+
+.pg3.current{
+    background: url("../img/btn_video_sel.png") no-repeat center;
+}
+
+
+.pg4,.pg5,#product1,#product2{
+    width: 301px;
+    height: 96px;
+    top: 520px;
+}
+
+.pg4{
+
+    left: 320px;
+}
+
+#product1,#product2{
+    position: absolute;
+    top: 270px;
+    left: 480px;
+}
+
+#product2{
+    top: 400px;
+    left: 500px;
+}
+
+.pg4,#product1{
+    background: url("../img/btn_bigBag_def.png") no-repeat center;
+}
+
+.pg4.current,#product1.current{
+    background: url("../img/btn_bigBag_sel.png") no-repeat center;
+}
+
+.pg4.hasOrder,#product1.hasOrder{
+    background: url("../img/btn_bigBag_hasOrder.png") no-repeat center;
+}
+
+.pg5{
+    left: 650px;
+}
+.pg5,#product2{
+    background: url("../img/btn_miniBag_def.png") no-repeat center;
+}
+
+.pg5.current,#product2.current{
+    background: url("../img/btn_miniBag_sel.png") no-repeat center;
+}
+
+.pg5.hasOrder,#product2.hasOrder{
+    background: url("../img/btn_miniBag_hasOrder.png") no-repeat center;
+}
+
+.prizeNum{
+    position: absolute;
+    left: 574px;
+    top: 614px;
+    font-size: 22px;
+    font-weight: bold;
+}
+
+.list{
+    width: 1160px;
+    height: 158px;
+    overflow: hidden;
+    position: absolute;
+    top: 650px;
+    left: 60px;
+}
+
+.list li{
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+.ip_btn{
+    width: 152px;
+    height: 148px;
+}
+
+.list .ip1{
+    background: url("../img/ip_01.png") no-repeat center;
+}
+.list .ip2{
+    left: 202px;
+    background: url("../img/ip_02.png") no-repeat center;
+}
+.list .ip3{
+    left: 404px;
+    background: url("../img/ip_03.png") no-repeat center;
+}
+.list .ip4{
+    left: 606px;
+    background: url("../img/ip_04.png") no-repeat center;
+}
+.list .ip5{
+    left: 808px;
+    background: url("../img/ip_05.png") no-repeat center;
+}
+.list .ip6{
+    left: 1010px;
+    background: url("../img/ip_06.png") no-repeat center;
+}
+
+.list .ip1.current{
+    background: url("../img/ip_01_sel.png") no-repeat center;
+}
+.list .ip2.current{
+    background: url("../img/ip_02_sel.png") no-repeat center;
+}
+.list .ip3.current{
+    background: url("../img/ip_03_sel.png") no-repeat center;
+}
+.list .ip4.current{
+    background: url("../img/ip_04_sel.png") no-repeat center;
+}
+.list .ip5.current{
+    background: url("../img/ip_05_sel.png") no-repeat center;
+}
+.list .ip6.current{
+    background: url("../img/ip_06_sel.png") no-repeat center;
+}
+
+.voteGroup{
+    width: 1280px;
+    /* height: 1240px; */
+    position: absolute;
+    top: 796px;
+    left: 0;
+    background: url("../img/bg02.jpg") repeat-y center;
+}
+
+.tit1{
+    position: absolute;
+    top: 60px;
+    left: 400px;
+}
+
+.tit1 img,.tit1 .times{display: inline-block;}
+.tit1 .times{
+    position: absolute;
+    top: 18px;
+    left: 630px;
+    width: 200px;
+}
+
+.tit1 .times span{
+    display: inline-block;
+    width: 60px;
+    height: 32px;
+    line-height: 32px;
+    font-size: 26px;
+    font-weight: bold;
+    vertical-align: middle;
+    margin-left: 10px;
+}
+
+.voteList{
+    overflow: hidden;
+    width: 1000px;
+    /*height: 820px;*/
+    padding: 40px;
+    margin: 120px auto 0;
+    border: 6px solid #7A0B18;
+    border-radius: 30px;
+    margin-bottom: 224px;
+    background: url(../img/bg01.jpg) repeat-y center;
+    /* border-top-left-radius: 20px 60px;
+    border-top-right-radius: 20px 60px;
+    border-bottom-right-radius: 20px 60px;
+    border-bottom-left-radius: 20px 60px;*/
+}
+
+.voteList li{
+    float: left;
+    margin-right: 25px;
+    margin-bottom: 20px;
+}
+.voteList li:nth-child(4n){
+    margin-right: 0;
+}
+
+.voteList li .u_img{
+    width: 231px;
+    height: 152px;
+    border-radius: 10px;
+    box-shadow: 4px 4px 0 0 #7A0B18;
+    overflow: hidden;
+    position: relative;
+}
+.voteList li .u_img.current{
+    background: url(../img/btn_play.png) no-repeat center;
+}
+.u_img i{
+    width: 60px;
+    height: 26px;
+    display: block;
+    position: absolute;
+    left: 170px;
+    top: 127px;
+    line-height: 28px;
+    text-align: center;
+    font-weight: bold;
+    color: #4e4a4a;
+    background: #00d3df;
+    border-radius: 10px;
+}
+.u_msg{
+    width: 231px;
+    height: 40px;
+    line-height: 38px;
+    text-align: center;
+    font-size: 18px;
+    color: #7A0B18;
+    font-weight: bold;
+}
+
+
+.voteBtn{
+    display: block;
+    width: 185px;
+    height: 52px;
+    line-height: 52px;
+    text-align: center;
+    border-radius: 26px;
+    border:2px solid #7A0B18;
+    background-color: #C8241E;
+    margin:0 auto;
+    font-weight: bold;
+}
+
+.voteBtn.current{
+    background-color: #00D3E2;
+}
+
+
+.popup{
+    width: 1280px;
+    height: 720px;
+    position: fixed;
+    top: 0;
+    left: 0;
+    z-index: 99; 
+    visibility: hidden;
+}
+
+#rulesPopup{
+    height: 2004px;
+    background: url('../img/rules.png') no-repeat center;
+}
+
+.bar{
+    width: 12px;
+    height: 600px;
+    background-color: #fff8ca;
+    position: fixed;
+    top: 86px;
+    left: 1200px;
+    border-radius: 6px;
+}
+
+.progress{
+    display: inline-block;
+    width: 12px;
+    height: 200px;
+    border-radius: 6px;
+    background-color: #fcba1f;
+    position: absolute;
+    top: 0;
+    left: 0;
+}
+
+.code{
+    width: 220px;
+    height: 260px;
+    position: absolute;
+    top: 180px;
+    left: 938px;
+    text-align: center;
+}
+
+.code img{
+    width: 180px;
+    height: 180px;
+    margin: 0 auto 14px;
+}
+
+.code span{
+    display: block;
+    font-size: 22px;
+    font-weight: bold;
+    line-height: 30px;
+}
+
+#lotteryPopup{
+    background: url('../img/lottery.png') no-repeat center;
+}
+
+.confirm{
+    width: 173px;
+    height: 61px;
+    background: url('../img/btn_confirm_def.png') no-repeat center;
+    position: absolute;
+    top: 590px;
+    left: 554px;
+}
+
+.confirm.current{
+    background: url('../img/btn_confirm_sel.png') no-repeat center;
+}
+
+#exchangePopup{
+    background: url('../img/page_04.png') no-repeat center;
+}
+
+#exchangePopup .confirm{
+    left: 350px;
+}
+
+#exchangePopup .cancel{
+    left: 664px;
+}
+
+#phone{
+    width: 331px;
+    height: 71px;
+    position: absolute;
+    top: 251px;
+    left: 614px;
+    line-height: 71px;
+    font-size: 26px;
+    text-align: center;
+    color: #392316;
+    font-weight: bold;
+}
+
+#phone.current{
+    background: url('../img/input.png') no-repeat center;
+}
+
+#keyBoard{
+    width: 340px;
+    height: 110px;
+    position: absolute;
+    top: 350px;
+    left: 618px;
+}
+
+.phoneNum{
+    float: left;
+    font-size: 20px;
+    color: #392316;
+    font-weight: bold;
+    background: #f6e27b;
+    width: 46px;
+    height: 46px;
+    text-align: center;
+    line-height: 50px;
+    border: 3px solid transparent;
+    margin-right: 2px;
+    margin-bottom: 2px;
+    box-shadow: 0px 0px 5px 5px #edda77 inset;
+}
+
+.phoneNum.current{
+    border:3px solid #392316;
+}
+
+
+#awardPopup{
+    background: url('../img/page_03.png') no-repeat center;
+}
+
+#prizelog{
+    position: absolute;
+    left: 300px;
+    top: 250px;
+    color: #6a7a20;
+    font-size: 20px;
+    font-weight: 700;
+}
+
+.prizelogRow{
+    position:relative;
+    height: 40px;
+}
+
+.prizelogCol1{
+    position: absolute;
+    left: 20px;
+    width: 160px;
+    text-align: center;
+}
+
+.prizelogCol2{
+    position: absolute;
+    left: 170px;
+    width: 200px;
+    text-align: center;
+}
+
+.prizelogCol3{
+    position: absolute;
+    left: 388px;
+    width: 220px;
+    text-align: center;
+}
+
+#myAward{
+    position: absolute;
+    left: 430px;
+    top: 460px;
+    width: 198px;
+    height: 44px;
+    text-align: center;
+    line-height: 40px;
+    font-size: 20px;
+    font-weight: 700;
+    color: #6a7a20;
+}
+
+#myPhone{
+    position: absolute;
+    left: 760px;
+    top: 460px;
+    width: 170px;
+    height: 44px;
+    text-align: center;
+    line-height: 40px;
+    font-size: 20px;
+    font-weight: 700;
+    color: #6a7a20;
+}
+
+#unWinToyPopup{
+    background: url('../img/page_05.png') no-repeat center;
+}
+#unWinToyVipPopup{
+    background: url('../img/page_06.png') no-repeat center;
+}
+
+/*#noChancePopup{
+    background: url('../img/page_07.png') no-repeat center;
+}
+
+#noChanceVipPopup{
+    background: url('../img/page_08.png') no-repeat center;
+}
+*/
+#prizePopup{
+    background: url('../img/page_09.png') no-repeat center;
+}
+
+#markDownPopup{
+    background: url('../img/page_10.png') no-repeat center;
+}
+
+.toAward,.cancel,.confirm,.toExchange{
+    width: 227px;
+    height: 91px;
+    position: absolute;
+    top: 590px;
+    left: 524px;
+}
+
+.toAward{
+    left: 650px;
+    background: url('../img/btn_exchange_nor.png') no-repeat center;
+}
+
+.toAward.current{
+    background: url('../img/btn_exchange_cov.png') no-repeat center;
+}
+
+.cancel{
+    left: 350px;
+    background: url('../img/btn_cancel_nor.png') no-repeat center;
+}
+
+.toExchange{
+    left: 650px;
+    background: url('../img/btn_exchange_nor.png') no-repeat center;
+}
+
+.toExchange.current{
+    background: url('../img/btn_exchange_cov.png') no-repeat center;
+}
+
+#prizePopup .cancel{
+    left: 400px;
+}
+
+.pmodel{
+    width: 162px;
+    height: 220px;
+    position: absolute;
+    left: 380px;
+    top: 260px;
+}
+
+
+.poster,.poster1{
+    width: 185px;
+    height: 236px;
+    position: absolute;
+    left: 368.5px;
+    top: 252px;
+}
+
+.poster_2{
+    left: 558.5px;
+}
+
+.poster_3{
+    left: 748.5px;
+}
+
+.poster.current,.poster1.current{
+    background: url('../img/content_f.png') no-repeat center;
+}
+
+.pmodel_1{
+    background: url('../img/content0.jpg') no-repeat center;
+}
+.pmodel_2{
+    left: 570px;
+    background: url('../img/content1.jpg') no-repeat center;
+}
+.pmodel_3{
+    left: 760px;
+    background: url('../img/content2.jpg') no-repeat center;
+}
+
+.cancel.current{
+    background: url('../img/btn_cancel_cov.png') no-repeat center;
+
+
+.toExchange{
+    left: 650px;
+    background: url('../img/btn_exchange_nor.png') no-repeat center;
+}
+
+.toExchange.current{
+    background: url('../img/btn_exchange_cov.png') no-repeat center;
+}
+
+
+
+

+ 110 - 0
h5v2/mw_20200108_act/css/page2.css

@@ -0,0 +1,110 @@
+/* 
+* @Author: Marte
+* @Date:   2020-01-15 19:47:10
+* @Last Modified by:   Marte
+* @Last Modified time: 2020-01-15 20:05:30
+*/
+html, body, ul, li, p, img { margin:0; padding:0; }
+ul, ol { list-style:none; }
+img {border:none; padding:0;margin:0;outline-style:none; border:0; vertical-align:middle; display:block;} 
+s,i,em{font-style:normal;text-decoration:none;}
+html{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+}
+body{
+    width:1280px;
+    height:720px;
+    margin: 0 auto;
+    font-size:20px;
+    color: #f1f1f1;
+    overflow: hidden;
+    font-family:'Microsoft Yahei;Arial';
+}
+
+@-webkit-keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+@keyframes pulse {
+  from {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+  50% {-webkit-transform: scale3d(1.05, 1.05, 1.05);transform: scale3d(1.05, 1.05, 1.05);}
+  to {-webkit-transform: scale3d(1, 1, 1);transform: scale3d(1, 1, 1);}
+}
+
+.current{
+    -webkit-animation: pulse .3s .02s ease both;
+    -moz-animation: pulse .4s .02 ease both;
+}
+
+.current .u_img{
+    border:4px solid #7f1020;
+    border-radius: 10px;
+}
+
+.pulse {
+  -webkit-animation-name: pulse;
+  animation-name: pulse;
+}
+
+.cont{
+    width:1280px;
+    height:720px;
+    background: url("../img/sort/bg.jpg") no-repeat center;
+    background-size: 100%;
+}
+.first{
+    position: absolute;
+    top: 250px;
+    left: 520px;
+}
+
+#topUl{
+    position: absolute;
+    top: 480px;
+    left: 135px; 
+}
+
+#topUl li{
+    float: left;
+    margin-right: 25px;
+    margin-bottom: 20px;
+}
+
+.u_img{
+    width: 231px;
+    height: 152px;
+    border-radius: 10px;
+    box-shadow: 4px 4px 0 0 #7A0B18;
+    overflow: hidden;
+    position: relative;
+}
+.u_img.current{
+    background: url(../img/btn_play.png) no-repeat center;
+}
+.u_img i{
+    width: 60px;
+    height: 26px;
+    display: block;
+    position: absolute;
+    left: 170px;
+    top: 127px;
+    line-height: 28px;
+    text-align: center;
+    font-weight: bold;
+    color: #4e4a4a;
+    background: #00d3df;
+    border-radius: 10px;
+}
+.u_msg{
+    width: 231px;
+    height: 40px;
+    line-height: 38px;
+    text-align: center;
+    font-size: 18px;
+    color: #7A0B18;
+    font-weight: bold;
+}

二进制
h5v2/mw_20200108_act/img/bg.jpg


二进制
h5v2/mw_20200108_act/img/bg01.jpg


二进制
h5v2/mw_20200108_act/img/bg02.jpg


二进制
h5v2/mw_20200108_act/img/bg1.jpg


二进制
h5v2/mw_20200108_act/img/bg2.jpg


二进制
h5v2/mw_20200108_act/img/btn_back_def.png


二进制
h5v2/mw_20200108_act/img/btn_back_sel.png


二进制
h5v2/mw_20200108_act/img/btn_bigBag_def.png


二进制
h5v2/mw_20200108_act/img/btn_bigBag_hasOrder.png


二进制
h5v2/mw_20200108_act/img/btn_bigBag_sel.png


二进制
h5v2/mw_20200108_act/img/btn_cancel_cov.png


二进制
h5v2/mw_20200108_act/img/btn_cancel_nor.png


二进制
h5v2/mw_20200108_act/img/btn_confirm_def.png


二进制
h5v2/mw_20200108_act/img/btn_confirm_sel.png


二进制
h5v2/mw_20200108_act/img/btn_exchange_cov.png


二进制
h5v2/mw_20200108_act/img/btn_exchange_nor.png


二进制
h5v2/mw_20200108_act/img/btn_find_def.png


二进制
h5v2/mw_20200108_act/img/btn_find_sel.png


二进制
h5v2/mw_20200108_act/img/btn_miniBag_def.png


二进制
h5v2/mw_20200108_act/img/btn_miniBag_hasOrder.png


二进制
h5v2/mw_20200108_act/img/btn_miniBag_sel.png


二进制
h5v2/mw_20200108_act/img/btn_play.png


二进制
h5v2/mw_20200108_act/img/btn_rules_def.png


二进制
h5v2/mw_20200108_act/img/btn_rules_sel.png


二进制
h5v2/mw_20200108_act/img/btn_video_se1l.png


二进制
h5v2/mw_20200108_act/img/btn_video_sel.png


二进制
h5v2/mw_20200108_act/img/content0.jpg


二进制
h5v2/mw_20200108_act/img/content1.jpg


二进制
h5v2/mw_20200108_act/img/content2.jpg


二进制
h5v2/mw_20200108_act/img/content_f.png


二进制
h5v2/mw_20200108_act/img/demo.jpg


二进制
h5v2/mw_20200108_act/img/ip_01.png


二进制
h5v2/mw_20200108_act/img/ip_01_sel.png


二进制
h5v2/mw_20200108_act/img/ip_02.png


二进制
h5v2/mw_20200108_act/img/ip_02_sel.png


二进制
h5v2/mw_20200108_act/img/ip_03.png


二进制
h5v2/mw_20200108_act/img/ip_03_sel.png


二进制
h5v2/mw_20200108_act/img/ip_04.png


二进制
h5v2/mw_20200108_act/img/ip_04_sel.png


二进制
h5v2/mw_20200108_act/img/ip_05.png


二进制
h5v2/mw_20200108_act/img/ip_05_sel.png


二进制
h5v2/mw_20200108_act/img/ip_06.png


二进制
h5v2/mw_20200108_act/img/ip_06_sel.png


二进制
h5v2/mw_20200108_act/img/lottery.png


二进制
h5v2/mw_20200108_act/img/page_03.png


二进制
h5v2/mw_20200108_act/img/page_04.png


二进制
h5v2/mw_20200108_act/img/page_05.png


二进制
h5v2/mw_20200108_act/img/page_06.png


二进制
h5v2/mw_20200108_act/img/page_07.png


二进制
h5v2/mw_20200108_act/img/page_08.png


二进制
h5v2/mw_20200108_act/img/page_09.png


二进制
h5v2/mw_20200108_act/img/page_10.png


二进制
h5v2/mw_20200108_act/img/piaoshu.png


二进制
h5v2/mw_20200108_act/img/rules.png


二进制
h5v2/mw_20200108_act/img/sort/bg.jpg


二进制
h5v2/mw_20200108_act/img/sort/btn_play.png


二进制
h5v2/mw_20200108_act/img/sort/icon.png


二进制
h5v2/mw_20200108_act/img/sort/icon_01.png


二进制
h5v2/mw_20200108_act/img/sort/icon_02.png


二进制
h5v2/mw_20200108_act/img/sort/icon_03.png


二进制
h5v2/mw_20200108_act/img/sort/icon_04.png


二进制
h5v2/mw_20200108_act/img/sort/icon_05.png


二进制
h5v2/mw_20200108_act/img/tit1.png


+ 445 - 0
h5v2/mw_20200108_act/index.html

@@ -0,0 +1,445 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta name="page-view-size" content="1280*720" />
+        <title>"鼠"你最棒,萌宝"潮"贺岁</title>
+        <link rel="stylesheet" type="text/css" href="css/page.css" />
+    </head>
+    <body>
+        <div class="main">
+            <div class="code">
+                <img id="QRcode" src="" alt="" />
+                <span>扫码上转萌娃贺岁视频</span>
+                <span>拼人气赢大奖</span>
+            </div>
+            <div class="page_btn pg0"></div>
+            <div class="page_btn pg1"></div>
+            <div class="page_btn pg2"></div>
+            <div class="page_btn pg3" id="othersProduct"></div>
+            <!-- <div class="page_btn pg4" id="oursProduct"></div> -->
+
+            <ul class="list">
+                <li class="ip_btn ip1"></li>
+                <li class="ip_btn ip2"></li>
+                <li class="ip_btn ip3"></li>
+                <li class="ip_btn ip4"></li>
+                <li class="ip_btn ip5"></li>
+                <li class="ip_btn ip6"></li>
+            </ul>
+
+            <div id="rulesPopup" class="popup">
+                <div class="rules_btn"></div>
+                <div class="bar">
+                    <span id="miniBar" class="progress"></span>
+                </div>
+            </div>
+        </div>
+        <script src="./js/webview.js" type="text/javascript"></script>
+        <script src="./js/tvSysBtnBind.v2.js" type="text/javascript"></script>
+        <script src="./js/comm.js" type="text/javascript"></script>
+        <script type="text/javascript">
+            try {
+                var uid = Webview.readSystemProp('user.id');
+                var usertoken = Webview.readSystemProp('user.token');
+                var mac = Webview.readSystemProp('device.mac');
+                var version = Webview.readSystemProp('app.version');
+            } catch (e) {
+                var uid = getStr("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"
+            }
+
+
+            var init = {
+                act_id:2,
+                gameNum:0,
+                theme_id:2,
+                fromsource:15,
+                oursId:"8801000077",
+                othersId:"8801000646",//不用
+                oursProduct_isVip:0,
+                othersProduct_isVip:0,
+                contentcode:"00000001000000000018000000431421",//少儿月包
+                // contentcode1:"D00000001201905291020410009898494",
+            }
+
+            var webUrl = 'http://111.23.13.123:8091/';
+            var backUrl = webUrl+'h5v2/mw_20200108_act/index.html';
+            // var indexUrl = webUrl+'html/index.html?activity='+init.act_id;
+            var link = "http://111.23.12.38:8093/h5/act/index.html?mark="+uid;//http://120.78.169.79/h5/act/index.html";
+            var videoId = "00000001000000000033000000121962";
+            var videoArr = ["00000001000000000014000000153851","00000001000000000032000000221170","00000001000000000025000000326508","00000001000000000028000000428043","00000001000000000026000000325529","00000001000000000015000000283749"]
+
+            var pageConf = {
+                focusIdx:2,
+                focusItem:"page_btn",
+            }
+
+            var rulesPopup = false;
+            var rulesMark = 0;
+            var data = new Object();
+            data.rules = {
+                page_btn:{
+                    0:[2,0,0,1],
+                    1:[1,-1,0,1],
+                    2:[0,-1,-1,0],
+                    3:[0,-1,0,["ip_btn",2]],
+                    // 4:[0,-2,0,["ip_btn",3]],
+                    onEnterPress:function(){
+                        switch (this.currentIndex) {
+                            case 0:
+                                onBack();
+                                break;
+                            case 1:
+                                stopPlay();
+                                rulesPopup = true;
+                                S("rulesPopup");
+                                this.reSetClass("rules_btn",1);
+                                break;
+                            case 2:
+                                fullscreenPlay(videoId,"1");
+                                break;
+                            case 3:
+                                order(0);
+                                break;
+                            case 4:
+                                order(1);
+                                break;
+                            default:
+                                break;
+                        }
+                        
+                    },
+                    onPress:function(){
+                        if((this.event.keyCode == 40 || this.event.keyCode == "DOWN")&& this.prevIndex == 2){
+                            if(init.othersProduct_isVip == 0){
+                                this.reSetClass("page_btn",3);
+                            }else if(init.oursProduct_isVip == 0 && init.othersProduct_isVip == 1){
+                                this.reSetClass("page_btn",4);
+                            }else{
+                                this.reSetClass("ip_btn",2);
+                            }
+                        }else if((this.event.keyCode == 39 || this.event.keyCode == "RIGHT")&& this.prevIndex == 3){
+                            if(init.oursProduct_isVip == 0){
+                                this.reSetClass("page_btn",4);
+                            }
+                        }
+                        // else if((this.event.keyCode == 37 || this.event.keyCode == "LEFT")&& this.prevIndex == 4){
+                        //     if(init.othersProduct_isVip == 0){
+                        //         this.reSetClass("page_btn",3);
+                        //     }
+                        // }
+                    },
+                },
+                ip_btn:{
+                    line:6,
+                    onEnterPress:function(){
+                        if(init.othersProduct_isVip == 1){
+                            fullscreenPlay(videoArr[this.currentIndex]);
+                        }else{
+                            order(0);
+                        }
+                    },
+                    onPress:function(){
+                        if(this.event.keyCode == 38 || this.event.keyCode == "UP"){
+                            if(init.othersProduct_isVip == 0){
+                                this.reSetClass("page_btn",3);
+                            }else if(init.oursProduct_isVip == 0 && init.othersProduct_isVip == 1){
+                                this.reSetClass("page_btn",4);
+                            }else{
+                                this.reSetClass("page_btn",2);
+                            }
+                        }
+                    },
+                },
+                rules_btn:{
+                    line:1,
+                    onEnterPress:function(){
+                        closeRulesPopup();
+                    },
+                    onPress:function(){
+                        if(this.event.keyCode == 40 || this.event.keyCode == "DOWN"){
+                            if(rulesMark<2)rulesMark+=1;
+                            G("miniBar").style.top = rulesMark*200+"px";
+                            G("rulesPopup").style.top = (-(rulesMark*540))+"px";
+                        }else if(this.event.keyCode == 38 || this.event.keyCode == "UP"){
+                            if(rulesMark>0)rulesMark-=1;
+                            G("miniBar").style.top = rulesMark*200+"px";
+                            G("rulesPopup").style.top = (-(rulesMark*540))+"px";
+                        }
+
+                    }
+                }
+            }
+
+            function onBack(){
+                if(rulesPopup){
+                    closeRulesPopup();
+                }else{
+                    stopPlay();
+                    Webview.closeBrwoser("返回");    
+                }
+            }
+
+            function closeRulesPopup(){
+                try{
+                    smallvodPlay(videoId);
+                }catch(e){
+                    
+                }
+                rulesPopup = false;
+                H("rulesPopup");
+                main.reSetClass("page_btn",1);
+            }
+
+
+            function order(idx){
+                if(init.gameNum==0 && (init.othersProduct_isVip || init.oursProduct_isVip)){
+                    S("timeOutPopup");
+                    main.reSetClass("timeOutBtn");
+                }else{
+                    var pid = init.oursId;
+                    var mark = "mw_oursBag";
+                    // if(idx == 1){
+                    //     pid = init.oursId;
+                    //     mark = "mw_othersBag";
+                    // }
+                    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); 
+                    }
+                }
+            } 
+
+             function addData(fn) {
+                ajax({
+                    url:webUrl+"index.php?m=Home&c=ThemeData&a=addData",
+                    data:{
+                        uid: uid, 
+                        theme_id: init.theme_id,
+                    },
+                    success: function (res) {
+                        fn && fn(res);
+                    },
+                    error: function () {
+                    }
+                })
+            }
+
+            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 authorization(contentcode,uid,usertoken,mac,version,fn) {
+               ajax({
+                    url:webUrl+"index.php?m=Home&c=order&a=contentCTCAuth",
+                    data:{
+                        contentcode:contentcode,
+                        uid:uid, //2.0
+                        usertoken:usertoken,
+                        mac:mac,
+                        version:version,
+                        fromsource:init.fromsource,
+                    },
+                    type: "post",
+                    dataType: "json",
+                    success: function (res) {
+                        fn && fn(res);
+                    },
+                    error: function (e) {
+                        fn && fn(e);
+                    }
+                })
+            }
+
+            function payResult(is_vip,uid,product_id){
+                if(is_vip == 1){
+                    ajax({
+                        url:webUrl+"index.php?m=Home&c=DuduApi&a=payResult",
+                        data:{
+                            uid: uid, 
+                            product_id:product_id,
+                            pay_result:0
+                        },
+                        success: function (res) {
+                        },
+                        error: function () {
+                        }
+                    })
+                }
+            }
+
+            function createQrcode(uid,url,fn){
+                ajax({
+                    url:webUrl+"index.php?m=Home&c=Activityv2&a=createQrcode",
+                    data:{
+                        act_id:init.act_id,
+                        is_vip:0,
+                        uid: uid, 
+                        url:url,
+                    },
+                    success: function (res) {
+                        fn && fn(res);
+                    },
+                    error: function (e) {
+                        fn && fn(e);
+                    }
+                })
+            }
+
+
+            function fullscreenPlay(mid) {
+                var playIntent = {
+                    package : "com.hunantv.operator",
+                    action: "mangotv://com.hunantv.operator/player/vod", 
+                    data:"",
+                    extras: {
+                        "video_index": 0,
+                        "media_asset_id": mid, //媒资包
+                    },
+                    flags: []
+                };
+                Webview.sendIntent("startActivity", playIntent);     
+            };
+
+            function smallvodPlay(media_id,media_num){   
+                media_num  = media_num || 0;  
+                stopPlay();
+                starcorExt.setVideoWindowPosition("345", "179", "577", "323");
+                // starcorExt.setHandler("PlayPrepared",function(prepared){
+                var playIntent = {
+                    "video_type": "0", 
+                    "media_asset_id": media_id,
+                    "video_index": media_num,
+                };
+                // if(prepared){
+                starcorExt.playVideo(playIntent);
+                // }
+                // });
+            };
+
+            function stopPlay(){
+                try{
+                    starcorExt.stopVideo();
+                }catch(e){
+                }
+            }
+            try{
+                starcorExt.setHandler("Resume",function(isResumed){
+                   if(isResumed){//从全屏或设置键回来
+                        smallvodPlay(videoId);
+                   }
+                });
+                starcorExt.setHandler("PlayOnCompletion",function(isCompleted){
+                    if(isCompleted){//小视频播放结束
+                        smallvodPlay(videoId);
+                    }
+                });
+            }catch(e){
+            }
+
+
+            function pageInit(){
+                if(!getStr("mw_oursBag") && !getStr("mw_othersBag") && !getStr("for")){
+                    addUser();
+                    addData();
+                }
+
+                createQrcode(uid,link,function(res){
+                    if(res.code == 0){
+                        G("QRcode").src = res.data.qrcode;
+                    }
+                })
+                
+                authorization(init.contentcode,uid,usertoken,mac,version,function(res){
+                    if(res.code == 0){
+                        if(res.data.result==0){
+                            init.oursProduct_isVip = 1;
+                            addClass(G("oursProduct"),'hasOrder');
+                            if(!!getStr("mw_oursBag")){
+                                payResult(init.oursProduct_isVip,uid,init.oursId);
+                            }
+                        }else{
+                            init.oursProduct_isVip = 0;
+                        }
+                        btnInit();
+ 
+                        // authorization(init.contentcode1,uid,usertoken,mac,version,function(res){
+                        //     if(res.code == 0){
+                        //         if(res.data.result==0){
+                        //             init.othersProduct_isVip = 1;
+                        //             addClass(G("othersProduct"),'hasOrder');
+                        //             if(!!getStr("mw_othersBag")){
+                        //                 payResult(init.othersProduct_isVip,uid,init.othersId)   
+                        //             }
+                        //         }else{
+                        //             init.othersProduct_isVip = 0;
+                        //         }                       
+                        //     }
+                        // });
+                    }
+                    
+                },function(){
+                    btnInit();
+                });
+                smallvodPlay(videoId);
+            }
+            function btnInit(){
+                var btnConfig = {
+                    className: pageConf.focusItem,
+                    currentIndex: pageConf.focusIdx,
+                    rules: data.rules,
+                    onBack:onBack,
+                }
+                window.main = new tvSysBtnBind(btnConfig);
+                main.reLoad();
+            }
+
+            pageInit();
+
+            window.onunload = function(){
+                stopPlay();
+            }
+        </script>
+    </body>
+</html>

文件差异内容过多而无法显示
+ 1132 - 0
h5v2/mw_20200108_act/index1.html


+ 180 - 0
h5v2/mw_20200108_act/index2.html

@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <meta name="page-view-size" content="1280*720" />
+        <title>"鼠"你最棒,萌宝"潮"贺岁</title>
+        <link rel="stylesheet" type="text/css" href="css/page2.css" />
+    </head>
+    <body>
+        <div class="cont">
+            <div class="first">
+                <div class="u_img"><img src="img/demo.jpg" alt="" /><i></i></div><div class="u_msg">张宇涵</div>
+            </div>
+            <ul id="topUl">
+                <li class="topLi"><div class="u_img"><img src="img/demo.jpg" alt="" /><i></i></div><div class="u_msg">张宇涵</div></li>
+                <li class="topLi"><div class="u_img"><img src="img/demo.jpg" alt="" /><i></i></div><div class="u_msg">张宇涵</div></li>
+                <li class="topLi"><div class="u_img"><img src="img/demo.jpg" alt="" /><i></i></div><div class="u_msg">张宇涵</div></li>
+                <li class="topLi"><div class="u_img"><img src="img/demo.jpg" alt="" /><i></i></div><div class="u_msg">张宇涵</div></li>
+            </ul>
+        </div>
+        <script src="./js/webview.js" type="text/javascript"></script>
+        <script src="./js/tvSysBtnBind.v2.js" type="text/javascript"></script>
+        <script src="./js/comm.js" type="text/javascript"></script>
+        <script type="text/javascript">
+            try {
+                var uid = Webview.readSystemProp('user.id');
+                var usertoken = Webview.readSystemProp('user.token');
+                var mac = Webview.readSystemProp('device.mac');
+                var version = Webview.readSystemProp('app.version');
+                webUrl = 'http://10.255.1.98:8090/DuduToy_v2/';
+            } 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"
+                if (location.href.indexOf('10.255.1.98:8090') >= 0) {
+                    webUrl = 'http://10.255.1.98:8090/DuduToy_v2/';
+                } else {
+                    webUrl = 'http://10.200.10.28:28090/DuduToy_v2/';
+                }
+            }
+
+
+            var init = {
+                act_id:8,
+                gameNum:0,
+                theme_id:4,
+                fromsource:4,
+                oursId:"11187",
+                othersId:"3651",
+                oursProduct_isVip:0,
+                othersProduct_isVip:0,
+                contentcode:"D00000001201808211755370019993899",
+                contentcode1:"D00000001201905291020410009898494",
+            }
+
+            var backUrl = webUrl+'h5v2/activity/mw_20200108_act/index.html';
+            var indexUrl = webUrl+'h5v2/index.html?activity='+init.act_id;
+            var videoArr = []
+
+            var pageConf = {
+                focusIdx:0,
+                focusItem:"first",
+            }
+
+            var rulesPopup = false;
+            var rulesMark = 0;
+            var data = new Object();
+            data.rules = {
+                first:{
+                    line:1,
+                    "down":["topLi"],
+                    onEnterPress:function(){
+                        
+                    },
+                    onPress:function(){
+                        
+                    },
+                },
+                topLi:{
+                    line:4,
+                    "up":["first"],
+                    onEnterPress:function(){
+                        
+                    },
+                    onPress:function(){
+                        
+                    },
+                },
+            }
+
+             function onBack(){
+                window.location.href = indexUrl;   
+            }
+
+            function addData(fn) {
+                ajax({
+                    url:webUrl+"index.php?m=Home&c=ThemeData&a=addData",
+                    data:{
+                        uid: uid, 
+                        theme_id: init.theme_id,
+                    },
+                    success: function (res) {
+                        fn && fn(res);
+                    },
+                    error: function () {
+                    }
+                })
+            }
+
+            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 getMengbaoList(uid,is_vip,fn) {
+                ajax({
+                    url:webUrl+"index.php?m=Home&c=Activityv2&a=getMengbaoList",
+                    data:{
+                        act_id:init.act_id,
+                        uid: uid, 
+                        is_vip: is_vip,
+                        order:"score",
+                    },
+                    success: function (res) {
+                        fn && fn(res);
+                    },
+                    error: function () {
+                    }
+                })
+            }
+
+            function fullscreenPlay(mid,num) {
+                num = num || 30;
+                stopPlay();
+                var playIntent = {
+                    action: "com.mgtv.hndx.prop.mgplayer.MgVodPlayerActivity", //湖南电信、湖南联通(6期)
+                    extras: {
+                        "cmd_ex": "play_video",
+                        "play_video_direct": 1,
+                        "video_id": mid,
+                        "video_type": 0,
+                        "video_index": 0,
+                        "video_all_index": num,
+                        "ui_style": 0,
+                        "media_asset_id": "TVseries",
+                        "category_id": "",
+                        "video_new_index": num-1,
+                    },
+                    flags: ["SINGLE_TOP"]
+                };
+                Webview.sendIntent("startActivity", playIntent); //全屏播放
+            };
+
+            function btnInit(){
+                var btnConfig = {
+                    className: pageConf.focusItem,
+                    currentIndex: pageConf.focusIdx,
+                    rules: data.rules,
+                    onBack:onBack,
+                }
+                window.main = new tvSysBtnBind(btnConfig);
+                main.reLoad();
+            }
+
+            btnInit();
+
+        </script>
+    </body>
+</html>

+ 385 - 0
h5v2/mw_20200108_act/js/comm.js

@@ -0,0 +1,385 @@
+//ajax对象构造函数
+/**
+ * [Ajax description]
+ * @param {[type]} options [请求方式(字符串)]
+ * @param {[dataType]} options [返回数据的格式(字符串)]
+ * @param {[data]} options [参数(对象)]
+ * @param {[url]} options [请求地址(字符串)]
+ * @param {[success]} options [成功回调(函数)]
+ * @param {[error]} options [错误回调(函数)]
+ * @param {[async]} options [是否同步(布尔)]
+ 
+ * 例子:
+ * ajax({
+        url:
+        data:
+        type:
+        dataType:
+        success:
+        error:
+        async:
+    });
+ */
+function ajax(options){
+    var _this = this;
+    //异步请求对象的完成状态
+    this.done = 0;
+    this.format = function(){
+        var now = new String(new Date().getTime());
+        return now.substr(0,now.length-5);
+    }
+    //格式化参数
+    this.formatParams = function(data) {
+        //获取地址参数
+        var arr = [];
+        for (var name in data) {
+            arr.push(encodeURIComponent(name) + "=" + encodeURIComponent(data[name]));
+        }
+        
+        arr.push("t="+_this.format());//按分钟刷一次
+        return arr.join("&");
+    }
+    
+    //传入设置
+    options = options || {};
+    //请求方式
+    options.type = (options.type || "GET").toUpperCase();
+    options.dataType = options.dataType || "json";
+    options.async = options.async || true;
+    var params = _this.formatParams(options.data);
+    //创建异步请求对象 - 第一步
+    var xhr;
+    //w3c标准
+    if (window.XMLHttpRequest) {
+        xhr = new XMLHttpRequest();
+    } 
+    //兼容IE6及以下
+    else if (window.ActiveObject) { 
+        xhr = new ActiveXObject('Microsoft.XMLHTTP');
+    }
+    
+    //连接 和 发送 - 第二步
+    //判断是那种类型的请求
+    //若是get请求
+    if (options.type == "GET") {
+        //参数拼接
+        if(options.url.indexOf("?")==-1) sp="?" ; else sp="&";
+    
+        //发送请求
+        xhr.open("GET", options.url + sp + params,options.async);
+        xhr.send(null);
+        
+    } 
+    //若是post请求
+    else if (options.type == "POST") {
+        //发送请求
+        xhr.open("POST", options.url,options.async);
+        //设置表单提交时的内容类型
+        xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+        //参数配置
+        xhr.send(params);
+    }
+
+    //接收 - 第三步
+    xhr.onreadystatechange = function() {
+        if (xhr.readyState == 4) {
+            //状态码
+            var status = xhr.status;
+            //状态码表示成功时,执行成功回调函数
+            if (status >= 200 && status < 300 || status == 304) {
+                            
+                //返回数据的格式
+                //json字符串
+                if (options.dataType == "json") {
+
+                    try{
+                        options.success && options.success(eval("("+xhr.responseText+")"));
+                    }
+                    catch(err){
+                        options.success && options.success(JSON.parse(xhr.responseText), xhr.responseXML);
+                    }
+                    
+                
+                } 
+                //普通字符串
+                else {
+                    options.success && options.success(xhr.responseText, xhr.responseXML);
+                }
+                // 改变状态为完成
+                _this.done = 1;
+            } 
+            //如果状态码表示失败时调用错误处理回调函数
+            else {
+                options.error && options.error(status);
+                // 改变状态为完成
+                _this.done = 1;
+            }
+        }
+    }
+}
+
+
+
+function setCookie(name,value,t){   
+  //document.cookie.setPath("/");  
+  var hour = t?t:8; 
+  var exp = new Date();   
+  exp.setTime(exp.getTime() + hour*60*60*1000);   
+  document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString()+";path=/";   
+} 
+
+function getCookie(name){   
+  //document.cookie.setPath("/");  
+  var arr, reg = new RegExp("(^| )"+name+"=([^;]*)(;|$)");  
+  if(arr=document.cookie.match(reg)){  
+      return unescape(arr[2]);   
+  }  
+  else{  
+      return null;   
+  }
+}
+
+/**
+  * 获取url字段参数化
+  * @param name 字段名
+*/
+function getStr(name){
+  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+  var r = window.location.search.substr(1).match(reg);
+  if (r != null) return unescape(r[2]); return null; 
+}
+
+//类名增加兼容
+function addClass(obj, cls){
+    if (!hasClass(obj, cls)) obj.className += " " + cls
+}
+
+// 去除类名
+function removeClass(obj, cls){
+    if (hasClass(obj, cls)) {
+        var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
+        obj.className = obj.className.replace(reg, ' ')
+    }
+}
+
+// 查看类名
+function hasClass(obj, cls){
+    // console.log(obj,cls)
+    return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
+}
+
+// 缓冲运动
+function animate(ele,opt,callback){
+    //设置一个变量用于判断动画数量
+    var timerLen = 0;
+    for(var attr in opt){
+        creatTimer(attr);
+        //每加一个定时器,动画数加一
+        timerLen++;
+    }
+    function creatTimer(attr){
+        var timerName = attr + 'timer';console.log(timerName)
+        var target = opt[attr];
+        clearInterval(ele[timerName]);
+        ele[timerName] = setInterval(function(){
+            // 先获取当前值
+            var current = getComputedStyle(ele)[attr];
+
+            // 提取数值:单位
+            // 根据当前值提取单位(单位在current最后面)
+            var unit = current.match(/[a-z]+$/);
+            if(unit){
+                current = current.substring(0,unit.index)*1;
+                unit = unit[0]
+            }else{
+                unit = '';
+                current *= 1;
+            }
+
+            // 计算速度
+            var speed = (target - current)/10;
+
+            // 处理speed值,防止speed为小数而造成定时器无法完成的情况
+            // 0.3=>1,-0.3=>-1
+            speed = speed>0 ? Math.ceil(speed) : Math.floor(speed);
+
+            //对于没有单位的属性单独处理
+            if(attr == 'opacity'){
+                speed = speed>0?0.05:-0.05;
+            }
+            
+
+            if(current === target){console.log("清除定时器")
+                clearInterval(ele[timerName]);
+                current = target - speed;
+                //每完成一个动画,timerLen减一
+                timerLen--
+                //最后若timerLen数量为零,则所有动画已经执行完再执行回调函数
+                if(typeof callback ==='function'&&timerLen==0){
+                    callback();
+                }
+                
+            }
+            ele.style[attr] = current + speed + unit;
+        },30)
+    };
+
+    
+}
+
+//弹窗工具
+function tips(text, time) {//提示工具
+    time = time ? time : 2000;
+    var para = document.createElement("p");
+    para.innerHTML = text;
+    para.setAttribute("class", "w_tips");
+    para.setAttribute("style", "display: block;border-radius: 10px;background-color: rgba(1,1,1,0.5);color: #FFF;padding: 14px 26px;font-size: 16px; position: fixed;left: 50%;top: 80%;z-index: 999;");
+    document.body.appendChild(para);
+    para.style.marginLeft = -para.offsetWidth / 2+"px";
+    setTimeout(function() {
+        document.body.removeChild(para);
+    }, time);
+}
+
+function G(id) {
+  return document.getElementById(id);
+}
+
+function S(id) {
+  var temp = G(id);
+  if (temp) temp.style.visibility = 'visible';
+}
+
+function H(id) {
+  var temp = G(id);
+  if (temp) temp.style.visibility = 'hidden';
+}
+
+
+var curCSS;
+if (window.getComputedStyle) {
+    curCSS = function(elem, name) {
+        name = comm.toHump(name, '-');
+        var ret, computed = window.getComputedStyle(elem, null),
+        style = elem.style;
+        if (computed) ret = computed[name];
+        if (!ret) ret = style[name];
+        return ret;
+    };
+} else if (document.documentElement.currentStyle) {
+    curCSS = function(elem, name) {
+        name = comm.toHump(name, '-');
+        var ret = elem.currentStyle && elem.currentStyle[name],
+        style = elem.style;
+        if (!ret && style && style[name]) {
+            ret = style[name];
+        }
+        return ret === '' ? 'auto': ret;
+    };
+} else {
+    curCSS = function(elem, name) {
+        name = comm.toHump(name, '-');
+        var style = elem.style;
+        return style[name];
+    };
+}
+
+function css(obj, name, value) {
+    if (value === undefined) {
+        var temp = curCSS(obj, name);
+        if (temp === '' || temp === 'auto') temp = 0;
+        return temp;
+    } else {
+        var pxs = ['left', 'top', 'right', 'bottom', 'width', 'height', 'line-height', 'font-size'];
+        var isPx = pxs.indexOf(name) >= 0;
+        if (isPx && !/.*px$/g.test(value + '') && value !== 'auto') value += 'px';
+        obj.style[comm.toHump(name)] = value;
+    }
+};
+
+fx = {
+    interval: 13,
+    tagIdx: 0,
+    animates: {},
+    start: function(obj, params, speed, easing, callback, tag) {
+        var speeds = {
+            fast: 200,
+            normal: 400,
+            slow: 600
+        };
+        speed = (typeof speed === 'string' ? speeds[speed] : speed) || speeds.normal;
+        if (typeof easing === 'function') {
+            tag = callback;
+            callback = easing;
+            easing = '';
+        }
+        easing = easing || 'swing';
+        tag = tag || 'default';
+        for (var i in this.animates) {
+            if (i.indexOf(tag) >= 0) this.stop(i);
+        }
+
+        var oldParams = params;
+        params = {};
+        var canContinue = false;
+        for (var i in oldParams) {
+            var p = oldParams[i];
+            if (!comm.isArray(p)) p = [css(obj, i), p];
+            else css(obj, i, p[0]);
+            params[i] = {
+                start: parseFloat(p[0]),
+                end: parseFloat(p[1])
+            };
+            if (params[i].start !== params[i].end) canContinue = true;
+        }
+        if (!canContinue) return;
+        tag += '_' + (++this.tagIdx);
+        this.animates[tag] = {
+            obj: obj,
+            params: params,
+            speed: speed,
+            easing: easing,
+            callback: callback,
+            startTime: Date.now(),
+            idx: 0,
+            timer: undefined
+        };
+        this.animates[tag].timer = setInterval(function() {
+            var animate = fx.animates[tag];
+            animate.idx++;
+            var n = Date.now() - animate.startTime;
+            if (n > animate.speed) {
+                fx.stop(tag);
+                return;
+            }
+            var percent = n / animate.speed;
+            var pos = fx.easing[animate.easing](percent, n, 0, 1, animate.speed);
+            for (var i in animate.params) {
+                var p = animate.params[i];
+                css(animate.obj, i, p.start + (p.end - p.start) * pos);
+            }
+        },
+        this.interval);
+    },
+    stop: function(tag) {
+        var animate = fx.animates[tag];
+        if (!animate) return false;
+        clearInterval(animate.timer);
+        var ps = animate.params;
+        for (var i in ps) css(animate.obj, i, ps[i].end);
+        animate.callback && animate.callback();
+        delete fx.animates[tag];
+        return true;
+    },
+    easing: {
+        linear: function(p, n, firstNum, diff) {
+            return firstNum + diff * p;
+        },
+        swing: function(p, n, firstNum, diff) {
+            return 0.5 - Math.cos(p * Math.PI) / 2;
+        }
+    }
+};
+function animate(obj, params, speed, easing, callback, tag) {
+    fx.start(obj, params, speed, easing, callback, tag);
+};

+ 653 - 0
h5v2/mw_20200108_act/js/tvSysBtnBind.v2.js

@@ -0,0 +1,653 @@
+try{
+(function(arr) { 
+        //当前元素删除
+        arr.forEach(function(item) {
+            if (item.hasOwnProperty('remove')) {
+                return
+            }
+            Object.defineProperty(item, 'remove', {
+                configurable: true,
+                enumerable: true,
+                writable: true,
+                value: function remove() {
+                    this.parentNode.removeChild(this)
+                }
+            })
+        })
+    })([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+
+    if (!("classList" in document.documentElement)) {
+        // classList 兼容
+        Object.defineProperty(HTMLElement.prototype, 'classList', {
+            get: function() {
+                var self = this;
+
+                function update(fn) {
+                    return function(value) {
+                        var classes = self.className.split(/\s+/g),
+                            index = classes.indexOf(value);
+                        fn(classes, index, value);
+                        self.className = classes.join(" ")
+                    }
+                }
+                return {
+                    add: update(function(classes, index, value) {
+                        if (!~index) classes.push(value)
+                    }),
+                    remove: update(function(classes, index) {
+                        if (~index) classes.splice(index, 1)
+                    }),
+                    toggle: update(function(classes, index, value) {
+                        if (~index) classes.splice(index, 1);
+                        else classes.push(value)
+                    }),
+                    contains: function(value) {
+                        return !!~self.className.split(/\s+/g).indexOf(value)
+                    },
+                    item: function(i) {
+                        return self.className.split(/\s+/g)[i] || null
+                    }
+                }
+            }
+        })
+    }
+    function fireKeyEvent(el, evtType, keyCode) {
+        //创建事件
+        var doc = el.ownerDocument,
+            win = doc.defaultView || doc.parentWindow,
+            evtObj;
+        if (doc.createEvent) {
+            if (win.KeyEvent) {
+                evtObj = doc.createEvent('KeyEvents');
+                evtObj.initKeyEvent(evtType, true, true, win, false, false, false, false, keyCode, 0)
+            } else {
+                evtObj = doc.createEvent('UIEvents');
+                Object.defineProperty(evtObj, 'keyCode', {
+                    get: function() {
+                        return this.keyCodeVal
+                    }
+                });
+                Object.defineProperty(evtObj, 'which', {
+                    get: function() {
+                        return this.keyCodeVal
+                    }
+                });
+                evtObj.initUIEvent(evtType, true, true, win, 1);
+                evtObj.keyCodeVal = keyCode;
+                if (evtObj.keyCode !== keyCode) {
+                    // console.log("keyCode " + evtObj.keyCode + " 和 (" + evtObj.which + ") 不匹配")
+                }
+            }
+            el.dispatchEvent(evtObj)
+        } else if (doc.createEventObject) {
+            evtObj = doc.createEventObject();
+            evtObj.keyCode = keyCode;
+            el.fireEvent('on' + evtType, evtObj)
+        }
+
+    }
+}catch(e){
+    //版本很低
+} 
+function addClass(ele, cls) {
+    if(ele.classList){
+       ele.classList.add(cls); 
+    }else{
+       if (!this.hasClass(ele, cls)) ele.className += " " + cls; 
+    }
+    
+}
+function arrIndexOf(arr, v) {
+          for (var i = 0; i < arr.length; i++) {
+             if (arr[i] == v) {
+                 return i;
+              }
+         }
+       return -1;
+ }
+//删除指定dom元素的样式
+function removeClass(ele, cls) {
+    if(ele.classList){
+       ele.classList.remove(cls); 
+    }else{
+        if (ele.className != '' && hasClass(ele, cls)) {
+                    var arrClassName = ele.className.split(' ');
+                    var classIndex = arrIndexOf(arrClassName, cls);
+                     if (classIndex!==-1) {
+                       arrClassName.splice(classIndex, 1);
+                        ele.className = arrClassName.join(' ');
+                     }
+               }
+    }
+}
+//如果存在(不存在),就删除(添加)一个样式
+function toggleClass(ele,cls){ 
+    if(hasClass(ele,cls)){ 
+            removeClass(ele, cls); 
+        }else{ 
+            addClass(ele, cls); 
+     } 
+    
+}
+
+function hasClass(element, cls) {
+return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
+} 
+//  function hasClass(tagStr,classStr){
+//     if(tagStr.classList){
+//        return tagStr.classList.contains(classStr);
+//     } else{ 
+//        var arr=tagStr.className.split(/\s+/ ); //这个正则表达式是因为class可以有多个,判断是否包含
+//                for (var i=0;i<arr.length;i++){
+//                    if (arr[i]==classStr){
+//                        return true ;
+//                    }
+//                }
+//             return false 
+//         }
+// }
+function getClassNames(classStr,target, tagName) {
+   /* classStr 样式名(必须) 目标元素 标签类型 */
+   target= target?target:document;
+   tagName = tagName?tagName:"*";
+    if (document.getElementsByClassName) {
+        return target.getElementsByClassName(classStr)
+    } else {
+        var nodes = target.getElementsByTagName(tagName),
+            ret = [];
+        for (i = 0; i < nodes.length; i++) {
+            if (hasClass(nodes[i], classStr)) {
+                ret.push(nodes[i])
+            }
+        }
+        return ret;
+    }
+}
+
+function getElementLeft(ele) {
+            var actualLeft = ele.offsetLeft;
+            var current = ele.offsetParent;
+            // 如果当前元素不是根元素
+            while (current !== null) {
+                actualLeft += current.offsetLeft;
+                current = current.offsetParent;
+            }
+            return actualLeft;
+        }
+
+        function getElementTop(ele) {
+            var actualTop = ele.offsetTop;
+            var current = ele.offsetParent;
+            while (current !== null) {
+                actualTop += current.offsetTop;
+                current = current.offsetParent;
+            }
+            return actualTop;
+        }
+
+function getBoundingClientRect(ele) {
+// 该方法是计算当前元素距离当前视口的距离,所以需要得到页面的滚动距离
+    var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+    var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
+// 如果浏览器支持该方法
+    if (ele.getBoundingClientRect) {
+        if (typeof arguments.callee.offset !== 'number') {
+       //不同浏览器中,元素的默认位置不同。为了统一起见,需要新创建一个元素
+            var temp = document.createElement('div');
+            temp.style.cssText = "position:absolute;top:0;left:0";
+            document.body.appendChild(temp);
+            arguments.callee.offset = -temp.getBoundingClientRect().top - scrollTop;
+            document.body.removeChild(temp);
+            temp = null;
+        }
+        var rect = ele.getBoundingClientRect();
+        var offset = arguments.callee.offset;
+        return {
+            left: rect.left + offset,
+            right: rect.right + offset,
+            top: rect.top + offset,
+            bottom: rect.bottom + offset,
+            width:(rect.right + offset)-(rect.left + offset),
+            height:(rect.bottom + offset)-(rect.top + offset)
+        }
+    } else {
+    //当前浏览器不支持该方法
+        var actualLeft = getElementLeft(ele);
+        var actualTop = getElementTop(ele);
+        var offsetWidth=ele.offsetWidth;
+        var offsetHeight=ele.offsetHeight;
+        return {
+            left: actualLeft - scrollLeft,
+            right: actualLeft + offsetWidth - scrollLeft,
+            top: actualTop - scrollTop,
+            bottom: actualTop + offsetHeight - scrollTop,
+            width:(actualLeft + offsetWidth- scrollLeft) -(actualLeft - scrollLeft),
+            height:(actualTop + offsetHeight - scrollTop)-(actualTop - scrollTop)
+        }
+    }
+}
+    (function(window) {
+        var tvSysBtnBind = function(init) {
+                var _this = this,
+                    _self = self;
+                var id = init.id ? init.id : null,
+                    keyRemoveDefault = typeof init.keyRemoveDefault == "undefined" ? false : init.keyRemoveDefault,
+                    currentIndex = init.currentIndex ? parseInt(init.currentIndex) : 0,
+                    btnLeft = init.btnLeft ? init.btnLeft : 37,
+                    btnUp = init.btnUp ? init.btnUp : 38,
+                    btnRight = init.btnRight ? init.btnRight : 39,
+                    btnDown = init.btnDown ? init.btnDown : 40,
+                    btnEnter = init.btnEnter ? init.btnEnter : 13,
+                    history = typeof init.history == "undefined" ? true : init.history,
+                    isFloatLast = typeof init.isFloatLast == "undefined" ? false : init.isFloatLast,
+                    isCentered = typeof init.isCentered == "undefined" ? true : init.isCentered,
+                    currentClass = init.currentClass ? init.currentClass : "current",
+                    effect = init.effect ? init.effect : "slide1",
+                    element = new Array(),
+                    rules = init.rules,
+                    direction = "y";
+                _this.className = init.className ? init.className : "hotbutton";
+                this.event = {};
+                var _tempElem;
+                this.currentIndex = parseInt(currentIndex);
+                this.defaultIndex = parseInt(currentIndex);
+                this.currentClass = currentClass;
+                this.historyFocus = {};
+                if (!window.focusobj) window.focusobj = document.createElement("span");
+                (typeof init.onLoad) == "function" ? init.onLoad : init.onLoad = function() {};
+                (typeof init.onBack) == "function" ? init.onLoad : init.onBack = function() {};
+                this.onLoad = function() {
+                    focusobj.innerHTML = '<div class="cssbk"><b class="lt"></b><b class="t"></b><b class="rt"></b><b class="r"></b><b class="rb"></b><b class="b"></b><b class="lb"></b> <b class="l"></b></div>';
+                    addClass(focusobj,"focusobj");
+                    addClass(focusobj,"current");
+                    focusobj.style.display = "none";
+                    _this.target = init.id ? document.getElementById(init.id) : document.body;
+                    _this.defaultTarget = _this.target;
+                    _this.currentId = init.id ? init.id : "Jdoc";
+                    _this.reLoad();
+                    _this.sourceClassName = _this.className;
+                    _this.sourceLength = element.length;
+                    _this.prev = element[currentIndex];
+                    _this.prevIndex = currentIndex;
+                    _this.current = element[currentIndex];
+                    _this.currentIndex = currentIndex;
+                    _this.target.appendChild(focusobj);
+                    init.onLoad.call(_this);
+                }
+                self.getCurRule=function(){
+                    var obj = {};
+                    if (rules) {
+                        obj = rules["#" + _this.currentId + ">." + _this.className];
+                        if (typeof obj == "undefined") obj = rules[_this.className]
+                    }
+                    return obj
+                }
+
+
+                this.reSetClass = function(item, index, curClass) {
+                 var obj =_self.getCurRule();
+                    if(typeof obj["history"]=="undefined") obj["history"]=history; //默认历史记录开关
+                    if (obj["history"]) _this.historyFocus[_this.currentId+_this.className] = _this.currentIndex; //当前历史开关
+                    //index = index ? index : 0;
+                    _this.prevCurrentClass = _this.currentClass;
+                    if (curClass) {
+                        _this.currentClass = curClass
+                    }
+                    var arr = item.split(">");
+                    for (var i = 0; i < arr.length; i++) {
+                        if (arr[i] == "") arr.splice(i)
+                    }
+                    for (var i = 0; i < arr.length; i++) {
+                        if (arr[i].indexOf("#") != -1) {
+                            _this.currentId=arr[i].replace("#", "");
+                            if (document.getElementById( _this.currentId)) _this.target = document.getElementById( _this.currentId);
+                        }
+                        if (arr[i].indexOf(".") != -1) {
+                            item = arr[i].replace(".", "")
+                        }
+                        if (arr[i].indexOf(".") == -1 && arr[i].indexOf("#") == -1) {
+                            item = arr[i]
+                        }
+                    }
+
+                    if (getClassNames(item,_this.target).length > 0) {
+                        _self.newItem(item, index)
+                    } else {
+                        _this.target = _this.defaultTarget;
+                        if (getClassNames(item,_this.target).length > 0) _self.newItem(item, index)
+                    }
+                }
+                self.newItem = function(item, index) {
+
+                    if (_this.prev) removeClass(_this.prev,_this.currentClass);
+                    //_this.target=document.getElementById(_this.currentId);
+                    if(typeof _this.historyFocus[_this.currentId+item]=="undefined")
+                        _this.historyFocus[_this.currentId+item]=0;
+                    _this.className = item;
+                    _this.prevIndex = _this.currentIndex = typeof index!="undefined" ?index:  _this.historyFocus[_this.currentId+item];
+                    _this.reLoad();
+                }
+                self.readFn = function() {
+                    if ((typeof init.onEnterPress) == "function") {
+                        init.onEnterPress
+                    } else {
+                        init.onEnterPress = function() {}
+                    }
+                    if ((typeof init.onPress) == "function") {
+                        init.onPress
+                    } else {
+                        init.onPress = function() {}
+                    }
+                }
+                this.reLoad = function() {
+                    self.readFn();
+                    element =getClassNames(_this.className,_this.target);
+                    this.hotbtn = element;
+                    if (element.length <= 0) return false;
+                    if (_this.currentIndex || _this.currentIndex == 0) {
+                        _this.currentIndex = parseInt(_this.currentIndex)
+                    } else {
+                        _this.currentIndex = parseInt(init.currentIndex)
+                    }
+                    if (isload >= 2 && _this.sourceClass == _this.className && _this.sourceLength != element.length && !isSet) {
+                        if (hasClass(_this.prev,_this.className) && _this.sourceLength > element.length) {
+                            _this.currentIndex = _this.currentIndex - (_this.sourceLength - element.length);
+                            _this.prevIndex = _this.prevIndex - (_this.sourceLength - element.length);
+                            _this.sourceLength = element.length
+                        } else if (hasClass(_this.prev,_this.className) && _this.sourceLength < element.length) {
+                            _this.currentIndex = _this.currentIndex + (element.length - _this.sourceLength);
+                            _this.prevIndex = _this.prevIndex + (element.length - _this.sourceLength);
+                            _this.sourceLength = element.length
+                        }
+                    }
+                    isSet = false;
+                    _this.current = element[_this.currentIndex];
+                    _this.currentIndex = _this.currentIndex;
+                    _self.classDo(_this.currentIndex);
+                    for (var i = 0; i < this.hotbtn.length; i++) {
+                        this.hotbtn[i].setAttribute("data-id", i)
+                    }
+                }
+                function keydefault(e) {
+                    try {
+                        if (keyRemoveDefault) window.event ? window.event.returnValue = false : e.preventDefault()
+                    } catch (e) {}
+                }
+                var isSet = false;
+                this.setCurrentIndex = function(index) {
+                    isSet = true;
+                    index = parseInt(index);
+                    _this.currentIndex = index;
+                    _this.current = element[index]
+                }
+                var maxTop = 0;
+                this.viewScrollY = function(y,view) {
+                    var obj = self.getCurRule();
+                    // var view = _this.current.parentNode.parentNode;
+                    var sumtop =  obj["directionY"] ? parseInt(obj["directionY"]) : 0;
+                    var top = sumtop + y + view.clientHeight / 2 - Math.ceil(_this.current.clientHeight / 2);
+                    if (top > 0) top = 0;
+                    obj["directionY"]=top;
+                    view.children[0].style.top = top + "px"
+                }
+                var maxLeft = 0;
+                this.viewScrollX = function(x,view) {
+                    var obj = self.getCurRule();
+                    // var view = _this.current.parentNode.parentNode;
+                    var sumleft = obj["directionX"] ? parseInt(obj["directionX"]) : 0;
+                    var left = sumleft + x + view.clientWidth / 2 - Math.ceil(_this.current.clientWidth / 2);
+                    
+                      if (isCentered) {
+                        if (left > 0) left = 0;
+                        if (obj["maxLeft"]==undefined||obj["maxLeft"]==null) {
+                            maxLeft = getBoundingClientRect(_this.hotbtn[_this.hotbtn.length - 1]).right - getBoundingClientRect(view).right;
+                            obj["maxLeft"]=maxLeft;
+            
+                        }
+                        if (left < sumleft && left < -maxLeft) {
+                            left = -maxLeft
+                        }
+                        // if(maxLeft<view.clientWidth)
+                        //  left=0;
+                    }
+                    obj["directionX"]=left;
+                    view.children[0].style.left = left + "px"
+                }
+                this.onPress = function(e) {
+                    init.onPress.call(_this)
+                }
+                this.onEnterPress = function() {
+                    init.onEnterPress.call(_this)
+                }
+                this.onBack = function() {
+                    init.onBack.call(_this)
+                }
+                self.getScrollTop = function() {
+                    var scrollTop = 0;
+                    if (document.documentElement && document.documentElement.scrollTop) {
+                        scrollTop = document.documentElement.scrollTop
+                    } else if (document.body) {
+                        scrollTop = document.body.scrollTop
+                    }
+                    return scrollTop
+                }
+                this.scroll = function() {
+                    var obj = self.getCurRule();
+                    if (getBoundingClientRect(_this.current).bottom > document.body.clientHeight || getBoundingClientRect(_this.current).top < 0) {
+                        var y = getBoundingClientRect(_this.current).top - (document.body.clientHeight / 2 - _this.current.clientHeight / 2);
+                        // window.scrollTo(0, y)
+                    }
+
+                    var view = _this.current.parentNode.parentNode;
+                    if(obj["directionParent"])view=obj["directionParent"];
+                    // var direction = view.getAttribute("data-scroll-direction");
+                    // if (!direction) {
+                    //     view = _this.current.parentNode.parentNode.parentNode;
+                    //     direction = view.getAttribute("data-scroll-direction"); 
+                    // }
+                    if (obj == undefined || !obj["direction"] )return;
+                    view.style.position = "relative";
+                    view.children[0].style.position = "absolute";
+                    var sumleft = obj["directionX"] ? parseInt(obj["directionX"]) : 0;
+                    if (obj["direction"] == "x") {
+                        view.children[0].style.width = _this.hotbtn.length * _this.current.clientWidth * 2 + "px";
+                        var scroll_left = getBoundingClientRect(view).left - getBoundingClientRect(_this.current).left;
+                        if( _this.hotbtn.length * _this.current.clientWidth>view.clientWidth)
+                         _this.viewScrollX(scroll_left,view);
+                    }
+                    var sumleft = obj["directionY"] ? parseInt(obj["directionY"]) : 0;
+                    if (obj["direction"] == "y") {
+                        var scroll_top = getBoundingClientRect(view).top - getBoundingClientRect(_this.current).top;
+                        _this.viewScrollY(scroll_top,view)
+                    }
+                }
+                var isload = 0;
+                self.classDo = function(index) {
+                    isload = isload + 1;
+                    if (isload == 2) {
+                        _this.sourceLength = element.length
+                    }
+                    if (_this.prevCurrentClass) {
+                        var ele = getClassNames(_this.prevCurrentClass,_this.target) ;
+                        for (var i = 0; i < ele.length; i++) {
+                            if (hasClass(ele[i],_this.prevCurrentClass)) {
+                                removeClass(ele[i],_this.prevCurrentClass);
+                            }
+                        }
+                    }
+                    if (element[index])  addClass(element[index],_this.currentClass);
+                    else return;
+                    for (var i = 0; i < element.length; i++) {
+                        if (i != index && hasClass(element[i],_this.currentClass)) {
+                            removeClass(element[i],_this.currentClass);
+                        }
+                    }
+                    _this.scroll();
+                    var effect = element[index].getAttribute("data-effect");
+                    if (effect) {
+                        focusobj.setAttribute("style", "  position: fixed; z-index: 19;width:" + (getBoundingClientRect(element[index]).width) + "px ;height:" + (getBoundingClientRect(element[index]).height) + "px; left:" + getBoundingClientRect(element[index]).left + "px;top:" + getBoundingClientRect(element[index]).top + "px;");
+                        focusobj.setAttribute("class", "focusobj current " + effect);
+                        focusobj.style.display = "list-item"
+                    } else {
+                        focusobj.setAttribute("style", "");
+                        focusobj.style.display = "none"
+                    }
+                }
+                self.EventUtil = {
+                    add: function(obj, callback) {
+                        if (typeof(obj.onkeypress) == "null") {
+                            obj.onkeypress = function(e) {
+                                callback && callback(e)
+                            }
+                        } else {
+                            obj.onkeydown = function(e) {
+                                callback && callback(e)
+                            }
+                        }
+                    }
+                }
+
+                try{
+                    Webview.requestFocus();
+                    Webview.setKeyEventHandler(function (action, keyCode, keyName, metaState){
+                        var e = this;
+                        e.keyCode = keyName;
+                        _self.onPressdo(e);
+                        // _this.makepress(keyName)
+                    })
+                }catch(err){
+                    self.EventUtil.add(document, function (e) {
+                        _self.onPressdo(e);
+                    });
+                }
+                // EventUtil.add(document, function(e) {
+                //     _self.onPressdo(e)
+                // });
+                self.overIndex = function() {
+                    if (_this.currentIndex >= element.length - 1) {
+                        _this.currentIndex = element.length - 1
+                    }
+                    if (_this.currentIndex < 0) {
+                        _this.currentIndex = 0
+                    }
+                }
+                self.isNumber = function(val) {
+                    var regPos = /^\d+(\.\d+)?$/;
+                    var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/;
+                    if (regPos.test(val) || regNeg.test(val)) {
+                        return true
+                    } else {
+                        return false
+                    }
+                }
+                self.ruleFn = function(index, direction) {
+                    var obj = {};
+                    if (rules) {
+                        obj =_self.getCurRule();
+                    }
+                    if (obj && typeof obj == "object" && typeof obj["line"] != "undefined") {
+                        var line = obj["line"]
+                    } else {
+                        var line = _this.hotbtn.length
+                    }
+                    line = parseInt(line);
+                    if (obj && typeof obj == "object" && typeof obj[_this.currentIndex] != "undefined" && typeof obj[_this.currentIndex][index] != "undefined") {
+                        var objRules = obj[_this.currentIndex];
+                        if (self.isNumber(objRules[index])) {
+                            _this.currentIndex = parseInt(_this.currentIndex) + parseInt(objRules[index])
+                        } else if (Array.isArray(objRules[index])) {
+                            _this.reSetClass(objRules[index][0], objRules[index][1])
+                        } else if (typeof obj["line"] != "undefined") {
+                            _this.currentIndex = _this.currentIndex + line
+                        }
+                    } else {
+                        var jump = element[_this.currentIndex].getAttribute("data-" + direction);
+                        jump = parseInt(jump);
+                        if (direction == "up") {
+                            if (_this.currentIndex > line - 1) _this.currentIndex = jump ? _this.currentIndex - jump : _this.currentIndex - line;
+                            else if (obj && typeof obj["up"] == "object") _this.reSetClass(obj[direction][0], obj["up"][1], obj["up"][2], obj["up"][3]);
+                            else if (obj && typeof obj["up"] == "function") obj["up"].call(_this)
+                        } else if (direction == "left") {
+                            if ((_this.currentIndex) % line != 0) _this.currentIndex = jump ? _this.currentIndex - jump : _this.currentIndex - 1;
+                            else if (obj && typeof obj["left"] == "object") _this.reSetClass(obj["left"][0], obj["left"][1], obj["left"][2], obj["left"][3]);
+                            else if (obj && typeof obj["left"] == "function") obj["left"].call(_this)
+                        } else if (direction == "right") {
+                            if ((_this.currentIndex + 1) % line != 0) _this.currentIndex = jump ? _this.currentIndex + jump : _this.currentIndex + 1;
+                            else if (obj && typeof obj["right"] == "object") _this.reSetClass(obj["right"][0], obj["right"][1], obj["right"][2], obj["right"][3]);
+                            else if (obj && typeof obj["right"] == "function") obj["right"].call(_this)
+                        } else if (direction == "down") {
+                            if (_this.hotbtn.length - line > _this.currentIndex) _this.currentIndex = jump ? _this.currentIndex + jump : _this.currentIndex + line;
+                            else if (obj && typeof obj["down"] == "object") _this.reSetClass(obj["down"][0], obj["down"][1], obj["down"][2], obj["down"][3]);
+                            else if (obj && typeof obj["down"] == "function") obj["down"].call(_this);
+                            else if (_this.currentIndex + line > _this.hotbtn.length - 1 && _this.currentIndex + line <= (line - _this.hotbtn.length % line) + _this.hotbtn.length - 1 && _this.hotbtn.length % line != 0 && isFloatLast) {
+                                _this.currentIndex = _this.currentIndex + line;
+                                self.overIndex()
+                            }
+                        }
+                    }
+                }
+                self.rule = function() {
+                    self.overIndex();
+                    if (_this.event.keyCode == btnLeft || _this.event.keyCode == "LEFT") {
+                        self.ruleFn(0, "left")
+                    } else if (_this.event.keyCode == btnRight || _this.event.keyCode == "RIGHT") {
+                        self.ruleFn(2, "right")
+                    } else if (_this.event.keyCode == btnUp || _this.event.keyCode == "UP") {
+                        self.ruleFn(1, "up")
+                    } else if (_this.event.keyCode == btnDown || _this.event.keyCode == "DOWN") {
+                        self.ruleFn(3, "down")
+                    }
+                    self.overIndex()
+                }
+                this.back=function(){
+                    _this.event.keyCode=8;
+                   self.onPressdo(_this.event);  
+                }
+                // this.makepress=function(k){
+                //     if(k==""){
+                //         _this.event.keyCode=btnLeft;
+                //     }else if(k=="RIGHT"){
+                //         _this.event.keyCode=btnRight;
+                //     }else if(k=="UP"){
+                //         _this.event.keyCode=btnUp;
+                //     }else if(k=="DOWN"){
+                //         _this.event.keyCode=btnDown;
+                //     }else if(k=="ENTER"){
+                //         _this.event.keyCode=btnEnter;
+                //     }
+                //      self.onPressdo(_this.event); 
+                // }
+                self.onPressdo = function(e) {
+                    _this.event = e;
+                    _this.currentIndex = _this.currentIndex >= element.length - 1 ? element.length - 1 : _this.currentIndex;
+                    _this.prev = element[_this.currentIndex];
+                    _this.prevIndex = _this.currentIndex;
+                    self.rule();
+                    _this.current = element[_this.currentIndex];
+                    _this.currentIndex = _this.currentIndex;
+                    _this.className = _this.className;
+                    //$.tips(e.keyCode)
+                    if (e.keyCode == 8 || e.keyCode == 27 || e.keyCode == "BACK") {
+                        if (rules["#" + _this.currentId + ">." +_this.className] && (typeof rules["#" + _this.currentId + ">." +_this.className]["onBack"]) == "function") rules["#" + _this.currentId + ">." +_this.className]["onBack"].call(_this);
+                        else if (rules[_this.className] && (typeof rules[_this.className]["onBack"]) == "function") rules[_this.className]["onBack"].call(_this);
+                        else _this.onBack.call(_this)
+                    }
+                if (rules && rules["#" + _this.currentId + ">." + _this.className] && (typeof rules["#" + _this.currentId + ">." + _this.className]["onPress"]) == "function")
+                     init.rules["#" + _this.currentId + ">." + _this.className]["onPress"].call(_this);
+                    else if (rules && rules[_this.className] && (typeof rules[_this.className]["onPress"]) == "function")
+                     init.rules[_this.className]["onPress"].call(_this);
+                    else _this.onPress.call(_this);
+
+                    
+                    if (e.keyCode == btnEnter || e.keyCode == "ENTER") {
+                        if (rules["#" + _this.currentId + ">." +_this.className] && (typeof rules["#" + _this.currentId + ">." +_this.className]["onEnterPress"]) == "function") rules["#" + _this.currentId + ">." +_this.className]["onEnterPress"].call(_this);
+                        else if (rules[_this.className] && (typeof rules[_this.className]["onEnterPress"]) == "function") rules[_this.className]["onEnterPress"].call(_this);
+                        else _this.onEnterPress.call(_this)
+                    }
+                    _self.classDo(_this.currentIndex);
+                    keydefault(e)
+                }
+                this.onLoad();
+            }
+        window.tvSysBtnBind = tvSysBtnBind
+    })(window)

+ 247 - 0
h5v2/mw_20200108_act/js/webview.js

@@ -0,0 +1,247 @@
+/**
+ * webview接口
+ */
+/*global Common: true, $: false,jQuery:false,template:false,console:false , starcorExt:false,starcor:false*/
+
+(function(){
+
+var oldStarcorExt = starcorExt;
+starcorExt = {
+	_setCallbackResult: function(idx,ret) {
+		oldStarcorExt._setCallbackResult(idx,ret);
+	},
+	_execAndroidFunc: function(func,args) {
+	return	oldStarcorExt._execAndroidFunc(func,args);
+	}
+};
+//
+starcorExt._invokeCallback = function(name, args, returnIdx) {
+    var func = this._callbacks[name];
+	console.log("starcorExt._invokeCallback func:"+func+"args:"+args);
+	if(args!=null){
+		 var item0 = args[0];
+		 console.log("item0.type:"+typeof(item0.type));
+		 if(typeof(item0.type)=="undefined"){
+			 args=JSON.parse(args);
+			 console.log("args:"+args);
+		 }
+	}
+    var ret = null;
+    try {
+        var invokeArgs = [];
+        for( var idx in args ) {
+            var item = args[idx];
+			console.log("item:"+item+"idx:"+idx);
+			console.log("item.type:"+item.type+",item.value:"+item.value);
+            switch(item.type) {
+                case "number":
+                    invokeArgs.push(Number(item.value));
+                    break;
+                case "string":
+                    invokeArgs.push(String(item.value));
+                    break;
+                case "boolean":
+                    invokeArgs.push("true".toLowerCase() == item.value);
+                    break;
+            }
+        }
+        ret = func.apply(this, invokeArgs);
+    } catch (e) {}
+    starcorExt._setCallbackResult(returnIdx, ret);
+};
+starcorExt._addCallback = function(callback) {
+    var callbackIdx = String(starcorExt._callback_counter++);
+    this._callbacks[callbackIdx] = callback;
+    return callbackIdx;
+};
+starcorExt._callback_counter = 0;
+starcorExt._callbacks = {};
+
+// 调用浏览器功能,参数依cmd类型而定
+starcorExt.exec = function() {
+    var args = [];
+    for(var idx=0;idx<arguments.length;++idx) {
+        var val = arguments[idx];
+        switch (typeof val) {
+            case "number":
+                args.push({"type":"number", "value":val});
+                break;
+            case "string":
+                args.push({"type":"string", "value":val});
+                break;
+            case "bool":
+                args.push({"type":"boolean", "value":val});
+                break;
+            case "object":
+                args.push({"type":"object", "value":val});
+                break;
+            case "function":
+                args.push({"type": "callback", "value": this._addCallback(val)});
+                break;
+        }
+    }
+    var cmd = args.shift();
+    if(typeof this._execAndroidFunc === "undefined"){
+        return null;
+    }
+    return this._execAndroidFunc(cmd.value, JSON.stringify(args));
+};
+// 返回版本信息
+starcorExt.getVersion = function() {
+    return this.exec("getVersion");
+};
+// 关闭浏览器或浏览器所在的页面
+starcorExt.closeBrwoser = function(reason) {
+    if (reason)
+        return this.exec("closeBrowser",reason);
+};
+// 输出日志信息, info可为一个或多个, 多个输入参数以空格分隔
+starcorExt.log = function(tag, info) {
+    var logMsg = [];
+    for(var idx=1;idx<arguments.length;++idx) {
+        var item = arguments[idx];
+        if (item instanceof Array || typeof(item) == "object") {
+            logMsg.push(JSON.stringfy(item));
+        } else {
+            logMsg.push(item);
+        }
+    }
+    this.exec("log", tag, logMsg.join(" "));
+};
+// 调整浏览器尺寸,调整后,浏览器保持在屏幕上居中位置
+starcorExt.resizeBrowser = function(width, height) {
+    return this.exec("resizeBrowser", width, height);
+};
+starcorExt.moveBrowser = function(x, y) {
+    return this.exec("moveBrowser", x, y);
+};
+starcorExt.moveBrowserEx = function(x, y, width, height) {
+    return this.exec("moveBrowserEx", x, y, width, height);
+};
+starcorExt.getBrowserPosition = function() {
+    var posInfo = this.exec("getBrowserPosition");
+    posInfo = posInfo.split(",");
+    return {
+        x:posInfo[0],
+        y:posInfo[1],
+        width:posInfo[2],
+        height:posInfo[3]
+    };
+};
+starcorExt.getScreenSize = function() {
+    var posInfo = this.exec("getScreenSize");
+    posInfo = posInfo.split(",");
+    return {
+        width:posInfo[0],
+        height:posInfo[1]
+    };
+};
+// 设置事件回调
+// handlerType 回调类型, KeyEvent, Message
+// handler 回调函数, 其形式由handlerType决定
+//-----------------------------------------------------------------------------
+// handler为空表示取消对事件的监听
+// handler如果处理了事件, 返回true, 否则事件交由浏览器处理
+starcorExt.setHandler = function(handlerType, handler) {
+    return this.exec("setHandler", handlerType, handler);
+};
+// 获取焦点
+// webview获取焦点后,所有按键事件都将转发给页面处理
+starcorExt.requestFocus = function() {
+    return this.exec("requestFocus");
+};
+// 释放焦点
+// direction: 将焦点释放给当前webview在某个方向上的相邻元素,如无相邻元素,则焦点不变化
+starcorExt.releaseFocus = function(direction) {
+    return this.exec("releaseFocus", direction);
+};
+// 是否有焦点
+starcorExt.hasFocus = function() {
+    return this.exec("hasFocus");
+};
+// 读取系统属性
+// propName:
+//		user.name			读取用户名,未登录时值为空
+//		user.token			读取用户token,未登录时值为空
+//		user.id				读取用户id,未登录时值为空
+//		app.name			读取应用名
+//		app.version			读取应用版本
+//		stbid               stb_id机顶盒编码,即机顶盒串号(联通)
+starcorExt.readSystemProp = function(propName) {
+    return String(this.exec("readSystemProp", propName));
+};
+// 设置按键事件回调, handler形如function(action, keyCode, keyName, metaState)
+// action可以为keyUp, keyDown
+// keyName为按键名称, 如: up, down, left, right, a, b, c, d, 1, 2, 3, 4, enter, return, UNKNOWN
+// keyCode为按键对应的键值
+// metaState为控制建对应状态,ctrl, alt, shift等
+starcorExt.setKeyEventHandler = function(handler) {
+    return this.setHandler("KeyEvent", handler);
+};
+// 设置消息回调,handler形如function(msg, extInfo)
+// msg:
+//		onFocusChanged,	true/false	-	webview焦点变化,true表示获取焦点,false表示失去焦点
+starcorExt.setMessageHandler = function(handler) {
+    return this.setHandler("Message", handler);
+};
+// 发送消息给应用
+// msg:
+//      onLogin,     extInfo: {name:"user name", id:"user id", token:"login token"}
+//      onPurchases, extInfo: {id:"item id", result:"success"/"failed", msg:"err message"}
+starcorExt.sendMessage = function(msg, extInfo) {
+    return this.exec("sendMessage", msg, extInfo);
+};
+// 发送Android Intent
+// mode:
+//      sendBroadcast   发送广播
+//      startActivity   打开应用
+//      startService    启动服务
+starcorExt.sendIntent = function(mode, intent) {
+    return this.exec("sendIntent", mode,intent);
+};
+// 打开子浏览器(弹出方式)
+// 同时只能打开一个子浏览器
+starcorExt.openBrowser = function(url) {
+    return this.exec("openBrowser", url);
+};
+
+
+
+/*设置小视频窗口位置
+x:起始x坐标
+y:起始y坐标
+width:宽度
+height:高度
+*/
+starcorExt.setVideoWindowPosition = function(x,y,width,height) {
+    return this.exec("setVideoWindowPosition", x,y,width,height);
+};
+/*播放视频,其中playParams为json数据,示例如下:
+var playParams = {
+            video_type:"0",
+            video_id:"b836aef6c9b851958199d3b5a1a77050",
+            video_name:"青云志",
+            media_asset_id:"TVseries",
+            category_id:"1000015",
+            ui_style:"0",
+            video_index:"26",
+            quality:"hd",
+            video_all_index:"27",
+            video_new_index:"26",
+        };
+*/
+starcorExt.playVideo = function(playParams) {
+    return this.exec("playVideo", playParams);
+};
+//停止播放视频
+starcorExt.stopVideo = function() {
+    return this.exec("stopVideo");
+};
+//web页面是否有输入框,有输入框则设置为“true”,没有则设置成“false”
+//调用示例:Webview.setInputTypeTextFlag("false");
+starcorExt.setInputTypeTextFlag = function(flag) {
+    return this.exec("setInputTypeTextFlag",flag);
+};
+ window.Webview = starcorExt;
+
+})();