@cqsjjb/jjb-react-admin-component 3.3.1-beta.13 → 3.3.1-beta.15
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.
- package/PhoneBox/index.js +12 -10
- package/package.json +1 -1
- package/ControlWrapper/index.less +0 -38
- package/PhoneBox/dianchi.png +0 -0
- package/PhoneBox/phone.png +0 -0
- package/PhoneBox/shexiang.png +0 -0
- package/PhoneBox/wangluo.png +0 -0
- package/PhoneBox/xinhao.png +0 -0
package/PhoneBox/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
2
|
import { Empty, Space, message, Tooltip, Button, QRCode } from 'antd';
|
|
3
3
|
import { SyncOutlined } from '@ant-design/icons';
|
|
4
|
+
import { http } from '@cqsjjb/jjb-common-lib';
|
|
4
5
|
import shexiang from './shexiang.svg';
|
|
5
6
|
import xinhao from './xinhao.svg';
|
|
6
7
|
import wangluo from './wangluo.svg';
|
|
@@ -74,6 +75,13 @@ export default props => {
|
|
|
74
75
|
};
|
|
75
76
|
}, []);
|
|
76
77
|
|
|
78
|
+
// 获取预览地址
|
|
79
|
+
const getPreviewUrl = () => {
|
|
80
|
+
// 从url中解析出id
|
|
81
|
+
const id = new URL(iframeUrl).searchParams.get('sceneEngineId');
|
|
82
|
+
return http.Get(`/scene/engine/preview/url/${id}`);
|
|
83
|
+
};
|
|
84
|
+
|
|
77
85
|
// 二维码过期状态定时器
|
|
78
86
|
const startQrcodeTimer = () => {
|
|
79
87
|
if (qrcodeTimerId.current) {
|
|
@@ -95,19 +103,13 @@ export default props => {
|
|
|
95
103
|
}, 60000);
|
|
96
104
|
};
|
|
97
105
|
const getQrCodeUrl = () => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
setIsQrcodeExpire(false); // 重置二维码过期状态
|
|
102
|
-
startQrcodeTimer(); // 启动过期状态定时器
|
|
103
|
-
startQrcodeExpireTimeUpdateTimer(); // 启动过期时间定时器
|
|
104
|
-
});
|
|
105
|
-
} else {
|
|
106
|
-
setQrcodeUrl(`${iframeUrl}?t=${Date.now()}`);
|
|
106
|
+
const ftechFunc = fetchQrcodeUrl || getPreviewUrl;
|
|
107
|
+
ftechFunc().then(res => {
|
|
108
|
+
setQrcodeUrl(res.data);
|
|
107
109
|
setIsQrcodeExpire(false); // 重置二维码过期状态
|
|
108
110
|
startQrcodeTimer(); // 启动过期状态定时器
|
|
109
111
|
startQrcodeExpireTimeUpdateTimer(); // 启动过期时间定时器
|
|
110
|
-
}
|
|
112
|
+
});
|
|
111
113
|
};
|
|
112
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
113
115
|
className: `phone-box ${size === 'small' ? 'phone-box-small' : ''}`
|
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
@com-prefix-cls: if(isdefined(@ant-prefix), @ant-prefix, ant);
|
|
2
|
-
|
|
3
|
-
.@{com-prefix-cls}-form-item-control-label-wrapper {
|
|
4
|
-
.@{com-prefix-cls}-form-item-control-label-span {
|
|
5
|
-
border: 1px solid #d9d9d9;
|
|
6
|
-
height: 32px;
|
|
7
|
-
line-height: 30px;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
margin-right: -1px;
|
|
10
|
-
padding: 0 2px 0 8px;
|
|
11
|
-
border-top-left-radius: 4px;
|
|
12
|
-
border-bottom-left-radius: 4px;
|
|
13
|
-
white-space: nowrap;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.@{com-prefix-cls}-form-item-control-label-has {
|
|
17
|
-
.@{com-prefix-cls}-select-selector, .@{com-prefix-cls}-picker, .@{com-prefix-cls}-input, .@{com-prefix-cls}-input-affix-wrapper {
|
|
18
|
-
border-top-left-radius: 0;
|
|
19
|
-
border-bottom-left-radius: 0;
|
|
20
|
-
border-left-color: transparent !important;
|
|
21
|
-
&:hover, &:focus, &:focus-within{
|
|
22
|
-
border-left-color: @colorPrimary !important;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&-default {
|
|
28
|
-
.@{com-prefix-cls}-form-item-control-label-span {
|
|
29
|
-
border-color: #d9d9d9;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-dark {
|
|
34
|
-
.@{com-prefix-cls}-form-item-control-label-span {
|
|
35
|
-
border-color: #424242;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
package/PhoneBox/dianchi.png
DELETED
|
Binary file
|
package/PhoneBox/phone.png
DELETED
|
Binary file
|
package/PhoneBox/shexiang.png
DELETED
|
Binary file
|
package/PhoneBox/wangluo.png
DELETED
|
Binary file
|
package/PhoneBox/xinhao.png
DELETED
|
Binary file
|