|
|
@@ -10,7 +10,7 @@
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "default": function() { return /* binding */ Buttons; }
|
|
|
/* harmony export */ });
|
|
|
-/* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
|
|
|
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
|
|
|
/* 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 _utils_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts");
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
|
|
@@ -25,10 +25,10 @@ function Buttons(props) {
|
|
|
opacity: 0.4
|
|
|
} : {};
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
|
|
|
- style: (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, myStyle),
|
|
|
+ style: (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, myStyle),
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|
|
|
className: props.type == _utils_types__WEBPACK_IMPORTED_MODULE_0__.ButtonType.outline ? 'outline_btn' : 'btn',
|
|
|
- style: (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, props.style),
|
|
|
+ style: (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, props.style),
|
|
|
onClick: props.onClick,
|
|
|
children: props.title
|
|
|
})
|
|
|
@@ -163,7 +163,7 @@ function Rings(props) {
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "default": function() { return /* binding */ Component; }
|
|
|
/* harmony export */ });
|
|
|
-/* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
|
|
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
|
|
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
@@ -179,7 +179,7 @@ function Rings(props) {
|
|
|
|
|
|
function Component(props) {
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
|
|
|
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_useState, 2),
|
|
|
+ _useState2 = (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_useState, 2),
|
|
|
selIndex = _useState2[0],
|
|
|
setSelIndex = _useState2[1];
|
|
|
function isString(variable) {
|
|
|
@@ -277,16 +277,18 @@ function Component(props) {
|
|
|
/* harmony export */ API_LOGOUT: function() { return /* binding */ API_LOGOUT; },
|
|
|
/* harmony export */ API_OAUTH_LOGIN: function() { return /* binding */ API_OAUTH_LOGIN; },
|
|
|
/* harmony export */ API_REGISTER: function() { return /* binding */ API_REGISTER; },
|
|
|
-/* harmony export */ API_USER_INFO: function() { return /* binding */ API_USER_INFO; }
|
|
|
+/* harmony export */ API_STATIC_RESOURCES: function() { return /* binding */ API_STATIC_RESOURCES; },
|
|
|
+/* 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_WX_PUB_FOLLOWED, API_STATIC_RESOURCES, 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_CHECKS, 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/';
|
|
|
|
|
|
//common
|
|
|
var API_ADJUST_TIMES = "".concat(baseUrl, "/api/fast/adjust-times");
|
|
|
-var API_WX_PUB_FOLLOWED = "".concat(baseUrl, "/api/fast/user/wx-pub-followed");
|
|
|
+// export const API_WX_PUB_FOLLOWED = `${baseUrl}/api/fast/user/wx-pub-followed`
|
|
|
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");
|
|
|
@@ -311,6 +313,9 @@ var API_FAST_CALENDARS = "".concat(baseUrl, "/api/fast/calendars/");
|
|
|
|
|
|
//journal
|
|
|
|
|
|
+//permissions
|
|
|
+var API_WX_PUB_FOLLOWED = "".concat(baseUrl, "/api/fast/user/wx-pub-followed");
|
|
|
+
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ "./src/services/http/request.ts":
|
|
|
@@ -322,8 +327,8 @@ var API_FAST_CALENDARS = "".concat(baseUrl, "/api/fast/calendars/");
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ request: function() { return /* binding */ request; }
|
|
|
/* harmony export */ });
|
|
|
-/* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js */ "./node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js");
|
|
|
-/* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");
|
|
|
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__ = __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_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.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__);
|
|
|
|
|
|
@@ -334,9 +339,9 @@ function getStorage(_x) {
|
|
|
return _getStorage.apply(this, arguments);
|
|
|
}
|
|
|
function _getStorage() {
|
|
|
- _getStorage = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee(key) {
|
|
|
+ _getStorage = (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee(key) {
|
|
|
var res;
|
|
|
- return (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee$(_context) {
|
|
|
+ return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.prev = 0;
|
|
|
@@ -425,9 +430,9 @@ function request(_x2) {
|
|
|
// }
|
|
|
// };
|
|
|
function _request() {
|
|
|
- _request = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee2(param) {
|
|
|
+ _request = (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/(0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().mark(function _callee2(param) {
|
|
|
var url, method, data, header, token, split, timeZoneFormatted;
|
|
|
- return (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee2$(_context2) {
|
|
|
+ return (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__["default"])().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
url = param.url, method = param.method, data = param.data;
|
|
|
@@ -515,14 +520,14 @@ function _request() {
|
|
|
/* harmony export */ getPlans: function() { return /* binding */ getPlans; },
|
|
|
/* harmony export */ setPlan: function() { return /* binding */ setPlan; }
|
|
|
/* harmony export */ });
|
|
|
-/* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
|
|
|
+/* harmony import */ var _Users_Work_taro_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
|
|
|
/* 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 getPlans = function getPlans() {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
+ return new Promise(function (resolve) {
|
|
|
(0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
|
|
|
url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_PLANS,
|
|
|
method: 'GET',
|
|
|
@@ -536,11 +541,11 @@ var getPlans = function getPlans() {
|
|
|
};
|
|
|
|
|
|
var setPlan = function setPlan(params) {
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
+ return new Promise(function (resolve) {
|
|
|
(0,_http_request__WEBPACK_IMPORTED_MODULE_1__.request)({
|
|
|
url: _http_api__WEBPACK_IMPORTED_MODULE_0__.API_FAST_PLANS,
|
|
|
method: 'POST',
|
|
|
- data: (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__["default"])({}, params)
|
|
|
+ data: (0,_Users_Work_taro_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__["default"])({}, params)
|
|
|
}).then(function (res) {
|
|
|
resolve(res);
|
|
|
console.log(res);
|
|
|
@@ -699,9 +704,39 @@ var update = function update() {
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
-/***/ "./src/store/schedule.tsx":
|
|
|
+/***/ "./src/store/common.tsx":
|
|
|
+/*!******************************!*\
|
|
|
+ !*** ./src/store/common.tsx ***!
|
|
|
+ \******************************/
|
|
|
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
+
|
|
|
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
+/* harmony export */ setResources: function() { return /* binding */ setResources; }
|
|
|
+/* harmony export */ });
|
|
|
+/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "webpack/container/remote/@reduxjs/toolkit");
|
|
|
+/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
+
|
|
|
+var initialState = {
|
|
|
+ resources: []
|
|
|
+};
|
|
|
+var commonSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
|
|
|
+ name: 'permission',
|
|
|
+ initialState: initialState,
|
|
|
+ reducers: {
|
|
|
+ setResources: function setResources(state, action) {
|
|
|
+ state.resources = action.payload;
|
|
|
+ }
|
|
|
+ }
|
|
|
+});
|
|
|
+/* harmony default export */ __webpack_exports__["default"] = (commonSlice.reducer);
|
|
|
+var setResources = commonSlice.actions.setResources;
|
|
|
+
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+
|
|
|
+/***/ "./src/store/scenario.tsx":
|
|
|
/*!********************************!*\
|
|
|
- !*** ./src/store/schedule.tsx ***!
|
|
|
+ !*** ./src/store/scenario.tsx ***!
|
|
|
\********************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
@@ -716,8 +751,8 @@ var initialState = {
|
|
|
scenario: null,
|
|
|
schedule: null
|
|
|
};
|
|
|
-var scheduleSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
|
|
|
- name: 'user',
|
|
|
+var scenarioSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({
|
|
|
+ name: 'schedule',
|
|
|
initialState: initialState,
|
|
|
reducers: {
|
|
|
setScenario: function setScenario(state, action) {
|
|
|
@@ -744,11 +779,11 @@ var scheduleSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-/* harmony default export */ __webpack_exports__["default"] = (scheduleSlice.reducer);
|
|
|
-var _scheduleSlice$action = scheduleSlice.actions,
|
|
|
- setScenario = _scheduleSlice$action.setScenario,
|
|
|
- setFastSchedule = _scheduleSlice$action.setFastSchedule,
|
|
|
- setSleepSchedule = _scheduleSlice$action.setSleepSchedule;
|
|
|
+/* harmony default export */ __webpack_exports__["default"] = (scenarioSlice.reducer);
|
|
|
+var _scenarioSlice$action = scenarioSlice.actions,
|
|
|
+ setScenario = _scenarioSlice$action.setScenario,
|
|
|
+ setFastSchedule = _scenarioSlice$action.setFastSchedule,
|
|
|
+ setSleepSchedule = _scenarioSlice$action.setSleepSchedule;
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
@@ -967,6 +1002,7 @@ var _userSlice$actions = userSlice.actions,
|
|
|
var ButtonType = /*#__PURE__*/function (ButtonType) {
|
|
|
ButtonType["primary"] = "primary";
|
|
|
ButtonType["outline"] = "outline";
|
|
|
+ ButtonType["more"] = "more";
|
|
|
return ButtonType;
|
|
|
}({});
|
|
|
var TextType = /*#__PURE__*/function (TextType) {
|