more chat role is ready, and add API to add new chat role

This commit is contained in:
RockYang
2023-04-08 09:39:03 +08:00
parent df7d4d5b94
commit df9e587300
21 changed files with 231 additions and 104 deletions

View File

@@ -1,7 +1,7 @@
import axios from 'axios'
import {getSessionId} from "@/utils/storage";
axios.defaults.timeout = 5000
axios.defaults.timeout = 10000
axios.defaults.baseURL = process.env.VUE_APP_API_HOST
axios.defaults.withCredentials = true;
axios.defaults.headers.post['Content-Type'] = 'application/json'

View File

@@ -12,4 +12,10 @@ export function randString(length) {
buf.push(str.charAt(rand))
}
return buf.join("")
}
export function isMobile() {
const userAgent = navigator.userAgent;
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i;
return mobileRegex.test(userAgent);
}