index.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  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. isWeibo = '<?php echo $isWeibo; ?>';
  172. sub = '<?php echo $sub; ?>';
  173. mock = '<?php echo $mock; ?>';
  174. console.log(isWeibo);
  175. console.log(sub);
  176. console.log(mock);
  177. if(isWeibo != '1' && mock == '0'){
  178. showMessage('请使用微博客户端打开');
  179. onOpen();
  180. }
  181. if (mock == '0') {
  182. showMessage('请使用微博客户端打开')
  183. onOpen();
  184. }
  185. console.log("isWeibo = " + isWeibo)
  186. console.log('sub = ' + sub)
  187. // uid
  188. if (sub=='' && isWeibo) {
  189. console.log('noLogin.....')
  190. noLogin();
  191. }
  192. //未登录状态下跳转 scheme:
  193. function noLogin() {
  194. window.location.href = `sinaweibo://login?redirect_scheme=${(encodeURIComponent(location.href))} `;
  195. }
  196. function onOpen(url) {
  197. let scheme;
  198. if (!url) {
  199. url = location.href; // 要打开的 H5 页面的地址
  200. scheme = `sinaweibo://browser?url=${encodeURIComponent(url)}`;
  201. } else {
  202. if (url.search('http') != -1) {
  203. scheme = `sinaweibo://browser?url=${encodeURIComponent(url)}`;
  204. } else {
  205. scheme = url;
  206. }
  207. }
  208. console.log('打开链接:', scheme);
  209. if (isWeibo) {
  210. window.location.href = scheme;
  211. } else {
  212. window.location.href = `https://m.weibo.cn/feature/openapp?scheme=${encodeURIComponent(scheme)}`;
  213. }
  214. }
  215. // 关于微博 ======== END
  216. function getQueryString(name) {
  217. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  218. var r = window.location.search.substr(1).match(reg);
  219. if (r != null) {
  220. return (r[2]);
  221. } else {
  222. return null;
  223. }
  224. }
  225. var openid = getQueryString('openid');
  226. // 定义变量
  227. var secNum = 120;
  228. var totalNum = 120;
  229. var stayTime = 1500;
  230. var version = 6;
  231. var isShare = 0;
  232. var theTokenData = '';
  233. var YUMING = '/';
  234. // 登录接口
  235. function checkLogin(backFun){
  236. console.log("sub = " + sub)
  237. var u = YUMING + 'index/index/checkLogin'
  238. var obj = {cookie:sub};
  239. $.post(u,obj,function(data){
  240. console.log(data)
  241. if(data.code == 0){
  242. // 调用成功
  243. theTokenData = data.data.token;
  244. playCount = data.data.count;
  245. isShare = data.data.isShare;
  246. isBeginActivity = data.data.isBeginActivity; //活动是否开始
  247. Main.userInfo = data.data.user;
  248. if(data.data.task.length == 0){
  249. TestPage.getDanNum = 0;
  250. }else{
  251. TestPage.getDanNum = data.data.task.num;
  252. }
  253. console.log("Main.userInfo = " )
  254. console.log( Main.userInfo )
  255. // playCount = 1; // Test...........
  256. if(playCount == 1){
  257. // 玩过一次
  258. if( isShare == 0 ){
  259. // 未分享
  260. $('#sendWeiboBtn').show();
  261. $('#tipDIV').show();
  262. $('#tipImg').attr('src' , 'img/tip01.jpg');
  263. }else{
  264. // 已分享
  265. $('#shareBtn').hide();
  266. }
  267. }else if(playCount == 2){
  268. $('#sendWeiboBtn').hide();
  269. $('#tipDIV').show();
  270. $('#tipImg').attr('src' , 'img/tip02.jpg');
  271. }else{
  272. console.log("playCount = " + playCount )
  273. }
  274. backFun();
  275. }else{
  276. console.log('------ checkLogin' + data.message)
  277. }
  278. })
  279. }
  280. // 校验是否可以参加游戏接口
  281. function checkRole(backFun){
  282. var u = YUMING + 'index/index/checkRole'
  283. var obj = {token:theTokenData};
  284. $.post(u,obj,function(data){
  285. console.log(data)
  286. if(data.code == 0){
  287. // 调用成功
  288. Main.canPlay = data.data.first;
  289. backFun();
  290. }else{
  291. console.log('------ checkRole' + data.message)
  292. }
  293. })
  294. }
  295. // 提交任务接口
  296. function submitTask(timeNum, danNum , backFun){
  297. var u = YUMING + 'index/index/submitTask'
  298. var obj = {token:theTokenData , duration:timeNum , number:danNum };
  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. // showMessage("提交成功")
  306. backFun();
  307. }else{
  308. console.log('------ submitTask error' + data.message)
  309. }
  310. })
  311. }
  312. // 提交发送微博接口
  313. function submitShare( ){
  314. var u = YUMING + 'index/index/submitShare'
  315. var obj = { token:theTokenData };
  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. }else{
  324. console.log('------ submitShare error : ' + data.message)
  325. }
  326. })
  327. }
  328. // 排行分数
  329. function getRankTop( backFun ){
  330. var u = YUMING + 'index/index/topRanking'
  331. var obj = { token:theTokenData };
  332. $.post(u,obj,function(data){
  333. if(data.code == 0){
  334. console.log(data.data)
  335. backFun(data.data); //self ranking
  336. }else{
  337. console.log('------ ranking error :' + data.message)
  338. }
  339. })
  340. }
  341. // 排行最新
  342. function getRankNew( backFun ){
  343. var u = YUMING + 'index/index/newRanking'
  344. var obj = { token:theTokenData };
  345. $.post(u,obj,function(data){
  346. if(data.code == 0){
  347. backFun(data.data); //self ranking
  348. }else{
  349. console.log('------ newRanking error' + data.message)
  350. }
  351. })
  352. }
  353. // 提交领取信息接口
  354. function submitReceive( uName , uTel , uAdd , giftId , typeId , backFun ){
  355. // token 登录凭证 name 姓名、mobile 手机号、address 地址、 giftId 奖品ID、 type 类型:1 中奖 2 排名
  356. var u = YUMING + 'index/index/submitReceive'
  357. var obj = { token:theTokenData , name:uName , mobile:uTel, address:uAdd , giftId:giftId , type:typeId };
  358. $.post(u,obj,function(data){
  359. if(data.code == 0){
  360. backFun(data.data); //self ranking
  361. }else{
  362. console.log('------ submitReceive error' + data.message)
  363. }
  364. })
  365. }
  366. //获取轮播中奖接口
  367. function getRotationAward( backFun ){
  368. var u = YUMING + 'index/index/getRotationAward'
  369. var obj = { token:theTokenData };
  370. $.post(u,obj,function(data){
  371. if(data.code == 0){
  372. backFun(data.data);
  373. // "nickname": "用户7771259896",
  374. // "portrait": "https://tvax1.sinaimg.cn/default/images/default_avatar_female_180.gif?KID=imgbed,tva&Expires=1657047644&ssig=rLOkyZc0Iy",
  375. // "uid": 7771259896,
  376. // "giftName": "奖品A"
  377. }else{
  378. console.log('------ getRotationAward error' + data.message)
  379. }
  380. })
  381. }
  382. // 用户点击查看奖品, 排名中奖接口,前 50
  383. function getRankingWinAward( backFun ){
  384. var u = YUMING + 'index/index/getRankingWinAward'
  385. var obj = { token:theTokenData };
  386. $.post(u,obj,function(data){
  387. if(data.code == 0){
  388. backFun(data.data);
  389. }else{
  390. console.log('------ getRankingWinAward error' + data.message)
  391. }
  392. })
  393. }
  394. // 抽奖接口
  395. function getLuckDraw( backFun ){
  396. var u = YUMING + 'index/index/getLuckDraw'
  397. var obj = { token:theTokenData };
  398. $.post(u,obj,function(data){
  399. if(data.code == 0){
  400. backFun(data.data);
  401. // "isWinAward": 0, // 是否中奖 0 末中奖 1 中奖
  402. // "giftId": 0 // 奖品ID
  403. }else{
  404. console.log('------ newRanking error ' + data.message)
  405. }
  406. })
  407. }
  408. // 中奖记录接口
  409. function getAwardLog( backFun ){
  410. var u = YUMING + 'index/index/getAwardLog'
  411. var obj = { token:theTokenData };
  412. $.post(u,obj,function(data){
  413. if(data.code == 0){
  414. backFun(data.data);
  415. // "giftId": 1,
  416. // "giftName": "投影仪",
  417. // "typeLabel": "抽奖",
  418. // "type": 2,
  419. // "createAt": "22-08-30 01:39:45"
  420. }else{
  421. console.log('------ getAwardLog error ' + data.message)
  422. }
  423. })
  424. }
  425. function showHaibao(){
  426. $('#haibaoDIV').show();
  427. }
  428. function isWeiXin() {
  429. var ua = window.navigator.userAgent.toLowerCase();
  430. if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  431. return true;
  432. } else {
  433. return false;
  434. }
  435. }
  436. var isInWx = isWeiXin();
  437. console.log('isInWx = ' + isInWx)
  438. function setDivY(div, n) {
  439. var yy = n / 750 * window.innerWidth;
  440. document.getElementById(div).style.top = yy + "px";
  441. }
  442. function showMessage(str){
  443. layer.msg( str ,{ time: 1500 }, function(){
  444. });
  445. }
  446. function hideImgDIV(){
  447. $('#btnsDIV').hide();
  448. document.getElementById("imgDIV").style.display = "none";
  449. document.getElementById('theImg').src = '';
  450. }
  451. function showBtnDIV(){
  452. setDivY('btnsDIV' , 1330 + Main.hh)
  453. $('#btnsDIV').show();
  454. }
  455. function hideBtnDIV(){
  456. $('#imgDIV').hide();
  457. $('#btnsDIV').hide();
  458. }
  459. function showBtnAndImg(){
  460. $('#imgDIV').show();
  461. $('#btnsDIV').show();
  462. }
  463. function makeWeiboSend(){
  464. 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',
  465. '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',
  466. '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',
  467. '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',
  468. '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',
  469. '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',
  470. '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',
  471. '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',
  472. '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',
  473. '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',
  474. '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',
  475. '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',
  476. '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',
  477. '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',
  478. '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'];
  479. var u = sendArr[TestPage.getDanNum - 1]
  480. window.location.href = encodeURIComponent(u);
  481. }
  482. $('#sendWeiboBtn').click(function(){
  483. submitShare();
  484. setTimeout(function(){
  485. makeWeiboSend()
  486. $('#tipDIV').hide();
  487. } , 200)
  488. })
  489. $('#shareBtn').click(function(){
  490. submitShare();
  491. if(window.location.host == 'local.sina.com'){
  492. }else{
  493. setTimeout(function(){
  494. makeWeiboSend()
  495. } , 200)
  496. }
  497. if(isShare == 0){
  498. isShare = 1;
  499. hideImgDIV();
  500. MainGame.self.createTestPage();
  501. MainGame.self.goBigMap();
  502. setTimeout(function(){
  503. MainGame.self.doRemoveEndPage();
  504. } , 500)
  505. }
  506. })
  507. $('#linkBtn').click(function(){
  508. hideBtnDIV();
  509. MainGame.self.showRankPage();
  510. })
  511. function showGIF(){
  512. setDivY('bgDIV2' , 590 + Main.hh)
  513. $('#bgDIV').show();
  514. $('#bgDIV2').show();
  515. }
  516. function hideGIF(){
  517. $('#bgDIV').hide();
  518. $('#bgDIV2').hide();
  519. }
  520. $("input,select").blur(function(){
  521. setTimeout(function(){
  522. var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
  523. window.scrollTo(0, Math.max(scrollHeight - 1, 0));
  524. },100);
  525. });
  526. </script>
  527. <!--音频控制-->
  528. <script>
  529. document.addEventListener("WeixinJSBridgeReady", function () {
  530. document.getElementById("wx_call").play();
  531. }, false);
  532. function playBgMusic(){
  533. document.getElementById("wx_call").play();
  534. }
  535. function playSound(str){
  536. document.getElementById(str).play();
  537. }
  538. function pauseSound(str){
  539. document.getElementById(str).pause();
  540. }
  541. //--------处理音频
  542. window.play_sound = 1;
  543. function auPlay(){
  544. console.log(" auPlay ");
  545. document.getElementById('wx_call').play();
  546. }
  547. function auPause(){
  548. console.log(" auPause ");
  549. document.getElementById('wx_call').pause();
  550. }
  551. var angle = 0;
  552. var canZhuan = true;
  553. // setInterval(function(){
  554. // if(canZhuan){
  555. // angle +=3;
  556. // $('#soundBtn').rotate(angle);
  557. // }
  558. // }, 30);
  559. $("#soundBtn").click(function(){
  560. if(play_sound == 0){play_sound = 1;auPlay();}
  561. else{play_sound = 0; auPause();}
  562. canZhuan = !canZhuan;
  563. });
  564. </script>
  565. <!--生成海报-->
  566. <script>
  567. function makeDivImg(base64){
  568. // console.log(base64);
  569. //------------------------ Canvas
  570. var canvas = document.getElementById('canvas');
  571. var context = canvas.getContext('2d');
  572. context.fillStyle="#ffffff";
  573. context.fillRect(0,0,canvas.width, canvas.height);
  574. var img = new Image();
  575. img.onload = function() {
  576. context.drawImage(this, 0, 0, canvas.width*1, canvas.height*1);
  577. // setDivY('btnsDIV', 1200+Main.hh);
  578. // document.getElementById("btnsDIV").style.display = "";
  579. document.getElementById("imgDIV").style.display = "";
  580. document.getElementById('theImg').src = base64;
  581. showBtnDIV();
  582. EndPage.self.makeImgComplete();
  583. // EndPage.endQr.visible = false;
  584. };
  585. img.src = ""+base64;
  586. }
  587. </script>
  588. </body>
  589. </html>