移动端V1.0
This commit is contained in:
57
utils/ai.js
Normal file
57
utils/ai.js
Normal file
@@ -0,0 +1,57 @@
|
||||
export const initCoze = async function(userInfo) {
|
||||
return new CozeWebSDK.WebChatClient({
|
||||
config: {
|
||||
bot_id: '7517200991494717475',
|
||||
botInfo: {
|
||||
parameters: {
|
||||
user_role: userInfo.roleGroup,
|
||||
user_name: userInfo.nickName,
|
||||
user_id: userInfo.username,
|
||||
user_token: userInfo.user_token,
|
||||
}
|
||||
}
|
||||
},
|
||||
auth: {
|
||||
type: "token",
|
||||
token: userInfo.accessToken,
|
||||
onRefreshToken: async () => {
|
||||
return userInfo.userInfo.accessToken;
|
||||
},
|
||||
},
|
||||
userInfo: {
|
||||
id: userInfo.username,
|
||||
nickname: userInfo.nickName,
|
||||
url: userInfo.avater
|
||||
},
|
||||
ui: {
|
||||
base: {
|
||||
icon: "https://p3-flow-imagex-sign.byteimg.com/ocean-cloud-tos/FileBizType.BIZ_BOT_ICON/4185184193750220_1751011524142392616_RI5wYOximW.jpg~tplv-a9rns2rl98-image-qvalue.jpeg?rk3s=bbd3e7ed&x-expires=1753606533&x-signature=OxWu7ZE9AsolGXHOZGxYQf36bt4%3D",
|
||||
layout: "mobile",
|
||||
lang: "zh-CN",
|
||||
zIndex: 1000,
|
||||
},
|
||||
chatBot: {
|
||||
title: "“智水”AI辅导员",
|
||||
uploadable: true,
|
||||
el: document.getElementById("chatbot"),
|
||||
},
|
||||
asstBtn: {
|
||||
isNeed: false
|
||||
},
|
||||
header: {
|
||||
isShow: true,
|
||||
isNeedClose: true,
|
||||
},
|
||||
footer: {
|
||||
isShow: false,
|
||||
expressionText: '智能体由 {{name}}提供技术支持',
|
||||
linkvars: {
|
||||
name: {
|
||||
text: '广西厚溥',
|
||||
link: 'http://www.gxxdit.com/'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user