主动获取魔窗内容,1.2.3版本开始生效
import { MJMLink } from "@yl/super-jssdk"
MJMLink.getData()
| 参数 | 类型 | 作用 |
|---|---|---|
| resolve(result) | Function | 成功回调, result为String, |
| reject(err) | Function | 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"} |
MJMLink.getData()
.then((res) => {
console.log(res);
})
.catch(err => {
console.log('插件调用失败:', err)
})