index.js 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. "use strict";
  2. (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/index/index"],{
  3. /***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/index/index.tsx":
  4. /*!********************************************************************************************************!*\
  5. !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/index/index.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 */ IndexPage; }
  10. /* harmony export */ });
  11. /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
  12. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
  13. /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
  14. /* harmony import */ var _components_Rings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @components/Rings */ "./src/components/Rings.weapp.tsx");
  15. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
  16. /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_2__);
  17. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
  18. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
  19. // import ComponentA from './component'
  20. // import TabBar from '../../components/Tabbar';
  21. function IndexPage() {
  22. var array = [];
  23. var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) {
  24. return state.user;
  25. });
  26. array.push('ffff');
  27. array.push( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  28. children: "ffff"
  29. }));
  30. // array.push(<Rings radius={50}/>)
  31. function goDetail() {
  32. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
  33. // url: '/pages/index/detail'
  34. //src/moduleA/pages/third.tsx
  35. url: '../../moduleA/pages/third'
  36. });
  37. }
  38. function login() {
  39. if (user.isLogin) {
  40. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
  41. url: '/pages/ChooseScenario'
  42. });
  43. } else {
  44. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
  45. url: '/pages/ChooseAuth'
  46. });
  47. }
  48. }
  49. return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  50. style: {
  51. backgroundColor: '#fff',
  52. flex: 1,
  53. flexDirection: 'column',
  54. display: 'flex'
  55. },
  56. children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  57. children: "homepage12234"
  58. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  59. children: user.isLogin ? '已登录' : '未登录'
  60. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  61. children: user.isLogin ? "\u7528\u6237\u6635\u79F0\uFF1A".concat(user.nickname) : ''
  62. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
  63. onClick: function onClick() {
  64. return goDetail();
  65. },
  66. children: "go detail"
  67. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_Rings__WEBPACK_IMPORTED_MODULE_1__["default"], {
  68. radius: 50
  69. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Input, {
  70. placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D1",
  71. style: {
  72. textAlign: 'left',
  73. backgroundColor: 'pink'
  74. }
  75. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  76. className: "login",
  77. onClick: function onClick() {
  78. return login();
  79. },
  80. children: "sss"
  81. })]
  82. });
  83. }
  84. // export default class Index extends Component<PropsWithChildren> {
  85. // componentDidMount () { }
  86. // componentWillUnmount () { }
  87. // componentDidShow () { }
  88. // componentDidHide () { }
  89. // goDetail(){
  90. // Taro.navigateTo({
  91. // url: '/pages/index/detail'
  92. // })
  93. // }
  94. // render () {
  95. // return (
  96. // <View className='index'>
  97. // <Text>Hello world123!</Text>
  98. // <ComponentA value="A"/>
  99. // <Button onClick={()=>this.goDetail()}>detail</Button>
  100. // </View>
  101. // )
  102. // }
  103. // }
  104. /***/ }),
  105. /***/ "./src/pages/index/index.tsx":
  106. /*!***********************************!*\
  107. !*** ./src/pages/index/index.tsx ***!
  108. \***********************************/
  109. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  110. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
  111. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__);
  112. /* 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");
  113. var config = {"navigationBarTitleText":"首页","usingComponents":{"demo":"../../components/demo"}};
  114. 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 || {}))
  115. /* 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"]);
  116. /***/ })
  117. },
  118. /******/ function(__webpack_require__) { // webpackRuntimeModules
  119. /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  120. /******/ __webpack_require__.O(0, ["taro","common"], function() { return __webpack_exec__("./src/pages/index/index.tsx"); });
  121. /******/ var __webpack_exports__ = __webpack_require__.O();
  122. /******/ }
  123. ]);
  124. //# sourceMappingURL=index.js.map