Profile.js 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. "use strict";
  2. (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Profile"],{
  3. /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Profile.tsx":
  4. /*!****************************************************************************************************!*\
  5. !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Profile.tsx ***!
  6. \****************************************************************************************************/
  7. /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
  8. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9. /* harmony export */ "default": function() { return /* binding */ Page; }
  10. /* harmony export */ });
  11. /* harmony import */ var _components_Buttons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Buttons */ "./src/components/Buttons.tsx");
  12. /* harmony import */ var _services_user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/services/user */ "./src/services/user.tsx");
  13. /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
  14. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
  15. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_2__);
  16. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
  17. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_3__);
  18. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
  19. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
  20. function Page() {
  21. var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useDispatch)();
  22. var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(function (state) {
  23. return state.user;
  24. });
  25. function logoutF() {
  26. dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_1__.logout)());
  27. }
  28. function clearF() {
  29. dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_1__.clear)());
  30. }
  31. function tapLogin() {
  32. _tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default().navigateTo({
  33. url: '/pages/ChooseAuth'
  34. });
  35. }
  36. return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.View, {
  37. className: "container",
  38. children: [user.isLogin ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
  39. title: "\u9000\u51FA\u767B\u5F55",
  40. onClick: logoutF,
  41. style: {
  42. width: 289,
  43. marginBottom: 30
  44. }
  45. }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.Text, {
  46. onClick: tapLogin,
  47. children: "\u8BF7\u767B\u5F55"
  48. }), user.isLogin ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
  49. title: "\u6CE8\u9500\u8D26\u53F7",
  50. onClick: clearF,
  51. style: {
  52. width: 289,
  53. marginBottom: 30
  54. }
  55. }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.Text, {})]
  56. });
  57. }
  58. /***/ }),
  59. /***/ "./src/pages/Profile.tsx":
  60. /*!*******************************!*\
  61. !*** ./src/pages/Profile.tsx ***!
  62. \*******************************/
  63. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  64. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
  65. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__);
  66. /* harmony import */ var _node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Profile_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Profile.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Profile.tsx");
  67. var config = {};
  68. var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createPageConfig)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Profile_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Profile', {root:{cn:[]}}, config || {}))
  69. /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Profile_tsx__WEBPACK_IMPORTED_MODULE_1__["default"]);
  70. /***/ })
  71. },
  72. /******/ function(__webpack_require__) { // webpackRuntimeModules
  73. /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  74. /******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/Profile.tsx"); });
  75. /******/ var __webpack_exports__ = __webpack_require__.O();
  76. /******/ }
  77. ]);
  78. //# sourceMappingURL=Profile.js.map