import { getVipInfo, } from '~/api/user' import { formatDate } from '~/utils/util' Component({ data: { show: false, vipTime: '' }, methods: { open() { if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ mask: true }) } this.getVipInfo() this.setData({ show: true }) }, closeModal() { this.setData({ show: false }) if (typeof this.getTabBar === 'function' && this.getTabBar()) { this.getTabBar().setData({ mask: false }) } }, async getVipInfo() { let vipTime = await getVipInfo() this.setData({ vipTime }) }, } })