parent
a3d894f125
commit
9e7e10f9e3
File diff suppressed because one or more lines are too long
@ -0,0 +1,89 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[13012],{
|
||||
|
||||
/***/ 8327:
|
||||
/*!***************************************************************!*\
|
||||
!*** ./src/pages/Counselling/ExpertList/OnlineChat/index.tsx ***!
|
||||
\***************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
||||
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
||||
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ 75936);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
||||
|
||||
|
||||
|
||||
|
||||
var OnlineChat = function OnlineChat(_ref) {
|
||||
var _user$userInfo;
|
||||
var loading = _ref.loading,
|
||||
user = _ref.user,
|
||||
dispatch = _ref.dispatch,
|
||||
account = _ref.account;
|
||||
var params = (0,umi__WEBPACK_IMPORTED_MODULE_2__.useParams)();
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
var handleMessage = function handleMessage(event) {
|
||||
if (event.data === 'goBack') {
|
||||
umi__WEBPACK_IMPORTED_MODULE_2__.history.push("/counselling/expertList/".concat(params === null || params === void 0 ? void 0 : params.id, "/info?backUrl=/counselling/expertList")); // 返回上一页
|
||||
}
|
||||
};
|
||||
|
||||
// 添加消息监听器
|
||||
window.addEventListener('message', handleMessage);
|
||||
|
||||
// 清理函数,组件卸载时移除监听器
|
||||
return function () {
|
||||
window.removeEventListener('message', handleMessage);
|
||||
};
|
||||
}, []);
|
||||
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
||||
dispatch({
|
||||
type: 'globalSetting/headerFooterToggle',
|
||||
payload: false
|
||||
});
|
||||
return function () {
|
||||
dispatch({
|
||||
type: 'globalSetting/headerFooterToggle',
|
||||
payload: true
|
||||
});
|
||||
};
|
||||
}, []);
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", {
|
||||
style: {
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
},
|
||||
children: (user === null || user === void 0 ? void 0 : user.userInfo) && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("iframe", {
|
||||
style: {
|
||||
width: '100%',
|
||||
height: '100vh'
|
||||
},
|
||||
frameBorder: "0",
|
||||
sandbox: "allow-scripts allow-same-origin allow-top-navigation",
|
||||
allow: "microphone; camera",
|
||||
scrolling: "no",
|
||||
src: "https://192.168.0.210:8080/?info=true&roomId=".concat(params === null || params === void 0 ? void 0 : params.id, "&userName=").concat(user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.username)
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__["default"] = ((0,umi__WEBPACK_IMPORTED_MODULE_2__.connect)(function (_ref2) {
|
||||
var loading = _ref2.loading,
|
||||
user = _ref2.user,
|
||||
engineeringNavigtion = _ref2.engineeringNavigtion,
|
||||
account = _ref2.account,
|
||||
dispatch = _ref2.dispatch;
|
||||
return _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
||||
loading: loading,
|
||||
user: user
|
||||
}, engineeringNavigtion), {}, {
|
||||
account: account,
|
||||
dispatch: dispatch
|
||||
});
|
||||
})(OnlineChat));
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue