import { defineStore } from 'pinia'
import { ref } from 'vue'
import axios from 'axios'
export const useChannelStore = defineStore('channel', () => {
const channelList = ref([])
const getList = () => {
axios({
method: "get",
url: "http://geek.itheima.net/v1_0/channels"
}).then(resp => {
channelList.value = resp.data.data.channels
console.log(channelList.value)
})
}
return {
channelList,
getList
}
})