2023-04-01 13:07:20 +00:00
|
|
|
async function setMagicUrl(url) {
|
|
|
|
localStorage.setItem('GoGoUrl',url);
|
|
|
|
}
|
|
|
|
|
|
|
|
// ture:开启使用魔法聊天|false:关闭使用魔法聊天|'repeat':开启聊天复用
|
|
|
|
async function setChatHubWithMagic(user) {
|
|
|
|
localStorage.setItem('ChatHubWithMagic',user);
|
|
|
|
}
|
|
|
|
// ture|false|'repeat'
|
|
|
|
async function getChatHubWithMagic() {
|
|
|
|
let v = localStorage.ChatHubWithMagic;
|
2023-04-01 15:34:44 +00:00
|
|
|
if (v) {
|
|
|
|
switch(v){
|
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
return false;
|
|
|
|
case 2:
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 'repeat';
|
2023-04-01 13:07:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//设置上次创建的聊天
|
|
|
|
async function setLastChatJson(json) {
|
|
|
|
localStorage.setItem('LastChatJson',json);
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取上次创建的聊天
|
|
|
|
async function getLastChatJson() {
|
|
|
|
return localStorage.LastChatJson;
|
|
|
|
}
|
|
|
|
|
|
|
|
//获取上次聊天聊到的消息id次数
|
|
|
|
async function getLastChatInvocationId(){
|
|
|
|
return localStorage.LastChatInvocationId;
|
|
|
|
}
|
|
|
|
//设置上次聊天聊到的消息id次数
|
|
|
|
async function setLastInvocationId(invocationId){
|
|
|
|
return localStorage.setItem('LastChatInvocationId',invocationId);
|
|
|
|
}
|