mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore:
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user