yt-chat-components 1.6.5 → 1.6.6
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/package.json +1 -1
- package/public/index.html +32 -31
- package/src/YtChatView/chatWidget/chatWindow/index.tsx +3 -0
- package/src/YtChatView/chatWidget/chatWindow/inputMobile/inputMobile.jsx +2 -2
- package/src/YtChatView/chatWidget/index.tsx +3 -0
- package/src/YtChatView/mobileChatV2/index.jsx +4 -2
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -109,48 +109,49 @@
|
|
|
109
109
|
<!--/>-->
|
|
110
110
|
<!--</body>-->
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
host-url="https://ai-api.yuntu.cn"
|
|
115
|
-
sign-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/logo.png"
|
|
116
|
-
app-id="5f48c683-38d8-430e-8479-17730a605821"
|
|
117
|
-
box-style='{"height":"100%","minWidth": "1380px","background":"url(https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/system/portal_bg_blue.png) center top / 100% 100% no-repeat"}'
|
|
118
|
-
is-show-side-right=true
|
|
119
|
-
is-show-side-left=true
|
|
120
|
-
dialog-index="999999999"
|
|
121
|
-
agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/kai_yuan/byz/xinge.png"
|
|
122
|
-
agent-name="白城医学高等专科学校招生咨询平台"
|
|
123
|
-
logo-width="27px"
|
|
124
|
-
logo-font-size="20px"
|
|
125
|
-
is-title-side-icon=true
|
|
126
|
-
is-show-upload-button=false
|
|
127
|
-
is-show-read-icon=true
|
|
128
|
-
drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"
|
|
129
|
-
asset-map='{"sendMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/sendMessage.png","stopMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/stopMessage.png","speakUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/speak.png"}'
|
|
130
|
-
/>
|
|
131
|
-
</body>
|
|
132
|
-
|
|
133
|
-
<!--<body style="width: 100vw; height: 100vh; margin:0 ">-->
|
|
134
|
-
<!--<yt-page-chat-mobile-v2-->
|
|
135
|
-
<!-- host-url="http://192.168.110.135:7860"-->
|
|
112
|
+
<!--<body style="width: 100vw; height: 100vh; margin:0;">-->
|
|
113
|
+
<!--<yt-page-chat-v2-->
|
|
114
|
+
<!-- host-url="https://ai-api.yuntu.cn"-->
|
|
136
115
|
<!-- sign-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/logo.png"-->
|
|
137
116
|
<!-- app-id="5f48c683-38d8-430e-8479-17730a605821"-->
|
|
138
|
-
<!--
|
|
139
|
-
<!-- box-style='{"height":"100%"}'-->
|
|
117
|
+
<!-- box-style='{"height":"100%","minWidth": "1380px","background":"url(https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/system/portal_bg_blue.png) center top / 100% 100% no-repeat"}'-->
|
|
140
118
|
<!-- is-show-side-right=true-->
|
|
141
119
|
<!-- is-show-side-left=true-->
|
|
142
120
|
<!-- dialog-index="999999999"-->
|
|
121
|
+
<!-- agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/kai_yuan/byz/xinge.png"-->
|
|
143
122
|
<!-- agent-name="白城医学高等专科学校招生咨询平台"-->
|
|
144
|
-
<!--
|
|
145
|
-
<!-- logo-
|
|
146
|
-
<!-- logo-font-size="26px"-->
|
|
123
|
+
<!-- logo-width="27px"-->
|
|
124
|
+
<!-- logo-font-size="20px"-->
|
|
147
125
|
<!-- is-title-side-icon=true-->
|
|
148
126
|
<!-- is-show-upload-button=false-->
|
|
149
127
|
<!-- is-show-read-icon=true-->
|
|
150
128
|
<!-- drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"-->
|
|
151
129
|
<!-- asset-map='{"sendMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/sendMessage.png","stopMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/stopMessage.png","speakUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/speak.png"}'-->
|
|
152
|
-
<!-- header-name="白城医学高等专科学校招生咨询平台"-->
|
|
153
|
-
<!-- is-show-mobile-input-area=true-->
|
|
154
130
|
<!--/>-->
|
|
155
131
|
<!--</body>-->
|
|
132
|
+
|
|
133
|
+
<body style="width: 100vw; height: 100vh; margin:0 ">
|
|
134
|
+
<yt-page-chat-mobile-v2
|
|
135
|
+
host-url="http://192.168.110.135:7860"
|
|
136
|
+
sign-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/logo.png"
|
|
137
|
+
app-id="5f48c683-38d8-430e-8479-17730a605821"
|
|
138
|
+
agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/kai_yuan/byz/xinge.png"
|
|
139
|
+
box-style='{"height":"100%"}'
|
|
140
|
+
is-show-side-right=true
|
|
141
|
+
is-show-side-left=true
|
|
142
|
+
dialog-index="999999999"
|
|
143
|
+
agent-name="白城医学高等专科学校招生咨询平台"
|
|
144
|
+
agent-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/ccit/user/xc//image/ebfaf4da-c1d9-46fb-a0b1-f159e95cffc2_AI招生咨询小助手.png"
|
|
145
|
+
logo-width="42px"
|
|
146
|
+
logo-font-size="26px"
|
|
147
|
+
is-title-side-icon=true
|
|
148
|
+
is-show-upload-button=false
|
|
149
|
+
is-show-read-icon=true
|
|
150
|
+
drop-man-url="https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_man01.png"
|
|
151
|
+
asset-map='{"sendMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/sendMessage.png","stopMessageUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/stopMessage.png","speakUrl":"https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/school/bcyz/user/ai/speak.png"}'
|
|
152
|
+
header-name="白城医学高等专科学校招生咨询平台"
|
|
153
|
+
is-show-mobile-input-area=true
|
|
154
|
+
is-in-h5-page=true
|
|
155
|
+
/>
|
|
156
|
+
</body>
|
|
156
157
|
</html>
|
|
@@ -97,6 +97,7 @@ export default function ChatWindow({
|
|
|
97
97
|
voice,
|
|
98
98
|
onSmartRobotClick,
|
|
99
99
|
isShowMobileInputArea,
|
|
100
|
+
isInH5Page
|
|
100
101
|
}: {
|
|
101
102
|
is_enable_call:boolean;
|
|
102
103
|
tags: [];
|
|
@@ -151,6 +152,7 @@ export default function ChatWindow({
|
|
|
151
152
|
voice?: string;
|
|
152
153
|
onSmartRobotClick?: Function;
|
|
153
154
|
isShowMobileInputArea?: boolean;
|
|
155
|
+
isInH5Page: boolean;
|
|
154
156
|
}) {
|
|
155
157
|
const ref = useRef<HTMLDivElement>(null);
|
|
156
158
|
const lastMessage = useRef<HTMLDivElement>(null);
|
|
@@ -1232,6 +1234,7 @@ export default function ChatWindow({
|
|
|
1232
1234
|
onStartRecordClick={startConnectAndRecord}
|
|
1233
1235
|
onStopRecordClick={stopRecord}
|
|
1234
1236
|
onSmartRobotClick={onSmartRobotClick}
|
|
1237
|
+
isInH5Page={isInH5Page}
|
|
1235
1238
|
/>
|
|
1236
1239
|
)
|
|
1237
1240
|
}
|
|
@@ -62,9 +62,9 @@ class InputMobile extends React.Component {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
render() {
|
|
65
|
-
const {isShowVoiceButton, disabled, placeholder, onSendClick, inputRef, onSmartRobotClick = () => {} } = this.props;
|
|
65
|
+
const {isShowVoiceButton, disabled, placeholder, onSendClick, inputRef, onSmartRobotClick = () => {}, isInH5Page } = this.props;
|
|
66
66
|
return (
|
|
67
|
-
<div className={styles.m_tool_box}>
|
|
67
|
+
<div className={styles.m_tool_box} style={isInH5Page ? { marginBottom: '58px' } : {}}>
|
|
68
68
|
{/*智能体小人图形固定显示位置*/}
|
|
69
69
|
<div className={styles.m_avatar}>
|
|
70
70
|
<img src={'https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/kai_yuan/common/smartBoy.png'} width={'60px'} style={{zIndex:10}} onClick={onSmartRobotClick}/>
|
|
@@ -57,6 +57,7 @@ export default function ChatWidget({
|
|
|
57
57
|
voice,
|
|
58
58
|
onSmartRobotClick,
|
|
59
59
|
isShowMobileInputArea,
|
|
60
|
+
isInH5Page
|
|
60
61
|
}: {
|
|
61
62
|
is_enable_call:boolean,
|
|
62
63
|
tags: [];
|
|
@@ -107,6 +108,7 @@ export default function ChatWidget({
|
|
|
107
108
|
voice?: string;
|
|
108
109
|
onSmartRobotClick?: Function;
|
|
109
110
|
isShowMobileInputArea?: boolean;
|
|
111
|
+
isInH5Page: boolean;
|
|
110
112
|
}) {
|
|
111
113
|
const [open, setOpen] = useState(start_open);
|
|
112
114
|
const [messages, setMessages] = useState<ChatMessageType[]>([]);
|
|
@@ -187,6 +189,7 @@ export default function ChatWidget({
|
|
|
187
189
|
voice={voice}
|
|
188
190
|
onSmartRobotClick={onSmartRobotClick}
|
|
189
191
|
isShowMobileInputArea={isShowMobileInputArea}
|
|
192
|
+
isInH5Page={isInH5Page}
|
|
190
193
|
/>
|
|
191
194
|
</div>
|
|
192
195
|
);
|
|
@@ -503,7 +503,8 @@ export class MobileChatPageV2 extends React.Component {
|
|
|
503
503
|
signUrl,
|
|
504
504
|
headerName,
|
|
505
505
|
isShowMobileInputArea,
|
|
506
|
-
inputContainerStyle = {}
|
|
506
|
+
inputContainerStyle = {},
|
|
507
|
+
isInH5Page
|
|
507
508
|
} = this.props;
|
|
508
509
|
const { currentFlow = {} } = this.state;
|
|
509
510
|
return (
|
|
@@ -545,7 +546,7 @@ export class MobileChatPageV2 extends React.Component {
|
|
|
545
546
|
<div
|
|
546
547
|
className="p_historyDialog"
|
|
547
548
|
style={{
|
|
548
|
-
height:
|
|
549
|
+
height: `calc(100% - 146px - 50px ${isInH5Page ? '- 58px' : ''})`,
|
|
549
550
|
boxSizing: 'border-box',
|
|
550
551
|
userSelect: 'none',
|
|
551
552
|
flex: 1,
|
|
@@ -702,6 +703,7 @@ export class MobileChatPageV2 extends React.Component {
|
|
|
702
703
|
tipTitle={tipTitle}
|
|
703
704
|
tipContent={tipContent}
|
|
704
705
|
isShowMobileInputArea={isShowMobileInputArea}
|
|
706
|
+
isInH5Page={isInH5Page}
|
|
705
707
|
/>
|
|
706
708
|
</div>
|
|
707
709
|
</div>
|