You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
48 lines
1.0 KiB
<!--推送配置-->
|
|
<template>
|
|
<el-row type="flex" justify="center">
|
|
<el-col :span="8">
|
|
<el-input v-model="botName" :disabled="true">
|
|
<template v-slot:prepend>Telegram Bot</template>
|
|
</el-input>
|
|
</el-col>
|
|
</el-row>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import {defineComponent, onMounted, ref} from "vue";
|
|
import {useStore} from "vuex";
|
|
import {getTelegramBot, JSONResponse, message} from "../request";
|
|
import {email_cookie_key} from "../global";
|
|
//@ts-ignore
|
|
import crumbs from 'crumbsjs';
|
|
|
|
export default defineComponent({
|
|
name: "Config",
|
|
setup() {
|
|
|
|
const store = useStore()
|
|
|
|
onMounted(() => {
|
|
store.commit('updateRoute', '/config')
|
|
})
|
|
|
|
const botName = ref('')
|
|
|
|
getTelegramBot(crumbs.get(email_cookie_key)).then(res => res.json())
|
|
.then((res: JSONResponse) => {
|
|
if (res.result === 'OK') {
|
|
botName.value = res.body.bot.name
|
|
} else {
|
|
message(res)
|
|
}
|
|
})
|
|
|
|
return {botName}
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |