纯图片分享
import { MWeixin } from "@yl/super-jssdk";
MWeixin.shareImage(optional);
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| optional | Object | 是 | 必选参数 |
optional
| 参数 | 类型 | 必填 | 作用 |
|---|---|---|---|
| url | string | 是 | 要分享的图片地址 |
| pengyouquan | munber | 否 | 可选参数,1发朋友圈,0分享给朋友,默认0; |
| 参数 | 类型 | 作用 |
|---|---|---|
| resolve() | Function | 成功回调, |
| reject(error) | Function | 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"} |
MWeixin.shareImage({
'url':'/sdcard/xxx.jpg',
}).then(res => {
console.log(res)
}).catch(err => {
console.log(err)
});