index.html 26 KB

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