s
This commit is contained in:
parent
5da8cc3bcc
commit
95de506a76
@ -20,14 +20,13 @@ async function bootstrap() {
|
||||
// 子页面中
|
||||
app.mount('#app')
|
||||
}
|
||||
const origins=['https://erp.fontree.cn','http://172.16.100.93:9010']
|
||||
const origins=['https://erp.fontree.cn','http://172.16.100.93:9010','http://localhost:8080']
|
||||
window.addEventListener('message', function(event) {
|
||||
|
||||
if (origins.includes(event.origin)){
|
||||
localStorage.setItem('token',event.data.token)
|
||||
localStorage.setItem('mode',JSON.stringify(event.data.mode))
|
||||
localStorage.setItem('userInfo',JSON.stringify(event.data.userInfo))
|
||||
|
||||
localStorage.setItem('isGPT4',event.data.isGPT4)
|
||||
}
|
||||
});
|
||||
bootstrap()
|
||||
|
@ -9,6 +9,7 @@ const currentListUuid=ref('')
|
||||
const gptMode=ref('gpt-3.5-turbo')
|
||||
const dataList = ref([]);
|
||||
const isStop = ref(false);
|
||||
const isGPT4 = ref(false);
|
||||
const getDataList = async () => {
|
||||
const data = {
|
||||
page: 1,
|
||||
@ -62,5 +63,5 @@ const currentListUuid=ref('')
|
||||
getDataList()
|
||||
}
|
||||
}
|
||||
return { sessionDetail,currentListUuid ,gptMode,getDataList,dataList,getSessionDetail,createSessionStore,deleteSession,isStop};
|
||||
return { sessionDetail,currentListUuid ,gptMode,getDataList,dataList,getSessionDetail,createSessionStore,deleteSession,isStop,isGPT4};
|
||||
});
|
||||
|
@ -21,7 +21,7 @@ import {storeToRefs} from 'pinia'
|
||||
import { sessionDetailForSetup } from '@/store'
|
||||
const sessionDetailData=sessionDetailForSetup()
|
||||
let controller = new AbortController()
|
||||
const { sessionDetail:dataSources ,currentListUuid,gptMode,isStop} = storeToRefs(sessionDetailData)
|
||||
const { sessionDetail:dataSources ,currentListUuid,gptMode,isStop,isGPT4} = storeToRefs(sessionDetailData)
|
||||
|
||||
const dialog = useDialog()
|
||||
const ms = useMessage()
|
||||
|
@ -11,7 +11,7 @@ import { PromptStore, SvgIcon } from '@/components/common'
|
||||
import { t } from '@/locales'
|
||||
import {sessionDetailForSetup} from "@/store";
|
||||
const sessionDetailData=sessionDetailForSetup()
|
||||
const {sessionDetail, dataList,gptMode,currentListUuid } = storeToRefs(sessionDetailData)
|
||||
const {sessionDetail, dataList,gptMode,currentListUuid,isGPT4 } = storeToRefs(sessionDetailData)
|
||||
const appStore = useAppStore()
|
||||
const chatStore = useChatStore()
|
||||
|
||||
@ -63,8 +63,13 @@ const mobileSafeArea = computed(() => {
|
||||
return {}
|
||||
})
|
||||
const options=ref([{ label: 'GPT-3.5', value: 'gpt-3.5-turbo' },
|
||||
{ label: 'GPT-4.0', value: 'gpt-4-1106-preview' },
|
||||
{ label: 'GPT-V', value: 'gpt-4-vision-preview' }])
|
||||
{ label: 'GPT-4.0', value: 'gpt-4-1106-preview' ,permission:'isGPT4'},
|
||||
{ label: 'GPT-V', value: 'gpt-4-vision-preview',permission:'isGPT4' }])
|
||||
setTimeout(()=>{
|
||||
if (localStorage.getItem('isGPT4')!=='true'){
|
||||
options.value=options.value.filter(item=>item.permission!=='isGPT4')
|
||||
}
|
||||
},1000)
|
||||
watch(
|
||||
isMobile,
|
||||
(val) => {
|
||||
|
Loading…
Reference in New Issue
Block a user