Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@marsjs/api

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marsjs/api - npm Package Compare versions

Comparing version 1.0.17 to 1.0.18

33

api/navigate/index.js

@@ -86,3 +86,3 @@ /**

}
delta = parseInt(delta, 10);
delta = parseInt(delta || 1, 10);
let routes = this.$router.options.routes;

@@ -101,3 +101,31 @@ delta > routes.length

/**
* 跳转到 tabBar 页面
* @param {Object} options 跳转参数
* @param {string} options.url 需要跳转的 tabBar 页面的路径
* @param {Function} options.success 接口调用成功的回调函数
* @param {Function} options.fail 接口调用失败的回调函数
* @param {Function} options.complete 接口调用结束的回调函数(调用成功、失败都会执行)
*/
function switchTab(options) {
let {
url,
success,
fail,
complete
} = options;
this.$router && this.$router.push({
path: url
}, function (res) {
callback(success, res);
callback(complete, res);
}, function (res) {
callback(fail, res);
callback(complete, res);
});
}
/**
* 需要跳转的应用内页面路径 , 路径后可以带参数。参数与路径之间使用 ? 分隔,参数键与参数值用=相连,不同参数用 & 分隔;如 ‘path?key=value&key2=value2’,如果跳转的页面路径是 tabBar 页面则不能带参数。不支持回调。

@@ -118,3 +146,4 @@ * @param {Object} options 跳转参数

navigateBack,
reLaunch
reLaunch,
switchTab
};

19

CHANGELOG.md

@@ -6,2 +6,15 @@ # Change Log

## [1.0.18](https://github.com/max-team/Mars/compare/@marsjs/api@1.0.17...@marsjs/api@1.0.18) (2019-06-04)
### Features
* **api:** add navigate api: switch tab ([ff33fda](https://github.com/max-team/Mars/commit/ff33fda))
# @marsjs/api
## [1.0.17](https://github.com/max-team/Mars/compare/@marsjs/api@1.0.16...@marsjs/api@1.0.17) (2019-04-16)

@@ -12,11 +25,9 @@

* **systeminfo:** fix UC bug becauseOf its unusual userAgent ([fa347d0](https://github.com/max-team/Mars/commit/fa347d0))
* **api:** fix UC systeminfo bug becauseOf its unusual userAgent ([fa347d0](https://github.com/max-team/Mars/commit/fa347d0))
## [1.0.16](https://github.com/max-team/Mars/compare/@marsjs/api@1.0.16...@marsjs/api@1.0.16) (2019-04-12)
## [1.0.16](https://github.com/max-team/Mars/compare/@marsjs/api@1.0.16...@marsjs/api@1.0.16) (2019-04-16)
### Features

@@ -23,0 +34,0 @@

{
"name": "@marsjs/api",
"version": "1.0.17",
"version": "1.0.18",
"browser": "index.js",

@@ -12,3 +12,3 @@ "scripts": {

},
"gitHead": "c06b1b6defdff89c31582297ca3be1f62bfc62a2"
"gitHead": "e7b9db6988b630f289186df83226d75ed57394dd"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc