@vtx/modals2 5.0.56 → 5.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,14 +4,16 @@ import VmEmpty from "../vm-empty";
4
4
  import "./index.less";
5
5
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
6
6
  var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
7
+ var _channel$list;
7
8
  var channel = props.channel,
8
9
  onClose = props.onClose;
9
10
  var name = "".concat(channel === null || channel === void 0 ? void 0 : channel.deviceName, "-").concat(channel === null || channel === void 0 ? void 0 : channel.channelName);
11
+ var url = (channel === null || channel === void 0 ? void 0 : channel.totalTimeUrl) || (channel === null || channel === void 0 || (_channel$list = channel.list) === null || _channel$list === void 0 || (_channel$list = _channel$list[0]) === null || _channel$list === void 0 ? void 0 : _channel$list.playbackUrl);
10
12
  var gridItemRef = useRef(null);
11
13
  return /*#__PURE__*/_jsx("div", {
12
14
  className: "vm-video-content-container",
13
15
  ref: gridItemRef,
14
- children: channel !== null && channel !== void 0 && channel.totalTimeUrl ? /*#__PURE__*/_jsxs(_Fragment, {
16
+ children: url ? /*#__PURE__*/_jsxs(_Fragment, {
15
17
  children: [/*#__PURE__*/_jsxs("div", {
16
18
  className: "vm-video-content-container-header",
17
19
  children: [/*#__PURE__*/_jsx("span", {
@@ -29,7 +31,7 @@ var GridItem = /*#__PURE__*/forwardRef(function (props, ref) {
29
31
  ref: ref,
30
32
  beenHasVideo: channel.beenHasVideo // 对讲
31
33
  ,
32
- url: channel.totalTimeUrl,
34
+ url: url,
33
35
  type: channel === null || channel === void 0 ? void 0 : channel.player,
34
36
  deviceIp: channel.deviceIp,
35
37
  devicePort: channel.devicePort,
@@ -128,13 +128,14 @@ var VmVideo = function VmVideo(_ref) {
128
128
  channelNum: values.channelNum,
129
129
  deviceId: channel.videoDeviceId
130
130
  }).then(function (res) {
131
- var _res$data;
132
- if (!(res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.totalTimeUrl)) {
131
+ var _data$list;
132
+ var data = (res === null || res === void 0 ? void 0 : res.data) || {};
133
+ if (!(data !== null && data !== void 0 && data.totalTimeUrl) && !((_data$list = data.list) !== null && _data$list !== void 0 && (_data$list = _data$list[0]) !== null && _data$list !== void 0 && _data$list.playbackUrl)) {
133
134
  message.info('未查询到视频!');
134
135
  return;
135
136
  }
136
137
  setState({
137
- history: res === null || res === void 0 ? void 0 : res.data
138
+ history: data
138
139
  });
139
140
  });
140
141
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/modals2",
3
- "version": "5.0.56",
3
+ "version": "5.0.57",
4
4
  "description": "弹窗组件",
5
5
  "license": "MIT",
6
6
  "module": "lib/index.js",