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.
 
 
 
 
 

44 lines
893 B

<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, message} from "../request";
export default defineComponent({
name: "Config",
setup() {
const store = useStore()
onMounted(() => {
store.commit('updateRoute', '/config')
})
const botName = ref('')
getTelegramBot(store.state.user.email).then(res => res.json())
.then(res => {
if (res.result === 'OK') {
botName.value = res.bot.name
} else {
message(res)
}
})
return {botName}
}
})
</script>
<style scoped>
</style>