Page({
data: {
fromType: "",
userInfo: {},
mobile: "",
userId: "",
slideButtons: [{
text: "修改",
click: "edit",
extClass: "edit_btn"
}, {
text: "删除",
click: "delete",
extClass: "delete_btn"
}],
tab_index: 0,
tab_active: "workexp",
check_type: "",
showType: "",
workexp: [],
eduexp: [],
societyexp: [],
personalexp: [],
paper: [],
},
onLoad: function(options) {
let fromType = options.fromType;
let userId = options.userId ? options.userId : "";
this.setData({
fromType: fromType,
userId: userId
})
let that = this
this.getUserInfo();
},
onShareAppMessage: function() {
console.log("11111")
return {
title: this.data.userInfo.name + "的名片"
};
},
editPublic(e) {
const that = this;
let type = e.currentTarget.dataset.type;
this.setData({
check_type: type
});
},
onShow: function() {
if (this.data.fromType !== "businessCard" || !this.data.showType) return false;
this.getUserInfo()
},
})
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。
找到原因了,在APP.js中,与我合作的开发者,写了一个公共分享的方法,所以指定页面中的分享方法会被覆盖掉