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amPyaj7Mk2V5ze1vcHnK++K24r/Sois+CgOyIkeytWBeU0zP8a/mneTjz5n/vtfwe1ibHGrKcs/yGz9monHCbi21qSPWIjMiI/HfkXwSZaWJJZaXhAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE3LTA0LTA0VDExOjQ3OjQ1KzA4OjAwI6N5UAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNy0wNC0wNFQxMTo0Nzo0NSswODowMFL+wewAAAAASUVORK5CYII='
const buttons = [{
    openType: 'getUserInfo',
    label: 'GetUserInfo',
    icon,
},
{
    openType: 'share',
    label: 'Share',
    icon,
},
{
    openType: 'contact',
    label: 'Contact',
    icon,
},
{
    label: 'View on Demo',
    icon,
}]

import ad from '../index/ad'

ad({
    data: {
        buttons,
    },
    onClick(e) {
        console.log('onClick', e.detail)
        if (e.detail.index === 3) {
            wx.switchTab({
                url: '/pages/index/index',
            })
        }
    },
    onContact(e) {
        console.log('onContact', e)
    },
    onGotUserInfo(e) {
        console.log('onGotUserInfo', e)
    },
    onGotPhoneNumber(e) {
        console.log('onGotPhoneNumber', e)
    },
    onChange(e) {
        console.log('onChange', e)
    },
})
