index.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. "use strict";
  2. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_react-dom_js.js");
  3. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-MTR4XPV4_js.js");
  4. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-SX7RUVFK_js.js");
  5. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js");
  6. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_taro_js.js");
  7. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js");
  8. require("../../prebundle/node_modules_taro_weapp_prebundle_tarojs_runtime_js.js");
  9. require("../../prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js.js");
  10. require("../../prebundle/remoteEntry.js");
  11. require("../../prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js");
  12. require("../../prebundle/node_modules_taro_weapp_prebundle_react_js.js");
  13. require("../../taro");
  14. require("../../runtime");
  15. (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["plugin/pages/miniWeb/index"],{
  16. /***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=plugin/pages/miniWeb/index!./src/plugin/pages/miniWeb/index.tsx":
  17. /*!**********************************************************************************************************************************!*\
  18. !*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=plugin/pages/miniWeb/index!./src/plugin/pages/miniWeb/index.tsx ***!
  19. \**********************************************************************************************************************************/
  20. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  21. /* harmony import */ var _Users_huangzhichao_Documents_www_wx_custom_plugin_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
  22. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
  23. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
  24. /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
  25. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
  26. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
  27. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
  28. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
  29. var count = 0;
  30. var MiniWeb = function MiniWeb() {
  31. var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
  32. _useState2 = (0,_Users_huangzhichao_Documents_www_wx_custom_plugin_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_useState, 2),
  33. showModal = _useState2[0],
  34. setShowModal = _useState2[1];
  35. (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useDidShow)(function () {
  36. count++;
  37. if (count < 2) {
  38. setShowModal(true);
  39. } else {
  40. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateBack();
  41. }
  42. });
  43. (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useUnload)(function () {
  44. count = 0;
  45. });
  46. function btnClick() {
  47. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().openEmbeddedMiniProgram({
  48. appId: 'wxdd07a068bf2e6ef4',
  49. path: 'pages/middlepage/middlepage?paramKey=fdc2ab9b532143aea717520b5f9b8f10'
  50. });
  51. }
  52. function onCancel() {
  53. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateBack();
  54. }
  55. function onConfirm() {
  56. setShowModal(false);
  57. btnClick();
  58. }
  59. return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  60. className: "mini-web",
  61. children: [showModal && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  62. className: "modal",
  63. children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  64. className: "modal-content",
  65. children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  66. className: "modal-body",
  67. children: "\u662F\u5426\u6253\u5F00\u534A\u5C4F\u5C0F\u7A0B\u5E8F"
  68. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  69. className: "modal-footer",
  70. children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  71. className: "button cancel",
  72. onClick: onCancel,
  73. children: "\u53D6\u6D88"
  74. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  75. className: "button confirm",
  76. onClick: onConfirm,
  77. children: "\u786E\u8BA4"
  78. })]
  79. })]
  80. })
  81. }), "\u534A\u5C4F\u5C0F\u7A0B\u5E8F"]
  82. });
  83. };
  84. /* harmony default export */ __webpack_exports__["default"] = (MiniWeb);
  85. /***/ }),
  86. /***/ "./src/plugin/pages/miniWeb/index.tsx":
  87. /*!********************************************!*\
  88. !*** ./src/plugin/pages/miniWeb/index.tsx ***!
  89. \********************************************/
  90. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  91. /* harmony import */ var _tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/plugin-platform-weapp/dist/runtime */ "webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime");
  92. /* harmony import */ var _tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0__);
  93. /* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/plugin-framework-react/dist/runtime */ "webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime");
  94. /* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_1__);
  95. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
  96. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
  97. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ "webpack/container/remote/react-dom");
  98. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);
  99. var component = (__webpack_require__(/*! !!../../../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=plugin/pages/miniWeb/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=plugin/pages/miniWeb/index!./src/plugin/pages/miniWeb/index.tsx")["default"])
  100. var config = {"isNewBlended":false};
  101. var inst = Component((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_1__.createNativeComponentConfig)(component, react__WEBPACK_IMPORTED_MODULE_2__, (react_dom__WEBPACK_IMPORTED_MODULE_3___default()), config))
  102. /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (component);
  103. /***/ }),
  104. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
  105. /*!*********************************************************************!*\
  106. !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
  107. \*********************************************************************/
  108. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  109. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  110. /* harmony export */ "default": function() { return /* binding */ _arrayLikeToArray; }
  111. /* harmony export */ });
  112. function _arrayLikeToArray(arr, len) {
  113. if (len == null || len > arr.length) len = arr.length;
  114. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  115. return arr2;
  116. }
  117. /***/ }),
  118. /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
  119. /*!*******************************************************************!*\
  120. !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
  121. \*******************************************************************/
  122. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  123. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  124. /* harmony export */ "default": function() { return /* binding */ _arrayWithHoles; }
  125. /* harmony export */ });
  126. function _arrayWithHoles(arr) {
  127. if (Array.isArray(arr)) return arr;
  128. }
  129. /***/ }),
  130. /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js":
  131. /*!*************************************************************************!*\
  132. !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***!
  133. \*************************************************************************/
  134. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  135. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  136. /* harmony export */ "default": function() { return /* binding */ _iterableToArrayLimit; }
  137. /* harmony export */ });
  138. function _iterableToArrayLimit(r, l) {
  139. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  140. if (null != t) {
  141. var e,
  142. n,
  143. i,
  144. u,
  145. a = [],
  146. f = !0,
  147. o = !1;
  148. try {
  149. if (i = (t = t.call(r)).next, 0 === l) {
  150. if (Object(t) !== t) return;
  151. f = !1;
  152. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
  153. } catch (r) {
  154. o = !0, n = r;
  155. } finally {
  156. try {
  157. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  158. } finally {
  159. if (o) throw n;
  160. }
  161. }
  162. return a;
  163. }
  164. }
  165. /***/ }),
  166. /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js":
  167. /*!********************************************************************!*\
  168. !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
  169. \********************************************************************/
  170. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  171. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  172. /* harmony export */ "default": function() { return /* binding */ _nonIterableRest; }
  173. /* harmony export */ });
  174. function _nonIterableRest() {
  175. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  176. }
  177. /***/ }),
  178. /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":
  179. /*!******************************************************************!*\
  180. !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***!
  181. \******************************************************************/
  182. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  183. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  184. /* harmony export */ "default": function() { return /* binding */ _slicedToArray; }
  185. /* harmony export */ });
  186. /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
  187. /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js");
  188. /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
  189. /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
  190. function _slicedToArray(arr, i) {
  191. return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
  192. }
  193. /***/ }),
  194. /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
  195. /*!*******************************************************************************!*\
  196. !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
  197. \*******************************************************************************/
  198. /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
  199. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  200. /* harmony export */ "default": function() { return /* binding */ _unsupportedIterableToArray; }
  201. /* harmony export */ });
  202. /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
  203. function _unsupportedIterableToArray(o, minLen) {
  204. if (!o) return;
  205. if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
  206. var n = Object.prototype.toString.call(o).slice(8, -1);
  207. if (n === "Object" && o.constructor) n = o.constructor.name;
  208. if (n === "Map" || n === "Set") return Array.from(o);
  209. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen);
  210. }
  211. /***/ })
  212. },
  213. /******/ function(__webpack_require__) { // webpackRuntimeModules
  214. /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  215. /******/ __webpack_require__.O(0, ["plugin/taro","plugin/common"], function() { return __webpack_exec__("./src/plugin/pages/miniWeb/index.tsx"); });
  216. /******/ var __webpack_exports__ = __webpack_require__.O();
  217. /******/ }
  218. ]);;;
  219. //# sourceMappingURL=index.js.map