button 去边框
.operation-list::after{
border: none;
}
* 返回顶部 */
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();
},
//图片上传
headsculpture: function (e) {
var that = this;
wx.chooseImage({
count: 1, //最多可以选择的图片总数
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
var tempFilePaths = res.tempFilePaths;
//启动上传等待中...
wx.showToast({
title: '正在上传...',
icon: 'loading',
mask: true,
duration: 2000,
})
wx.uploadFile({
url: '', //地址
filePath: tempFilePaths[0],
name: 'uploadfile_ant',
formData: {},
header: {
"Content-Type": "multipart/form-data"
},
success: function (res) {
var data = JSON.parse(res.data);
//服务器返回格式: { "Catalog": "testFolder", "FileName": &