app.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. "use strict";
  2. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-2Y2U3MWF_js.js");
  3. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-3EXGJ5BE_js.js");
  4. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_xstate_js.js");
  5. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_reduxjs_toolkit_js.js");
  6. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_i18next_js.js");
  7. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_react-redux_js.js");
  8. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-77KB62LY_js.js");
  9. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_react-i18next_js.js");
  10. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js");
  11. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_taro_js.js");
  12. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_i18next-browser-languagedetector_js.js");
  13. require("./prebundle/node_modules_taro_weapp_prebundle_tarojs_runtime_js.js");
  14. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js");
  15. require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-LNJCN3VW_js.js");
  16. require("./prebundle/remoteEntry.js");
  17. require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js");
  18. require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js");
  19. require("./prebundle/node_modules_taro_weapp_prebundle_react-dom_js.js");
  20. require("./common");
  21. require("./vendors");
  22. require("./taro");
  23. require("./runtime");
  24. (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["app"],{
  25. /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/app.tsx":
  26. /*!******************************************************************************************!*\
  27. !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/app.tsx ***!
  28. \******************************************************************************************/
  29. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  30. /* harmony import */ var _context_locales_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context/locales/index */ "./src/context/locales/index.ts");
  31. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
  32. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_1__);
  33. /* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store/store */ "./src/store/store.tsx");
  34. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
  35. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
  36. // import 'taro-ui/dist/style/index.scss'
  37. var App = function App(_ref) {
  38. var children = _ref.children;
  39. return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_redux__WEBPACK_IMPORTED_MODULE_1__.Provider, {
  40. store: _store_store__WEBPACK_IMPORTED_MODULE_2__["default"],
  41. children: children
  42. });
  43. };
  44. // class App extends Component<PropsWithChildren> {
  45. // componentDidMount () {}
  46. // componentDidShow () {}
  47. // componentDidHide () {}
  48. // // this.props.children 是将要会渲染的页面
  49. // render () {
  50. // return this.props.children
  51. // }
  52. // }
  53. /* harmony default export */ __webpack_exports__["default"] = (App);
  54. /***/ }),
  55. /***/ "./src/app.tsx":
  56. /*!*********************!*\
  57. !*** ./src/app.tsx ***!
  58. \*********************/
  59. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  60. /* 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");
  61. /* 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__);
  62. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
  63. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__);
  64. /* 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");
  65. /* 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__);
  66. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
  67. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__);
  68. /* 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");
  69. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
  70. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
  71. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom */ "webpack/container/remote/react-dom");
  72. /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__);
  73. var config = {"pages":["pages/Clock","pages/index/index","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetSchedule","pages/H5","pages/Profile","pages/Metric","pages/Activity"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true,"tabBar":{"custom":true,"list":[{"pagePath":"pages/Clock","text":"首页"},{"pagePath":"pages/Metric","text":"第二页"},{"pagePath":"pages/Activity","text":"第三页"},{"pagePath":"pages/Profile","text":"第四页"}]}};
  74. _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.window.__taroAppConfig = config
  75. 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))
  76. ;(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__.initPxTransform)({
  77. designWidth: 750,
  78. deviceRatio: {"640":1.17,"750":1,"828":0.905},
  79. baseFontSize: 20,
  80. unitPrecision: undefined,
  81. targetUnit: undefined
  82. })
  83. /***/ }),
  84. /***/ "./src/context/locales/en.js":
  85. /*!***********************************!*\
  86. !*** ./src/context/locales/en.js ***!
  87. \***********************************/
  88. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  89. /* harmony default export */ __webpack_exports__["default"] = ({
  90. languageList: {
  91. switch_language: 'Switch Language',
  92. zh: 'Chinese',
  93. en: 'English'
  94. },
  95. page: {
  96. choose_language: {
  97. title: '',
  98. sub_title: '',
  99. btn_confirm: ''
  100. },
  101. choose_auth: {
  102. app_name: '',
  103. btn_create_account: '',
  104. btn_login: '登录',
  105. btn_wechat: '微信登录'
  106. },
  107. auth: {
  108. agreement: 'I agree to the Terms of Service and Privacy Policy.'
  109. },
  110. choose_scenario: {
  111. title: 'Choose scenario',
  112. sub_title: 'A scenario clock will display on homepage',
  113. btn_next: 'Next',
  114. btn_more: 'Learn more',
  115. fast: 'Fast',
  116. sleep: 'Sleep',
  117. fast_sleep: 'Fast Sleep'
  118. },
  119. set_goal: {
  120. title: '',
  121. btn_done: ''
  122. }
  123. },
  124. feature: {
  125. tabbar: {
  126. clock: 'Clock',
  127. metric: 'Metric',
  128. activity: 'Activity',
  129. nutrition: 'Nutrition',
  130. profile: 'Profile'
  131. },
  132. auth: {
  133. create_account: {
  134. title: 'Create Account',
  135. sub_title: 'Enter username and email',
  136. input_username_placeholder: 'Username',
  137. input_email_placeholder: 'Email',
  138. footer_desc: 'Already have an account? ',
  139. footer_login: 'Log in',
  140. btn_next: 'Next'
  141. },
  142. login: {
  143. input_account_placeholder: 'Username or email',
  144. input_password_placeholder: 'Password',
  145. footer_desc: 'Don\'t have an account? ',
  146. footer_sign_up: 'Create account'
  147. },
  148. create_password: {
  149. title: 'Create password',
  150. sub_title: 'Enter password and confirm',
  151. input_password_placeholder: 'Password',
  152. input_password_confirm_placeholder: 'Confirm Password',
  153. btn_next: 'Next'
  154. }
  155. },
  156. track_time_duration: {
  157. action_sheet: {
  158. change_schedule: 'Change schedule',
  159. switch_scenario: 'Switch scenario',
  160. give_up: 'Give up',
  161. end_fast: 'End fast',
  162. cancel: 'Cancel'
  163. }
  164. }
  165. }
  166. });
  167. /***/ }),
  168. /***/ "./src/context/locales/index.ts":
  169. /*!**************************************!*\
  170. !*** ./src/context/locales/index.ts ***!
  171. \**************************************/
  172. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  173. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
  174. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
  175. /* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "webpack/container/remote/i18next-browser-languagedetector");
  176. /* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__);
  177. /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next */ "webpack/container/remote/i18next");
  178. /* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(i18next__WEBPACK_IMPORTED_MODULE_2__);
  179. /* harmony import */ var _zh__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./zh */ "./src/context/locales/zh.js");
  180. /* harmony import */ var _en__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./en */ "./src/context/locales/en.js");
  181. /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
  182. /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_5__);
  183. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getStorage({
  184. key: 'language'
  185. }).then(function (res) {
  186. // initLocale(res.data)
  187. initLocale('zh');
  188. }).catch(function (err) {
  189. initLocale('zh');
  190. });
  191. function initLocale(strLocale) {
  192. i18next__WEBPACK_IMPORTED_MODULE_2___default().use((i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1___default())) //嗅探当前浏览器语言
  193. .use(react_i18next__WEBPACK_IMPORTED_MODULE_5__.initReactI18next) //init i18next
  194. .init({
  195. //引入资源文件
  196. resources: {
  197. en: {
  198. translation: _en__WEBPACK_IMPORTED_MODULE_4__["default"]
  199. },
  200. zh: {
  201. translation: _zh__WEBPACK_IMPORTED_MODULE_3__["default"]
  202. }
  203. },
  204. //选择默认语言,选择内容为上述配置中的key,即en/zh
  205. lng: strLocale,
  206. //Taro.getStorageSync('language') ? Taro.getStorageSync('language') : 'en',
  207. debug: false,
  208. interpolation: {
  209. escapeValue: false // not needed for react as it escapes by default
  210. }
  211. });
  212. }
  213. /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((i18next__WEBPACK_IMPORTED_MODULE_2___default()));
  214. /***/ }),
  215. /***/ "./src/context/locales/zh.js":
  216. /*!***********************************!*\
  217. !*** ./src/context/locales/zh.js ***!
  218. \***********************************/
  219. /***/ (function(__unused_webpack_module, __webpack_exports__) {
  220. /* harmony default export */ __webpack_exports__["default"] = ({
  221. languageList: {
  222. switch_language: '切换语言',
  223. zh: '中文',
  224. en: '英文'
  225. },
  226. page: {
  227. choose_language: {
  228. title: '',
  229. sub_title: '',
  230. btn_confirm: ''
  231. },
  232. choose_auth: {
  233. app_name: '',
  234. btn_create_account: '',
  235. btn_login: '登录',
  236. btn_wechat: '微信登录'
  237. },
  238. auth: {
  239. agreement: '已阅读并同意《用户协议》和《隐私政策》'
  240. },
  241. choose_scenario: {
  242. title: '选择场景',
  243. sub_title: '场景时钟将在首页展示',
  244. btn_next: '下一步',
  245. btn_more: '了解更多',
  246. fast: '断食',
  247. sleep: '睡眠',
  248. fast_sleep: '断食睡眠'
  249. }
  250. },
  251. feature: {
  252. tabbar: {
  253. clock: '时钟',
  254. metric: '指标',
  255. activity: '运动',
  256. nutrition: '营养',
  257. profile: '我'
  258. },
  259. auth: {
  260. create_account: {
  261. title: '注册账号',
  262. sub_title: '创建用户名',
  263. input_username_placeholder: '用户名',
  264. input_email_placeholder: '邮箱',
  265. footer_desc: '已有账号?',
  266. footer_login: '去登录',
  267. btn_next: '下一步'
  268. },
  269. login: {
  270. input_account_placeholder: '用户名或邮箱',
  271. input_password_placeholder: '密码',
  272. footer_desc: '还没有账号?',
  273. footer_sign_up: '去注册'
  274. },
  275. create_password: {
  276. title: '创建密码',
  277. sub_title: '输入并确认密码',
  278. input_password_placeholder: '密码',
  279. input_password_confirm_placeholder: '确认密码',
  280. btn_next: '下一步'
  281. }
  282. },
  283. track_time_duration: {
  284. action_sheet: {
  285. change_schedule: '调整日程',
  286. switch_scenario: '切换场景',
  287. give_up: '放弃终止',
  288. end_fast: '结束断食',
  289. cancel: '取消'
  290. }
  291. }
  292. }
  293. });
  294. /***/ }),
  295. /***/ "./src/store/demo.tsx":
  296. /*!****************************!*\
  297. !*** ./src/store/demo.tsx ***!
  298. \****************************/
  299. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  300. /* unused harmony exports increment, decrement, incrementByAmount, apple */
  301. /* harmony import */ var _Users_Work_hola_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");
  302. /* harmony import */ var _Users_Work_hola_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");
  303. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit");
  304. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
  305. var initialState = {
  306. value: 0
  307. };
  308. var counterSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
  309. name: 'counter',
  310. initialState: initialState,
  311. reducers: {
  312. increment: function increment(state) {
  313. state.value += 1;
  314. },
  315. decrement: function decrement(state) {
  316. state.value -= 1;
  317. },
  318. incrementByAmount: function incrementByAmount(state, action) {
  319. state.value += action.payload;
  320. }
  321. }
  322. });
  323. var _counterSlice$actions = counterSlice.actions,
  324. increment = _counterSlice$actions.increment,
  325. decrement = _counterSlice$actions.decrement,
  326. incrementByAmount = _counterSlice$actions.incrementByAmount;
  327. var apple = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createAsyncThunk)('user/wxLogin', /*#__PURE__*/function () {
  328. var _ref2 = (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee(payload, _ref) {
  329. var dispatch;
  330. return (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee$(_context) {
  331. while (1) switch (_context.prev = _context.next) {
  332. case 0:
  333. dispatch = _ref.dispatch;
  334. dispatch(increment());
  335. // console.log(payload.code)
  336. // request({
  337. // url: API_LOGIN, method: 'POST', data: { 'code':payload.code,type:'WX_MP',app_version:'1',client_version:'1',client_type:'WXP_MP' }
  338. // }).then(res => {
  339. // console.log(res);
  340. // dispatch(loginSuccess(res));
  341. // })
  342. case 2:
  343. case "end":
  344. return _context.stop();
  345. }
  346. }, _callee);
  347. }));
  348. return function (_x, _x2) {
  349. return _ref2.apply(this, arguments);
  350. };
  351. }());
  352. /* harmony default export */ __webpack_exports__["default"] = (counterSlice.reducer);
  353. /***/ }),
  354. /***/ "./src/store/permission.tsx":
  355. /*!**********************************!*\
  356. !*** ./src/store/permission.tsx ***!
  357. \**********************************/
  358. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  359. /* unused harmony exports setWXPubFollow, setPushAllow, setStepAllow, setCameraAllow, setAlbumAllow, setPhotoAllow */
  360. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit");
  361. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
  362. var initialState = {
  363. wxPubFollow: false,
  364. pushAllow: false,
  365. stepAllow: false,
  366. albumAllow: false,
  367. cameraAllow: false,
  368. photoAllow: false
  369. };
  370. var permissionSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
  371. name: 'permission',
  372. initialState: initialState,
  373. reducers: {
  374. setWXPubFollow: function setWXPubFollow(state, action) {
  375. state.wxPubFollow = action.payload;
  376. },
  377. setPushAllow: function setPushAllow(state, action) {
  378. state.pushAllow = action.payload;
  379. },
  380. setStepAllow: function setStepAllow(state, action) {
  381. state.stepAllow = action.payload;
  382. },
  383. setAlbumAllow: function setAlbumAllow(state, action) {
  384. state.albumAllow = action.payload;
  385. },
  386. setCameraAllow: function setCameraAllow(state, action) {
  387. state.cameraAllow = action.payload;
  388. },
  389. setPhotoAllow: function setPhotoAllow(state, action) {
  390. state.photoAllow = action.payload;
  391. }
  392. }
  393. });
  394. /* harmony default export */ __webpack_exports__["default"] = (permissionSlice.reducer);
  395. var _permissionSlice$acti = permissionSlice.actions,
  396. setWXPubFollow = _permissionSlice$acti.setWXPubFollow,
  397. setPushAllow = _permissionSlice$acti.setPushAllow,
  398. setStepAllow = _permissionSlice$acti.setStepAllow,
  399. setCameraAllow = _permissionSlice$acti.setCameraAllow,
  400. setAlbumAllow = _permissionSlice$acti.setAlbumAllow,
  401. setPhotoAllow = _permissionSlice$acti.setPhotoAllow;
  402. /***/ }),
  403. /***/ "./src/store/store.tsx":
  404. /*!*****************************!*\
  405. !*** ./src/store/store.tsx ***!
  406. \*****************************/
  407. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  408. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit");
  409. /* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
  410. /* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user */ "./src/store/user.tsx");
  411. /* harmony import */ var _scenario__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./scenario */ "./src/store/scenario.tsx");
  412. /* harmony import */ var _demo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./demo */ "./src/store/demo.tsx");
  413. /* harmony import */ var _permission__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./permission */ "./src/store/permission.tsx");
  414. /* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./common */ "./src/store/common.tsx");
  415. var store = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.configureStore)({
  416. reducer: {
  417. // 添加你的 reducer
  418. user: _user__WEBPACK_IMPORTED_MODULE_1__["default"],
  419. counter: _demo__WEBPACK_IMPORTED_MODULE_3__["default"],
  420. scenario: _scenario__WEBPACK_IMPORTED_MODULE_2__["default"],
  421. permission: _permission__WEBPACK_IMPORTED_MODULE_4__["default"],
  422. common: _common__WEBPACK_IMPORTED_MODULE_5__["default"]
  423. }
  424. });
  425. /* harmony default export */ __webpack_exports__["default"] = (store);
  426. /***/ })
  427. },
  428. /******/ function(__webpack_require__) { // webpackRuntimeModules
  429. /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  430. /******/ __webpack_require__.O(0, ["vendors","common"], function() { return __webpack_exec__("./src/app.tsx"); });
  431. /******/ var __webpack_exports__ = __webpack_require__.O();
  432. /******/ }
  433. ]);;;
  434. //# sourceMappingURL=app.js.map