index.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="Access-Control-Allow-Origin" content="*">
  6. <title> </title>
  7. <meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
  8. <meta name="apple-mobile-web-app-capable" content="yes" />
  9. <meta name="full-screen" content="true" />
  10. <meta name="screen-orientation" content="portrait" />
  11. <meta name="x5-fullscreen" content="true" />
  12. <meta name="360-fullscreen" content="true" />
  13. <style>
  14. html, body {
  15. -ms-touch-action: none;
  16. background:transparent;
  17. padding: 0;
  18. border: 0;
  19. margin: 0;
  20. }
  21. input,button,select,textarea{outline:none;background-color: transparent; border: 0;}
  22. *{
  23. -webkit-tap-highlight-color: rgba(0,0,0,0);
  24. -webkit-tap-highlight-color:transparent;
  25. }
  26. img,div{
  27. -webkit-tap-highlight-color: rgba(0,0,0,0);
  28. -webkit-tap-highlight-color:transparent;
  29. -webkit-user-select:none; /*webkit浏览器*/
  30. -moz-user-select:none;/*火狐*/
  31. -ms-user-select:none; /*IE10*/
  32. user-select:none;
  33. }
  34. input{
  35. -webkit-appearance: none;
  36. -webkit-tap-highlight-color: rgba(0,0,0,0);
  37. }
  38. .box{
  39. width: 100%;
  40. height: 100%;
  41. text-align:center;
  42. }
  43. .doScale{
  44. -webkit-animation:zscale 1.2s linear infinite ;
  45. }
  46. @-webkit-keyframes zscale
  47. {
  48. 0%{ transform: scale(1) }
  49. 50%{ transform: scale(1.1) }
  50. 100%{ transform: scale(1) }
  51. }
  52. </style>
  53. </head>
  54. <script src="js/jquery.min.js"></script>
  55. <!--<script src="js/createjs.min.js"></script>-->
  56. <script src="layer/layer.js"></script>
  57. <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  58. <body>
  59. <div id="bgDIV" class="box" style="position:fixed; top: 0;left: 0;width: 100%; ">
  60. <img src="img/aloadingBg.jpg" style=" position: relative; width: 100%; top: 50%; left: 50%; transform: translate(-50%,-50%);">
  61. </div>
  62. <div id="bgDIV2" style="position:fixed; top: 0;left: 0;width: 100%; text-align: center; display: none; ">
  63. <div >
  64. <img src="img/aloading.gif" style=" position: relative; width: 30%; ">
  65. </div>
  66. <div style="margin-top: 4em;">
  67. <img src="img/aloadingTxt.png" style=" position: relative; width: 30%; ">
  68. </div>
  69. </div>
  70. <audio preload="preload" id="wx_call" src="wx.mp3" loop></audio>
  71. <audio preload="preload" id="wx_sound" src="" ></audio>
  72. <div style="margin: auto;width: 100%;height: 100%;" class="egret-player"
  73. data-entry-class="Main"
  74. data-orientation="portrait"
  75. data-scale-mode="fixedWidth"
  76. data-frame-rate="60"
  77. data-content-width="750"
  78. data-content-height="1600"
  79. data-multi-fingered="2"
  80. data-show-fps="false" data-show-log="false"
  81. data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
  82. </div>
  83. <div id="tipDIV" class="box" style="position:fixed; top: 0;left: 0;width: 100%; display: none; ">
  84. <img id="tipImg" src="" style=" position: relative; width: 100%; top: 50%; left: 50%; transform: translate(-50%,-50%);">
  85. <img id="sendWeiboBtn" src="img/shareBtn.gif" style="position: absolute; top:50%; left: 25%; width: 50%; display: none" >
  86. </div>
  87. <div id="canvasDIV" style=" vertical-align: middle; text-align: center; position: absolute; width: 100%; height: 100%; top:0px;left:0px; display: none; ">
  88. <canvas id="canvas" style=" margin-top: 30% " width="750" height="1465" ></canvas>
  89. </div>
  90. <div id="imgDIV" style=" opacity: 0.01; background-color: #FFFFFF; text-align: center; vertical-align: middle; position: absolute; width: 100%; height: 70%; top:0px; left:0px; display: none">
  91. <img id="theImg" style="margin-top: 0% ; width:100%; " >
  92. </div>
  93. <div id="btnsDIV" style="position: absolute; width: 100%; text-align: center; display:none ; ">
  94. <div id="shareBtn" style=" width: 40%; margin-right: 0.5em; display: inline-block">
  95. <img src="img/shareBtn.gif" style="width: 100%">
  96. </div>
  97. <div id="linkBtn" style="width: 33%; margin-left: 0.5em; display: inline-block;">
  98. <img src="img/linkBtn.png" style="width: 100%">
  99. </div>
  100. </div>
  101. <div style="position: fixed; left: 0px; top: 0px; width: 10% ; margin-top: 15px ;margin-left: 90% ; z-index: 999 ; display: block; ">
  102. <img id="soundBtn" src="bm_1.gif" style="width: 70%">
  103. </div>
  104. <script src="js/eruda.min.js"></script>
  105. <script> eruda.init(); </script>
  106. <script>
  107. var loadScript = function (list, callback) {
  108. var loaded = 0;
  109. var loadNext = function () {
  110. loadSingleScript(list[loaded], function () {
  111. loaded++;
  112. if (loaded >= list.length) {
  113. callback();
  114. }
  115. else {
  116. loadNext();
  117. }
  118. })
  119. };
  120. loadNext();
  121. };
  122. var loadSingleScript = function (src, callback) {
  123. var s = document.createElement('script');
  124. s.async = false;
  125. s.src = src;
  126. s.addEventListener('load', function () {
  127. s.parentNode.removeChild(s);
  128. s.removeEventListener('load', arguments.callee, false);
  129. callback();
  130. }, false);
  131. document.body.appendChild(s);
  132. };
  133. var data = `{ "initial": [ "js/all.min.js" ],
  134. "game": [ "js/default.thm.js?v=6" , "js/main.min.js?v=6" ]
  135. }`;
  136. var manifest = JSON.parse(data);
  137. var list = manifest.initial.concat(manifest.game);
  138. loadScript(list, function () {
  139. var theRenderMode = "webgl";
  140. egret.runEgret({ renderMode: theRenderMode , audioType: 0, calculateCanvasScaleFactor:function(context) {
  141. var backingStore = context.backingStorePixelRatio ||
  142. context.webkitBackingStorePixelRatio ||
  143. context.mozBackingStorePixelRatio ||
  144. context.msBackingStorePixelRatio ||
  145. context.oBackingStorePixelRatio ||
  146. context.backingStorePixelRatio || 1;
  147. return (window.devicePixelRatio || 1) / backingStore;
  148. }});
  149. egret.ImageLoader.crossOrigin = "anonymous";
  150. });
  151. </script>
  152. <script>
  153. // 获取参数
  154. function getPara(_key) {
  155. var reg = new RegExp("(^|&)" + _key + "=([^&]*)(&|$)");
  156. var r = window.location.search.substr(1).match(reg);
  157. if (r != null) return unescape(r[2]);
  158. return null;
  159. }
  160. //获取cookie
  161. function getCookie(cname) {
  162. var name = cname + "=";
  163. var ca = document.cookie.split(';');
  164. for (var i = 0; i < ca.length; i++) {
  165. var c = ca[i].trim();
  166. if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
  167. }
  168. return "";
  169. }
  170. // 微博端判断
  171. var isWeibo = false;
  172. var ua = navigator.userAgent.toLowerCase();//获取判断用的对象
  173. // if(window.location.host == 'local.sina.com'){
  174. // // 模拟本地微博端
  175. // isWeibo = true;
  176. // sub = getPara('sub');
  177. // }else{
  178. // if (ua.match(/WeiBo/i) == "weibo") {
  179. // isWeibo = true;
  180. // } else {
  181. // showMessage('请使用微博客户端打开');
  182. // // onOpen();
  183. // }
  184. // }
  185. isWeibo = true;
  186. sub = getPara('sub');
  187. console.log("isWeibo = " + isWeibo)
  188. var sub = '';
  189. if(isWeibo){
  190. // 微博端
  191. sub = getCookie('SUB') || getCookie('sub');
  192. if(window.location.host == 'local.sina.com'){
  193. sub = getPara('sub');
  194. }
  195. }else{
  196. sub = getPara('sub');
  197. }
  198. console.log('sub = ' + sub)
  199. // uid
  200. if (sub=='' && isWeibo) {
  201. console.log('noLogin.....')
  202. noLogin();
  203. }
  204. //未登录状态下跳转 scheme:
  205. function noLogin() {
  206. window.location.href = `sinaweibo://login?redirect_scheme=${(encodeURIComponent(location.href))} `;
  207. }
  208. function onOpen(url) {
  209. let scheme;
  210. if (!url) {
  211. url = location.href; // 要打开的 H5 页面的地址
  212. scheme = `sinaweibo://browser?url=${encodeURIComponent(url)}`;
  213. } else {
  214. if (url.search('http') != -1) {
  215. scheme = `sinaweibo://browser?url=${encodeURIComponent(url)}`;
  216. } else {
  217. scheme = url;
  218. }
  219. }
  220. console.log('打开链接:', scheme);
  221. if (isWeibo) {
  222. window.location.href = scheme;
  223. } else {
  224. window.location.href = `https://m.weibo.cn/feature/openapp?scheme=${encodeURIComponent(scheme)}`;
  225. }
  226. }
  227. // 关于微博 ======== END
  228. function getQueryString(name) {
  229. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  230. var r = window.location.search.substr(1).match(reg);
  231. if (r != null) {
  232. return (r[2]);
  233. } else {
  234. return null;
  235. }
  236. }
  237. var openid = getQueryString('openid');
  238. // 定义变量
  239. var secNum = 120;
  240. var totalNum = 120;
  241. var stayTime = 1500;
  242. var version = 6;
  243. var isShare = 0;
  244. var theTokenData = '';
  245. var YUMING = 'https://video.shuncheng.lu/';
  246. // 登录接口
  247. function checkLogin(backFun){
  248. if(window.location.host == 'active.songjiang.xyz' || window.location.host == 'local.sina.com'){
  249. sub = getPara('sub');
  250. }
  251. console.log("sub = " + sub)
  252. var u = YUMING + 'index/index/checkLogin'
  253. var obj = {cookie:sub};
  254. $.post(u,obj,function(data){
  255. console.log(data)
  256. if(data.code == 0){
  257. // 调用成功
  258. theTokenData = data.data.token;
  259. playCount = data.data.count;
  260. isShare = data.data.isShare;
  261. isBeginActivity = data.data.isBeginActivity; //活动是否开始
  262. Main.userInfo = data.data.user;
  263. if(data.data.task.length == 0){
  264. TestPage.getDanNum = 0;
  265. }else{
  266. TestPage.getDanNum = data.data.task.num;
  267. }
  268. console.log("Main.userInfo = " )
  269. console.log( Main.userInfo )
  270. // playCount = 1; // Test...........
  271. if(playCount == 1){
  272. // 玩过一次
  273. if( isShare == 0 ){
  274. // 未分享
  275. $('#sendWeiboBtn').show();
  276. $('#tipDIV').show();
  277. $('#tipImg').attr('src' , 'img/tip01.jpg');
  278. }else{
  279. // 已分享
  280. $('#shareBtn').hide();
  281. }
  282. }else if(playCount == 2){
  283. $('#sendWeiboBtn').hide();
  284. $('#tipDIV').show();
  285. $('#tipImg').attr('src' , 'img/tip02.jpg');
  286. }else{
  287. console.log("playCount = " + playCount )
  288. }
  289. backFun();
  290. }else{
  291. console.log('------ checkLogin' + data.message)
  292. }
  293. })
  294. }
  295. // 校验是否可以参加游戏接口
  296. function checkRole(backFun){
  297. var u = YUMING + 'index/index/checkRole'
  298. var obj = {token:theTokenData};
  299. $.post(u,obj,function(data){
  300. if(window.location.host == 'local.sina.com'){
  301. }
  302. console.log(data)
  303. if(data.code == 0){
  304. // 调用成功
  305. Main.canPlay = data.data.first;
  306. backFun();
  307. }else{
  308. console.log('------ checkRole' + data.message)
  309. }
  310. })
  311. }
  312. // 提交任务接口
  313. function submitTask(timeNum, danNum , backFun){
  314. var u = YUMING + 'index/index/submitTask'
  315. var obj = {token:theTokenData , duration:timeNum , number:danNum };
  316. $.post(u,obj,function(data){
  317. if(window.location.host == 'local.sina.com'){
  318. }
  319. console.log(data)
  320. if(data.code == 0){
  321. // 提交成功
  322. // showMessage("提交成功")
  323. backFun();
  324. }else{
  325. console.log('------ submitTask error' + data.message)
  326. }
  327. })
  328. }
  329. // 提交发送微博接口
  330. function submitShare( ){
  331. var u = YUMING + 'index/index/submitShare'
  332. var obj = { token:theTokenData };
  333. $.post(u,obj,function(data){
  334. if(window.location.host == 'local.sina.com'){
  335. }
  336. console.log(data)
  337. if(data.code == 0){
  338. // 提交成功
  339. showMessage("提交成功")
  340. }else{
  341. console.log('------ submitShare error : ' + data.message)
  342. }
  343. })
  344. }
  345. // 排行分数
  346. function getRankTop( backFun ){
  347. var u = YUMING + 'index/index/topRanking'
  348. var obj = { token:theTokenData };
  349. $.post(u,obj,function(data){
  350. if(data.code == 0){
  351. console.log(data.data)
  352. backFun(data.data); //self ranking
  353. }else{
  354. console.log('------ ranking error :' + data.message)
  355. }
  356. })
  357. }
  358. // 排行最新
  359. function getRankNew( backFun ){
  360. var u = YUMING + 'index/index/newRanking'
  361. var obj = { token:theTokenData };
  362. $.post(u,obj,function(data){
  363. if(data.code == 0){
  364. backFun(data.data); //self ranking
  365. }else{
  366. console.log('------ newRanking error' + data.message)
  367. }
  368. })
  369. }
  370. // 提交领取信息接口
  371. function submitReceive( uName , uTel , uAdd , giftId , typeId , backFun ){
  372. // token 登录凭证 name 姓名、mobile 手机号、address 地址、 giftId 奖品ID、 type 类型:1 中奖 2 排名
  373. var u = YUMING + 'index/index/submitReceive'
  374. var obj = { token:theTokenData , name:uName , mobile:uTel, address:uAdd , giftId:giftId , type:typeId };
  375. $.post(u,obj,function(data){
  376. if(data.code == 0){
  377. backFun(data.data); //self ranking
  378. }else{
  379. console.log('------ submitReceive error' + data.message)
  380. }
  381. })
  382. }
  383. //获取轮播中奖接口
  384. function getRotationAward( backFun ){
  385. var u = YUMING + 'index/index/getRotationAward'
  386. var obj = { token:theTokenData };
  387. $.post(u,obj,function(data){
  388. if(data.code == 0){
  389. backFun(data.data);
  390. // "nickname": "用户7771259896",
  391. // "portrait": "https://tvax1.sinaimg.cn/default/images/default_avatar_female_180.gif?KID=imgbed,tva&Expires=1657047644&ssig=rLOkyZc0Iy",
  392. // "uid": 7771259896,
  393. // "giftName": "奖品A"
  394. }else{
  395. console.log('------ getRotationAward error' + data.message)
  396. }
  397. })
  398. }
  399. // 用户点击查看奖品, 排名中奖接口,前 50
  400. function getRankingWinAward( backFun ){
  401. var u = YUMING + 'index/index/getRankingWinAward'
  402. var obj = { token:theTokenData };
  403. $.post(u,obj,function(data){
  404. if(data.code == 0){
  405. backFun(data.data);
  406. }else{
  407. console.log('------ getRankingWinAward error' + data.message)
  408. }
  409. })
  410. }
  411. // 抽奖接口
  412. function getLuckDraw( backFun ){
  413. var u = YUMING + 'index/index/getLuckDraw'
  414. var obj = { token:theTokenData };
  415. $.post(u,obj,function(data){
  416. if(data.code == 0){
  417. backFun(data.data);
  418. // "isWinAward": 0, // 是否中奖 0 末中奖 1 中奖
  419. // "giftId": 0 // 奖品ID
  420. }else{
  421. console.log('------ newRanking error ' + data.message)
  422. }
  423. })
  424. }
  425. // 中奖记录接口
  426. function getAwardLog( backFun ){
  427. var u = YUMING + 'index/index/getAwardLog'
  428. var obj = { token:theTokenData };
  429. $.post(u,obj,function(data){
  430. if(data.code == 0){
  431. backFun(data.data);
  432. // "giftId": 1,
  433. // "giftName": "投影仪",
  434. // "typeLabel": "抽奖",
  435. // "type": 2,
  436. // "createAt": "22-08-30 01:39:45"
  437. }else{
  438. console.log('------ getAwardLog error ' + data.message)
  439. }
  440. })
  441. }
  442. function showHaibao(){
  443. $('#haibaoDIV').show();
  444. }
  445. function isWeiXin() {
  446. var ua = window.navigator.userAgent.toLowerCase();
  447. if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  448. return true;
  449. } else {
  450. return false;
  451. }
  452. }
  453. var isInWx = isWeiXin();
  454. console.log('isInWx = ' + isInWx)
  455. function setDivY(div, n) {
  456. var yy = n / 750 * window.innerWidth;
  457. document.getElementById(div).style.top = yy + "px";
  458. }
  459. function showMessage(str){
  460. layer.msg( str ,{ time: 1500 }, function(){
  461. });
  462. }
  463. function hideImgDIV(){
  464. $('#btnsDIV').hide();
  465. document.getElementById("imgDIV").style.display = "none";
  466. document.getElementById('theImg').src = '';
  467. }
  468. function showBtnDIV(){
  469. setDivY('btnsDIV' , 1330 + Main.hh)
  470. $('#btnsDIV').show();
  471. }
  472. function hideBtnDIV(){
  473. $('#imgDIV').hide();
  474. $('#btnsDIV').hide();
  475. }
  476. function showBtnAndImg(){
  477. $('#imgDIV').show();
  478. $('#btnsDIV').show();
  479. }
  480. function makeWeiboSend(){
  481. var sendArr = ['sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490hqn5gpj60ku0w878u02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490hqn5gpj60ku0w878u02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490hqn5gpj60ku0w878u02%22%7D%5D',
  482. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490ig5jijj60ku0w842y02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490ig5jijj60ku0w842y02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490ig5jijj60ku0w842y02%22%7D%5D',
  483. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490iuexffj60ku0w8djr02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490iuexffj60ku0w8djr02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490iuexffj60ku0w8djr02%22%7D%5D',
  484. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490jb0dtzj60ku0w8q7a02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490jb0dtzj60ku0w8q7a02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490jb0dtzj60ku0w8q7a02%22%7D%5D',
  485. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490jsnv74j60ku0w842o02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490jsnv74j60ku0w842o02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490jsnv74j60ku0w842o02%22%7D%5D',
  486. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490k40kijj60ku0w8q7d02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490k40kijj60ku0w8q7d02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490k40kijj60ku0w8q7d02%22%7D%5D',
  487. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490keoeotj60ku0w8n1d02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490keoeotj60ku0w8n1d02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490keoeotj60ku0w8n1d02%22%7D%5D',
  488. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490kwod1tj60ku0w8wj502.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490kwod1tj60ku0w8wj502.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490kwod1tj60ku0w8wj502%22%7D%5D',
  489. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490l9c612j60ku0w8n1d02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2Fa002ckVKbly8h490l9c612j60ku0w8n1d02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490l9c612j60ku0w8n1d02%22%7D%5D',
  490. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2F002ckVKbly8h490lp4gzxj60ku0w8ae902.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490lp4gzxj60ku0w8ae902.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490lp4gzxj60ku0w8ae902%22%7D%5D',
  491. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge002ckVKbly8h490lzpghhj60ku0w8dk302.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490lzpghhj60ku0w8dk302.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490lzpghhj60ku0w8dk302%22%7D%5D',
  492. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490mb9hjxj60ku0w8jvi02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490mb9hjxj60ku0w8jvi02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490mb9hjxj60ku0w8jvi02%22%7D%5D',
  493. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490mmy6m2j60ku0w8aei02.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490mmy6m2j60ku0w8aei02.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490mmy6m2j60ku0w8aei02%22%7D%5D',
  494. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490mwyi2ej60ku0w8wj102.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490mwyi2ej60ku0w8wj102.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490mwyi2ej60ku0w8wj102%22%7D%5D',
  495. 'sinaweibo://sendweibo?content=&pics=%5B%7B%22thumbnail%22%3A%22https%3A%2F%2Fwx1.sinaimg.cn%2Flarge%2F002ckVKbly8h490nmi4cxj60ku0w8gq202.jpg%22%2C%22original%22%3A%22https%3A%2F%2Fwx4.sinaimg.cn%2Flarge%2F002ckVKbly8h490nmi4cxj60ku0w8gq202.jpg%22%2C%22pid%22%3A%22002ckVKbly8h490nmi4cxj60ku0w8gq202%22%7D%5D'];
  496. var u = sendArr[TestPage.getDanNum - 1]
  497. window.location.href = encodeURIComponent(u);
  498. }
  499. $('#sendWeiboBtn').click(function(){
  500. submitShare();
  501. setTimeout(function(){
  502. makeWeiboSend()
  503. $('#tipDIV').hide();
  504. } , 200)
  505. })
  506. $('#shareBtn').click(function(){
  507. submitShare();
  508. if(window.location.host == 'local.sina.com'){
  509. }else{
  510. setTimeout(function(){
  511. makeWeiboSend()
  512. } , 200)
  513. }
  514. if(isShare == 0){
  515. isShare = 1;
  516. hideImgDIV();
  517. MainGame.self.createTestPage();
  518. MainGame.self.goBigMap();
  519. setTimeout(function(){
  520. MainGame.self.doRemoveEndPage();
  521. } , 500)
  522. }
  523. })
  524. $('#linkBtn').click(function(){
  525. hideBtnDIV();
  526. MainGame.self.showRankPage();
  527. })
  528. function showGIF(){
  529. setDivY('bgDIV2' , 590 + Main.hh)
  530. $('#bgDIV').show();
  531. $('#bgDIV2').show();
  532. }
  533. function hideGIF(){
  534. $('#bgDIV').hide();
  535. $('#bgDIV2').hide();
  536. }
  537. $("input,select").blur(function(){
  538. setTimeout(function(){
  539. var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
  540. window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  541. },100);
  542. });
  543. </script>
  544. <!--音频控制-->
  545. <script>
  546. document.addEventListener("WeixinJSBridgeReady", function () {
  547. document.getElementById("wx_call").play();
  548. }, false);
  549. function playBgMusic(){
  550. document.getElementById("wx_call").play();
  551. }
  552. function playSound(str){
  553. document.getElementById(str).play();
  554. }
  555. function pauseSound(str){
  556. document.getElementById(str).pause();
  557. }
  558. //--------处理音频
  559. window.play_sound = 1;
  560. function auPlay(){
  561. console.log(" auPlay ");
  562. document.getElementById('wx_call').play();
  563. }
  564. function auPause(){
  565. console.log(" auPause ");
  566. document.getElementById('wx_call').pause();
  567. }
  568. var angle = 0;
  569. var canZhuan = true;
  570. // setInterval(function(){
  571. // if(canZhuan){
  572. // angle +=3;
  573. // $('#soundBtn').rotate(angle);
  574. // }
  575. // }, 30);
  576. $("#soundBtn").click(function(){
  577. if(play_sound == 0){play_sound = 1;auPlay();}
  578. else{play_sound = 0; auPause();}
  579. canZhuan = !canZhuan;
  580. });
  581. </script>
  582. <!--生成海报-->
  583. <script>
  584. function makeDivImg(base64){
  585. // console.log(base64);
  586. //------------------------ Canvas
  587. var canvas = document.getElementById('canvas');
  588. var context = canvas.getContext('2d');
  589. context.fillStyle="#ffffff";
  590. context.fillRect(0,0,canvas.width, canvas.height);
  591. var img = new Image();
  592. img.onload = function() {
  593. context.drawImage(this, 0, 0, canvas.width*1, canvas.height*1);
  594. // setDivY('btnsDIV', 1200+Main.hh);
  595. // document.getElementById("btnsDIV").style.display = "";
  596. document.getElementById("imgDIV").style.display = "";
  597. document.getElementById('theImg').src = base64;
  598. showBtnDIV();
  599. EndPage.self.makeImgComplete();
  600. // EndPage.endQr.visible = false;
  601. };
  602. img.src = ""+base64;
  603. }
  604. </script>
  605. </body>
  606. </html>