Browse Source

Merge branch 'luckysheet' into feature

resetPassword
mk 5 months ago
parent
commit
f63641ba21
  1. 11
      src/views/main-content.vue
  2. 11
      src/views/main-navbar.vue

11
src/views/main-content.vue

@ -32,8 +32,8 @@
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"
>
<template v-if="tabIsIframe(item.iframeURL)">
<iframe
:src="computedIframeUrl(item)"
<iframe
:src="item.iframeURL + '?token=' + `${item.query.openwebuiToken?item.query.openwebuiToken:token}` + '&customerId=' + customerId"
ref="iframes"
class="iframes"
id="iframes"
@ -140,7 +140,6 @@ export default {
this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId");
this.loopTips();
this.geOpenwebuiToken()
},
destroyed() {
this.$store.dispatch("clearInter");
@ -156,12 +155,6 @@ export default {
const token = item.iframeURL === process.env.VUE_APP_AI_URL ? this.webUiToken : this.token;
return `${item.iframeURL}?token=${token}&customerId=${this.customerId}`;
},
async geOpenwebuiToken(){
const {code,data} = await requestGet('/epmetuser/userOpenwebui/token')
if(code === 0 ){
this.webUiToken = data;
}
},
toPage(path) {
if (path) {
this.$router.push({

11
src/views/main-navbar.vue

@ -144,11 +144,18 @@ export default {
}
},
methods: {
handelClickShowAi(){
async geOpenwebuiToken(){
const {code,data} = await requestGet('/epmetuser/userOpenwebui/token')
if(code === 0 ){
return data;
}
},
async handelClickShowAi(){
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
(item) => item.meta.title === 'AI小助手'
)[0];
this.$router.push({ name: route.name });
let data = await this.geOpenwebuiToken()
this.$router.push({ name: route.name,query:{openwebuiToken:data}});
},
async redDot() {
const url = `/actual/base/communityOneTablePeriodPublish/redDot`;

Loading…
Cancel
Save