| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622 |
- "use strict";
- (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Auth"],{
- /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Auth.tsx":
- /*!*************************************************************************************************!*\
- !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Auth.tsx ***!
- \*************************************************************************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Page; }
- /* harmony export */ });
- /* 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 _features_auth_components_Auth__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @features/auth/components/Auth */ "./src/features/auth/components/Auth.tsx");
- /* harmony import */ var _features_auth_components_CreatePassword__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @features/auth/components/CreatePassword */ "./src/features/auth/components/CreatePassword.tsx");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* 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__);
- function Page() {
- var router = (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useRouter)();
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
- style: {
- backgroundColor: '#000'
- },
- children: router.params.type === 'createPassword' ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_features_auth_components_CreatePassword__WEBPACK_IMPORTED_MODULE_2__["default"], {}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_features_auth_components_Auth__WEBPACK_IMPORTED_MODULE_1__["default"], {})
- });
- }
- /***/ }),
- /***/ "./src/components/Box.tsx":
- /*!********************************!*\
- !*** ./src/components/Box.tsx ***!
- \********************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- function Component(props) {
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.View, {
- className: "box-container",
- children: props.child
- });
- }
- /***/ }),
- /***/ "./src/components/Inputs.tsx":
- /*!***********************************!*\
- !*** ./src/components/Inputs.tsx ***!
- \***********************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
- function Component(_ref) {
- var placeholder = _ref.placeholder,
- value = _ref.value,
- onChange = _ref.onChange,
- disabled = _ref.disabled,
- isSecure = _ref.isSecure;
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(value ? value : ''),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_useState, 2),
- inputValue = _useState2[0],
- setInputValue = _useState2[1];
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
- _useState4 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_useState3, 2),
- isFocus = _useState4[0],
- setIsFocus = _useState4[1];
- var handleInputChange = function handleInputChange(e) {
- var newValue = e.target.value;
- setInputValue(newValue);
- onChange(newValue);
- };
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
- children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Input, {
- className: isFocus ? "input input_focus" : "input",
- placeholder: placeholder ? placeholder : '',
- value: inputValue,
- type: isSecure ? 'password' : 'text',
- onInput: handleInputChange,
- disabled: disabled ? disabled : false,
- onFocus: function onFocus() {
- setIsFocus(true);
- },
- onBlur: function onBlur() {
- setIsFocus(false);
- }
- })
- });
- }
- /***/ }),
- /***/ "./src/features/auth/components/Auth.tsx":
- /*!***********************************************!*\
- !*** ./src/features/auth/components/Auth.tsx ***!
- \***********************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Auth; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _Login__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Login */ "./src/features/auth/components/Login.tsx");
- /* harmony import */ var _CreateAccount__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CreateAccount */ "./src/features/auth/components/CreateAccount.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__);
- function Auth() {
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_useState, 2),
- isSignup = _useState2[0],
- setIsSignup = _useState2[1];
- if (isSignup) return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_CreateAccount__WEBPACK_IMPORTED_MODULE_2__["default"], {
- login: function login() {
- return setIsSignup(false);
- }
- });
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Login__WEBPACK_IMPORTED_MODULE_1__["default"], {
- register: function register() {
- return setIsSignup(true);
- }
- });
- }
- /***/ }),
- /***/ "./src/features/auth/components/CreateAccount.tsx":
- /*!********************************************************!*\
- !*** ./src/features/auth/components/CreateAccount.tsx ***!
- \********************************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var _components_Box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Box */ "./src/components/Box.tsx");
- /* harmony import */ var _components_Buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/Buttons */ "./src/components/Buttons.tsx");
- /* harmony import */ var _components_Inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/Inputs */ "./src/components/Inputs.tsx");
- /* harmony import */ var _components_Texts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/Texts */ "./src/components/Texts.tsx");
- /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/types */ "./src/utils/types.ts");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_5__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_7__);
- /* harmony import */ var _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @assets/svg/check.svg */ "./src/assets/svg/check.svg");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__);
- function Component(props) {
- var _useTranslation = (0,react_i18next__WEBPACK_IMPORTED_MODULE_7__.useTranslation)(),
- t = _useTranslation.t;
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(''),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__["default"])(_useState, 2),
- name = _useState2[0],
- setName = _useState2[1];
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_6__.useState)(''),
- _useState4 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_10__["default"])(_useState3, 2),
- email = _useState4[0],
- setEmail = _useState4[1];
- var handleNameChange = function handleNameChange(value) {
- setName(value);
- };
- var handleEmailChange = function handleEmailChange(value) {
- setEmail(value);
- };
- var isButtonDisabled = name === '' || email === '';
- function signupComponent() {
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_2__["default"], {
- value: name,
- onChange: handleNameChange,
- placeholder: t('feature.auth.create_account.input_username_placeholder')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- style: {
- height: 20
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_2__["default"], {
- value: email,
- onChange: handleEmailChange,
- placeholder: t('feature.auth.create_account.input_email_placeholder')
- })]
- });
- }
- function registerF() {
- if (isButtonDisabled) {
- return;
- }
- setTimeout(function () {
- _tarojs_taro__WEBPACK_IMPORTED_MODULE_5___default().navigateTo({
- url: "/pages/Auth?type=createPassword&name=".concat(name, "&email=").concat(email)
- });
- }, 1000);
- // setTimeout(() => {
- // Taro.navigateBack()
- // Taro.redirectTo({
- // url: '/pages/ChooseScenario'
- // })
- // },1000)
- }
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- style: {
- backgroundColor: '#000',
- flex: 1,
- flexDirection: 'column',
- display: 'flex',
- width: '100vw',
- height: '100vh'
- },
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_3__["default"], {
- text: t('feature.auth.create_account.title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_4__.TextType.primary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_3__["default"], {
- text: t('feature.auth.create_account.sub_title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_4__.TextType.secondary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Box__WEBPACK_IMPORTED_MODULE_0__["default"], {
- child: signupComponent()
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_1__["default"], {
- onClick: registerF,
- title: t('feature.auth.create_account.btn_next'),
- style: {
- marginLeft: 23,
- marginRight: 23,
- marginTop: 20,
- marginBottom: 20
- },
- status: isButtonDisabled ? _utils_types__WEBPACK_IMPORTED_MODULE_4__.ComponentStatus.disable : _utils_types__WEBPACK_IMPORTED_MODULE_4__.ComponentStatus.enable
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- className: "agree_view",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.Image, {
- style: "width:12px;height:12px;",
- src: _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_8__
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.Text, {
- className: "agree_text",
- children: t('page.auth.agreement')
- })]
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- style: {
- flex: 1
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.View, {
- className: "footer",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.Text, {
- className: "have_account",
- children: t('feature.auth.create_account.footer_desc')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_11__.Text, {
- className: "login",
- onClick: function onClick() {
- return props.login();
- },
- children: t('feature.auth.create_account.footer_login')
- })]
- })]
- });
- }
- /***/ }),
- /***/ "./src/features/auth/components/CreatePassword.tsx":
- /*!*********************************************************!*\
- !*** ./src/features/auth/components/CreatePassword.tsx ***!
- \*********************************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var _components_Box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Box */ "./src/components/Box.tsx");
- /* harmony import */ var _components_Buttons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/components/Buttons */ "./src/components/Buttons.tsx");
- /* harmony import */ var _components_Inputs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/Inputs */ "./src/components/Inputs.tsx");
- /* harmony import */ var _components_Texts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/components/Texts */ "./src/components/Texts.tsx");
- /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/types */ "./src/utils/types.ts");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* 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_i18next__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_6__);
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
- /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_7__);
- /* harmony import */ var _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @assets/svg/check.svg */ "./src/assets/svg/check.svg");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_9__);
- /* harmony import */ var _services_user__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/services/user */ "./src/services/user.tsx");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);
- function Component(prop) {
- var _useTranslation = (0,react_i18next__WEBPACK_IMPORTED_MODULE_6__.useTranslation)(),
- t = _useTranslation.t;
- var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_7__.useDispatch)();
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(''),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__["default"])(_useState, 2),
- password = _useState2[0],
- setPassword = _useState2[1];
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(''),
- _useState4 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_12__["default"])(_useState3, 2),
- repeat = _useState4[0],
- setRepeat = _useState4[1];
- var handlePasswordChange = function handlePasswordChange(value) {
- setPassword(value);
- };
- var handleRepeatChange = function handleRepeatChange(value) {
- setRepeat(value);
- };
- var isButtonDisabled = password === '' || repeat === '';
- function loginComponent() {
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_2__["default"], {
- value: password,
- isSecure: true,
- onChange: handlePasswordChange,
- placeholder: t('feature.auth.create_password.input_password_placeholder')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- style: {
- height: 20
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_2__["default"], {
- value: repeat,
- isSecure: true,
- onChange: handleRepeatChange,
- placeholder: t('feature.auth.create_password.input_password_confirm_placeholder')
- })]
- });
- }
- function registerF() {
- if (isButtonDisabled) {
- return;
- }
- dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_10__.register)(prop.name, prop.email, password));
- setTimeout(function () {
- _tarojs_taro__WEBPACK_IMPORTED_MODULE_9___default().navigateBack({
- delta: 2
- });
- _tarojs_taro__WEBPACK_IMPORTED_MODULE_9___default().redirectTo({
- url: '/pages/ChooseScenario'
- });
- }, 1000);
- }
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- style: {
- backgroundColor: '#000',
- flex: 1,
- flexDirection: 'column',
- display: 'flex',
- width: '100vw',
- height: '100vh'
- },
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_3__["default"], {
- text: t('feature.auth.create_password.title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_4__.TextType.primary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_3__["default"], {
- text: t('feature.auth.create_password.sub_title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_4__.TextType.secondary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Box__WEBPACK_IMPORTED_MODULE_0__["default"], {
- child: loginComponent()
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_1__["default"], {
- onClick: registerF,
- title: t('feature.auth.create_password.btn_next'),
- style: {
- marginLeft: 23,
- marginRight: 23,
- marginTop: 20,
- marginBottom: 20
- },
- status: isButtonDisabled ? _utils_types__WEBPACK_IMPORTED_MODULE_4__.ComponentStatus.disable : _utils_types__WEBPACK_IMPORTED_MODULE_4__.ComponentStatus.enable
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- className: "agree_view",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.Image, {
- style: "width:12px;height:12px;",
- src: _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_8__
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.Text, {
- className: "agree_text",
- children: t('page.auth.agreement')
- })]
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- style: {
- flex: 1
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.View, {
- className: "footer",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.Text, {
- className: "have_account",
- children: t('feature.auth.create_password.footer_desc')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_13__.Text, {
- className: "login",
- children: t('feature.auth.create_password.footer_login')
- })]
- })]
- });
- }
- /***/ }),
- /***/ "./src/features/auth/components/Login.tsx":
- /*!************************************************!*\
- !*** ./src/features/auth/components/Login.tsx ***!
- \************************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Login; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var _components_Inputs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Inputs */ "./src/components/Inputs.tsx");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
- /* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_2__);
- /* harmony import */ var _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @assets/svg/check.svg */ "./src/assets/svg/check.svg");
- /* harmony import */ var _components_Texts__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/Texts */ "./src/components/Texts.tsx");
- /* harmony import */ var _components_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/Box */ "./src/components/Box.tsx");
- /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/types */ "./src/utils/types.ts");
- /* harmony import */ var _components_Buttons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/Buttons */ "./src/components/Buttons.tsx");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__);
- function Login(props) {
- var _useTranslation = (0,react_i18next__WEBPACK_IMPORTED_MODULE_2__.useTranslation)(),
- t = _useTranslation.t;
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__["default"])(_useState, 2),
- name = _useState2[0],
- setName = _useState2[1];
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
- _useState4 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_9__["default"])(_useState3, 2),
- password = _useState4[0],
- setPassword = _useState4[1];
- var handleNameChange = function handleNameChange(value) {
- setName(value);
- };
- var handlePasswordChange = function handlePasswordChange(value) {
- setPassword(value);
- };
- var isLoginButtonDisabled = name === '' || password === '';
- function loginComponent() {
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_0__["default"], {
- value: name,
- onChange: handleNameChange,
- placeholder: t('feature.auth.login.input_account_placeholder')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- style: {
- height: 20
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Inputs__WEBPACK_IMPORTED_MODULE_0__["default"], {
- value: password,
- isSecure: true,
- onChange: handlePasswordChange,
- placeholder: t('feature.auth.login.input_password_placeholder')
- })]
- });
- }
- function registerF() {}
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- style: {
- backgroundColor: '#000',
- flex: 1,
- flexDirection: 'column',
- display: 'flex',
- width: '100vw',
- height: '100vh'
- },
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_4__["default"], {
- text: t('feature.auth.create_account.title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_6__.TextType.primary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_4__["default"], {
- text: t('feature.auth.create_account.sub_title'),
- type: _utils_types__WEBPACK_IMPORTED_MODULE_6__.TextType.secondary
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Box__WEBPACK_IMPORTED_MODULE_5__["default"], {
- child: loginComponent()
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_7__["default"], {
- onClick: registerF,
- title: t('feature.auth.create_account.btn_next'),
- style: {
- marginLeft: 23,
- marginRight: 23,
- marginTop: 20,
- marginBottom: 20
- },
- status: isLoginButtonDisabled ? _utils_types__WEBPACK_IMPORTED_MODULE_6__.ComponentStatus.disable : _utils_types__WEBPACK_IMPORTED_MODULE_6__.ComponentStatus.enable
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- className: "agree_view",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.Image, {
- style: "width:12px;height:12px;",
- src: _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_3__
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.Text, {
- className: "agree_text",
- children: t('page.auth.agreement')
- })]
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- style: {
- flex: 1
- }
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
- className: "footer",
- children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.Text, {
- className: "have_account",
- children: t('feature.auth.create_account.footer_desc')
- }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.Text, {
- className: "login",
- onClick: function onClick() {
- return props.register();
- },
- children: t('feature.auth.create_account.footer_login')
- })]
- })]
- });
- }
- /***/ }),
- /***/ "./src/pages/Auth.tsx":
- /*!****************************!*\
- !*** ./src/pages/Auth.tsx ***!
- \****************************/
- /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
- /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
- /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Auth_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Auth.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Auth.tsx");
- var config = {};
- var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createPageConfig)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Auth_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Auth', {root:{cn:[]}}, config || {}))
- /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Auth_tsx__WEBPACK_IMPORTED_MODULE_1__["default"]);
- /***/ })
- },
- /******/ function(__webpack_require__) { // webpackRuntimeModules
- /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
- /******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/Auth.tsx"); });
- /******/ var __webpack_exports__ = __webpack_require__.O();
- /******/ }
- ]);
- //# sourceMappingURL=Auth.js.map
|