Merge pull request #10147 from dataease/dev-v2

merge fix
This commit is contained in:
fit2cloudrd
2024-06-06 16:16:50 +08:00
committed by GitHub
3 changed files with 13 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import noLic from './nolic.vue'
import { ref, useAttrs, onMounted, watch } from 'vue'
import { ref, useAttrs, onMounted } from 'vue'
import { execute, randomKey, formatArray } from './convert'
import { load, loadDistributed, xpackModelApi } from '@/api/plugin'
import { useCache } from '@/hooks/web/useCache'
@@ -81,7 +81,11 @@ const storeCacheProxy = byteArray => {
}
const pluginProxy = ref(null)
const invokeMethod = param => {
pluginProxy.value['invokeMethod'](param)
if (pluginProxy.value['invokeMethod']) {
pluginProxy.value['invokeMethod'](param)
} else {
pluginProxy.value[param.methodName](param.args)
}
}
onMounted(async () => {

View File

@@ -117,8 +117,12 @@ const handleLogin = () => {
if (!xpackLoadFail.value && xpackInvalidPwd.value?.invokeMethod) {
const param = {
methodName: 'init',
args: () => {
duringLogin.value = false
args: r => {
duringLogin.value = !!r
if (r) {
const queryRedirectPath = getCurLocation()
router.push({ path: queryRedirectPath })
}
}
}
xpackInvalidPwd?.value.invokeMethod(param)