welcome.blade.php 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6. <meta name="viewport" content="user-scalable=no"/>
  7. <meta name="viewport"
  8. content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,viewport-fit=cover"/>
  9. <script src="//cdn-novel.iycdm.com/static/jquery-3.4.1.min.js" type="text/javascript"></script>
  10. </head>
  11. <body>
  12. <style>
  13. html,
  14. body,
  15. p,
  16. div,
  17. section {
  18. margin: 0;
  19. padding: 0;
  20. }
  21. img {
  22. width: 100%;
  23. -webkit-tap-highlight-color: transparent;
  24. }
  25. a {
  26. color: currentColor;
  27. -webkit-tap-highlight-color: transparent;
  28. }
  29. .application-content {
  30. padding: 12px;
  31. max-width: 100%;
  32. transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  33. }
  34. .application-content .content-wrap {
  35. width: 100%;
  36. margin-right: auto;
  37. margin-left: auto;
  38. }
  39. .content-card {
  40. border-radius: 5px;
  41. max-width: 100%;
  42. outline: none;
  43. text-decoration: none;
  44. transition-property: box-shadow, opacity;
  45. box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
  46. 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  47. padding: 16px;
  48. font-size: 14px;
  49. line-height: 20px;
  50. }
  51. .card-text {
  52. text-align: center;
  53. }
  54. .card-text .wechat-title {
  55. color: red;
  56. font-weight: 700;
  57. margin-bottom: 16px;
  58. font-size: 18px;
  59. }
  60. .card-text .wechat-name {
  61. color: teal;
  62. font-weight: 700;
  63. font-size: 24px;
  64. line-height: 40px;
  65. margin-bottom: 16px;
  66. }
  67. .card-text .wechat-step {
  68. color: #000;
  69. font-weight: 900;
  70. font-size: 18px;
  71. line-height: 24px;
  72. margin-bottom: 16px;
  73. }
  74. .card-text .copy-text {
  75. height: 28px;
  76. min-width: 50px;
  77. padding: 0 12px;
  78. color: #009688;
  79. caret-color: #009688;
  80. border: 1px solid #009688;
  81. background-color: #fff;
  82. border-radius: 5px;
  83. font-size: 20px;
  84. margin: 0 auto 16px;
  85. display: block;
  86. }
  87. .card-text .copy-button {
  88. height: 36px;
  89. min-width: 64px;
  90. padding: 0 16px;
  91. background-color: #ff5252;
  92. border-radius: 5px;
  93. border: 1px solid #ff5252;
  94. color: #fff;
  95. font-size: 20px;
  96. line-height: 36px;
  97. display: block;
  98. margin: 0 auto 16px;
  99. box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
  100. 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
  101. }
  102. .toast-wrap {
  103. position: fixed;
  104. top: 50%;
  105. left: 50%;
  106. -webkit-transform: translate(-50%, -50%);
  107. transform: translate(-50%, -50%);
  108. padding: 5px 10px;
  109. color: #fff;
  110. font-size: 14px;
  111. text-align: center;
  112. background: rgba(0, 0, 0, 0.8);
  113. border-radius: 4px;
  114. }
  115. .hw-guide {
  116. width: 100%;
  117. height: 100%;
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. display: none;
  122. }
  123. .hw-guide img {
  124. width: 100%;
  125. }
  126. .hw-guide .btn-know {
  127. width: 180px;
  128. height: 40px;
  129. line-height: 40px;
  130. text-align: center;
  131. border: none;
  132. outline: none;
  133. background: linear-gradient(0deg,
  134. rgba(255, 210, 0, 1),
  135. rgba(255, 239, 75, 1));
  136. border-radius: 10px;
  137. text-align: center;
  138. font-size: 14px;
  139. font-family: PingFang-SC-Bold;
  140. font-weight: bold;
  141. color: rgba(255, 93, 123, 1);
  142. position: absolute;
  143. top: 62%;
  144. left: 50%;
  145. margin-left: -90px;
  146. }
  147. .open-gif {
  148. position: absolute;
  149. background: rgba(0, 0, 0, 0.5);
  150. top: 0;
  151. left: 0;
  152. width: 100%;
  153. height: 100%;
  154. }
  155. .open-gif .open-conetent {
  156. width: 53vw;
  157. position: absolute;
  158. height: 0;
  159. top: 0;
  160. bottom: 0;
  161. left: 0;
  162. right: 0;
  163. margin: auto;
  164. background-color: #f7f5eb;
  165. border-radius: 10px;
  166. overflow: hidden;
  167. text-align: center;
  168. }
  169. .open-gif .open-conetent img {
  170. width: 36%;
  171. display: inline-block;
  172. margin-top: 12%;
  173. }
  174. .open-gif .open-conetent p {
  175. margin-top: 8%;
  176. font-size: 14px;
  177. }
  178. .error-tips {
  179. text-align: center;
  180. margin-top: 40%;
  181. }
  182. .error-tips img {
  183. width: 48%;
  184. maegin-top: 30%;
  185. }
  186. .error-button {
  187. width: 200px;
  188. height: 40px;
  189. background: rgba(239, 89, 82, 1);
  190. border-radius: 20px;
  191. color: #fff;
  192. font-weight: bold;
  193. font-size: 16px;
  194. line-height: 40px;
  195. text-align: center;
  196. margin-top: 14%;
  197. margin-left: auto;
  198. margin-right: auto;
  199. }
  200. .wx-button{
  201. width:
  202. 200
  203. px
  204. ;
  205. height:
  206. 40
  207. px
  208. ;
  209. background:rgba(239,89,82,1)
  210. ;
  211. border-radius:
  212. 20
  213. px
  214. ;
  215. color:#fff
  216. ;
  217. font-weight: bold
  218. ;
  219. font-size:
  220. 16
  221. px
  222. ;
  223. line-height:
  224. 40
  225. px
  226. ;
  227. text-align: center
  228. ;
  229. margin-top:
  230. 14
  231. %
  232. ;
  233. margin-left: auto
  234. ;
  235. margin-right: auto
  236. ;
  237. </style>
  238. <div class="application-wrap">
  239. <main class="application-content">
  240. <p id="wechat-gzhname" style="opacity:0;width:0;height:0;">yuzhuwz</p>
  241. <div class="content-wrap" style="display: none;">
  242. <div class="error-tips"><img src="https://cdn-novel.iycdm.com/quickapp/static/net-error.jpg"/></div>
  243. <div class="error-button" onclick="location.reload();">点我继续阅读</div>
  244. @if ($show_gzh==1)
  245. <div class="wx-button clip" data-clipboard-action="copy" data-clipboard-target="#wechat-gzhname">
  246. 打开微信公众号继续阅读
  247. </div>
  248. @endif
  249. </div>
  250. </main>
  251. <div class="hw-guide">
  252. <img src="https://cdn-novel.iycdm.com/quickapp/static/guide.jpg "/>
  253. <div class="btn-know">知道了</div>
  254. </div>
  255. <div class="open-gif">
  256. <div class="open-conetent">
  257. <img src="https://cdn-novel.iycdm.com/quickapp/static/gidf.gif"/>
  258. <p>正在打开快应用...</p>
  259. </div>
  260. </div>
  261. </div>
  262. <script type="text/javascript">
  263. !function (t, e) {
  264. "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.ClipboardJS = e() : t.ClipboardJS = e()
  265. }(this, function () {
  266. return function (n) {
  267. var o = {};
  268. function r(t) {
  269. if (o[t]) return o[t].exports;
  270. var e = o[t] = {i: t, l: !1, exports: {}};
  271. return n[t].call(e.exports, e, e.exports, r), e.l = !0, e.exports
  272. }
  273. return r.m = n, r.c = o, r.d = function (t, e, n) {
  274. r.o(t, e) || Object.defineProperty(t, e, {enumerable: !0, get: n})
  275. }, r.r = function (t) {
  276. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(t, "__esModule", {value: !0})
  277. }, r.t = function (e, t) {
  278. if (1 & t && (e = r(e)), 8 & t) return e;
  279. if (4 & t && "object" == typeof e && e && e.__esModule) return e;
  280. var n = Object.create(null);
  281. if (r.r(n), Object.defineProperty(n, "default", {
  282. enumerable: !0,
  283. value: e
  284. }), 2 & t && "string" != typeof e) for (var o in e) r.d(n, o, function (t) {
  285. return e[t]
  286. }.bind(null, o));
  287. return n
  288. }, r.n = function (t) {
  289. var e = t && t.__esModule ? function () {
  290. return t.default
  291. } : function () {
  292. return t
  293. };
  294. return r.d(e, "a", e), e
  295. }, r.o = function (t, e) {
  296. return Object.prototype.hasOwnProperty.call(t, e)
  297. }, r.p = "", r(r.s = 0)
  298. }([function (t, e, n) {
  299. "use strict";
  300. var r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
  301. return typeof t
  302. } : function (t) {
  303. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  304. }, i = function () {
  305. function o(t, e) {
  306. for (var n = 0; n < e.length; n++) {
  307. var o = e[n];
  308. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o)
  309. }
  310. }
  311. return function (t, e, n) {
  312. return e && o(t.prototype, e), n && o(t, n), t
  313. }
  314. }(), a = o(n(1)), c = o(n(3)), u = o(n(4));
  315. function o(t) {
  316. return t && t.__esModule ? t : {default: t}
  317. }
  318. var l = function (t) {
  319. function o(t, e) {
  320. !function (t, e) {
  321. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  322. }(this, o);
  323. var n = function (t, e) {
  324. if (!t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  325. return !e || "object" != typeof e && "function" != typeof e ? t : e
  326. }(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this));
  327. return n.resolveOptions(e), n.listenClick(t), n
  328. }
  329. return function (t, e) {
  330. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function, not " + typeof e);
  331. t.prototype = Object.create(e && e.prototype, {
  332. constructor: {
  333. value: t,
  334. enumerable: !1,
  335. writable: !0,
  336. configurable: !0
  337. }
  338. }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : t.__proto__ = e)
  339. }(o, c.default), i(o, [{
  340. key: "resolveOptions", value: function () {
  341. var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
  342. this.action = "function" == typeof t.action ? t.action : this.defaultAction, this.target = "function" == typeof t.target ? t.target : this.defaultTarget, this.text = "function" == typeof t.text ? t.text : this.defaultText, this.container = "object" === r(t.container) ? t.container : document.body
  343. }
  344. }, {
  345. key: "listenClick", value: function (t) {
  346. var e = this;
  347. this.listener = (0, u.default)(t, "click", function (t) {
  348. return e.onClick(t)
  349. })
  350. }
  351. }, {
  352. key: "onClick", value: function (t) {
  353. var e = t.delegateTarget || t.currentTarget;
  354. this.clipboardAction && (this.clipboardAction = null), this.clipboardAction = new a.default({
  355. action: this.action(e),
  356. target: this.target(e),
  357. text: this.text(e),
  358. container: this.container,
  359. trigger: e,
  360. emitter: this
  361. })
  362. }
  363. }, {
  364. key: "defaultAction", value: function (t) {
  365. return s("action", t)
  366. }
  367. }, {
  368. key: "defaultTarget", value: function (t) {
  369. var e = s("target", t);
  370. if (e) return document.querySelector(e)
  371. }
  372. }, {
  373. key: "defaultText", value: function (t) {
  374. return s("text", t)
  375. }
  376. }, {
  377. key: "destroy", value: function () {
  378. this.listener.destroy(), this.clipboardAction && (this.clipboardAction.destroy(), this.clipboardAction = null)
  379. }
  380. }], [{
  381. key: "isSupported", value: function () {
  382. var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : ["copy", "cut"],
  383. e = "string" == typeof t ? [t] : t, n = !!document.queryCommandSupported;
  384. return e.forEach(function (t) {
  385. n = n && !!document.queryCommandSupported(t)
  386. }), n
  387. }
  388. }]), o
  389. }();
  390. function s(t, e) {
  391. var n = "data-clipboard-" + t;
  392. if (e.hasAttribute(n)) return e.getAttribute(n)
  393. }
  394. t.exports = l
  395. }, function (t, e, n) {
  396. "use strict";
  397. var o, r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) {
  398. return typeof t
  399. } : function (t) {
  400. return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
  401. }, i = function () {
  402. function o(t, e) {
  403. for (var n = 0; n < e.length; n++) {
  404. var o = e[n];
  405. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o)
  406. }
  407. }
  408. return function (t, e, n) {
  409. return e && o(t.prototype, e), n && o(t, n), t
  410. }
  411. }(), a = n(2), c = (o = a) && o.__esModule ? o : {default: o};
  412. var u = function () {
  413. function e(t) {
  414. !function (t, e) {
  415. if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function")
  416. }(this, e), this.resolveOptions(t), this.initSelection()
  417. }
  418. return i(e, [{
  419. key: "resolveOptions", value: function () {
  420. var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
  421. this.action = t.action, this.container = t.container, this.emitter = t.emitter, this.target = t.target, this.text = t.text, this.trigger = t.trigger, this.selectedText = ""
  422. }
  423. }, {
  424. key: "initSelection", value: function () {
  425. this.text ? this.selectFake() : this.target && this.selectTarget()
  426. }
  427. }, {
  428. key: "selectFake", value: function () {
  429. var t = this, e = "rtl" == document.documentElement.getAttribute("dir");
  430. this.removeFake(), this.fakeHandlerCallback = function () {
  431. return t.removeFake()
  432. }, this.fakeHandler = this.container.addEventListener("click", this.fakeHandlerCallback) || !0, this.fakeElem = document.createElement("textarea"), this.fakeElem.style.fontSize = "12pt", this.fakeElem.style.border = "0", this.fakeElem.style.padding = "0", this.fakeElem.style.margin = "0", this.fakeElem.style.position = "absolute", this.fakeElem.style[e ? "right" : "left"] = "-9999px";
  433. var n = window.pageYOffset || document.documentElement.scrollTop;
  434. this.fakeElem.style.top = n + "px", this.fakeElem.setAttribute("readonly", ""), this.fakeElem.value = this.text, this.container.appendChild(this.fakeElem), this.selectedText = (0, c.default)(this.fakeElem), this.copyText()
  435. }
  436. }, {
  437. key: "removeFake", value: function () {
  438. this.fakeHandler && (this.container.removeEventListener("click", this.fakeHandlerCallback), this.fakeHandler = null, this.fakeHandlerCallback = null), this.fakeElem && (this.container.removeChild(this.fakeElem), this.fakeElem = null)
  439. }
  440. }, {
  441. key: "selectTarget", value: function () {
  442. this.selectedText = (0, c.default)(this.target), this.copyText()
  443. }
  444. }, {
  445. key: "copyText", value: function () {
  446. var e = void 0;
  447. try {
  448. e = document.execCommand(this.action)
  449. } catch (t) {
  450. e = !1
  451. }
  452. this.handleResult(e)
  453. }
  454. }, {
  455. key: "handleResult", value: function (t) {
  456. this.emitter.emit(t ? "success" : "error", {
  457. action: this.action,
  458. text: this.selectedText,
  459. trigger: this.trigger,
  460. clearSelection: this.clearSelection.bind(this)
  461. })
  462. }
  463. }, {
  464. key: "clearSelection", value: function () {
  465. this.trigger && this.trigger.focus(), window.getSelection().removeAllRanges()
  466. }
  467. }, {
  468. key: "destroy", value: function () {
  469. this.removeFake()
  470. }
  471. }, {
  472. key: "action", set: function () {
  473. var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "copy";
  474. if (this._action = t, "copy" !== this._action && "cut" !== this._action) throw new Error('Invalid "action" value, use either "copy" or "cut"')
  475. }, get: function () {
  476. return this._action
  477. }
  478. }, {
  479. key: "target", set: function (t) {
  480. if (void 0 !== t) {
  481. if (!t || "object" !== (void 0 === t ? "undefined" : r(t)) || 1 !== t.nodeType) throw new Error('Invalid "target" value, use a valid Element');
  482. if ("copy" === this.action && t.hasAttribute("disabled")) throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
  483. if ("cut" === this.action && (t.hasAttribute("readonly") || t.hasAttribute("disabled"))) throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');
  484. this._target = t
  485. }
  486. }, get: function () {
  487. return this._target
  488. }
  489. }]), e
  490. }();
  491. t.exports = u
  492. }, function (t, e) {
  493. t.exports = function (t) {
  494. var e;
  495. if ("SELECT" === t.nodeName) t.focus(), e = t.value; else if ("INPUT" === t.nodeName || "TEXTAREA" === t.nodeName) {
  496. var n = t.hasAttribute("readonly");
  497. n || t.setAttribute("readonly", ""), t.select(), t.setSelectionRange(0, t.value.length), n || t.removeAttribute("readonly"), e = t.value
  498. } else {
  499. t.hasAttribute("contenteditable") && t.focus();
  500. var o = window.getSelection(), r = document.createRange();
  501. r.selectNodeContents(t), o.removeAllRanges(), o.addRange(r), e = o.toString()
  502. }
  503. return e
  504. }
  505. }, function (t, e) {
  506. function n() {
  507. }
  508. n.prototype = {
  509. on: function (t, e, n) {
  510. var o = this.e || (this.e = {});
  511. return (o[t] || (o[t] = [])).push({fn: e, ctx: n}), this
  512. }, once: function (t, e, n) {
  513. var o = this;
  514. function r() {
  515. o.off(t, r), e.apply(n, arguments)
  516. }
  517. return r._ = e, this.on(t, r, n)
  518. }, emit: function (t) {
  519. for (var e = [].slice.call(arguments, 1), n = ((this.e || (this.e = {}))[t] || []).slice(), o = 0, r = n.length; o < r; o++) n[o].fn.apply(n[o].ctx, e);
  520. return this
  521. }, off: function (t, e) {
  522. var n = this.e || (this.e = {}), o = n[t], r = [];
  523. if (o && e) for (var i = 0, a = o.length; i < a; i++) o[i].fn !== e && o[i].fn._ !== e && r.push(o[i]);
  524. return r.length ? n[t] = r : delete n[t], this
  525. }
  526. }, t.exports = n
  527. }, function (t, e, n) {
  528. var d = n(5), h = n(6);
  529. t.exports = function (t, e, n) {
  530. if (!t && !e && !n) throw new Error("Missing required arguments");
  531. if (!d.string(e)) throw new TypeError("Second argument must be a String");
  532. if (!d.fn(n)) throw new TypeError("Third argument must be a Function");
  533. if (d.node(t)) return s = e, f = n, (l = t).addEventListener(s, f), {
  534. destroy: function () {
  535. l.removeEventListener(s, f)
  536. }
  537. };
  538. if (d.nodeList(t)) return a = t, c = e, u = n, Array.prototype.forEach.call(a, function (t) {
  539. t.addEventListener(c, u)
  540. }), {
  541. destroy: function () {
  542. Array.prototype.forEach.call(a, function (t) {
  543. t.removeEventListener(c, u)
  544. })
  545. }
  546. };
  547. if (d.string(t)) return o = t, r = e, i = n, h(document.body, o, r, i);
  548. throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
  549. var o, r, i, a, c, u, l, s, f
  550. }
  551. }, function (t, n) {
  552. n.node = function (t) {
  553. return void 0 !== t && t instanceof HTMLElement && 1 === t.nodeType
  554. }, n.nodeList = function (t) {
  555. var e = Object.prototype.toString.call(t);
  556. return void 0 !== t && ("[object NodeList]" === e || "[object HTMLCollection]" === e) && "length" in t && (0 === t.length || n.node(t[0]))
  557. }, n.string = function (t) {
  558. return "string" == typeof t || t instanceof String
  559. }, n.fn = function (t) {
  560. return "[object Function]" === Object.prototype.toString.call(t)
  561. }
  562. }, function (t, e, n) {
  563. var a = n(7);
  564. function i(t, e, n, o, r) {
  565. var i = function (e, n, t, o) {
  566. return function (t) {
  567. t.delegateTarget = a(t.target, n), t.delegateTarget && o.call(e, t)
  568. }
  569. }.apply(this, arguments);
  570. return t.addEventListener(n, i, r), {
  571. destroy: function () {
  572. t.removeEventListener(n, i, r)
  573. }
  574. }
  575. }
  576. t.exports = function (t, e, n, o, r) {
  577. return "function" == typeof t.addEventListener ? i.apply(null, arguments) : "function" == typeof n ? i.bind(null, document).apply(null, arguments) : ("string" == typeof t && (t = document.querySelectorAll(t)), Array.prototype.map.call(t, function (t) {
  578. return i(t, e, n, o, r)
  579. }))
  580. }
  581. }, function (t, e) {
  582. if ("undefined" != typeof Element && !Element.prototype.matches) {
  583. var n = Element.prototype;
  584. n.matches = n.matchesSelector || n.mozMatchesSelector || n.msMatchesSelector || n.oMatchesSelector || n.webkitMatchesSelector
  585. }
  586. t.exports = function (t, e) {
  587. for (; t && 9 !== t.nodeType;) {
  588. if ("function" == typeof t.matches && t.matches(e)) return t;
  589. t = t.parentNode
  590. }
  591. }
  592. }])
  593. });
  594. </script>
  595. <script type="text/javascript" src="https://statres.quickapp.cn/quickapp/js/routerinline.min.js"></script>
  596. <script type="text/javascript">
  597. var clipboard = new ClipboardJS('.clip');
  598. clipboard.on('success', function (e) {
  599. window.location.href = "weixin://dl/officialaccounts";
  600. });
  601. </script>
  602. <script type="text/javascript">
  603. //获取url参数
  604. function getQueryString(name) {
  605. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
  606. var r = decodeURIComponent(window.location.search)
  607. .substr(1)
  608. .match(reg);
  609. if (r != null) return unescape(r[2]);
  610. return null;
  611. }
  612. //添加input
  613. function clipbroad() {
  614. }
  615. //全局变量
  616. var glob = {
  617. ua: window.navigator.userAgent.toLocaleLowerCase(),
  618. isHuaWei: /huawei|honor/.test(window.navigator.userAgent.toLowerCase()),
  619. isOpenApp: false,
  620. obAvailable: false //机型是否支持快应用
  621. };
  622. //快应用配置
  623. var QYY = {
  624. isWx: /micromessenger/.test(glob.ua), //是否微信环境
  625. isIos: /iphone|ipod|ipad/.test(glob.ua), //是否是ios
  626. entry: "views/Reader", //拉起快应用阅读器页面
  627. packName: "{{ $package }}", //快应用包名
  628. bid: "{{$hash_bid}}", //书籍id
  629. cid: "{{$cid}}", //章节id
  630. send_order_id: "{{$send_order_id}}",//派单ID
  631. };
  632. //判断机型是否支持快应用
  633. try {
  634. channelReady(function (bAvailable) {
  635. glob.obAvailable = bAvailable;
  636. });
  637. } catch (e) {
  638. glob.obAvailable = false;
  639. }
  640. //显示公众号落地页
  641. function showH5Page() {
  642. var time = QYY.isIos ? 0 : 5000;
  643. setTimeout(function () {
  644. $(".content-wrap").show();
  645. showPop(false);
  646. }, time);
  647. }
  648. //是否显示拉起快应用弹窗
  649. function showPop(show) {
  650. if (show) {
  651. $(".open-gif").show();
  652. } else {
  653. $(".open-gif").hide();
  654. }
  655. }
  656. //打开快应用逻辑
  657. function openQyy() {
  658. var parmas = {
  659. bid: QYY.bid,
  660. chapter_id: QYY.cid,
  661. send_order_id: QYY.send_order_id
  662. };
  663. try {
  664. //尝试直接拉起
  665. appRouter(QYY.packName, "/" + QYY.entry, parmas);
  666. } catch (e) {
  667. //唤醒失败 尝试url sheme唤醒
  668. try {
  669. appRouter(QYY.packName, "/" + QYY.entry, parmas);
  670. } catch (er) {
  671. routerAHap(parmas);
  672. }
  673. }
  674. }
  675. //URL唤醒快应用
  676. function routerAHap(data) {
  677. var parmas = $.param(data);
  678. var ohapa = document.createElement("a");
  679. ohapa.href = "hap://app/" + QYY.packName + "/" + QYY.entry + "?" + parmas;
  680. ohapa.setAttribute(
  681. "style",
  682. "position: absolute;left: -1000rem;height: 1rem;width: 1rem;overflow: hidden"
  683. );
  684. document.body.appendChild(ohapa);
  685. ohapa.click();
  686. }
  687. //初始化
  688. function startDeep() {
  689. showH5Page();
  690. !QYY.isIos && openQyy();
  691. }
  692. //华为h5流程
  693. var hwPage = {
  694. init: function () {
  695. this.lisen();
  696. $(".hw-guide").css("height", $(".hw-guide").width() * 1.778);
  697. $(".hw-guide").show();
  698. },
  699. lisen: function () {
  700. $(".btn-know").on("click", function () {
  701. $(".hw-guide").hide();
  702. showPop(true);
  703. startDeep();
  704. });
  705. }
  706. };
  707. $(function () {
  708. //页面流程开始
  709. //处理弹出框的高度
  710. $(".open-conetent").height($(".open-conetent").width() * 0.75);
  711. //华为手机显示提示页
  712. if (glob.isHuaWei) {
  713. setTimeout(function () {
  714. hwPage.init();
  715. showPop(false);
  716. }, 3000);
  717. } else {
  718. setTimeout(function () {
  719. startDeep();
  720. }, 400)
  721. }
  722. });
  723. </script>
  724. </body>
  725. </html>