网友真实露脸自拍10p,成人国产精品秘?久久久按摩,国产精品久久久久久无码不卡,成人免费区一区二区三区

小程序模板網

小程序分享轉發方法

發布時間:2021-06-18 08:58 所屬欄目:小程序開發教程

1、小程序分享轉發(法一)

a:右上角菜單欄顯示轉發

wx.showShareMenu({
  withShareTicket: true,
  success: function(res) {
  },
  fail: function(res) {
  }
})
b:
onShareAppMessage(options) {
  let shareObj = {
    title: '精選優惠券', 
    path: '/pages/selected',  // 默認當前頁的url
    imageUrl: '../images/logo.png',
    success: function(res) {
      console.log(res, '成功')
    },
    fail: function(res) {
      console.log(res, '失敗')
    }
  }
  return shareObj
}
2、小程序分享轉發(法二)
a:自定義轉發分享
<button data-name="shareBtn" open-type="share">轉發</button>
b:
onShareAppMessage(options) {
  let shareObj = {
    title: '精選優惠券', 
    path: '/pages/selected',  // 默認當前頁的url
    imageUrl: '../images/logo.png',
    success: function(res) {
      console.log(res, '成功')
    },
    fail: function(res) {
      console.log(res, '失敗')
    }
  }
  if(option.form === 'button'){
    var eData = options.target.dataset;
    console.log( eData.name ); 


  }
  return shareObj
}


易優小程序(企業版)+靈活api+前后代碼開源 碼云倉庫:starfork
本文地址:http://www.xiuhaier.com/wxmini/doc/course/26553.html 復制鏈接 如需定制請聯系易優客服咨詢:800182392 點擊咨詢
QQ在線咨詢
AI智能客服 ×