2.0.0-beta • Published 4 years ago
universal-getlaunchoptionssync v2.0.0-beta
group: title: Application
title: getLaunchOptionsSync
getLaunchOptionsSync
Obtains the parameters upon Mini Program startup.
Support
Install
$ npm install universal-getlaunchoptionssync --save
Usage
import { createElement, useEffect, Fragment } from 'rax';
import getLaunchOptionsSync from 'universal-getlaunchoptionssync';
function App() {
useEffect(() => {
const options = getLaunchOptionsSync();
console.log(options.path);
}, []);
return (<>
<View></View>
</>)
}
It can also be imported from the big package:
import {getLaunchOptionsSync} from 'universal-api';
Return
Property | Type | Description | Default |
---|---|---|---|
query | Object | The query parameter for Mini Program startup | - |
scene | Number | The scene value for Mini Program startup wechat ali byte | - |
path | String | The path for Mini Program startup | - |
referrerInfo | Object | The source information | - |
referrerInfo
Property | Type | Description | Default |
---|---|---|---|
appId | String | The appId of the source Mini Program | - |
extraData | Object | The data transfered from the source Mini Program | - |
2.0.0-beta
4 years ago