-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIS_HEALTHOPEN.js
More file actions
51 lines (45 loc) · 1.13 KB
/
IS_HEALTHOPEN.js
File metadata and controls
51 lines (45 loc) · 1.13 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
48
49
50
51
'use strict';
/**
* @api GET_LOGIN() GET_LOGIN
* @apiGroup APP
* @apiVersion 1.0.0
* @apiDescription 判断是否已登录
* @apiUse APPNpm
* @apiUse APPJs
* @apiParamExample {string} 例子
* GET_LOGIN(({isLogin})=>{
* console.log(isLogin)
* })
* @apiParamExample {string} 返回值
* {
* isLogin: true
* }
**/
/**
* todo LOGIN
*/
Object.defineProperty(exports, "__esModule", {
value: true
});
var _config = require('./APP/config');
var name = 'IS_HEALTHOPEN';
var IS_HEALTHOPEN = function IS_HEALTHOPEN() {
var fn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (_) {};
if (typeof fn === 'function') {
(0, _config.WinJSDec)(function (_) {
window.WinJSBridge.call('tools', 'healthopen', function (res) {
var code = res.code,
response = res.response;
if (code == 0) {
fn(response);
} else {
throw new Error('[' + name + '] ' + _config.appError);
}
});
});
} else {
throw new TypeError('[' + name + '] ' + _config.fnError);
}
};
exports.default = IS_HEALTHOPEN;
//# sourceMappingURL=IS_HEALTHOPEN.js.map