|
|
|
|
@ -58,6 +58,8 @@ var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
|
|
var ui_customization = __webpack_require__(1003);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
|
|
|
var lodash = __webpack_require__(89392);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(82710);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Counselling/ExpertList/index.tsx
|
|
|
|
|
@ -79,6 +81,7 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Navigation = function Navigation(_ref) {
|
|
|
|
|
var _questionInfo$statis, _questionInfo$statis2;
|
|
|
|
|
var loading = _ref.loading,
|
|
|
|
|
@ -376,15 +379,36 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
className: ExpertListmodules.btns,
|
|
|
|
|
children: [(questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.show_chat_entry) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ExpertListmodules.onlineChat,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _user$userInfo;
|
|
|
|
|
if ((user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login) == "") {
|
|
|
|
|
showLogin();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
_umi_production_exports.history.push("/counselling/expertList/".concat(questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.id, "/onlineChat"));
|
|
|
|
|
// window.open(`https://192.168.0.210:8080/?info=true&roomId=${questionInfo?.id}&userName=${user?.userInfo?.username}`)
|
|
|
|
|
},
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!((user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login) == "")) {
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
showLogin();
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 3:
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/online_consults/start_chat_record.json", {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
specialist_id: questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.id
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
_umi_production_exports.history.push("/counselling/expertList/".concat(questionInfo === null || questionInfo === void 0 ? void 0 : questionInfo.id, "/onlineChat"));
|
|
|
|
|
// window.open(`https://192.168.0.210:8080/?info=true&roomId=${questionInfo?.id}&userName=${user?.userInfo?.username}`)
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
})),
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-zaixianliaotian"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
@ -492,11 +516,11 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
visible: visible,
|
|
|
|
|
okText: "\u786E\u5B9A",
|
|
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
(0,counselling/* specialist_question */.$D)(objectSpread2_default()({
|
|
|
|
|
@ -511,9 +535,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setVisible(false);
|
|
|
|
|
@ -541,11 +565,11 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var ExpertList = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var loading = _ref3.loading,
|
|
|
|
|
engineeringNavigtion = _ref3.engineeringNavigtion,
|
|
|
|
|
user = _ref3.user,
|
|
|
|
|
dispatch = _ref3.dispatch;
|
|
|
|
|
/* harmony default export */ var ExpertList = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var loading = _ref4.loading,
|
|
|
|
|
engineeringNavigtion = _ref4.engineeringNavigtion,
|
|
|
|
|
user = _ref4.user,
|
|
|
|
|
dispatch = _ref4.dispatch;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
loading: loading,
|
|
|
|
|
user: user
|