@tslsmart/magic-applet
Version:
特斯联移动端统一接口,抹平h5和wgt的差异
21 lines (18 loc) • 457 B
text/typescript
import { onLaunch } from '@dcloudio/uni-app'
import { PARAMS_LOCAL_KEY } from '../constant'
export const initParams = () => {
return new Promise((resolve) => {
onLaunch(({ referrerInfo }) => {
const params = referrerInfo?.extraData
if (params.authorization) {
uni.setStorage({
key: PARAMS_LOCAL_KEY,
data: params,
success() {
resolve(params)
}
})
}
})
})
}