39 lines
749 B
TypeScript
39 lines
749 B
TypeScript
// terms.ts
|
|
Page({
|
|
data: {},
|
|
|
|
onLoad() {
|
|
// 页面加载时的逻辑
|
|
},
|
|
|
|
onReady() {
|
|
// 页面初次渲染完成时的逻辑
|
|
},
|
|
|
|
onShow() {
|
|
// 页面显示时的逻辑
|
|
},
|
|
|
|
onHide() {
|
|
// 页面隐藏时的逻辑
|
|
},
|
|
|
|
onUnload() {
|
|
// 页面卸载时的逻辑
|
|
},
|
|
|
|
handleEmailTap(e: any) {
|
|
const email = (e && e.currentTarget && e.currentTarget.dataset && e.currentTarget.dataset.email) ? e.currentTarget.dataset.email : 'support@blabla.team'
|
|
try {
|
|
wx.setClipboardData({
|
|
data: email,
|
|
success: () => {
|
|
wx.showToast({ title: '邮箱已复制', icon: 'none' })
|
|
}
|
|
})
|
|
} catch (err) {
|
|
wx.showToast({ title: '复制失败', icon: 'none' })
|
|
}
|
|
}
|
|
})
|