-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJUMP_OUT.js
More file actions
47 lines (40 loc) · 1.16 KB
/
JUMP_OUT.js
File metadata and controls
47 lines (40 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
'use strict';
/**
* @api JUMP_OUT(url) JUMP_OUT
* @apiGroup APP
* @apiVersion 1.0.0
* @apiParam {string} url 目标URL地址
* @apiDescription 用外部浏览器打开 url
* @apiUse APPNpm
* @apiUse APPJs
* @apiParamExample {string} 例子
* JUMP_OUT('https://www.baidu.com') 外部地址
* JUMP_OUT('https://gift.yingyinglicai.com/activity/invite/???') 活动地址
* @apiParamExample {string} 返回值
* 无
**/
/**
* todo JUMP
*/
Object.defineProperty(exports, "__esModule", {
value: true
});
var _config = require('./APP/config');
var _BROWSER = require('./BROWSER');
var _BROWSER2 = _interopRequireDefault(_BROWSER);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var name = 'JUMP_OUT';
var JUMP_OUT = function JUMP_OUT(url) {
if (typeof url !== 'string') {
throw new TypeError('[' + name + '] ' + _config.strError);
}
if (_BROWSER2.default.isClient) {
(0, _config.WinJSDec)(function (_) {
window.WinJSBridge.call('navigation', 'openURLOutside', { url: url });
});
} else {
window.location.href = url;
}
};
exports.default = JUMP_OUT;
//# sourceMappingURL=JUMP_OUT.js.map