"use strict"; require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-2Y2U3MWF_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-3EXGJ5BE_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_reduxjs_toolkit_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_i18next_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_react-redux_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-77KB62LY_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_react-i18next_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_i18next-browser-languagedetector_js.js"); require("./prebundle/node_modules_taro_weapp_prebundle_tarojs_runtime_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js"); require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js.js"); require("./prebundle/remoteEntry.js"); require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"); require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"); require("./prebundle/node_modules_taro_weapp_prebundle_react-dom_js.js"); require("./common"); require("./vendors"); require("./taro"); require("./runtime"); (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["app"],{ /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/app.tsx": /*!******************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/app.tsx ***! \******************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony import */ var _context_locales_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context/locales/index */ "./src/context/locales/index.ts"); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux"); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store/store */ "./src/store/store.tsx"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); var App = function App(_ref) { var children = _ref.children; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_redux__WEBPACK_IMPORTED_MODULE_1__.Provider, { store: _store_store__WEBPACK_IMPORTED_MODULE_2__["default"], children: children }); }; // class App extends Component { // componentDidMount () {} // componentDidShow () {} // componentDidHide () {} // // this.props.children 是将要会渲染的页面 // render () { // return this.props.children // } // } /* harmony default export */ __webpack_exports__["default"] = (App); /***/ }), /***/ "./src/app.tsx": /*!*********************!*\ !*** ./src/app.tsx ***! \*********************/ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { /* 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"); /* 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__); /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime"); /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/plugin-framework-react/dist/runtime */ "webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"); /* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro"); /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_app_tsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./app.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/app.tsx"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "webpack/container/remote/react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom */ "webpack/container/remote/react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__); var config = {"pages":["pages/index/index","pages/Second","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetGoal"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"tabBar":{"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/Second","text":"第二页"}]},"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true}; _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.window.__taroAppConfig = config var inst = App((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__.createReactApp)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_app_tsx__WEBPACK_IMPORTED_MODULE_4__["default"], react__WEBPACK_IMPORTED_MODULE_5__, (react_dom__WEBPACK_IMPORTED_MODULE_6___default()), config)) ;(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__.initPxTransform)({ designWidth: 750, deviceRatio: {"640":1.17,"750":1,"828":0.905}, baseFontSize: 20, unitPrecision: undefined, targetUnit: undefined }) /***/ }), /***/ "./src/context/locales/en.js": /*!***********************************!*\ !*** ./src/context/locales/en.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { /* harmony default export */ __webpack_exports__["default"] = ({ languageList: { switch_language: 'Switch Language', zh: 'Chinese', en: 'English' }, page: { choose_language: { title: '', sub_title: '', btn_confirm: '' }, choose_auth: { app_name: '', btn_create_account: '', btn_login: '登录', btn_wechat: '微信登录' }, auth: { agreement: 'I agree to the Terms of Service and Privacy Policy.' }, choose_scenario: { title: 'Choose scenario', sub_title: 'A scenario clock will display on homepage', btn_next: 'Next', btn_more: 'Learn more', fast: 'Fast', sleep: 'Sleep', fast_sleep: 'Fast Sleep' }, set_goal: { title: '', btn_done: '' } }, feature: { auth: { create_account: { title: 'Create Account', sub_title: 'Enter username and email', input_username_placeholder: 'Username', input_email_placeholder: 'Email', footer_desc: 'Already have an account? ', footer_login: 'Log in', btn_next: 'Next' }, login: { input_account_placeholder: '', input_password_placeholder: '', footer_desc: '', footer_sign_up: '' }, create_password: { title: '', sub_title: '', input_password_placeholder: '', input_password_confirm_placeholder: '', btn_next: '' } } } }); /***/ }), /***/ "./src/context/locales/index.ts": /*!**************************************!*\ !*** ./src/context/locales/index.ts ***! \**************************************/ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro"); /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "webpack/container/remote/i18next-browser-languagedetector"); /* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next */ "webpack/container/remote/i18next"); /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(i18next__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _zh__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zh */ "./src/context/locales/zh.js"); /* harmony import */ var _en__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./en */ "./src/context/locales/en.js"); /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next"); /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_5__); _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getStorage({ key: 'language' }).then(function (res) { // initLocale(res.data) initLocale('zh'); }).catch(function (err) { initLocale('zh'); }); function initLocale(strLocale) { i18next__WEBPACK_IMPORTED_MODULE_2___default().use((i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1___default())) //嗅探当前浏览器语言 .use(react_i18next__WEBPACK_IMPORTED_MODULE_5__.initReactI18next) //init i18next .init({ //引入资源文件 resources: { en: { translation: _en__WEBPACK_IMPORTED_MODULE_4__["default"] }, zh: { translation: _zh__WEBPACK_IMPORTED_MODULE_3__["default"] } }, //选择默认语言,选择内容为上述配置中的key,即en/zh lng: strLocale, //Taro.getStorageSync('language') ? Taro.getStorageSync('language') : 'en', debug: false, interpolation: { escapeValue: false // not needed for react as it escapes by default } }); } /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((i18next__WEBPACK_IMPORTED_MODULE_2___default())); /***/ }), /***/ "./src/context/locales/zh.js": /*!***********************************!*\ !*** ./src/context/locales/zh.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { /* harmony default export */ __webpack_exports__["default"] = ({ languageList: { switch_language: '切换语言', zh: '中文', en: '英文' }, page: { choose_language: { title: '', sub_title: '', btn_confirm: '' }, choose_auth: { app_name: '', btn_create_account: '', btn_login: '登录', btn_wechat: '微信登录' }, auth: { agreement: '已阅读并同意《用户协议》和《隐私政策》' }, choose_scenario: { title: '选择场景', sub_title: '场景时钟将在首页展示', btn_next: '下一步', btn_more: '了解更多', fast: '断食', sleep: '睡眠', fast_sleep: '断食睡眠' } }, feature: { auth: { create_account: { title: '注册账号', sub_title: '创建用户名', input_username_placeholder: '用户名', input_email_placeholder: '邮箱', footer_desc: '已有账号?', footer_login: '去登录', btn_next: '下一步' }, login: { input_account_placeholder: '', input_password_placeholder: '', footer_desc: '', footer_sign_up: '' }, create_password: { title: '', sub_title: '', input_password_placeholder: '', input_password_confirm_placeholder: '', btn_next: '' } } } }); /***/ }), /***/ "./src/store/demo.tsx": /*!****************************!*\ !*** ./src/store/demo.tsx ***! \****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* unused harmony exports increment, decrement, incrementByAmount, apple */ /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"); /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"); /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit"); /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__); var initialState = { value: 0 }; var counterSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({ name: 'counter', initialState: initialState, reducers: { increment: function increment(state) { state.value += 1; }, decrement: function decrement(state) { state.value -= 1; }, incrementByAmount: function incrementByAmount(state, action) { state.value += action.payload; } } }); var _counterSlice$actions = counterSlice.actions, increment = _counterSlice$actions.increment, decrement = _counterSlice$actions.decrement, incrementByAmount = _counterSlice$actions.incrementByAmount; var apple = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createAsyncThunk)('user/wxLogin', /*#__PURE__*/function () { var _ref2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee(payload, _ref) { var dispatch; return (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: dispatch = _ref.dispatch; dispatch(increment()); // console.log(payload.code) // request({ // url: API_LOGIN, method: 'POST', data: { 'code':payload.code,type:'WX_MP',app_version:'1',client_version:'1',client_type:'WXP_MP' } // }).then(res => { // console.log(res); // dispatch(loginSuccess(res)); // }) case 2: case "end": return _context.stop(); } }, _callee); })); return function (_x, _x2) { return _ref2.apply(this, arguments); }; }()); /* harmony default export */ __webpack_exports__["default"] = (counterSlice.reducer); /***/ }), /***/ "./src/store/store.tsx": /*!*****************************!*\ !*** ./src/store/store.tsx ***! \*****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit"); /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user */ "./src/store/user.tsx"); /* harmony import */ var _demo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./demo */ "./src/store/demo.tsx"); var store = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.configureStore)({ reducer: { // 添加你的 reducer user: _user__WEBPACK_IMPORTED_MODULE_1__["default"], counter: _demo__WEBPACK_IMPORTED_MODULE_2__["default"] } }); /* harmony default export */ __webpack_exports__["default"] = (store); /***/ }) }, /******/ function(__webpack_require__) { // webpackRuntimeModules /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } /******/ __webpack_require__.O(0, ["vendors","common"], function() { return __webpack_exec__("./src/app.tsx"); }); /******/ var __webpack_exports__ = __webpack_require__.O(); /******/ } ]);;; //# sourceMappingURL=app.js.map