dev
This commit is contained in:
parent
e1ead5394f
commit
d5080a0bab
|
|
@ -78,6 +78,7 @@ const getInfoFor1101 = (params: any) => {
|
|||
isReading.value = false;
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
wsStore.setMessageCallback(reciceMessage)
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,68 @@
|
|||
<template>
|
||||
<div class="container-wrapper">
|
||||
print
|
||||
<el-button @click="sendMessage">发送消息 </el-button>
|
||||
<el-button @click="getarry">拉配置 </el-button>
|
||||
<el-button @click="getNetwork">拿ip</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import {getKey} from "@/utils/discrotyUtil.ts";
|
||||
import gends from "@/assets/config/directory/gends.json";
|
||||
import natys from "@/assets/config/directory/antys.json";
|
||||
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json";
|
||||
import insutypes from "@/assets/config/directory/insutypes.json";
|
||||
import {onMounted, onUnmounted, ref} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {post} from "@/utils/request.ts";
|
||||
import type {Request, Response} from "@/utils/ws.ts";
|
||||
import {useWsStore} from "@/stores/wsStore.ts";
|
||||
|
||||
const wsStore = useWsStore();
|
||||
const isReading = ref(false)
|
||||
const ReadSocialCard = async (readType: string) => {
|
||||
isReading.value = true;
|
||||
let data: any = {}
|
||||
data.key ="111111111111";
|
||||
data.val="哈哈哈哈122222222222222";
|
||||
let request: Request = {
|
||||
type: "Config/set",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
};
|
||||
const sendMessage = () => {
|
||||
ReadSocialCard("CardDefault");
|
||||
}
|
||||
const reciceMessage = (response: Response) => {
|
||||
console.log(response);
|
||||
}
|
||||
const getarry = () => {
|
||||
let data: any = {}
|
||||
let request: Request = {
|
||||
type: "Config/getAll",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
}
|
||||
const getNetwork = () => {
|
||||
let data: any = {}
|
||||
let request: Request = {
|
||||
type: "getNetwork",
|
||||
config: {},
|
||||
data: data
|
||||
}
|
||||
wsStore.sendMessage(request);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
wsStore.setMessageCallback(reciceMessage)
|
||||
});
|
||||
onUnmounted(() => {
|
||||
wsStore.removeAllMessageCallback()
|
||||
})
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in New Issue