"use strict"; (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/index/index"],{ /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/index/index.tsx": /*!********************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/index/index.tsx ***! \********************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ IndexPage; } /* harmony export */ }); /* harmony import */ var _Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js"); /* harmony import */ var _Users_Work_hola_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.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 _tarojs_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"); /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro"); /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_Rings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @components/Rings */ "./src/components/Rings.weapp.tsx"); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux"); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _store_user__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/store/user */ "./src/store/user.tsx"); /* harmony import */ var _services_permission__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/services/permission */ "./src/services/permission.tsx"); /* harmony import */ var _services_common__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/services/common */ "./src/services/common.tsx"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime"); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__); // import './index.scss' // import ComponentA from './component' // import TabBar from '../../components/Tabbar'; function IndexPage() { var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(); var array = []; var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(function (state) { return state.user; }); var permission = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(function (state) { return state.permission; }); var common = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(function (state) { return state.common; }); array.push('ffff'); array.push( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { children: "ffff" })); // array.push() (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { dispatch((0,_services_common__WEBPACK_IMPORTED_MODULE_6__.staticResources)()); }, []); (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_1__.useReady)( /*#__PURE__*/(0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_9__["default"])( /*#__PURE__*/(0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_10__["default"])().mark(function _callee() { var userData; return (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_10__["default"])().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return getStorage('userData'); case 2: userData = _context.sent; if (userData) { dispatch((0,_store_user__WEBPACK_IMPORTED_MODULE_4__.getInfoSuccess)(JSON.parse(userData))); // return JSON.parse(userData as string) as UserState; setTimeout(function () { checkWXPubFollow(); }, 200); } case 4: case "end": return _context.stop(); } }, _callee); }))); function checkWXPubFollow() { (0,_services_permission__WEBPACK_IMPORTED_MODULE_5__.wxPubFollow)().then(function (res) { console.log(res); }); } function followWxPub() { var resource = common.resources.filter(function (item) { return item.code == 'follow_wx_pub'; }); _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().showModal({ title: '提示', content: '关注公众号后可接收提醒\n点击确定,前往关注', showCancel: true, success: function success(result) { if (result.confirm) { _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().navigateTo({ url: '/pages/H5?title=fast16cc 关注服务号&url=' + resource[0].url }); } } }); } function getStorage(_x) { return _getStorage.apply(this, arguments); } function _getStorage() { _getStorage = (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_9__["default"])( /*#__PURE__*/(0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_10__["default"])().mark(function _callee2(key) { var res; return (0,_Users_Work_hola_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_10__["default"])().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: _context2.prev = 0; _context2.next = 3; return _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().getStorage({ key: key }); case 3: res = _context2.sent; return _context2.abrupt("return", res.data); case 7: _context2.prev = 7; _context2.t0 = _context2["catch"](0); return _context2.abrupt("return", ''); case 10: case "end": return _context2.stop(); } }, _callee2, null, [[0, 7]]); })); return _getStorage.apply(this, arguments); } function goDetail() { _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().navigateTo({ // url: '/pages/index/detail' //src/moduleA/pages/third.tsx url: '../../moduleA/pages/third' }); } function login() { if (user.isLogin) { _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().navigateTo({ url: '/pages/ChooseScenario' }); } else { _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().navigateTo({ url: '/pages/ChooseAuth' }); } } return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.View, { style: { backgroundColor: '#fff', flex: 1, flexDirection: 'column', display: 'flex' }, children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { children: "homepage12234" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { children: user.isLogin ? '已登录' : '未登录' }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { children: user.isLogin ? "\u7528\u6237\u6635\u79F0\uFF1A".concat(user.nickname) : '' }), permission.wxPubFollow == false && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { onClick: function onClick() { return followWxPub(); }, children: "\u53BB\u5173\u6CE8\u516C\u4F17\u53F7" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Button, { onClick: function onClick() { return goDetail(); }, children: "go detail" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_Rings__WEBPACK_IMPORTED_MODULE_2__["default"], { radius: 50 }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Input, { placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D1", style: { textAlign: 'left', backgroundColor: 'pink' } }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_8__.Text, { className: "login", onClick: function onClick() { return login(); }, children: "sss" })] }); } // export default class Index extends Component { // componentDidMount () { } // componentWillUnmount () { } // componentDidShow () { } // componentDidHide () { } // goDetail(){ // Taro.navigateTo({ // url: '/pages/index/detail' // }) // } // render () { // return ( // // Hello world123! // // // // ) // } // } /***/ }), /***/ "./src/pages/index/index.tsx": /*!***********************************!*\ !*** ./src/pages/index/index.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_index_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./index.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/index/index.tsx"); var config = {"navigationBarTitleText":"首页","usingComponents":{"demo":"../../components/demo"}}; var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createPageConfig)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_index_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/index/index', {root:{cn:[]}}, config || {})) /* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_index_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/index/index.tsx"); }); /******/ var __webpack_exports__ = __webpack_require__.O(); /******/ } ]); //# sourceMappingURL=index.js.map