收藏
回答

onShareAppMessage: function() 分享没触发?

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", //当前选中tab索引值
    check_type: "", //当前编辑公开的内容
    showType: "", //编辑后返回页面需要刷新的api
    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()
  },



})
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容