# shareforjiyun

> wxshare and leadeonShare for jiyun

Latest version **1.0.3** (published 2021-04-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install shareforjiyun
pnpm add shareforjiyun
yarn add shareforjiyun
bun add shareforjiyun
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2021-04-02 |
| First published | 2021-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jiyun |
| Maintainers | zhengxueqi |
| Keywords | share |

## Links

- npm: https://www.npmjs.com/package/shareforjiyun
- npm.io page: https://npm.io/package/shareforjiyun

## Recent versions

- 1.0.3 (latest) — 2021-04-02
- 1.0.2 — 2021-03-25
- 1.0.1 — 2021-03-16
- 1.0.0 — 2021-03-12

## README

## shareforjiyun

### 使用方法概览
  - 添加shareforjiyun npm 依赖：cnpm install shareforjiyun --save 
  - 项目中引入：import shareHandle from 'shareforjiyun' (shareHandle自定义)
    - shareHandle对象下有两个方法
      - shareHandle.wxShare(obj)方法用于微信分享
      - shareHandle.leadeonShare(obj)方法用于一级手厅分享
      ```
        //obj参数示例
        const obj = {
          title: '分享标题',
          desc: '分享描述',
          link: '分享链接',
          imgUrl: '分享图标',
          content: '分享内容'  
        }
        //必传键值对请参考代码案例
      ```
      
### 使用依赖
  - shareHandle.wxShare(obj)方法依赖axios请求
  - shareHandle.leadeonShare(obj)方法依赖leadeon(一级手厅jdk)

### 代码案例
  ```
  import axios from "axios";
  if (getIsWeixin()) {  //微信对应环境
    //微信二次分享 
    shareHandle.wxShare({
      title: shareTitle,
      desc: shareDescription,
      imgUrl: sharePictureUrl,
      link: shareRedirectUrl_para,
    });
  }
  if (getIsApp()) {  //手厅对应环境
    //一级手厅分享
    shareHandle.leadeonShare({
      title: shareTitle,
      link: shareRedirectUrl_para,
      imgUrl: sharePictureUrl,
      content: shareDescription,
    });
  }
  ```

---
_Source: https://npm.io/package/shareforjiyun · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
