import { encrypt } from '@/common/crypto.js'

const defalutOptions = {
    title: '护肤上颜选，正品有好货~',
    path: '/pages/index/index',
    imageUrl: 'https://static.caimei365.com/app/mini-hehe/icon/icon-share.png'
}

export function shareDataResult(shareData, title, coverUrl) {
    const state_str = encodeURIComponent(encrypt(shareData))
    const result = {
        title: title || defalutOptions.title,
        path: `${defalutOptions.path}?state_str=${state_str}`,
        imageUrl: coverUrl || defalutOptions.imageUrl
    }
    return result
}
