* 返回顶部
*/
backTop: function() {
this.stickyFlag = false, wx.pageScrollTo({
scrollTop: 0,
duration: 500
});
},
//跳转
goLink: function(event) {
let url = event.currentTarget.dataset.link;
url && wx.navigateTo({ url })
},
//复制
copy: function () {
var that = this;
wx.setClipboardData({
data: that.data.goodsList[0].code,
success() {
wx.showToast({
title: '复制成功',
icon: 'success',
duration: 1000
})
}
})
},
/**
* 拨打电话
*/
callTelphone: function (e) {
var that = this;
var phoneNumber = e.currentTarget.dataset.phone;
if (phoneNumber) {
this.isCalling || (this.isCalling = true, wx.makePhoneCall({
phoneNumber: phoneNumber,
complete: function () {
that.isCalling = false;
}
}));
}
},
/**
* 搜索栏高度
*/
getScrollViewHeight: function () {
var that = this;
wx.createSelectorQuery().select(".search-bar").boundingClientRect(function (res) {
res.height && that.setData({
scrollViewHeight: wx.getSystemInfoSync().windowHeight - res.height
});
}).exec();
},
本文地址:https://blog.csdn.net/liugenrong/article/details/107352837
如对本文有疑问, 点击进行留言回复!!
iOS开发苹果开发者企业账号续费(提示你的支付授权失败解决办法)
有关ios::sync_with_stdio(false)和cin.tie(nullptr)的介绍与意义
iOS14有nfc功能吗 iOS14 nfc功能开启关闭方法
网友评论