import { AgreementType } from '@/core/libs/enums'

const toast = (title: string) => uni.showToast({ title, icon: 'none' })

export const toHomePage = (id: string) => {
  console.log(id)
  uni
    .navigateToMiniProgram({
      appId: 'wx4d95c9addba81089',
      envVersion: 'trial',
      path: '/pages/mine/homepage/index' + '?id=' + id,
    })
    .then()
}
export const toContentHtml = async (option: { title: string; type: AgreementType }) => {
  await uni.navigateTo({
    url: `/pages/common/content-html/index?title=${option.title}&type=${option.type}`,
  })
}
