share.d.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /**
  2. * 分享 请求参数定义
  3. * @apiName biz.util.share
  4. */
  5. export interface IBizUtilShareParams {
  6. /** 分享类型,0:全部组件默认; 1:只能分享到钉钉;2:不能分享,只有刷新按钮 */
  7. type: number;
  8. /** url地址 */
  9. url: string;
  10. /** 分享标题 */
  11. title: string;
  12. /** 分享内容 */
  13. content: string;
  14. /** 分享的图片 */
  15. image: string;
  16. /** 每个平台自定义的内容 */
  17. custom?: {
  18. [key: string]: {
  19. content: string;
  20. image: string;
  21. url: string;
  22. title: string;
  23. };
  24. };
  25. /** 数组代表需要使用那几个平台,并且按序显示 */
  26. order?: string[];
  27. /** 按钮名 */
  28. buttonName?: string;
  29. /** 是否只显示分享平台,布尔值,true:只显示分享平台,false:不仅显示分享平台,也显示收藏,复制等操作选项 */
  30. onlyShare?: boolean;
  31. /** 不用选择平台,直接跳到指定平台分享,值与下表key值相同 */
  32. destChannelStyle?: string;
  33. /** 用于传递手机号,进行短信的分享 */
  34. smsRecipients?: string[];
  35. /** 提供前端支持额外增加分享item的展示,item点击后返回对应的key提供前端进行业务处理 >5.1.1以上支持 移动端 */
  36. custom_addon?: {
  37. [customShareType: string]: {
  38. title: string;
  39. iconUrl: string;
  40. };
  41. };
  42. }
  43. /**
  44. * 分享 返回结果定义
  45. * @apiName biz.util.share
  46. */
  47. export interface IBizUtilShareResult {
  48. /** 分享平台类型 */
  49. shareType?: string;
  50. /** result */
  51. result?: 0 | 1 | 2;
  52. }
  53. /**
  54. * 分享
  55. * @apiName biz.util.share
  56. * @supportVersion ios: 2.4.0 android: 2.4.0
  57. * @author android:长岚 iOS: 文算
  58. */
  59. export declare function share$(params: IBizUtilShareParams): Promise<IBizUtilShareResult>;
  60. export default share$;