This commit is contained in:
xiaojunnuo
2024-11-26 01:14:16 +08:00
parent 92c6c45e77
commit d6c7326467
5 changed files with 20 additions and 20 deletions
@@ -49,7 +49,7 @@ const doTest = async () => {
type: pluginType,
typeName: form.type,
action: props.action,
input: form
input: pluginType === "plugin" ? form.input : form
},
{
onError(err: any) {
@@ -87,7 +87,7 @@ const getOptions = async () => {
type: pluginType,
typeName: form.type,
action: props.action,
input: form
input: pluginType === "plugin" ? form.input : form
},
{
onError(err: any) {
@@ -10,7 +10,7 @@
</template>
<script lang="tsx" setup>
import { defineProps, ref, useAttrs } from "vue";
import { defineProps, inject, ref, useAttrs } from "vue";
import { Modal } from "ant-design-vue";
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
@@ -26,16 +26,21 @@ const emit = defineEmits<{
const attrs = useAttrs();
const otpCodeRef = ref("");
const getScope: any = inject("get:scope");
const getPluginType: any = inject("get:plugin:type");
async function loginWithOTPCode(otpCode: string) {
const { form } = getScope();
const pluginType = getPluginType();
return await doRequest({
type: props.type,
typeName: props.typeName,
type: pluginType,
typeName: form.type,
action: "LoginWithOPTCode",
data: {
otpCode
},
input: props.form
input: form
});
}