Browse Source

Merge branch 'luckysheet' into feature

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

9
src/views/main-content.vue

@ -33,7 +33,7 @@
> >
<template v-if="tabIsIframe(item.iframeURL)"> <template v-if="tabIsIframe(item.iframeURL)">
<iframe <iframe
:src="computedIframeUrl(item)" :src="item.iframeURL + '?token=' + `${item.query.openwebuiToken?item.query.openwebuiToken:token}` + '&customerId=' + customerId"
ref="iframes" ref="iframes"
class="iframes" class="iframes"
id="iframes" id="iframes"
@ -140,7 +140,6 @@ export default {
this.token = localStorage.getItem("token"); this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId"); this.customerId = localStorage.getItem("customerId");
this.loopTips(); this.loopTips();
this.geOpenwebuiToken()
}, },
destroyed() { destroyed() {
this.$store.dispatch("clearInter"); this.$store.dispatch("clearInter");
@ -156,12 +155,6 @@ export default {
const token = item.iframeURL === process.env.VUE_APP_AI_URL ? this.webUiToken : this.token; const token = item.iframeURL === process.env.VUE_APP_AI_URL ? this.webUiToken : this.token;
return `${item.iframeURL}?token=${token}&customerId=${this.customerId}`; 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) { toPage(path) {
if (path) { if (path) {
this.$router.push({ this.$router.push({

11
src/views/main-navbar.vue

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

Loading…
Cancel
Save