1. /**
  2. * 该模块是微信、qq分享插件(持续完善中,目前只支持微信的朋友圈、微信好友分享)
  3. * @module share
  4. * @subtitle 分享组件
  5. */
  6.  
  7. /**
  8. * 分享插件
  9. * @namespace cmp
  10. * @class share
  11. * @constructor
  12. * @param {Object} options 配置参数
  13. * @param {String} options.title 分享内容显示的标题
  14. * @param {String} options.text 分享内容显示的内容
  15. * @param {String} options.url 点击链接地址
  16. * @param {String} options.imgUrl 需要显示的图片地址
  17. * @param {Function} options.success 获取成功后的回调
  18. * @param {Function} options.error 错误的回调
  19. * @example
  20. * ```
  21. * <script>
  22. * cmp.share({
  23. * title:"这是一个分享",
  24. * text:"一大堆分享显示的内容文字",
  25. * url:"http://www.baidu.com",
  26. * imgUrl:"http://ddddd.png",
  27. * success:function(networkDetail){
  28. * //do something with networkDetail
  29. * }
  30. * error:function(error){}
  31. * });
  32. * </script>
  33. * ```
  34. */
Top