index.js 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
  40. url: '/pages/ChooseAuth'
  41. });
  42. }
  43. return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
  44. style: {
  45. backgroundColor: '#fff',
  46. flex: 1,
  47. flexDirection: 'column',
  48. display: 'flex'
  49. },
  50. children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  51. children: "homepage12234"
  52. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  53. children: user.isLogin ? '已登录' : '未登录'
  54. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  55. children: user.isLogin ? "\u7528\u6237\u6635\u79F0\uFF1A".concat(user.nickname) : ''
  56. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
  57. onClick: function onClick() {
  58. return goDetail();
  59. },
  60. children: "go detail"
  61. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_Rings__WEBPACK_IMPORTED_MODULE_1__["default"], {
  62. radius: 50
  63. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Input, {
  64. placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D1",
  65. style: {
  66. textAlign: 'left',
  67. backgroundColor: 'pink'
  68. }
  69. }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
  70. className: "login",
  71. onClick: function onClick() {
  72. return login();
  73. },
  74. children: "sss"
  75. })]
  76. });
  77. }
  78. // export default class Index extends Component<PropsWithChildren> {
  79. // componentDidMount () { }
  80. // componentWillUnmount () { }
  81. // componentDidShow () { }
  82. // componentDidHide () { }
  83. // goDetail(){
  84. // Taro.navigateTo({
  85. // url: '/pages/index/detail'
  86. // })
  87. // }
  88. // render () {
  89. // return (
  90. // <View className='index'>
  91. // <Text>Hello world123!</Text>
  92. // <ComponentA value="A"/>
  93. // <Button onClick={()=>this.goDetail()}>detail</Button>
  94. // </View>
  95. // )
  96. // }
  97. // }
  98. /***/ }),
  99. /***/ "./src/pages/index/index.tsx":
  100. /*!***********************************!*\
  101. !*** ./src/pages/index/index.tsx ***!
  102. \***********************************/
  103. /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
  104. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
  105. /* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__);
  106. /* 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");
  107. var config = {"navigationBarTitleText":"首页","usingComponents":{"demo":"../../components/demo"}};
  108. 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 || {}))
  109. /* 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"]);
  110. /***/ })
  111. },
  112. /******/ function(__webpack_require__) { // webpackRuntimeModules
  113. /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
  114. /******/ __webpack_require__.O(0, ["taro","common"], function() { return __webpack_exec__("./src/pages/index/index.tsx"); });
  115. /******/ var __webpack_exports__ = __webpack_require__.O();
  116. /******/ }
  117. ]);
  118. //# sourceMappingURL=index.js.map