|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[68150],{
|
|
|
|
|
|
/***/ 37218:
|
|
|
/*!******************************************************************!*\
|
|
|
!*** ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx ***!
|
|
|
\******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 8591);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 92832);
|
|
|
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 99267);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
//创建战队弹窗
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Addteans(_ref) {
|
|
|
var isAddmodle = _ref.isAddmodle,
|
|
|
setIsAdd = _ref.setIsAdd,
|
|
|
createTeam = _ref.createTeam;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
|
|
|
personname = _useState2[0],
|
|
|
setpersonname = _useState2[1];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
|
|
className: "modal_styles",
|
|
|
centered: true,
|
|
|
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
|
|
style: {
|
|
|
alignItems: 'center',
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
|
|
style: {
|
|
|
textAlign: 'left',
|
|
|
flex: '1'
|
|
|
},
|
|
|
children: "\u521B\u5EFA\u6218\u961F"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
|
|
|
onClick: function onClick() {
|
|
|
return setIsAdd(false);
|
|
|
},
|
|
|
style: {
|
|
|
cursor: 'porint'
|
|
|
}
|
|
|
})]
|
|
|
}),
|
|
|
open: isAddmodle,
|
|
|
closable: false,
|
|
|
destroyOnClose: true,
|
|
|
onOk: function onOk() {
|
|
|
if (!personname) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info('战队名不能为空');
|
|
|
return;
|
|
|
}
|
|
|
createTeam(personname);
|
|
|
},
|
|
|
onCancel: function onCancel() {
|
|
|
return setIsAdd(false);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
|
|
|
style: {
|
|
|
fontSize: '14px',
|
|
|
color: '#F73737',
|
|
|
marginLeft: '10px'
|
|
|
},
|
|
|
children: "*"
|
|
|
}), "\u961F\u540D\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("p", {
|
|
|
style: {
|
|
|
marginTop: '15px',
|
|
|
marginLeft: '10px',
|
|
|
marginRight: '10px'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
|
placeholder: "请输入队名",
|
|
|
value: personname,
|
|
|
maxLength: 60,
|
|
|
addonAfter: String(personname && personname.length || 0) + "/60",
|
|
|
onChange: function onChange(e) {
|
|
|
return setpersonname(e.target.value);
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Addteans);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 708:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./src/pages/Competitions/Entered/Enteredmodel/JoinModel.tsx ***!
|
|
|
\*******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 8591);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 92832);
|
|
|
/* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @ant-design/icons */ 99267);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
//通过邀请码加入战队
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Jointeam(_ref) {
|
|
|
var isjoin = _ref.isjoin,
|
|
|
setJoin = _ref.setJoin,
|
|
|
JoinTeams = _ref.JoinTeams;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(""),
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
|
|
|
code = _useState2[0],
|
|
|
setCode = _useState2[1];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
|
|
className: "modal_styles",
|
|
|
centered: true,
|
|
|
title: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("div", {
|
|
|
style: {
|
|
|
alignItems: 'center',
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
|
|
style: {
|
|
|
textAlign: 'left',
|
|
|
flex: '1'
|
|
|
},
|
|
|
children: "\u52A0\u5165\u6218\u961F"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_ant_design_icons__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
|
|
|
onClick: function onClick() {
|
|
|
return setJoin(false);
|
|
|
},
|
|
|
style: {
|
|
|
cursor: 'porint'
|
|
|
}
|
|
|
})]
|
|
|
}),
|
|
|
open: isjoin,
|
|
|
closable: false,
|
|
|
destroyOnClose: true,
|
|
|
onOk: function onOk() {
|
|
|
if (!code) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .ZP.info('邀请码不能为空');
|
|
|
return;
|
|
|
}
|
|
|
JoinTeams(code);
|
|
|
},
|
|
|
onCancel: function onCancel() {
|
|
|
return setJoin(false);
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("p", {
|
|
|
style: {
|
|
|
marginLeft: '10px',
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
marginRight: '10px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("span", {
|
|
|
style: {
|
|
|
flex: 'none'
|
|
|
},
|
|
|
children: "\u9080\u8BF7\u7801\uFF1A"
|
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
|
placeholder: "请输入邀请码",
|
|
|
value: code,
|
|
|
maxLength: 60,
|
|
|
addonAfter: String(code && code.length || 0) + "/60",
|
|
|
onChange: function onChange(e) {
|
|
|
return setCode(e.target.value);
|
|
|
}
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Jointeam);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 84088:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/pages/Competitions/components/PhoneModal.tsx ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 8591);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 92832);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/fetch */ 55794);
|
|
|
/* harmony import */ var _utils_hooks_useInterval__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/hooks/useInterval */ 78079);
|
|
|
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/util */ 20681);
|
|
|
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/utils/env */ 14160);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var phoneReg = /^1\d{10}$/;
|
|
|
function Addmodal(_ref) {
|
|
|
var isShowPhone = _ref.isShowPhone,
|
|
|
setIsShowPhone = _ref.setIsShowPhone,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch,
|
|
|
onOK = _ref.onOK,
|
|
|
isopen = _ref.isopen,
|
|
|
setisopen = _ref.setisopen,
|
|
|
datas = _ref.datas;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
|
phone = _useState2[0],
|
|
|
setphone = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
|
_useState4 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),
|
|
|
PhoneValue = _useState4[0],
|
|
|
setPhoneValue = _useState4[1];
|
|
|
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(60),
|
|
|
_useState6 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),
|
|
|
countdown = _useState6[0],
|
|
|
setCountdown = _useState6[1];
|
|
|
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(),
|
|
|
_useState8 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),
|
|
|
countdownFlag = _useState8[0],
|
|
|
setCountdownFlag = _useState8[1];
|
|
|
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
|
_useState10 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),
|
|
|
isShowPoint = _useState10[0],
|
|
|
setIsShowPoint = _useState10[1];
|
|
|
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
|
_useState12 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState11, 2),
|
|
|
isShowUntie = _useState12[0],
|
|
|
setIsShowUntie = _useState12[1];
|
|
|
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),
|
|
|
_useState14 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState13, 2),
|
|
|
UntieValue = _useState14[0],
|
|
|
setUntieValue = _useState14[1];
|
|
|
var intervalId = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)();
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
|
|
return function () {
|
|
|
intervalId.current && clearInterval(intervalId.current);
|
|
|
};
|
|
|
}, []);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
|
|
if (isopen) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.success('报名成功,获得10积分');
|
|
|
}
|
|
|
}, [isopen]);
|
|
|
(0,_utils_hooks_useInterval__WEBPACK_IMPORTED_MODULE_5__/* .useInterval */ .Y)(function () {
|
|
|
if (!countdownFlag) {
|
|
|
return;
|
|
|
} else {
|
|
|
setCountdown(60);
|
|
|
}
|
|
|
if (countdown > 0) {
|
|
|
setCountdown(countdown - 1);
|
|
|
} else {
|
|
|
setCountdown(60);
|
|
|
setCountdownFlag(false);
|
|
|
intervalId.current && clearInterval(intervalId.current);
|
|
|
}
|
|
|
}, 1000);
|
|
|
var handleGetCode = /*#__PURE__*/function () {
|
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
|
var _user$userInfo;
|
|
|
var data, smscode, res;
|
|
|
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP)("/api/users/accounts/".concat((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/valid_phone.json"), {
|
|
|
method: 'get',
|
|
|
params: {
|
|
|
phone: phone
|
|
|
}
|
|
|
});
|
|
|
case 2:
|
|
|
data = _context.sent;
|
|
|
if (!((data === null || data === void 0 ? void 0 : data.status) === -1)) {
|
|
|
_context.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
return _context.abrupt("return");
|
|
|
case 5:
|
|
|
if (!(data !== null && data !== void 0 && data.is_exists)) {
|
|
|
_context.next = 8;
|
|
|
break;
|
|
|
}
|
|
|
setIsShowPoint(true);
|
|
|
return _context.abrupt("return");
|
|
|
case 8:
|
|
|
smscode = (0,_utils_util__WEBPACK_IMPORTED_MODULE_6__/* .setmiyah */ .M)(phone);
|
|
|
_context.next = 11;
|
|
|
return dispatch({
|
|
|
type: 'account/getCode',
|
|
|
payload: {
|
|
|
login: phone,
|
|
|
type: 3,
|
|
|
smscode: smscode
|
|
|
}
|
|
|
});
|
|
|
case 11:
|
|
|
res = _context.sent;
|
|
|
if (res.status === 1) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码已发送,请注意查收');
|
|
|
setCountdownFlag(true);
|
|
|
}
|
|
|
case 13:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleGetCode() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
|
title: "\u5F3A\u5236\u89E3\u7ED1",
|
|
|
open: isShowUntie,
|
|
|
onCancel: function onCancel() {
|
|
|
return setIsShowUntie(false);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2() {
|
|
|
var _user$userInfo2;
|
|
|
var data;
|
|
|
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (UntieValue) {
|
|
|
_context2.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码不能为空');
|
|
|
return _context2.abrupt("return");
|
|
|
case 3:
|
|
|
_context2.next = 5;
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP)("/api/users/accounts/".concat(user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login, "/phone_force_unbind.json"), {
|
|
|
method: 'POST',
|
|
|
body: {
|
|
|
code: UntieValue,
|
|
|
phone: phone
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
data = _context2.sent;
|
|
|
if ((data === null || data === void 0 ? void 0 : data.status) === 0) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('解绑成功');
|
|
|
setCountdownFlag(false);
|
|
|
setIsShowUntie(false);
|
|
|
onOK();
|
|
|
setIsShowPhone(false);
|
|
|
setUntieValue('');
|
|
|
}
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
})),
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
style: {
|
|
|
padding: '8px 24px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
|
children: "\u82E5\u539F\u8D26\u53F7\u53EA\u6709\u7ED1\u5B9A\u4E86\u624B\u673A\u53F7\u4E00\u79CD\u767B\u5F55\u65B9\u5F0F\uFF0C\u5F3A\u5236\u89E3\u7ED1\u540E\u4F1A\u5BFC\u81F4\u539F\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF0C\u8BF7\u786E\u5B9A\u662F\u5426\u5F3A\u5236\u89E3\u7ED1"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
|
children: ["\u4F60\u7684\u624B\u673A\u53F7\uFF1A", phone]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
|
children: ["\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
|
value: UntieValue,
|
|
|
size: 'middle',
|
|
|
onChange: function onChange(e) {
|
|
|
return setUntieValue(e.target.value);
|
|
|
},
|
|
|
style: {
|
|
|
width: '240px'
|
|
|
}
|
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, {
|
|
|
disabled: countdownFlag,
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3() {
|
|
|
var smscode, res;
|
|
|
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
smscode = (0,_utils_util__WEBPACK_IMPORTED_MODULE_6__/* .setmiyah */ .M)(phone);
|
|
|
_context3.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'account/getCode',
|
|
|
payload: {
|
|
|
login: phone,
|
|
|
type: 10,
|
|
|
smscode: smscode
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context3.sent;
|
|
|
if (res.status === 1) {
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info('验证码已发送,请注意查收');
|
|
|
setCountdownFlag(true);
|
|
|
}
|
|
|
case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
})),
|
|
|
children: countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码'
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
|
title: "\u63D0\u793A",
|
|
|
open: isShowPoint,
|
|
|
onCancel: function onCancel() {
|
|
|
setIsShowPoint(false);
|
|
|
},
|
|
|
okText: "\u8FDB\u884C\u5F3A\u5236\u89E3\u7ED1",
|
|
|
okButtonProps: {
|
|
|
type: "primary",
|
|
|
ghost: true,
|
|
|
style: {
|
|
|
width: "124px"
|
|
|
}
|
|
|
},
|
|
|
onOk: function onOk() {
|
|
|
setIsShowUntie(true);
|
|
|
setIsShowPoint(false);
|
|
|
}
|
|
|
// footer={<div>
|
|
|
// <Button style={{textAlign:'end'}} type="primary" onClick={()=>setIsShowModal(false)}>确 定</Button>
|
|
|
// </div>}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
style: {
|
|
|
padding: '7px 24px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
|
children: "\u8BE5\u624B\u673A\u53F7\u5DF2\u7ECF\u88AB\u7ED1\u5B9A\u8D26\u53F7\uFF0C\u5982\u679C\u9700\u8981\u5C06\u8BE5\u624B\u673A\u53F7\u7ED1\u5B9A\u5728\u5F53\u524D\u8D26\u53F7\u4E0A\uFF0C\u4F60\u53EF\u4EE5\u8FDB\u884C\u4E0B\u65B9\u4EFB\u610F\u4E00\u79CD\u89E3\u7ED1\u64CD\u4F5C\uFF1A"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
|
style: {
|
|
|
marginTop: '1em',
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
|
style: {
|
|
|
flex: '1'
|
|
|
},
|
|
|
children: "1\u3001\u4F7F\u7528\u8BE5\u624B\u673A\u53F7\u767B\u5F55\u5E73\u53F0\u8FDB\u884C\u89E3\u7ED1\uFF0C\u518D\u5C06\u624B\u673A\u53F7\u7ED1\u5B9A\u5F53\u524D\u8D26\u53F7\u4E0A\u3002"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
|
style: {
|
|
|
marginTop: '1em',
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("span", {
|
|
|
style: {
|
|
|
flex: '1'
|
|
|
},
|
|
|
children: "2\u3001\u5F3A\u5236\u89E3\u7ED1\uFF08\u5F3A\u5236\u89E3\u7ED1\u53EF\u80FD\u4F1A\u5BFC\u81F4\u89E3\u7ED1\u8D26\u53F7\u65E0\u6CD5\u767B\u5F55\uFF09"
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
|
title: "\u7ED1\u5B9A\u624B\u673A\u53F7",
|
|
|
open: isShowPhone,
|
|
|
onCancel: function onCancel() {
|
|
|
return setIsShowPhone(false);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4() {
|
|
|
var _ref6, login, res;
|
|
|
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
if (phoneReg.test(phone)) {
|
|
|
_context4.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入有效的11位手机号码");
|
|
|
return _context4.abrupt("return");
|
|
|
case 3:
|
|
|
if (PhoneValue) {
|
|
|
_context4.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入验证码");
|
|
|
return _context4.abrupt("return");
|
|
|
case 6:
|
|
|
_ref6 = user.userInfo || {}, login = _ref6.login;
|
|
|
_context4.next = 9;
|
|
|
return dispatch({
|
|
|
type: 'account/bindPhone',
|
|
|
payload: {
|
|
|
login: login,
|
|
|
phone: phone,
|
|
|
code: PhoneValue
|
|
|
}
|
|
|
});
|
|
|
case 9:
|
|
|
res = _context4.sent;
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
setIsShowPhone(false);
|
|
|
onOK();
|
|
|
}
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})),
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
style: {
|
|
|
padding: '8px 24px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
|
children: "\u5E73\u53F0\u5DF2\u68C0\u6D4B\u5230\u60A8\u672A\u7ED1\u5B9A\u624B\u673A\u53F7\uFF0C\u4E3A\u4E86\u4E0D\u5F71\u54CD\u4F7F\u7528\u62A5\u540D\u529F\u80FD\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801"
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
|
children: ["\u4F60\u7684\u624B\u673A\u53F7\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
|
size: 'middle',
|
|
|
value: phone,
|
|
|
onChange: function onChange(e) {
|
|
|
return setphone(e.target.value);
|
|
|
},
|
|
|
style: {
|
|
|
width: '240px'
|
|
|
}
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("p", {
|
|
|
children: ["\u624B\u673A\u9A8C\u8BC1\u7801\uFF1A", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
|
|
|
size: 'middle',
|
|
|
value: PhoneValue,
|
|
|
onChange: function onChange(e) {
|
|
|
return setPhoneValue(e.target.value);
|
|
|
},
|
|
|
style: {
|
|
|
width: '240px'
|
|
|
}
|
|
|
}), " ", /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .ZP, {
|
|
|
disabled: countdownFlag,
|
|
|
type: "primary",
|
|
|
size: 'middle',
|
|
|
onClick: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5() {
|
|
|
return _root_workspace_ppte5yg23_local_v9_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
if (phoneReg.test(phone)) {
|
|
|
_context5.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.info("请输入有效的11位手机号码");
|
|
|
return _context5.abrupt("return");
|
|
|
case 3:
|
|
|
handleGetCode();
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
})),
|
|
|
children: countdownFlag ? "\u91CD\u65B0\u53D1\u9001".concat(countdown, "s") : '获取验证码'
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {
|
|
|
open: isopen,
|
|
|
footer: false,
|
|
|
onCancel: function onCancel() {
|
|
|
return setisopen(false);
|
|
|
},
|
|
|
centered: true,
|
|
|
width: 460,
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
style: {
|
|
|
marginTop: 50,
|
|
|
fontSize: 26,
|
|
|
color: '#3d3d3d',
|
|
|
textAlign: 'center',
|
|
|
marginBottom: 20
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("i", {
|
|
|
style: {
|
|
|
fontSize: 26,
|
|
|
color: '#52C41A'
|
|
|
},
|
|
|
className: "iconfont icon-tongguo"
|
|
|
}), " \u62A5\u540D\u6210\u529F"]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)("div", {
|
|
|
style: {
|
|
|
alignItems: 'center',
|
|
|
textAlign: 'center'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("img", {
|
|
|
style: {
|
|
|
width: 180,
|
|
|
border: '1px solid #eeeeef',
|
|
|
padding: 10,
|
|
|
marginBottom: 20
|
|
|
},
|
|
|
src: _utils_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.IMG_SERVER + (datas === null || datas === void 0 ? void 0 : datas.QR_code)
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)("p", {
|
|
|
style: {
|
|
|
color: '#AAAAAA'
|
|
|
},
|
|
|
children: "\u53C2\u8D5B\u8005\u53EF\u626B\u7801\u52A0\u5165\u5927\u8D5B\u5B98\u65B9\u4EA4\u6D41\u7FA4\uFF0C\u83B7\u53D6\u6700\u65B0\u7ADE\u8D5B\u901A\u77E5"
|
|
|
})]
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Addmodal);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 78079:
|
|
|
/*!*****************************************!*\
|
|
|
!*** ./src/utils/hooks/useInterval.tsx ***!
|
|
|
\*****************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Y: function() { return /* binding */ useInterval; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
|
function useInterval(callback, delay) {
|
|
|
var savedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
var savedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
|
|
|
// 保存新回调
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
savedCallback.current = callback;
|
|
|
});
|
|
|
|
|
|
// 建立 interval
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
|
function tick() {
|
|
|
savedCallback.current();
|
|
|
}
|
|
|
if (delay !== null) {
|
|
|
var id = setInterval(tick, delay);
|
|
|
savedId.current = id;
|
|
|
return function () {
|
|
|
return clearInterval(id);
|
|
|
};
|
|
|
}
|
|
|
}, [delay]);
|
|
|
}
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |