mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
more chat role is ready, and add API to add new chat role
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user