1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import { mapGetters } from 'vuex'
- import { drawLogo } from '@/utils'
- export default {
- data() {
- return {
- isRequest: false,
- list: [],
- }
- },
- computed: {
- ...mapGetters(['authUserId', 'routePrefix']),
- total() {
- return this.list.length
- },
- },
- mounted() {
- this.fetchList()
- },
- methods: {
- // 绘制logo的方法
- drawLogo,
- // 查看详情
- toDetail(item) {
- const url = `${this.routePrefix}/approve/club/detail?id=${item.authId}`
- this.$router.push(url)
- },
- async fetchList() {
- // 自定义加载图标
- this.$toast.loading({
- message: '正在获取明星机构...',
- duration: 0,
- })
- try {
- const res = await this.$http.api.getAuthClubStarList({
- authUserId: this.authUserId,
- })
- this.list = res.data
- } catch (error) {
- console.log(error)
- } finally {
- this.$toast.clear()
- }
- },
- // 格式化地址
- formatAddress(a1, a2) {
- let resutl = ''
- if (a1) resutl += a1
- if (a2) resutl += a2
- return resutl || '暂无'
- },
- },
- }
|