index.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <html>
  2. <head>
  3. <meta charset="UTF-8"/>
  4. <meta name="viewport" content="width=device-width, user-scalable=no" />
  5. <meta name="apple-mobile-web-app-capable" content="no" />
  6. <title>解开绳子</title>
  7. <style type="text/css">
  8. *{margin:0;padding:0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none}body{text-align:center;background:#077d45;min-height:417px;font-family:"Helvetica Neue",Helvetica,STHeiTi,sans-serif}.tips{color:#fff;height:30px;margin-top:5px}.left{color:#f60;position:absolute;width:100%;bottom:10px;left:0;font-size:20px;height:1em;line-height:1em}.left em{font-style:normal}.panel{position:fixed;width:100%;height:100%;top:0;left:0;z-index:2;background:rgba(20,90,20,.7);display:none}.panel.show{display:block}.panel-wrap{position:absolute;width:100%;margin:0 auto;border-radius:10px;display:none}.panel-wrap .hd{text-align:center;color:#090;font-size:16px;padding:10px 0;background:#333}.success .panel-success,.fail .panel-fail{display:block}.fail .panel-fail .hd{color:red}.fail .panel-success .hd{color:#0f0}.panel .bd{margin-top:120px}.btn{display:block;width:178px;height:38px;line-height:38px;color:#fff;margin:40px auto;text-align:center;background:#040;text-decoration:none}.btn.goon{color:#ff0}.btn.share{color:#f60}.share-arrow{display:none;top:0;right:0;position:absolute;width:90px;height:75px;background:url(127201e0a9fd21d6.png) no-repeat;background-size:90px 75px}.share-arrow.show{display:block}#cnzz_stat_icon_1252934876{display:none}
  9. </style>
  10. <script>document.write("<script type='text/javascript' src='config.js?v=" + Math.floor(Math.random()*10000000) + "' charset='UTF-8'><\/script>");</script>
  11. </head>
  12. <body>
  13. <p class="tips" id="tips">拖动节点,让所有的绳子都不交叉。</p>
  14. <p class="left">剩余步数:<em id="left-step">0</em></p>
  15. <div id="panel" class="panel fail">
  16. <div id="success" class="panel-wrap panel-success">
  17. <div class="hd">
  18. <h2 id="panel-title-success">恭喜闯关成功!</h2>
  19. </div>
  20. <div class="bd">
  21. <div>
  22. <div class="btn goon" onClick="goon()">闯下一关</div>
  23. <div class="btn share" onClick="share()">分享战绩</div>
  24. <a align="center" style="color:red" href="http://game.ikongzhong.cn/">更多游戏</a>
  25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  26. <a align="center" style="color:red" href="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd">关注我们</a>
  27. <br/><br/>
  28. <a align="center" style="text-decoration:underline;color:white;font-size:14;" href="javascript:location.href=game_47_01_url"><script>document.write(game_47_01_txt);</script></a>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="panel-wrap panel-fail">
  33. <div class="hd">
  34. <h2 id="panel-title-fail">很遗憾,没有解开所有绳子.</h2>
  35. </div>
  36. <div class="bd">
  37. <div>
  38. <div class="btn goon" onClick="goon()">重新闯关</div>
  39. <div class="btn share" onClick="share()">分享战绩</div>
  40. <a align="center" style="color:red" href="http://game.ikongzhong.cn/">更多游戏</a>
  41. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  42. <a align="center" style="color:red" href="http://mp.weixin.qq.com/s?__biz=MzI4MjA2MjE0MQ==&mid=246005295&idx=1&sn=490f8141976d607ba079d48f52a3fcd7#rd">关注我们</a>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="share-arrow" id="share-arrow"></div>
  47. </div>
  48. </body>
  49. <script type="text/javascript">
  50. function updateData(a) {
  51. levelNum = a || levelNum + 1,
  52. levelNum = Math.max(1, Math.min(maxLevels, parseInt(levelNum))),
  53. step = Math.round(.5 * levelNum * (Math.ceil(levelNum / 10) + 1))
  54. document.getElementById("panel-title-success").innerHTML = "第" + levelNum + "关,恭喜闯关成功!";
  55. document.getElementById("panel-title-fail").innerHTML = "第" + levelNum + "关,很遗憾绳子没解开!";
  56. }
  57. function updateDataFromHash() {
  58. var a = Math.max(0, window.location.hash.replace("#", ""));
  59. a > lastPlayNum && -1 === window.location.search.indexOf("isappinstalled") && (Tips("你还没玩到这关来哦,请继续加油!", 2), a = lastPlayNum),
  60. updateData(a)
  61. }
  62. function setCharAt(a, b, c) {
  63. return b > a.length - 1 ? a: a.substr(0, b) + c + a.substr(b + 1)
  64. }
  65. function init() {
  66. cursorX = 0,
  67. cursorY = 0,
  68. canvas ? context.clearRect(0, 0, gameW, gameH) : (canvas = document.createElement("canvas"), context = canvas.getContext("2d"), canvas.width = gameW, canvas.height = gameH, document.body.appendChild(canvas)),
  69. checkForTouch() ? (canvas.addEventListener("touchmove", touchMove, !1), canvas.addEventListener("touchstart", touchStart, !1), canvas.addEventListener("touchend", touchEnd, !1)) : (canvas.addEventListener("mousemove", mouseMove, !1), canvas.addEventListener("mousedown", mouseDown, !1), canvas.addEventListener("mouseup", mouseUp, !1)),
  70. field = level[0],
  71. window.location.hash && startLevel(),
  72. collisionMagic(),
  73. draw()
  74. }
  75. function moveCircle() {
  76. field[selectedCircle] && (field[selectedCircle][0] = cursorX, field[selectedCircle][1] = cursorY, draw())
  77. }
  78. function selectCircle() {
  79. var a, b, c, d, e, f, g;
  80. for (level = levels[levelNum - 1], selectedCircle = void 0, f = 1e4, g = 0; g < field.length; g++) a = field[g][0],
  81. b = field[g][1],
  82. c = a - cursorX,
  83. d = b - cursorY,
  84. e = c * c + d * d,
  85. f > e && (f = e, selectedCircle = g)
  86. }
  87. function startLevel() {
  88. for (window.scrollTo(0, 1), level = levels[levelNum - 1], field = [], i = 0; i < level[0].length; i++) field.push([level[0][i][0], level[0][i][1]]);
  89. collisionMagic(),
  90. draw(),
  91. selectedCircle = void 0,
  92. usedStep = 0
  93. }
  94. function showPanel(a) {
  95. closepanel(),
  96. penel.classList.add(a),
  97. penel.classList.add("show")
  98. }
  99. function closepanel() {
  100. $share.classList.remove("show"),
  101. penel.className = "panel"
  102. }
  103. function winLevel() {
  104. levelNum >= maxLevels ? (showPanel("success"), Tips('<span style="color:red">恭喜通关!</span>')) : showPanel("success"),
  105. levelNum += 1,
  106. step = .5 * 2 * levelNum * (Math.ceil(levelNum / 10) + 1)
  107. }
  108. function loseLevel() {
  109. setTimeout(function() {
  110. showPanel("fail")
  111. },
  112. 800)
  113. }
  114. function finishLevel(a) {
  115. saveFile = setCharAt(saveFile, levelNum - 1, "1"),
  116. localStorage.setItem("lazorsSave2", saveFile),
  117. a ? (winLevel(), shareDesc = "我在解绳子游戏第" + (levelNum - 1) + "关中" + usedStep + "步就解开了,你能做到吗?", finishStatus = 1) : (loseLevel(), shareDesc = "解绳子游戏第" + levelNum + "关我已经掌握了技巧,你也来试试?", finishStatus = 0)
  118. }
  119. function collisionMagic() {
  120. var a, b, c;
  121. for (collisions = [[], []], a = 0; a < field.length; a++) collisions[0].push(0);
  122. for (a = 0; a < level[1].length; a++) collisions[1].push(0);
  123. for (B = !1, a = 0; a < level[1].length; a++) for (b = a; b < level[1].length; b++) a !== b && (c = checkCollision(level[1][a], level[1][b]), c && (B = !0, collisions[0][level[1][a][0]] += c, collisions[0][level[1][b][0]] += c, collisions[0][level[1][a][1]] += c, collisions[0][level[1][b][1]] += c, collisions[1][a] += c, collisions[1][b] += c));
  124. setTimeout(function() {
  125. B ? step || finishLevel() : finishLevel(!0),
  126. $step.innerHTML = Math.max(0, step)
  127. },
  128. 0)
  129. }
  130. function checkCollision(a, b) {
  131. var d, e, f, g, h, c = {
  132. p0: {
  133. x: field[a[0]][0],
  134. y: field[a[0]][1]
  135. },
  136. p1: {
  137. x: field[a[1]][0],
  138. y: field[a[1]][1]
  139. }
  140. };
  141. return c.vx = c.p0.x - c.p1.x,
  142. c.vy = c.p0.y - c.p1.y,
  143. d = {
  144. p0: {
  145. x: field[b[0]][0],
  146. y: field[b[0]][1]
  147. },
  148. p1: {
  149. x: field[b[1]][0],
  150. y: field[b[1]][1]
  151. }
  152. },
  153. d.vx = d.p0.x - d.p1.x,
  154. d.vy = d.p0.y - d.p1.y,
  155. e = {
  156. vx: c.p0.x - d.p0.x,
  157. vy: c.p0.y - d.p0.y
  158. },
  159. f = {
  160. vx: d.p0.x - c.p0.x,
  161. vy: d.p0.y - c.p0.y
  162. },
  163. g = perP(e, c) / perP(d, c),
  164. h = perP(f, d) / perP(c, d),
  165. g > -1 && 0 > g && h > -1 && 0 > h
  166. }
  167. function perP(a, b) {
  168. return a.vx * b.vy - a.vy * b.vx
  169. }
  170. function clear() {
  171. context.clearRect(0, 0, gameW, gameH)
  172. }
  173. function draw() {
  174. var a, b, c, d, e;
  175. for (clear(), context.lineWidth = 2, e = 0; e < level[1].length; e++) c = field[level[1][e][0]],
  176. d = field[level[1][e][1]],
  177. context.strokeStyle = collisions[1][e] > 1 ? "rgb(185,24,14)": 1 == collisions[1][e] ? "rgb(235,170,34)": "rgb(7,195,13)",
  178. context.beginPath(),
  179. context.moveTo(c[0], c[1]),
  180. context.lineTo(d[0], d[1]),
  181. context.closePath(),
  182. context.stroke();
  183. for (e = 0; e < field.length; e++) a = field[e][0],
  184. b = field[e][1],
  185. context.fillStyle = "rgb(13,87,180)",
  186. drawCirclePath(17, a, b),
  187. context.fill(),
  188. context.fillStyle = collisions[0][e] > 1 ? "rgb(185,24,14)": 1 == collisions[0][e] ? "rgb(235,170,34)": "rgb(7,195,13)",
  189. drawCirclePath(8, a, b),
  190. context.fill()
  191. }
  192. function drawCirclePath(a, b, c) {
  193. context.beginPath(),
  194. context.arc(b, c, a, 0, 2 * Math.PI, !0),
  195. context.closePath()
  196. }
  197. function checkForTouch() {
  198. return detective = document.createElement("div"),
  199. detective.setAttribute("ontouchmove", "return;"),
  200. "function" == typeof detective.ontouchmove ? !0 : !1
  201. }
  202. function updateCursorPos(a) {
  203. cursorX = a.pageX - canvas.offsetLeft,
  204. cursorY = a.pageY - canvas.offsetTop,
  205. cursorX > gameW ? cursorX = gameW: 0 > cursorX && (cursorX = 0),
  206. cursorY > gameH ? cursorY = gameH: 0 > cursorY && (cursorY = 0)
  207. }
  208. function touchStart(a) {
  209. return step ? (updateCursorPos(a.touches[0]), selectCircle(), moveCircle(), window.scrollTo(0, 1), (cursorY > 40 || 230 > cursorX) && a.preventDefault(), void 0) : (a.preventDefault(), void 0)
  210. }
  211. function touchMove(a) {
  212. updateCursorPos(a.touches[0]),
  213. moveCircle()
  214. }
  215. function touchEnd() {
  216. step--,
  217. usedStep++,
  218. selectedCircle = void 0,
  219. collisionMagic(),
  220. draw(),
  221. Math.random() < .1 && Tips(tipsText[new Date % tipsTextLength])
  222. }
  223. function mouseDown(a) {
  224. updateCursorPos(a),
  225. selectCircle(),
  226. moveCircle()
  227. }
  228. function mouseUp() {
  229. selectedCircle = void 0,
  230. collisionMagic(),
  231. draw()
  232. }
  233. function mouseMove(a) {
  234. updateCursorPos(a),
  235. moveCircle()
  236. }
  237. function goon() {
  238. closepanel(),
  239. updateData(levelNum),
  240. startLevel()
  241. }
  242. function share() {
  243. $share.classList.add("show")
  244. }
  245. var gameW, gameH, menu, menuItems, canvas, context, cursorX, cursorY, shareTitle, shareDesc, finishStatus, levels, maxLevels, $step, $share, saveFile, tipsText, Tips, lastPlayNum, levelNum, step, usedStep, level, field, collisions, selectedCircle, s, penel, tipsTextLength;
  246. if (window.scrollTo(0, 1), gameW = window.screen.width, gameH = window.screen.height - 80, shareTitle = "解开绳子", shareDesc = "多掌握些解绳子扣子的技巧,说不定这技能以后还能用上呢,谁知道。", finishStatus = 1, levels = [[[[94, 96], [263, 72], [40, 330], [273, 343]], [[0, 1], [0, 2], [0, 3], [1, 2], [1, 3], [2, 3]]], [[[173, 86], [240, 305], [63, 223], [254, 111], [143, 314]], [[0, 1], [0, 2], [0, 3], [0, 4], [1, 3], [2, 3], [3, 4]]], [[[168, 60], [173, 316], [233, 266], [215, 143], [105, 317], [58, 137]], [[0, 3], [0, 4], [1, 3], [1, 5], [2, 3], [2, 4], [2, 5]]], [[[127, 71], [213, 155], [152, 317], [224, 237], [70, 272], [65, 193]], [[0, 2], [0, 5], [1, 4], [1, 5], [3, 4], [3, 5]]], [[[247, 296], [95, 278], [163, 71], [58, 148], [278, 151], [171, 332]], [[0, 2], [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [2, 5], [3, 4], [4, 5]]], [[[38, 300], [123, 361], [173, 53], [258, 321], [284, 151], [72, 111]], [[0, 2], [0, 4], [0, 5], [1, 2], [1, 4], [1, 5], [2, 4], [3, 5]]], [[[46, 125], [207, 370], [145, 201], [255, 213], [238, 161], [78, 329]], [[0, 1], [0, 2], [0, 4], [0, 5], [1, 3], [1, 5], [2, 3], [4, 5]]], [[[45, 140], [130, 363], [41, 309], [174, 92], [250, 132], [285, 315]], [[0, 2], [0, 4], [0, 5], [1, 3], [1, 4], [1, 5], [2, 3], [2, 5], [4, 5]]], [[[139, 335], [284, 193], [80, 273], [210, 80], [93, 134], [283, 314]], [[0, 1], [0, 3], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4], [3, 5], [4, 5]]], [[[258, 329], [202, 73], [67, 293], [273, 136], [173, 360], [60, 107]], [[0, 1], [0, 2], [0, 3], [1, 2], [1, 4], [1, 5], [2, 3], [2, 4], [2, 5], [3, 5], [4, 5]]], [[[48, 341], [240, 136], [203, 345], [273, 290], [123, 96], [29, 138]], [[0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [1, 2], [1, 5], [2, 3], [2, 4], [2, 5], [3, 4]]], [[[149, 212], [77, 232], [121, 138], [225, 220], [266, 100], [210, 337], [142, 329], [274, 319]], [[0, 1], [0, 6], [1, 3], [1, 4], [1, 6], [1, 7], [2, 3], [3, 4], [3, 5], [3, 6]]], [[[264, 246], [77, 97], [65, 304], [175, 344], [202, 137], [263, 117]], [[0, 1], [0, 2], [0, 3], [0, 4], [1, 2], [1, 3], [1, 5], [3, 5], [4, 5]]], [[[103, 335], [184, 336], [239, 253], [35, 262], [187, 141], [69, 157]], [[0, 1], [0, 2], [0, 5], [1, 4], [1, 5], [2, 3], [2, 4], [2, 5], [3, 4], [4, 5]]], [[[71, 109], [266, 286], [66, 217], [117, 313], [206, 346], [246, 88], [274, 192], [180, 180]], [[0, 1], [0, 2], [0, 4], [0, 6], [0, 7], [1, 3], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [3, 5], [3, 6], [5, 7]]], [[[154, 255], [186, 191], [85, 279], [49, 167], [198, 93], [264, 178], [108, 111], [251, 298]], [[0, 5], [0, 6], [1, 2], [1, 4], [1, 7], [2, 3], [2, 4], [2, 6], [2, 7], [3, 6], [3, 7], [4, 6], [4, 7], [5, 6]]], [[[218, 291], [250, 221], [151, 358], [48, 344], [76, 232], [47, 80], [270, 129], [175, 119]], [[0, 3], [0, 7], [1, 5], [1, 7], [2, 7], [3, 5], [3, 6], [3, 7], [4, 5], [4, 6], [5, 7]]], [[[33, 204], [252, 91], [250, 191], [71, 353], [227, 246], [54, 272], [67, 142], [193, 316]], [[0, 1], [0, 2], [1, 2], [1, 3], [1, 5], [1, 6], [2, 6], [3, 4], [3, 5], [4, 6], [5, 6], [5, 7], [6, 7]]], [[[143, 338], [146, 75], [98, 189], [285, 195], [257, 303], [278, 100], [66, 268], [44, 129]], [[0, 2], [0, 3], [0, 6], [1, 3], [2, 3], [2, 4], [2, 7], [3, 4], [3, 6], [5, 6], [5, 7]]], [[[101, 70], [273, 225], [52, 159], [133, 339], [245, 334], [38, 279], [191, 248], [190, 79]], [[0, 1], [0, 3], [0, 6], [1, 2], [1, 3], [1, 4], [1, 7], [2, 3], [2, 4], [3, 5], [3, 7], [5, 7], [6, 7]]], [[[169, 226], [74, 154], [51, 306], [213, 325], [267, 174], [39, 212], [192, 192], [121, 377], [131, 90], [247, 238]], [[0, 2], [1, 2], [1, 6], [2, 3], [2, 9], [3, 5], [4, 6], [4, 7], [5, 9], [6, 9], [7, 8]]], [[[55, 149], [189, 316], [239, 188], [300, 213], [276, 285], [217, 58], [114, 294]], [[0, 1], [0, 2], [0, 6], [1, 2], [1, 3], [1, 5], [2, 5], [2, 6], [3, 4], [3, 5], [4, 6], [5, 6]]], [[[262, 193], [84, 113], [194, 82], [77, 280], [230, 288], [40, 183], [158, 346], [163, 218]], [[0, 5], [0, 6], [0, 7], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [2, 3], [2, 4], [2, 6], [3, 4], [3, 6], [3, 7], [5, 6], [5, 7]]], [[[287, 190], [131, 201], [255, 289], [60, 194], [163, 74], [246, 87], [66, 281], [184, 312]], [[0, 1], [0, 2], [0, 4], [0, 7], [1, 4], [2, 3], [2, 5], [2, 7], [3, 4], [3, 7], [4, 5], [4, 6], [4, 7], [6, 7]]], [[[228, 100], [259, 147], [276, 307], [173, 321], [61, 161], [55, 237], [126, 81], [118, 134]], [[0, 2], [0, 5], [0, 6], [1, 5], [1, 6], [2, 4], [2, 5], [2, 6], [2, 7], [3, 5], [3, 7], [4, 6], [4, 7]]], [[[104, 334], [266, 263], [262, 132], [92, 102], [170, 287], [225, 336], [158, 52], [55, 214]], [[0, 3], [0, 5], [0, 6], [0, 7], [1, 2], [1, 5], [1, 6], [1, 7], [2, 3], [2, 4], [3, 4], [4, 7], [5, 6]]], [[[291, 165], [158, 341], [53, 219], [159, 216], [220, 48], [80, 124], [188, 121], [272, 325]], [[0, 1], [0, 5], [1, 5], [1, 7], [2, 3], [2, 6], [2, 7], [3, 6], [3, 7], [4, 5], [4, 6], [4, 7], [5, 6], [6, 7]]], [[[203, 287], [258, 151], [65, 305], [256, 262], [90, 91], [178, 86], [38, 214], [129, 316]], [[0, 1], [0, 6], [0, 7], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [2, 4], [2, 5], [3, 4], [4, 6], [6, 7]]], [[[209, 182], [151, 299], [176, 56], [50, 169], [98, 106], [109, 168], [284, 290], [279, 116]], [[0, 2], [0, 7], [1, 3], [1, 5], [1, 6], [2, 4], [2, 5], [2, 6], [3, 5], [3, 6], [4, 5], [4, 6], [5, 6], [5, 7], [6, 7]]], [[[136, 186], [243, 111], [55, 302], [62, 106], [188, 317], [132, 89], [234, 218], [28, 189]], [[0, 1], [0, 2], [0, 3], [0, 4], [1, 2], [1, 3], [1, 5], [1, 6], [1, 7], [2, 5], [2, 6], [3, 4], [3, 5], [4, 5], [5, 6], [5, 7], [6, 7]]]], maxLevels = levels.length, $step = document.getElementById("left-step"), $share = document.getElementById("share-arrow"), saveFile = localStorage.getItem("lazorsSave2"), !saveFile) {
  247. for (saveFile = "", i = 0; i < levels.length; i++) saveFile += "0";
  248. localStorage.setItem("lazorsSave2", saveFile)
  249. }
  250. tipsText = ["点击朋友圈好友的分享结果,有可能玩到还没玩过的关卡哦", "某一关玩到泄气都过不了?发到群里让大家一起玩吧"],
  251. Tips = function() {
  252. var c, a = document.getElementById("tips"),
  253. b = a.innerHTML;
  254. return function(d, e) {
  255. clearTimeout(c),
  256. a.innerHTML = d,
  257. e && (c = setTimeout(function() {
  258. a.innerHTML = b
  259. },
  260. 1e3 * e))
  261. }
  262. } (),
  263. lastPlayNum = 1 + saveFile.lastIndexOf("1"),
  264. levelNum = lastPlayNum,
  265. step = 0,
  266. usedStep = 0,
  267. //window.location.hash && (updateDataFromHash(), window.location.hash = ""),
  268. updateData(levelNum),
  269. level = levels[levelNum - 1],
  270. collisions = [[0, 0, 0, 0], [!1, !1, !1, !1, !1]],
  271. penel = document.getElementById("panel"),
  272. tipsTextLength = tipsText.length,
  273. document.addEventListener("touchmove",
  274. function(a) {
  275. a.preventDefault()
  276. }),
  277. document.addEventListener("onorientationchange",
  278. function() {
  279. Math.abs(90 === window.orientation) && alert("请使用竖屏玩耍")
  280. }),
  281. document.addEventListener("WeixinJSBridgeReady",
  282. function() {
  283. WeixinJSBridge.on("menu:share:appmessage",
  284. function() {
  285. WeixinJSBridge.invoke("sendAppMessage", {
  286. img_url: "http://mmbiz.qpic.cn/mmbiz/kG4NuD28mG91oXlPAYqCQySojbHiaXnOL347ce7pfHv3ZN8Lia5ickoMVicUDCt9PlibFaYU7ECrOuD4E60FIHZedrA/640",
  287. link: "http://" + domain + "/games/jksz/",
  288. desc: shareDesc,
  289. title: shareTitle
  290. },
  291. function() {
  292. window.location.href = aboutus;
  293. })
  294. }),
  295. WeixinJSBridge.on("menu:share:timeline",
  296. function() {
  297. WeixinJSBridge.invoke("shareTimeline", {
  298. img_url: "http://mmbiz.qpic.cn/mmbiz/kG4NuD28mG91oXlPAYqCQySojbHiaXnOL347ce7pfHv3ZN8Lia5ickoMVicUDCt9PlibFaYU7ECrOuD4E60FIHZedrA/640",
  299. link: "http://" + domain + "/games/jksz/",
  300. desc: shareDesc,
  301. title: shareDesc
  302. },
  303. function() {
  304. window.location.href = aboutus;
  305. })
  306. })
  307. },
  308. !1),
  309. init();
  310. </script><div style="display:none;"><script type="text/javascript">
  311. var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
  312. document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2eac95e2df0ea5d2b0aaa92e3dbbe419'
  313. type='text/javascript'%3E%3C/script%3E"));
  314. </script>
  315. </div>
  316. </html>
  317. </html>