// pages/message/index.js import Toast from '../../components/toast/index'; import Message from '../../components/message/index'; Page({ /** * 页面的初始数据 */ data: { isClick: false, aIconList: ['check-rectangle','star','notification-filled','circle'], }, toast(option) { Toast({ context: this, selector: '#t-toast', ...option, }); }, startVipButton(e){ this.setData({ isClick: true }) this.toast({ message: '已获得会员资格!', theme: 'success', placement: 'bottom', direction: 'column', }); Message.info({ context: this, offset: [20, 32], marquee: { speed: 50, loop: -1, delay: 5000 }, icon: false, content: '请关注微信公众号Quinn,回复"VIP"', duration: -1, }); } })