leon 2 anos atrás
pai
commit
a55dc423c8
57 arquivos alterados com 1255 adições e 181 exclusões
  1. 31 1
      dist/app.js
  2. 0 0
      dist/app.js.map
  3. 1 1
      dist/app.json
  4. 49 3
      dist/common.js
  5. 0 0
      dist/common.js.map
  6. 17 0
      dist/common.wxss
  7. 118 0
      dist/custom-tab-bar/index.js
  8. 0 0
      dist/custom-tab-bar/index.js.map
  9. 1 0
      dist/custom-tab-bar/index.json
  10. 2 0
      dist/custom-tab-bar/index.wxml
  11. 20 15
      dist/custom-tab-bar/index.wxss
  12. 58 0
      dist/pages/Activity.js
  13. 1 0
      dist/pages/Activity.js.map
  14. 1 0
      dist/pages/Activity.json
  15. 2 0
      dist/pages/Activity.wxml
  16. 27 16
      dist/pages/Auth.js
  17. 0 0
      dist/pages/Auth.js.map
  18. 39 25
      dist/pages/ChooseAuth.js
  19. 0 0
      dist/pages/ChooseAuth.js.map
  20. 343 0
      dist/pages/Clock.js
  21. 0 0
      dist/pages/Clock.js.map
  22. 1 0
      dist/pages/Clock.json
  23. 2 0
      dist/pages/Clock.wxml
  24. 0 1
      dist/pages/H5.wxss
  25. 58 0
      dist/pages/Metric.js
  26. 1 0
      dist/pages/Metric.js.map
  27. 1 0
      dist/pages/Metric.json
  28. 2 0
      dist/pages/Metric.wxml
  29. 41 26
      dist/pages/Profile.js
  30. 1 0
      dist/pages/Profile.js.map
  31. 1 0
      dist/pages/Profile.json
  32. 2 0
      dist/pages/Profile.wxml
  33. 0 1
      dist/pages/Second.js.map
  34. 0 29
      dist/pages/index/index.js
  35. 0 0
      dist/pages/index/index.js.map
  36. 16 3
      src/app.config.ts
  37. 15 0
      src/context/locales/en.js
  38. 15 0
      src/context/locales/zh.js
  39. 15 0
      src/custom-tab-bar/index.scss
  40. 51 0
      src/custom-tab-bar/index.tsx
  41. 0 10
      src/features/auth/components/Auth.tsx
  42. 14 9
      src/features/auth/components/CreatePassword.tsx
  43. 16 8
      src/features/auth/components/login.tsx
  44. 11 0
      src/features/trackTimeDuration/components/Clock.tsx
  45. 9 0
      src/features/trackTimeDuration/components/Console.tsx
  46. 49 0
      src/features/trackTimeDuration/components/More.tsx
  47. 9 0
      src/pages/Activity.tsx
  48. 20 8
      src/pages/ChooseAuth.tsx
  49. 0 0
      src/pages/Me.tsx
  50. 9 0
      src/pages/Metric.tsx
  51. 35 0
      src/pages/Profile.tsx
  52. 0 20
      src/pages/Second.tsx
  53. 132 0
      src/pages/clock.tsx
  54. 1 1
      src/services/http/api.js
  55. 14 2
      src/services/trackTimeDuration.tsx
  56. 1 1
      src/services/user.tsx
  57. 3 1
      src/store/user.tsx

+ 31 - 1
dist/app.js

@@ -97,7 +97,7 @@ var App = function App(_ref) {
 
 
 
-var config = {"pages":["pages/index/index","pages/Second","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetSchedule"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"tabBar":{"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/Second","text":"第二页"}]},"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true};
+var config = {"pages":["pages/Clock","pages/index/index","pages/Second","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetSchedule","pages/H5","pages/Profile","pages/Metric","pages/Activity"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"tabBar":{"custom":true,"list":[{"pagePath":"pages/Clock","text":"首页"},{"pagePath":"pages/Metric","text":"第二页"},{"pagePath":"pages/Activity","text":"第二页"},{"pagePath":"pages/Profile","text":"第二页"}]},"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true};
 _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.window.__taroAppConfig = config
 var inst = App((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__.createReactApp)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_app_tsx__WEBPACK_IMPORTED_MODULE_4__["default"], react__WEBPACK_IMPORTED_MODULE_5__, (react_dom__WEBPACK_IMPORTED_MODULE_6___default()), config))
 
@@ -154,6 +154,13 @@ var inst = App((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_
     }
   },
   feature: {
+    tabbar: {
+      clock: 'Clock',
+      metric: 'Metric',
+      activity: 'Activity',
+      nutrition: 'Nutrition',
+      profile: 'Profile'
+    },
     auth: {
       create_account: {
         title: 'Create Account',
@@ -177,6 +184,14 @@ var inst = App((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_
         input_password_confirm_placeholder: 'Confirm Password',
         btn_next: 'Next'
       }
+    },
+    track_time_duration: {
+      action_sheet: {
+        change_schedule: 'Change schedule',
+        switch_scenario: 'Switch scenario',
+        give_up: 'Give up',
+        cancel: 'Cancel'
+      }
     }
   }
 });
@@ -278,6 +293,13 @@ function initLocale(strLocale) {
     }
   },
   feature: {
+    tabbar: {
+      clock: '时钟',
+      metric: '指标',
+      activity: '运动',
+      nutrition: '营养',
+      profile: '我'
+    },
     auth: {
       create_account: {
         title: '注册账号',
@@ -301,6 +323,14 @@ function initLocale(strLocale) {
         input_password_confirm_placeholder: '确认密码',
         btn_next: '下一步'
       }
+    },
+    track_time_duration: {
+      action_sheet: {
+        change_schedule: '调整日程',
+        switch_scenario: '切换场景',
+        give_up: '放弃终止',
+        cancel: '取消'
+      }
     }
   }
 });

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/app.js.map


+ 1 - 1
dist/app.json

@@ -1 +1 @@
-{"pages":["pages/index/index","pages/Second","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetSchedule","pages/H5"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"tabBar":{"list":[{"pagePath":"pages/index/index","text":"首页"},{"pagePath":"pages/Second","text":"第二页"}]},"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true}
+{"pages":["pages/Clock","pages/index/index","pages/Second","pages/Login","pages/Auth","pages/ChooseAuth","pages/ChooseScenario","pages/SetSchedule","pages/H5","pages/Profile","pages/Metric","pages/Activity"],"subPackages":[{"root":"moduleA","pages":["pages/third"]}],"tabBar":{"custom":true,"list":[{"pagePath":"pages/Clock","text":"首页"},{"pagePath":"pages/Metric","text":"第二页"},{"pagePath":"pages/Activity","text":"第二页"},{"pagePath":"pages/Profile","text":"第二页"}]},"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#000000","navigationBarTitleText":"Weixin","navigationBarTextStyle":"white","backgroundColor":"#000000"},"darkmode":true}

+ 49 - 3
dist/common.js

@@ -272,6 +272,7 @@ function Component(props) {
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 /* harmony export */   API_CHECK_UNIQUE: function() { return /* binding */ API_CHECK_UNIQUE; },
 /* harmony export */   API_CLEAR_USER: function() { return /* binding */ API_CLEAR_USER; },
+/* harmony export */   API_FAST_CHECKS: function() { return /* binding */ API_FAST_CHECKS; },
 /* harmony export */   API_FAST_PLANS: function() { return /* binding */ API_FAST_PLANS; },
 /* harmony export */   API_LOGIN: function() { return /* binding */ API_LOGIN; },
 /* harmony export */   API_LOGOUT: function() { return /* binding */ API_LOGOUT; },
@@ -281,7 +282,7 @@ function Component(props) {
 /* harmony export */   API_USER_INFO: function() { return /* binding */ API_USER_INFO; },
 /* harmony export */   API_WX_PUB_FOLLOWED: function() { return /* binding */ API_WX_PUB_FOLLOWED; }
 /* harmony export */ });
-/* unused harmony exports baseUrl, imgUrl, API_ADJUST_TIMES, API_CLEAR_FAST, API_CLEAR_SLEEP, API_CLEAR_MIX, API_FAST_CHECKS, API_FAST_CHECK_ABANDONED, API_FAST_RECORDS, API_FAST_SCHEDULES, API_FAST_CALENDARS */
+/* unused harmony exports baseUrl, imgUrl, API_ADJUST_TIMES, API_CLEAR_FAST, API_CLEAR_SLEEP, API_CLEAR_MIX, API_FAST_CHECK_ABANDONED, API_FAST_RECORDS, API_FAST_SCHEDULES, API_FAST_CALENDARS */
 var online = false;
 var baseUrl = online ? 'https://api.fast.liveplus.fun' : 'https://api.fast.dev.liveplus.fun';
 var imgUrl = online ? 'https://api.fast.liveplus.fun/static/image/' : 'https://api.fast.dev.liveplus.fun/static/image/';
@@ -293,7 +294,7 @@ var API_OAUTH_LOGIN = "".concat(baseUrl, "/api/user/oauth2/login");
 var API_LOGIN = "".concat(baseUrl, "/api/user/login/password");
 var API_REGISTER = "".concat(baseUrl, "/api/user/account");
 var API_LOGOUT = "".concat(baseUrl, "/api/user/logout");
-var API_CLEAR_USER = "".concat(baseUrl, "/api/clear/user");
+var API_CLEAR_USER = "".concat(baseUrl, "/api/user/account");
 var API_STATIC_RESOURCES = "".concat(baseUrl, "/api/static-resource-urls");
 var API_USER_INFO = "".concat(baseUrl, "/api/user/info");
 var API_CLEAR_FAST = "".concat(baseUrl, "/api/clear/fasting");
@@ -510,6 +511,35 @@ function _request() {
 
 /***/ }),
 
+/***/ "./src/services/permission.tsx":
+/*!*************************************!*\
+  !*** ./src/services/permission.tsx ***!
+  \*************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */   wxPubFollow: function() { return /* binding */ wxPubFollow; }
+/* harmony export */ });
+/* harmony import */ var _http_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http/api */ "./src/services/http/api.js");
+/* harmony import */ var _http_request__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http/request */ "./src/services/http/request.ts");
+
+
+var wxPubFollow = function wxPubFollow() {
+  return new Promise(function (resolve) {
+    (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
+      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_WX_PUB_FOLLOWED,
+      method: 'GET',
+      data: {}
+    }).then(function (res) {
+      resolve(res);
+      console.log(res);
+      // dispatch(loginSuccess(res));
+    });
+  });
+};
+
+/***/ }),
+
 /***/ "./src/services/trackTimeDuration.tsx":
 /*!********************************************!*\
   !*** ./src/services/trackTimeDuration.tsx ***!
@@ -517,6 +547,7 @@ function _request() {
 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */   getChecks: function() { return /* binding */ getChecks; },
 /* harmony export */   getPlans: function() { return /* binding */ getPlans; },
 /* harmony export */   setPlan: function() { return /* binding */ setPlan; }
 /* harmony export */ });
@@ -554,6 +585,20 @@ var setPlan = function setPlan(params) {
   });
 };
 
+var getChecks = function getChecks() {
+  return new Promise(function (resolve) {
+    (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
+      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_CHECKS,
+      method: 'GET',
+      data: {}
+    }).then(function (res) {
+      resolve(res);
+      console.log(res);
+      // dispatch(loginSuccess(res));
+    });
+  });
+};
+
 /***/ }),
 
 /***/ "./src/services/user.tsx":
@@ -672,7 +717,7 @@ var clear = function clear() {
   return function (dispatch) {
     (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
       url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_CLEAR_USER,
-      method: 'POST',
+      method: 'DELETE',
       data: {}
     }).then(function (_) {
       dispatch((0,_store_user__WEBPACK_IMPORTED_MODULE_2__.clearSuccess)());
@@ -813,6 +858,7 @@ var initialState = {
   isLogin: false,
   nickname: null,
   avatar: null,
+  scenario_select_count: 0,
   token: null
 };
 var userSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/common.js.map


+ 17 - 0
dist/common.wxss

@@ -1,3 +1,20 @@
+/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/index/index.scss ***!
+  \*************************************************************************************************************************************************************************************************************************************************************************************************************************/
+.canvas-container {
+  width: 100%;
+  height: 500rpx;
+}
+
+.demo {
+  width: 749rpx;
+  height: 30rpx;
+  background-color: aqua;
+}
+
+.login {
+  color: red;
+}
 /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
   !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/components/Buttons.scss ***!
   \**************************************************************************************************************************************************************************************************************************************************************************************************************************/

+ 118 - 0
dist/custom-tab-bar/index.js

@@ -0,0 +1,118 @@
+"use strict";
+(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["custom-tab-bar/index"],{
+
+/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/custom-tab-bar/index.tsx":
+/*!***********************************************************************************************************!*\
+  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/custom-tab-bar/index.tsx ***!
+  \***********************************************************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */   "default": function() { return /* binding */ TabBar; }
+/* harmony export */ });
+/* 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_i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
+/* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_0__);
+/* 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 react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
+/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
+
+
+
+
+
+
+function TabBar() {
+  var _useTranslation = (0,react_i18next__WEBPACK_IMPORTED_MODULE_0__.useTranslation)(),
+    t = _useTranslation.t;
+  function switchTab(index) {
+    switch (index) {
+      case 0:
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().switchTab({
+          url: '/pages/Clock'
+        });
+        break;
+      case 1:
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().switchTab({
+          url: '/pages/Metric'
+        });
+        break;
+      case 2:
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().switchTab({
+          url: '/pages/Activity'
+        });
+        break;
+      case 3:
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_1___default().switchTab({
+          url: '/pages/Profile'
+        });
+        break;
+    }
+  }
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+    className: "tabbar",
+    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+      className: "tabbar-item",
+      onClick: function onClick() {
+        return switchTab(0);
+      },
+      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
+        children: t('feature.tabbar.clock')
+      })
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+      className: "tabbar-item",
+      onClick: function onClick() {
+        return switchTab(1);
+      },
+      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
+        children: t('feature.tabbar.metric')
+      })
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+      className: "tabbar-item",
+      onClick: function onClick() {
+        return switchTab(2);
+      },
+      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
+        children: t('feature.tabbar.activity')
+      })
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+      className: "tabbar-item",
+      onClick: function onClick() {
+        return switchTab(3);
+      },
+      children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
+        children: t('feature.tabbar.profile')
+      })
+    })]
+  });
+}
+
+/***/ }),
+
+/***/ "./src/custom-tab-bar/index.tsx":
+/*!**************************************!*\
+  !*** ./src/custom-tab-bar/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/custom-tab-bar/index.tsx");
+
+
+var inst = Component((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createComponentConfig)(_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_index_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'custom-tab-bar/index'))
+
+/* 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","common"], function() { return __webpack_exec__("./src/custom-tab-bar/index.tsx"); });
+/******/ var __webpack_exports__ = __webpack_require__.O();
+/******/ }
+]);
+//# sourceMappingURL=index.js.map

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/custom-tab-bar/index.js.map


+ 1 - 0
dist/custom-tab-bar/index.json

@@ -0,0 +1 @@
+{}

+ 2 - 0
dist/custom-tab-bar/index.wxml

@@ -0,0 +1,2 @@
+<import src="../base.wxml"/>
+<template is="taro_tmpl" data="{{root:root}}" />

+ 20 - 15
dist/pages/index/index.wxss → dist/custom-tab-bar/index.wxss

@@ -1,17 +1,22 @@
-/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
-  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/pages/index/index.scss ***!
-  \*************************************************************************************************************************************************************************************************************************************************************************************************************************/
-.canvas-container {
-  width: 100%;
-  height: 500rpx;
+/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
+  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/custom-tab-bar/index.scss ***!
+  \****************************************************************************************************************************************************************************************************************************************************************************************************************************/
+@charset "UTF-8";
+.tabbar {
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-flex-direction: row;
+      -ms-flex-direction: row;
+          flex-direction: row;
+  -webkit-justify-content: space-around;
+      -ms-flex-pack: distribute;
+          justify-content: space-around;
+  padding-bottom: constant(safe-area-inset-bottom);
+  /* 兼容 iOS < 11.2 */
+  padding-bottom: env(safe-area-inset-bottom);
 }
-
-.demo {
-  width: 749rpx;
-  height: 30rpx;
-  background-color: aqua;
-}
-
-.login {
-  color: red;
+.tabbar-item {
+  color: #fff;
+  padding-top: 25rpx;
 }

+ 58 - 0
dist/pages/Activity.js

@@ -0,0 +1,58 @@
+"use strict";
+(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Activity"],{
+
+/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Activity.tsx":
+/*!*****************************************************************************************************!*\
+  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Activity.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_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 Page() {
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.View, {
+    className: "container",
+    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.Text, {
+      children: "Activity Page"
+    })
+  });
+}
+
+/***/ }),
+
+/***/ "./src/pages/Activity.tsx":
+/*!********************************!*\
+  !*** ./src/pages/Activity.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_Activity_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Activity.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Activity.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_Activity_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Activity', {root:{cn:[]}}, config || {}))
+
+
+/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Activity_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","common"], function() { return __webpack_exec__("./src/pages/Activity.tsx"); });
+/******/ var __webpack_exports__ = __webpack_require__.O();
+/******/ }
+]);
+//# sourceMappingURL=Activity.js.map

+ 1 - 0
dist/pages/Activity.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"pages/Activity.js","mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAGA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://hola/._src_pages_Activity.tsx","webpack://hola/./src/pages/Activity.tsx?a504"],"sourcesContent":["import { View,Text } from \"@tarojs/components\";\n\nexport default function Page(){\n    return (\n        <View className=\"container\">\n            <Text>Activity Page</Text>\n        </View>\n    )\n}","import { createPageConfig } from '@tarojs/runtime'\nimport component from \"../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Activity.tsx\"\nvar config = {};\n\n\nvar inst = Page(createPageConfig(component, 'pages/Activity', {root:{cn:[]}}, config || {}))\n\n\nexport default component\n"],"names":[],"sourceRoot":""}

+ 1 - 0
dist/pages/Activity.json

@@ -0,0 +1 @@
+{"usingComponents":{"comp":"../comp"}}

+ 2 - 0
dist/pages/Activity.wxml

@@ -0,0 +1,2 @@
+<import src="../base.wxml"/>
+<template is="taro_tmpl" data="{{root:root}}" />

+ 27 - 16
dist/pages/Auth.js

@@ -373,6 +373,19 @@ function Component(prop) {
     setRepeat(value);
   };
   var isButtonDisabled = password === '' || repeat === '';
+  var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_7__.useSelector)(function (state) {
+    return state.user;
+  });
+  (0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
+    if (user.isLogin) {
+      _tarojs_taro__WEBPACK_IMPORTED_MODULE_9___default().navigateBack({
+        delta: 2
+      });
+      _tarojs_taro__WEBPACK_IMPORTED_MODULE_9___default().redirectTo({
+        url: '/pages/ChooseScenario'
+      });
+    }
+  }, [user.isLogin]);
   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"], {
@@ -397,14 +410,6 @@ function Component(prop) {
       return;
     }
     dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_10__.register)(__webpack_require__.g.username, __webpack_require__.g.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: {
@@ -521,15 +526,21 @@ function Login(props) {
     return state.user;
   });
   (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
-    if (user.nickname) {
-      _tarojs_taro__WEBPACK_IMPORTED_MODULE_10___default().navigateBack({
-        delta: 1
-      });
-      _tarojs_taro__WEBPACK_IMPORTED_MODULE_10___default().redirectTo({
-        url: '/pages/ChooseScenario'
-      });
+    if (user.isLogin) {
+      if (user.scenario_select_count > 0) {
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_10___default().navigateBack({
+          delta: 2
+        });
+      } else {
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_10___default().navigateBack({
+          delta: 1
+        });
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_10___default().redirectTo({
+          url: '/pages/ChooseScenario'
+        });
+      }
     }
-  }, [user.nickname]);
+  }, [user.isLogin]);
   var handleNameChange = function handleNameChange(value) {
     setName(value);
   };

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/pages/Auth.js.map


+ 39 - 25
dist/pages/ChooseAuth.js

@@ -10,9 +10,9 @@
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 /* harmony export */   "default": function() { return /* binding */ Page; }
 /* harmony export */ });
-/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");
-/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
-/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
+/* 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 _components_Buttons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @components/Buttons */ "./src/components/Buttons.tsx");
 /* harmony import */ var _components_Texts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @components/Texts */ "./src/components/Texts.tsx");
 /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts");
@@ -20,9 +20,12 @@
 /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__);
 /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
 /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_4__);
-/* harmony import */ var _services_user__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/services/user */ "./src/services/user.tsx");
-/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
-/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__);
+/* 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 _services_user__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/services/user */ "./src/services/user.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__);
+
 
 
 
@@ -41,6 +44,22 @@ function Page() {
     return state.counter.value;
   });
   var code = '';
+  var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_4__.useSelector)(function (state) {
+    return state.user;
+  });
+  (0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
+    if (user.isLogin) {
+      if (user.scenario_select_count > 0) {
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default().navigateBack({
+          delta: 1
+        });
+      } else {
+        _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default().redirectTo({
+          url: '/pages/ChooseScenario'
+        });
+      }
+    }
+  }, [user.isLogin]);
   (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__.useReady)(function () {
     _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default().login().then(function (res) {
       code = res.code;
@@ -52,9 +71,9 @@ function Page() {
     return _login.apply(this, arguments);
   }
   function _login() {
-    _login = (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_7__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["default"])().mark(function _callee() {
+    _login = (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_8__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_9__["default"])().mark(function _callee() {
       var _yield$Taro$getUserPr, encryptedData, iv;
-      return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_8__["default"])().wrap(function _callee$(_context) {
+      return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_9__["default"])().wrap(function _callee$(_context) {
         while (1) switch (_context.prev = _context.next) {
           case 0:
             _context.prev = 0;
@@ -66,25 +85,20 @@ function Page() {
             _yield$Taro$getUserPr = _context.sent;
             encryptedData = _yield$Taro$getUserPr.encryptedData;
             iv = _yield$Taro$getUserPr.iv;
-            dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_5__.wxLogin)(code, encryptedData, iv));
-            setTimeout(function () {
-              _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default().redirectTo({
-                url: '/pages/ChooseScenario'
-              });
-            }, 1000);
+            dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_6__.wxLogin)(code, encryptedData, iv));
 
             // 在这里处理用户信息
-            _context.next = 13;
+            _context.next = 12;
             break;
-          case 10:
-            _context.prev = 10;
+          case 9:
+            _context.prev = 9;
             _context.t0 = _context["catch"](0);
             console.log('获取用户信息失败:', _context.t0);
-          case 13:
+          case 12:
           case "end":
             return _context.stop();
         }
-      }, _callee, null, [[0, 10]]);
+      }, _callee, null, [[0, 9]]);
     }));
     return _login.apply(this, arguments);
   }
@@ -93,25 +107,25 @@ function Page() {
       url: '/pages/Auth'
     });
   }
-  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
     className: "container choose_container",
-    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_1__["default"], {
+    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_1__["default"], {
       text: "App name",
       type: _utils_types__WEBPACK_IMPORTED_MODULE_2__.TextType.big
-    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_1__["default"], {
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_Texts__WEBPACK_IMPORTED_MODULE_1__["default"], {
       text: counter
-    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_10__.View, {
       style: {
         height: 100
       }
-    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
       title: "WeChat",
       onClick: login,
       style: {
         width: 289,
         marginBottom: 30
       }
-    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
       title: "Create account",
       type: _utils_types__WEBPACK_IMPORTED_MODULE_2__.ButtonType.outline,
       onClick: createAccount,

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/pages/ChooseAuth.js.map


+ 343 - 0
dist/pages/Clock.js

@@ -0,0 +1,343 @@
+"use strict";
+(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Clock"],{
+
+/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Clock.tsx":
+/*!**************************************************************************************************!*\
+  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Clock.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_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
+/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
+/* 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 react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
+/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var _store_user__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/store/user */ "./src/store/user.tsx");
+/* harmony import */ var _services_permission__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/services/permission */ "./src/services/permission.tsx");
+/* harmony import */ var _features_trackTimeDuration_components_Clock__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/features/trackTimeDuration/components/Clock */ "./src/features/trackTimeDuration/components/Clock.tsx");
+/* harmony import */ var _features_trackTimeDuration_components_Console__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/features/trackTimeDuration/components/Console */ "./src/features/trackTimeDuration/components/Console.tsx");
+/* harmony import */ var _features_trackTimeDuration_components_More__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/features/trackTimeDuration/components/More */ "./src/features/trackTimeDuration/components/More.tsx");
+/* harmony import */ var _services_trackTimeDuration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/services/trackTimeDuration */ "./src/services/trackTimeDuration.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__);
+
+
+
+
+
+// import ComponentA from './component'
+
+
+
+
+
+
+
+
+// import TabBar from '../../components/Tabbar';
+
+
+function IndexPage() {
+  var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)();
+  var array = [];
+  var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(function (state) {
+    return state.user;
+  });
+  var permission = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(function (state) {
+    return state.permission;
+  });
+  var common = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(function (state) {
+    return state.common;
+  });
+  array.push('ffff');
+  array.push( /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+    children: "ffff"
+  }));
+  // array.push(<Rings radius={50}/>)
+
+  (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useReady)( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_11__["default"])().mark(function _callee() {
+    var userData;
+    return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_11__["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_2__.getInfoSuccess)(JSON.parse(userData)));
+            // return JSON.parse(userData as string) as UserState;
+            setTimeout(function () {
+              checkWXPubFollow();
+              getCheckData();
+            }, 200);
+          }
+        case 4:
+        case "end":
+          return _context.stop();
+      }
+    }, _callee);
+  })));
+  (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useDidShow)(function () {
+    if (user.isLogin) getCheckData();
+  });
+  function getCheckData() {
+    (0,_services_trackTimeDuration__WEBPACK_IMPORTED_MODULE_7__.getChecks)().then(function (res) {
+      console.log(res);
+    });
+  }
+  function checkWXPubFollow() {
+    (0,_services_permission__WEBPACK_IMPORTED_MODULE_3__.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_0___default().showModal({
+      title: '提示',
+      content: '关注公众号后可接收提醒\n点击确定,前往关注',
+      showCancel: true,
+      success: function success(result) {
+        if (result.confirm) {
+          _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___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_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_10__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_11__["default"])().mark(function _callee2(key) {
+      var res;
+      return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_11__["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_0___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_0___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_0___default().navigateTo({
+        url: '/pages/ChooseScenario'
+      });
+    } else {
+      _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
+        url: '/pages/ChooseAuth'
+      });
+    }
+  }
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.View, {
+    style: {
+      backgroundColor: '#fff',
+      flex: 1,
+      flexDirection: 'column',
+      display: 'flex'
+    },
+    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+      children: "homepage122345"
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+      children: user.isLogin ? '已登录' : '未登录'
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+      children: user.isLogin ? "\u7528\u6237\u6635\u79F0\uFF1A".concat(user.nickname) : ''
+    }), permission.wxPubFollow == false && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+      onClick: function onClick() {
+        return followWxPub();
+      },
+      children: "\u53BB\u5173\u6CE8\u516C\u4F17\u53F7"
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Button, {
+      onClick: function onClick() {
+        return goDetail();
+      },
+      children: "go detail"
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_9__.Text, {
+      className: "login",
+      onClick: function onClick() {
+        return login();
+      },
+      children: "sss"
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_features_trackTimeDuration_components_Clock__WEBPACK_IMPORTED_MODULE_4__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_features_trackTimeDuration_components_Console__WEBPACK_IMPORTED_MODULE_5__["default"], {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_features_trackTimeDuration_components_More__WEBPACK_IMPORTED_MODULE_6__["default"], {})]
+  });
+}
+
+/***/ }),
+
+/***/ "./src/features/trackTimeDuration/components/Clock.tsx":
+/*!*************************************************************!*\
+  !*** ./src/features/trackTimeDuration/components/Clock.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 _components_Rings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Rings */ "./src/components/Rings.weapp.tsx");
+/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
+/* 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() {
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
+    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components_Rings__WEBPACK_IMPORTED_MODULE_0__["default"], {
+      radius: 50
+    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
+      children: "Clock Component"
+    })]
+  });
+}
+
+/***/ }),
+
+/***/ "./src/features/trackTimeDuration/components/Console.tsx":
+/*!***************************************************************!*\
+  !*** ./src/features/trackTimeDuration/components/Console.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() {
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.View, {
+    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.Text, {
+      children: "Console Component"
+    })
+  });
+}
+
+/***/ }),
+
+/***/ "./src/features/trackTimeDuration/components/More.tsx":
+/*!************************************************************!*\
+  !*** ./src/features/trackTimeDuration/components/More.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_3__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
+/* 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 react_i18next__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-i18next */ "webpack/container/remote/react-i18next");
+/* harmony import */ var react_i18next__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_i18next__WEBPACK_IMPORTED_MODULE_1__);
+/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
+/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
+
+
+
+
+function Component() {
+  var _useTranslation = (0,react_i18next__WEBPACK_IMPORTED_MODULE_1__.useTranslation)(),
+    t = _useTranslation.t;
+  function waitActionSheet() {
+    _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showActionSheet({
+      itemList: [t('feature.track_time_duration.action_sheet.change_schedule'), t('feature.track_time_duration.action_sheet.switch_scenario')]
+    }).then(function (res) {
+      console.log(res.tapIndex);
+      switch (res.tapIndex) {
+        case 0:
+          _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
+            url: '/pages/SetSchedule'
+          });
+          break;
+        case 1:
+          _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().navigateTo({
+            url: '/pages/ChooseScenario'
+          });
+          break;
+      }
+    }).catch(function (err) {
+      console.log(err.errMsg);
+    });
+  }
+  function ongoingActionSheet() {
+    _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().showActionSheet({
+      itemList: [t('feature.track_time_duration.action_sheet.give_up'), t('feature.track_time_duration.action_sheet.switch_scenario')]
+    }).then(function (res) {
+      console.log(res.tapIndex);
+    }).catch(function (err) {
+      console.log(err.errMsg);
+    });
+  }
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.View, {
+    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Text, {
+      onClick: waitActionSheet,
+      children: "More Component"
+    })
+  });
+}
+
+/***/ }),
+
+/***/ "./src/pages/Clock.tsx":
+/*!*****************************!*\
+  !*** ./src/pages/Clock.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_Clock_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Clock.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Clock.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_Clock_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Clock', {root:{cn:[]}}, config || {}))
+
+
+/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Clock_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/Clock.tsx"); });
+/******/ var __webpack_exports__ = __webpack_require__.O();
+/******/ }
+]);
+//# sourceMappingURL=Clock.js.map

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/pages/Clock.js.map


+ 1 - 0
dist/pages/Clock.json

@@ -0,0 +1 @@
+{"usingComponents":{"comp":"../comp"}}

+ 2 - 0
dist/pages/Clock.wxml

@@ -0,0 +1,2 @@
+<import src="../base.wxml"/>
+<template is="taro_tmpl" data="{{root:root}}" />

+ 0 - 1
dist/pages/H5.wxss

@@ -1 +0,0 @@
-/* pages/H5.wxss */

+ 58 - 0
dist/pages/Metric.js

@@ -0,0 +1,58 @@
+"use strict";
+(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Metric"],{
+
+/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Metric.tsx":
+/*!***************************************************************************************************!*\
+  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Metric.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_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 Page() {
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.View, {
+    className: "container",
+    children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_1__.Text, {
+      children: "Metric Page"
+    })
+  });
+}
+
+/***/ }),
+
+/***/ "./src/pages/Metric.tsx":
+/*!******************************!*\
+  !*** ./src/pages/Metric.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_Metric_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Metric.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Metric.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_Metric_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Metric', {root:{cn:[]}}, config || {}))
+
+
+/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Metric_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","common"], function() { return __webpack_exec__("./src/pages/Metric.tsx"); });
+/******/ var __webpack_exports__ = __webpack_require__.O();
+/******/ }
+]);
+//# sourceMappingURL=Metric.js.map

+ 1 - 0
dist/pages/Metric.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"pages/Metric.js","mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAGA;;;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://hola/._src_pages_Metric.tsx","webpack://hola/./src/pages/Metric.tsx?c429"],"sourcesContent":["import { View,Text } from \"@tarojs/components\";\n\nexport default function Page(){\n    return (\n        <View className=\"container\">\n            <Text>Metric Page</Text>\n        </View>\n    )\n}","import { createPageConfig } from '@tarojs/runtime'\nimport component from \"../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Metric.tsx\"\nvar config = {};\n\n\nvar inst = Page(createPageConfig(component, 'pages/Metric', {root:{cn:[]}}, config || {}))\n\n\nexport default component\n"],"names":[],"sourceRoot":""}

+ 1 - 0
dist/pages/Metric.json

@@ -0,0 +1 @@
+{"usingComponents":{"comp":"../comp"}}

+ 2 - 0
dist/pages/Metric.wxml

@@ -0,0 +1,2 @@
+<import src="../base.wxml"/>
+<template is="taro_tmpl" data="{{root:root}}" />

+ 41 - 26
dist/pages/Second.js → dist/pages/Profile.js

@@ -1,75 +1,90 @@
 "use strict";
-(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Second"],{
+(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/Profile"],{
 
-/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Second.tsx":
-/*!***************************************************************************************************!*\
-  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Second.tsx ***!
-  \***************************************************************************************************/
+/***/ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Profile.tsx":
+/*!****************************************************************************************************!*\
+  !*** ./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Profile.tsx ***!
+  \****************************************************************************************************/
 /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */   "default": function() { return /* binding */ Second; }
+/* harmony export */   "default": function() { return /* binding */ Page; }
 /* harmony export */ });
 /* harmony import */ var _components_Buttons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/components/Buttons */ "./src/components/Buttons.tsx");
 /* harmony import */ var _services_user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/services/user */ "./src/services/user.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_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
-/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_2__);
-/* 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__);
+/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
+/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
+/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_2__);
+/* 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 react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
+/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
 
 
 
 
 
 
-function Second() {
-  var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useDispatch)();
+
+function Page() {
+  var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useDispatch)();
+  var user = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useSelector)(function (state) {
+    return state.user;
+  });
   function logoutF() {
     dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_1__.logout)());
   }
   function clearF() {
     dispatch((0,_services_user__WEBPACK_IMPORTED_MODULE_1__.clear)());
   }
-  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
-    children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
+  function tapLogin() {
+    _tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default().navigateTo({
+      url: '/pages/ChooseAuth'
+    });
+  }
+  return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.View, {
+    className: "container",
+    children: [user.isLogin ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
       title: "\u9000\u51FA\u767B\u5F55",
       onClick: logoutF,
       style: {
         width: 289,
         marginBottom: 30
       }
-    }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
+    }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.Text, {
+      onClick: tapLogin,
+      children: "\u8BF7\u767B\u5F55"
+    }), user.isLogin ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_components_Buttons__WEBPACK_IMPORTED_MODULE_0__["default"], {
       title: "\u6CE8\u9500\u8D26\u53F7",
       onClick: clearF,
       style: {
         width: 289,
         marginBottom: 30
       }
-    })]
+    }) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_5__.Text, {})]
   });
 }
 
 /***/ }),
 
-/***/ "./src/pages/Second.tsx":
-/*!******************************!*\
-  !*** ./src/pages/Second.tsx ***!
-  \******************************/
+/***/ "./src/pages/Profile.tsx":
+/*!*******************************!*\
+  !*** ./src/pages/Profile.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_Second_tsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Second.tsx */ "./node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./src/pages/Second.tsx");
+/* 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");
 
 
 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_Second_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Second', {root:{cn:[]}}, 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_Profile_tsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/Profile', {root:{cn:[]}}, config || {}))
 
 
-/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_ruleSet_1_rules_5_use_0_Second_tsx__WEBPACK_IMPORTED_MODULE_1__["default"]);
+/* 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"]);
 
 
 /***/ })
@@ -77,8 +92,8 @@ var inst = Page((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createPageConfig
 },
 /******/ 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/Second.tsx"); });
+/******/ __webpack_require__.O(0, ["taro","vendors","common"], function() { return __webpack_exec__("./src/pages/Profile.tsx"); });
 /******/ var __webpack_exports__ = __webpack_require__.O();
 /******/ }
 ]);
-//# sourceMappingURL=Second.js.map
+//# sourceMappingURL=Profile.js.map

+ 1 - 0
dist/pages/Profile.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"pages/Profile.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAIA;;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://hola/._src_pages_Profile.tsx","webpack://hola/./src/pages/Profile.tsx?039d"],"sourcesContent":["import Buttons from \"@/components/Buttons\";\nimport { clear, logout } from \"@/services/user\";\nimport { View,Text } from \"@tarojs/components\";\nimport Taro from \"@tarojs/taro\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nexport default function Page(){\n    const dispatch = useDispatch();\n    const user = useSelector((state: any) => state.user);\n    \n    function logoutF(){\n        dispatch(logout() as any);\n    }\n\n    function clearF(){\n        dispatch(clear() as any);\n    }\n\n    function tapLogin(){\n        Taro.navigateTo({\n            url: '/pages/ChooseAuth'\n        })\n    }\n    return <View  className=\"container\">\n        {\n            user.isLogin?<Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />:\n            <Text onClick={tapLogin}>请登录</Text>\n        }\n        {\n            user.isLogin?<Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} />:\n            <Text></Text>\n        }\n        \n    </View>\n}","import { createPageConfig } from '@tarojs/runtime'\nimport component from \"../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Profile.tsx\"\nvar config = {};\n\n\nvar inst = Page(createPageConfig(component, 'pages/Profile', {root:{cn:[]}}, config || {}))\n\n\nexport default component\n"],"names":[],"sourceRoot":""}

+ 1 - 0
dist/pages/Profile.json

@@ -0,0 +1 @@
+{"usingComponents":{"comp":"../comp"}}

+ 2 - 0
dist/pages/Profile.wxml

@@ -0,0 +1,2 @@
+<import src="../base.wxml"/>
+<template is="taro_tmpl" data="{{root:root}}" />

+ 0 - 1
dist/pages/Second.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"pages/Second.js","mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://hola/._src_pages_Second.tsx","webpack://hola/./src/pages/Second.tsx?e2e5"],"sourcesContent":["import Buttons from \"@/components/Buttons\";\nimport { clear, logout } from \"@/services/user\";\nimport { View,Text } from \"@tarojs/components\";\nimport { useDispatch } from \"react-redux\";\n\nexport default function Second() {\n    const dispatch = useDispatch();\n    \n    function logoutF(){\n        dispatch(logout() as any);\n    }\n\n    function clearF(){\n        dispatch(clear() as any);\n    }\n    return <View>\n        <Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />\n        <Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} />\n    </View>\n}","import { createPageConfig } from '@tarojs/runtime'\nimport component from \"../../node_modules/babel-loader/lib/index.js??ruleSet[1].rules[5].use[0]!./Second.tsx\"\nvar config = {};\n\n\nvar inst = Page(createPageConfig(component, 'pages/Second', {root:{cn:[]}}, config || {}))\n\n\nexport default component\n"],"names":[],"sourceRoot":""}

+ 0 - 29
dist/pages/index/index.js

@@ -273,35 +273,6 @@ var staticResources = function staticResources() {
   };
 };
 
-/***/ }),
-
-/***/ "./src/services/permission.tsx":
-/*!*************************************!*\
-  !*** ./src/services/permission.tsx ***!
-  \*************************************/
-/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */   wxPubFollow: function() { return /* binding */ wxPubFollow; }
-/* harmony export */ });
-/* harmony import */ var _http_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./http/api */ "./src/services/http/api.js");
-/* harmony import */ var _http_request__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./http/request */ "./src/services/http/request.ts");
-
-
-var wxPubFollow = function wxPubFollow() {
-  return new Promise(function (resolve) {
-    (0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
-      url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_WX_PUB_FOLLOWED,
-      method: 'GET',
-      data: {}
-    }).then(function (res) {
-      resolve(res);
-      console.log(res);
-      // dispatch(loginSuccess(res));
-    });
-  });
-};
-
 /***/ })
 
 },

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/pages/index/index.js.map


+ 16 - 3
src/app.config.ts

@@ -1,5 +1,6 @@
 export default defineAppConfig({
   pages: [
+    'pages/Clock',
     'pages/index/index',
     'pages/Second',
     'pages/Login',
@@ -7,7 +8,10 @@ export default defineAppConfig({
     'pages/ChooseAuth',
     'pages/ChooseScenario',
     'pages/SetSchedule',
-    'pages/H5'
+    'pages/H5',
+    'pages/Profile',
+    'pages/Metric',
+    'pages/Activity',
   ],
   subPackages:[
     {
@@ -18,14 +22,23 @@ export default defineAppConfig({
     }
   ],
   tabBar: {
+    custom: true,
     list:[
       {
-        pagePath: 'pages/index/index',
+        pagePath: 'pages/Clock',
         text: '首页',
 
       },
       {
-        pagePath: 'pages/Second',
+        pagePath: 'pages/Metric',
+        text: '第二页',
+      },
+      {
+        pagePath: 'pages/Activity',
+        text: '第二页',
+      },
+      {
+        pagePath: 'pages/Profile',
         text: '第二页',
       }
     ]

+ 15 - 0
src/context/locales/en.js

@@ -34,6 +34,13 @@ export default {
         }
     },
     feature:{
+        tabbar:{
+            clock:'Clock',
+            metric:'Metric',
+            activity:'Activity',
+            nutrition:'Nutrition',
+            profile:'Profile'
+        },
         auth:{
             create_account:{
                 title:'Create Account',
@@ -57,6 +64,14 @@ export default {
                 input_password_confirm_placeholder:'Confirm Password',
                 btn_next:'Next'
             }
+        },
+        track_time_duration:{
+            action_sheet:{
+                change_schedule:'Change schedule',
+                switch_scenario:'Switch scenario',
+                give_up:'Give up',
+                cancel:'Cancel'
+            }
         }
     }
 }

+ 15 - 0
src/context/locales/zh.js

@@ -30,6 +30,13 @@ export default {
         },
     },
     feature:{
+        tabbar:{
+            clock:'时钟',
+            metric:'指标',
+            activity:'运动',
+            nutrition:'营养',
+            profile:'我'
+        },
         auth:{
             create_account:{
                 title:'注册账号',
@@ -53,6 +60,14 @@ export default {
                 input_password_confirm_placeholder:'确认密码',
                 btn_next:'下一步'
             }
+        },
+        track_time_duration:{
+            action_sheet:{
+                change_schedule:'调整日程',
+                switch_scenario:'切换场景',
+                give_up:'放弃终止',
+                cancel:'取消'
+            }
         }
     }
 }

+ 15 - 0
src/custom-tab-bar/index.scss

@@ -0,0 +1,15 @@
+
+.tabbar{
+    display: flex;
+    flex-direction: row;
+    justify-content: space-around;
+    // background-color: red;
+    padding-bottom: constant(safe-area-inset-bottom);
+    /* 兼容 iOS < 11.2 */
+    padding-bottom: env(safe-area-inset-bottom);
+}
+
+.tabbar-item{
+    color: #fff;
+    padding-top: 25px;
+}

+ 51 - 0
src/custom-tab-bar/index.tsx

@@ -0,0 +1,51 @@
+import { View,Text } from '@tarojs/components'
+import './index.scss'
+import { useTranslation } from 'react-i18next'
+import Taro from '@tarojs/taro'
+
+export default function TabBar() {
+    const { t } = useTranslation()
+
+    function switchTab(index: number) {
+        switch (index) {
+            case 0:
+                Taro.switchTab({
+                    url: '/pages/Clock'
+                })
+                break;
+            case 1:
+                Taro.switchTab({
+                    url: '/pages/Metric'
+                })
+                break;
+            case 2:
+                Taro.switchTab({
+                    url: '/pages/Activity'
+                })
+                break;
+            case 3:
+                Taro.switchTab({
+                    url: '/pages/Profile'
+                })
+                break;
+        }
+    }
+    return (
+        <View className='tabbar'>
+            <View className='tabbar-item' onClick={()=>switchTab(0)}>
+                <Text>{t('feature.tabbar.clock')}</Text>
+            </View>
+            <View className='tabbar-item'  onClick={()=>switchTab(1)}>
+
+                <Text>{t('feature.tabbar.metric')}</Text>
+            </View>
+            <View className='tabbar-item' onClick={()=>switchTab(2)}>
+
+                <Text>{t('feature.tabbar.activity')}</Text>
+            </View>
+            <View className='tabbar-item' onClick={()=>switchTab(3)}>
+                <Text>{t('feature.tabbar.profile')}</Text>
+            </View>
+        </View>
+    )
+}

+ 0 - 10
src/features/auth/components/Auth.tsx

@@ -1,15 +1,5 @@
-import { View, Text, Image } from "@tarojs/components";
-import Texts from "@components/Texts";
-import { ComponentStatus, TextType } from "@utils/types";
-import Box from "@components/Box";
-import Inputs from "@components/Inputs";
-import Buttons from '@components/Buttons'
-import check from '@assets/svg/check.svg'
-import { useTranslation } from 'react-i18next'
 import './Auth.scss'
 import { useState } from "react";
-import { useDispatch, useSelector } from "react-redux";
-import Taro from "@tarojs/taro";
 
 import Login from './Login'
 import CreateAccount from './CreateAccount'

+ 14 - 9
src/features/auth/components/CreatePassword.tsx

@@ -4,7 +4,7 @@ import Inputs from "@/components/Inputs";
 import Texts from "@/components/Texts";
 import { ComponentStatus, TextType } from "@/utils/types";
 import { View, Image, Text } from "@tarojs/components";
-import { useState } from "react";
+import { useEffect, useState } from "react";
 import { useTranslation } from "react-i18next";
 import { useDispatch, useSelector } from "react-redux";
 import check from '@assets/svg/check.svg'
@@ -28,6 +28,19 @@ export default function Component(prop: { name: string, email: string }) {
 
   const isButtonDisabled = password === '' || repeat === '';
 
+  const user = useSelector((state: any) => state.user);
+
+  useEffect(() => {
+    if (user.isLogin) {
+      Taro.navigateBack({
+        delta: 2
+      })
+      Taro.redirectTo({
+        url: '/pages/ChooseScenario'
+      })
+    }
+  }, [user.isLogin])
+
   function loginComponent() {
     return <View>
       <Inputs value={password} isSecure={true} onChange={handlePasswordChange} placeholder={t('feature.auth.create_password.input_password_placeholder')}></Inputs>
@@ -45,14 +58,6 @@ export default function Component(prop: { name: string, email: string }) {
       global.email,
       password
     ) as any);
-    setTimeout(() => {
-      Taro.navigateBack({
-        delta: 2
-      })
-      Taro.redirectTo({
-        url: '/pages/ChooseScenario'
-      })
-    }, 1000)
   }
 
   return <View style={{ backgroundColor: '#000', flex: 1, flexDirection: 'column', display: 'flex', width: '100vw', height: '100vh' }}>

+ 16 - 8
src/features/auth/components/login.tsx

@@ -20,15 +20,23 @@ export default function Login(props: { register: () => void }) {
     const user = useSelector((state: any) => state.user);
 
     useEffect(() => {
-        if (user.nickname) {
-            Taro.navigateBack({
-                delta: 1
-            })
-            Taro.redirectTo({
-                url: '/pages/ChooseScenario'
-            })
+        if (user.isLogin) {
+            if (user.scenario_select_count > 0) {
+                Taro.navigateBack({
+                    delta: 2
+                })
+            }
+            else {
+                Taro.navigateBack({
+                    delta: 1
+                })
+                Taro.redirectTo({
+                    url: '/pages/ChooseScenario'
+                })
+            }
+
         }
-    }, [user.nickname])
+    }, [user.isLogin])
 
     const handleNameChange = (value: string) => {
         setName(value);

+ 11 - 0
src/features/trackTimeDuration/components/Clock.tsx

@@ -0,0 +1,11 @@
+import Rings from "@/components/Rings";
+import { View,Text } from "@tarojs/components";
+
+export default function Component(){
+    return (
+        <View>
+            <Rings radius={50} />
+            <Text>Clock Component</Text>
+        </View>
+    )
+}

+ 9 - 0
src/features/trackTimeDuration/components/Console.tsx

@@ -0,0 +1,9 @@
+import { View,Text } from "@tarojs/components";
+
+export default function Component(){
+    return (
+        <View>
+            <Text>Console Component</Text>
+        </View>
+    )
+}

+ 49 - 0
src/features/trackTimeDuration/components/More.tsx

@@ -0,0 +1,49 @@
+import { View, Text } from "@tarojs/components";
+import Taro from "@tarojs/taro";
+import { useTranslation } from "react-i18next";
+
+export default function Component() {
+    const { t } = useTranslation()
+    function waitActionSheet() {
+        Taro.showActionSheet({
+            itemList: [t('feature.track_time_duration.action_sheet.change_schedule'), t('feature.track_time_duration.action_sheet.switch_scenario')]
+        })
+            .then(res => {
+                console.log(res.tapIndex)
+                switch(res.tapIndex){
+                    case 0:
+                        Taro.navigateTo({
+                            url:'/pages/SetSchedule'
+                        })
+                        break;
+                    case 1:
+                        Taro.navigateTo({
+                            url:'/pages/ChooseScenario'
+                        })
+                        break;
+                }
+            })
+            .catch(err => {
+                console.log(err.errMsg)
+            })
+    }
+
+
+    function ongoingActionSheet() {
+        Taro.showActionSheet({
+            itemList: [t('feature.track_time_duration.action_sheet.give_up'), t('feature.track_time_duration.action_sheet.switch_scenario')]
+        })
+            .then(res => {
+                console.log(res.tapIndex)
+            })
+            .catch(err => {
+                console.log(err.errMsg)
+            })
+    }
+
+    return (
+        <View>
+            <Text onClick={waitActionSheet}>More Component</Text>
+        </View>
+    )
+}

+ 9 - 0
src/pages/Activity.tsx

@@ -0,0 +1,9 @@
+import { View,Text } from "@tarojs/components";
+
+export default function Page(){
+    return (
+        <View className="container">
+            <Text>Activity Page</Text>
+        </View>
+    )
+}

+ 20 - 8
src/pages/ChooseAuth.tsx

@@ -5,7 +5,7 @@ import './ChooseAuth.scss'
 import { ButtonType, ComponentStatus, TextType } from "../utils/types";
 import Taro, { useReady } from "@tarojs/taro";
 import { useDispatch, useSelector } from "react-redux";
-import { useState } from "react";
+import { useEffect, useState } from "react";
 import { wxLogin } from "@/services/user";
 
 export default function Page() {
@@ -13,6 +13,24 @@ export default function Page() {
     const counter = useSelector((state: any) => state.counter.value);
     var code = '';
 
+    const user = useSelector((state: any) => state.user);
+
+    useEffect(() => {
+        if (user.isLogin) {
+            if (user.scenario_select_count > 0) {
+                Taro.navigateBack({
+                    delta: 1
+                })
+            }
+            else {
+                Taro.redirectTo({
+                    url: '/pages/ChooseScenario'
+                })
+            }
+
+        }
+    }, [user.isLogin])
+
     useReady(() => {
         Taro.login().then(res => {
             code = res.code;
@@ -23,18 +41,12 @@ export default function Page() {
 
     async function login() {
         try {
-            const {  encryptedData, iv } = await Taro.getUserProfile({
+            const { encryptedData, iv } = await Taro.getUserProfile({
                 desc: '获取用户信息',
             });
 
             dispatch(wxLogin(code, encryptedData, iv) as any);
 
-            setTimeout(() => {
-                Taro.redirectTo({
-                    url: '/pages/ChooseScenario'
-                })
-            }, 1000)
-
             // 在这里处理用户信息
         } catch (error) {
             console.log('获取用户信息失败:', error);

+ 0 - 0
src/pages/Me.tsx


+ 9 - 0
src/pages/Metric.tsx

@@ -0,0 +1,9 @@
+import { View,Text } from "@tarojs/components";
+
+export default function Page(){
+    return (
+        <View className="container">
+            <Text>Metric Page</Text>
+        </View>
+    )
+}

+ 35 - 0
src/pages/Profile.tsx

@@ -0,0 +1,35 @@
+import Buttons from "@/components/Buttons";
+import { clear, logout } from "@/services/user";
+import { View,Text } from "@tarojs/components";
+import Taro from "@tarojs/taro";
+import { useDispatch, useSelector } from "react-redux";
+
+export default function Page(){
+    const dispatch = useDispatch();
+    const user = useSelector((state: any) => state.user);
+    
+    function logoutF(){
+        dispatch(logout() as any);
+    }
+
+    function clearF(){
+        dispatch(clear() as any);
+    }
+
+    function tapLogin(){
+        Taro.navigateTo({
+            url: '/pages/ChooseAuth'
+        })
+    }
+    return <View  className="container">
+        {
+            user.isLogin?<Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />:
+            <Text onClick={tapLogin}>请登录</Text>
+        }
+        {
+            user.isLogin?<Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} />:
+            <Text></Text>
+        }
+        
+    </View>
+}

+ 0 - 20
src/pages/Second.tsx

@@ -1,20 +0,0 @@
-import Buttons from "@/components/Buttons";
-import { clear, logout } from "@/services/user";
-import { View,Text } from "@tarojs/components";
-import { useDispatch } from "react-redux";
-
-export default function Second() {
-    const dispatch = useDispatch();
-    
-    function logoutF(){
-        dispatch(logout() as any);
-    }
-
-    function clearF(){
-        dispatch(clear() as any);
-    }
-    return <View>
-        <Buttons title='退出登录' onClick={logoutF} style={{ width: 289, marginBottom: 30 }} />
-        <Buttons title='注销账号' onClick={clearF} style={{ width: 289, marginBottom: 30 }} />
-    </View>
-}

+ 132 - 0
src/pages/clock.tsx

@@ -0,0 +1,132 @@
+import { Component, PropsWithChildren, useEffect } from 'react'
+import { View, Text, Button, Input } from '@tarojs/components'
+import './index/index.scss'
+import Taro, { useDidShow, useReady, useRouter } from '@tarojs/taro'
+// import ComponentA from './component'
+import Rings from '@components/Rings';
+import SingleSelect from '@components/SingleSelect';
+import { useDispatch, useSelector } from 'react-redux';
+import { getInfoSuccess } from '@/store/user';
+import { wxPubFollow } from '@/services/permission';
+import { staticResources } from '@/services/common';
+import { use } from 'i18next';
+import Clocks from '@/features/trackTimeDuration/components/Clock';
+import Console from '@/features/trackTimeDuration/components/Console';
+import More from '@/features/trackTimeDuration/components/More';
+import { getChecks } from '@/services/trackTimeDuration';
+// import TabBar from '../../components/Tabbar';
+
+export default function IndexPage() {
+  const dispatch = useDispatch();
+  const array: any[] = []
+  const user = useSelector((state: any) => state.user);
+  const permission = useSelector((state: any) => state.permission);
+  const common = useSelector((state: any) => state.common);
+  array.push('ffff');
+  array.push(<Text>ffff</Text>)
+  // array.push(<Rings radius={50}/>)
+
+
+
+
+  useReady(async () => {
+    const userData = await getStorage('userData');
+    if (userData) {
+      dispatch(getInfoSuccess(JSON.parse(userData as string)) as any);
+      // return JSON.parse(userData as string) as UserState;
+      setTimeout(() => {
+        checkWXPubFollow()
+        getCheckData()
+      }, 200)
+    }
+  })
+
+  useDidShow(() => {
+    if (user.isLogin)
+      getCheckData();
+  })
+
+  function getCheckData(){
+    getChecks().then(res => {
+      console.log(res);
+    })
+  }
+
+  function checkWXPubFollow() {
+    wxPubFollow().then(res => {
+      console.log(res);
+    })
+  }
+
+  function followWxPub() {
+    const resource = common.resources.filter((item: any) => {
+      return item.code == 'follow_wx_pub'
+    })
+
+    Taro.showModal({
+      title: '提示',
+      content: '关注公众号后可接收提醒\n点击确定,前往关注',
+      showCancel: true,
+      success(result) {
+        if (result.confirm) {
+          Taro.navigateTo({
+            url: '/pages/H5?title=fast16cc 关注服务号&url=' + resource[0].url,
+          })
+        }
+      },
+    })
+  }
+
+
+  async function getStorage(key: string) {
+    try {
+      const res = await Taro.getStorage({ key });
+      return res.data;
+    } catch {
+      return '';
+    }
+  }
+
+  function goDetail() {
+    Taro.navigateTo({
+      // url: '/pages/index/detail'
+      //src/moduleA/pages/third.tsx
+      url: '../../moduleA/pages/third'
+    })
+  }
+
+  function login() {
+    if (user.isLogin) {
+      Taro.navigateTo({
+        url: '/pages/ChooseScenario'
+      })
+    }
+    else {
+      Taro.navigateTo({
+        url: '/pages/ChooseAuth'
+      })
+    }
+
+  }
+  return (
+    <View style={{ backgroundColor: '#fff', flex: 1, flexDirection: 'column', display: 'flex' }}>
+      <Text>homepage122345</Text>
+      <Text>{user.isLogin ? '已登录' : '未登录'}</Text>
+      <Text>{user.isLogin ? `用户昵称:${user.nickname}` : ''}</Text>
+      {
+        permission.wxPubFollow == false && <Text onClick={() => followWxPub()}>去关注公众号</Text>
+      }
+      {/* <ComponentA value="ABBBB" /> */}
+      <Button onClick={() => goDetail()}>go detail</Button>
+      {/* <SingleSelect items={array}></SingleSelect> */}
+
+      {/* <Input placeholder="请输入用户名1" style={{ textAlign: 'left', backgroundColor: 'pink' }} /> */}
+      <Text className='login' onClick={() => login()}>sss</Text>
+      {/* <TabBar /> */}
+      <Clocks />
+      <Console />
+      <More />
+
+    </View>
+  )
+}

+ 1 - 1
src/services/http/api.js

@@ -11,7 +11,7 @@ export const API_OAUTH_LOGIN = `${baseUrl}/api/user/oauth2/login`
 export const API_LOGIN = `${baseUrl}/api/user/login/password`
 export const API_REGISTER = `${baseUrl}/api/user/account`
 export const API_LOGOUT = `${baseUrl}/api/user/logout`
-export const API_CLEAR_USER = `${baseUrl}/api/clear/user`
+export const API_CLEAR_USER = `${baseUrl}/api/user/account`
 export const API_STATIC_RESOURCES = `${baseUrl}/api/static-resource-urls`
 export const API_USER_INFO = `${baseUrl}/api/user/info`
 export const API_CLEAR_FAST = `${baseUrl}/api/clear/fasting`

+ 14 - 2
src/services/trackTimeDuration.tsx

@@ -1,4 +1,4 @@
-import { API_FAST_PLANS } from './http/api'
+import { API_FAST_PLANS, API_FAST_CHECKS } from './http/api'
 import { request } from './http/request';
 
 export const getPlans = () => {
@@ -16,7 +16,19 @@ export const getPlans = () => {
 export const setPlan = (params: Record<string, any> | undefined) => {
     return new Promise((resolve) => {
         request({
-            url: API_FAST_PLANS, method: 'POST', data: {...params}
+            url: API_FAST_PLANS, method: 'POST', data: { ...params }
+        }).then(res => {
+            resolve(res);
+            console.log(res);
+            // dispatch(loginSuccess(res));
+        })
+    })
+}
+
+export const getChecks = () => {
+    return new Promise((resolve) => {
+        request({
+            url: API_FAST_CHECKS, method: 'GET', data: {}
         }).then(res => {
             resolve(res);
             console.log(res);

+ 1 - 1
src/services/user.tsx

@@ -73,7 +73,7 @@ export const logout = () => (dispatch: any) => {
 
 export const clear = () => (dispatch: any) => {
     request({
-        url: API_CLEAR_USER, method: 'POST', data: {}
+        url: API_CLEAR_USER, method: 'DELETE', data: {}
     }).then(_ => {
         dispatch(clearSuccess());
     })

+ 3 - 1
src/store/user.tsx

@@ -1,9 +1,10 @@
-import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit';
+import {createSlice, PayloadAction } from '@reduxjs/toolkit';
 import Taro from '@tarojs/taro';
 interface UserState {
     nickname: string | null;
     avatar: string | null;
     token: string | null;
+    scenario_select_count: number |  0;
     isLogin: boolean;
 }
 
@@ -13,6 +14,7 @@ const initialState: UserState = {
     isLogin: false,
     nickname: null,
     avatar: null,
+    scenario_select_count: 0,
     token: null,
 }
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff