# reLaunch(Object object)

Closes all current pages and redirects to the specified page.

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | **✓** | **✓** | **✓** | V7.35.0+ | Preview
Web app | **X** | **X** | **X** | **X** | /

## Input

Inherits [standard object input](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM), and has the following extension properties:

Name | Data type | Required | Default value | Description
---|---|---|---|---
url | string | Yes | &nbsp; | The path of the gadget page to be redirected to, which can be followed by a parameter. The parameter is separated from the path by `?`, the parameter key is connected to the parameter value by `=`, and different parameters are separated by `&` (for example, `path?key=value&key2=value2`). If the path to be redirected to is the tabBar page, no parameter can be included

## Output

Inherits [standard object output](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM#8c92acb8), without extension property

##  Sample code

```js
tt.reLaunch({
    "url": "/pages/api/index",
    success(res) {
      console.log(JSON.stringify(res));
    },
    fail(res) {
      console.log(`reLaunch fail: ${JSON.stringify(res)}`);
    }
});
```

Sample return object for `success`:
```json
{
    "errMsg": "reLaunch:ok"
}
```

