我是这么调用的:
import { Cloud } from "laf-client-sdk";
const cloud = new Cloud({
baseUrl: "https://xxxxxxx.laf.dev",
dbProxyUrl: "/proxy/app",
getAccessToken: () => localStorage.getItem("access_token"),
environment: "wxmp",
});
报错如下:
TypeError: Cannot read property 'getItem' of undefined
at Object.getAccessToken (index.js:9)
at WxmpRequest._callee6$ (index.js? [sm]:8)
at L (regenerator.js:1)
at Generator._invoke (regenerator.js:1)
at Generator.t.<computed> [as next] (regenerator.js:1)
at asyncGeneratorStep (asyncToGenerator.js:1)
at c (asyncToGenerator.js:1)
at asyncToGenerator.js:1
at new Promise (<anonymous>)
at WxmpRequest.<anonymous> (asyncToGenerator.js:1)
哪位大佬指点下。。。