@byhealth/native-app-jssdk
Advanced tools
Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2
@@ -10,5 +10,12 @@ "use strict"; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var createCallback_1 = __importDefault(require("./lib/createCallback")); | ||
var nativeBridge_1 = __importDefault(require("./lib/nativeBridge")); | ||
var nativeBridge_1 = __importStar(require("./lib/nativeBridge")); | ||
/** | ||
@@ -18,3 +25,3 @@ * 当前是否在App环境 | ||
function isApp() { | ||
return !!navigator.userAgent.match(/byhealth/gi); | ||
return nativeBridge_1.isAppWebview; | ||
} | ||
@@ -66,3 +73,3 @@ exports.isApp = isApp; | ||
return new Promise(function (resolve) { | ||
nativeBridge_1.default('scanQrBarCode', 2, createCallback_1.default(resolve)); | ||
nativeBridge_1.default('scanQrBarCode', 1, createCallback_1.default(resolve)); | ||
}); | ||
@@ -76,3 +83,3 @@ } | ||
return new Promise(function (resolve) { | ||
nativeBridge_1.default('scanQrBarCode', 1, createCallback_1.default(resolve)); | ||
nativeBridge_1.default('scanQrBarCode', 2, createCallback_1.default(resolve)); | ||
}); | ||
@@ -79,0 +86,0 @@ } |
@@ -13,2 +13,3 @@ /** | ||
} | ||
declare const isAppWebview: boolean; | ||
/** | ||
@@ -18,2 +19,3 @@ * Call the app native interface. | ||
declare function nativeBridge(api: string, ...args: any): void; | ||
export { isAppWebview }; | ||
export default nativeBridge; |
@@ -6,2 +6,3 @@ "use strict"; | ||
var isAppWebview = !!navigator.userAgent.match(/byhealth/gi); | ||
exports.isAppWebview = isAppWebview; | ||
/** | ||
@@ -8,0 +9,0 @@ * Call the app native interface. |
@@ -7,3 +7,3 @@ /** | ||
import createCallback from './lib/createCallback'; | ||
import nativeBridge from './lib/nativeBridge'; | ||
import nativeBridge, { isAppWebview } from './lib/nativeBridge'; | ||
/** | ||
@@ -13,3 +13,3 @@ * 当前是否在App环境 | ||
export function isApp() { | ||
return !!navigator.userAgent.match(/byhealth/gi); | ||
return isAppWebview; | ||
} | ||
@@ -55,3 +55,3 @@ /** | ||
return new Promise(function (resolve) { | ||
nativeBridge('scanQrBarCode', 2, createCallback(resolve)); | ||
nativeBridge('scanQrBarCode', 1, createCallback(resolve)); | ||
}); | ||
@@ -64,3 +64,3 @@ } | ||
return new Promise(function (resolve) { | ||
nativeBridge('scanQrBarCode', 1, createCallback(resolve)); | ||
nativeBridge('scanQrBarCode', 2, createCallback(resolve)); | ||
}); | ||
@@ -67,0 +67,0 @@ } |
@@ -35,2 +35,3 @@ var nativeProtocol = 'js-call://'; | ||
} | ||
export { isAppWebview }; | ||
export default nativeBridge; |
@@ -1,5 +0,201 @@ | ||
/** | ||
/* | ||
* BY-Health Front-end Team (https://www.by-health.com/) | ||
* | ||
* Copyright © 2016-present By-Health Co Ltd. All rights reserved. | ||
* @file | ||
*/ | ||
/** | ||
* 角色名称 | ||
*/ | ||
export var RoleType; | ||
(function (RoleType) { | ||
/** | ||
* 连锁管理者 | ||
*/ | ||
RoleType[RoleType["RoleChainManager"] = 1] = "RoleChainManager"; | ||
/** | ||
* 店长 | ||
*/ | ||
RoleType[RoleType["RoleStoreManager"] = 2] = "RoleStoreManager"; | ||
/** | ||
* 店员 | ||
*/ | ||
RoleType[RoleType["RoleStoreAssistant"] = 3] = "RoleStoreAssistant"; | ||
// ------------ 经销商 ------------ | ||
// #region | ||
/** | ||
* 经销商总经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerGeneralManager"] = 100] = "RoleDealerGeneralManager"; | ||
/** | ||
* 经销商业务经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerBusinessManager"] = 101] = "RoleDealerBusinessManager"; | ||
/** | ||
* 经销商副总经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerViceGeneralManager"] = 102] = "RoleDealerViceGeneralManager"; | ||
/** | ||
* 经销商销售总监 | ||
*/ | ||
RoleType[RoleType["RoleDealerSalesDirector"] = 103] = "RoleDealerSalesDirector"; | ||
/** | ||
* 经销商业务主管 | ||
*/ | ||
RoleType[RoleType["RoleDealerAccountDirector"] = 104] = "RoleDealerAccountDirector"; | ||
/** | ||
* 经销商业务代表 | ||
*/ | ||
RoleType[RoleType["RoleDealerSalesRepresentative"] = 105] = "RoleDealerSalesRepresentative"; | ||
/** | ||
* 经销商促销员 | ||
*/ | ||
RoleType[RoleType["RoleDealerPromotionsSpecialist"] = 106] = "RoleDealerPromotionsSpecialist"; | ||
/** | ||
* 经销商资料管理员 | ||
*/ | ||
RoleType[RoleType["RoleDealerDataManager"] = 107] = "RoleDealerDataManager"; | ||
/** | ||
* 订单专员 | ||
*/ | ||
RoleType[RoleType["RoleDealerOrderSpecialist"] = 108] = "RoleDealerOrderSpecialist"; | ||
// #endregion | ||
// ------------------------------------ | ||
// 经销商 - 如果是以下三种角色,职位名称则要获取userInfo.user.outterRoletypename | ||
// ------------------------------------ | ||
// #region | ||
/** | ||
* 经销商高级管理员:经销商总经理 | ||
*/ | ||
RoleType[RoleType["RolePartnerSeniorAdministrator"] = 121] = "RolePartnerSeniorAdministrator"; | ||
/** | ||
* 经销商管理员:经销商副总经理,经销商销售总监,订单专员 | ||
*/ | ||
RoleType[RoleType["RolePartnerAdministrator"] = 122] = "RolePartnerAdministrator"; | ||
/** | ||
* 经销商业务员:经销商业务经理,经销商业务代表,经销商业务主管,经销商资料管理员 | ||
*/ | ||
RoleType[RoleType["RolePartnerBusinessManager"] = 123] = "RolePartnerBusinessManager"; | ||
// #endregion | ||
// ------------ 讲师 ------------ | ||
// #region | ||
/** | ||
* 总负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBoss"] = 201] = "RoleLecturerBoss"; | ||
/** | ||
* [健康管理]场景负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerManageScene"] = 202] = "RoleLecturerManageScene"; | ||
/** | ||
* [健康管理]现场操作讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerManageOperation"] = 203] = "RoleLecturerManageOperation"; | ||
/** | ||
* [大健康快车]现场操作讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBusOperation"] = 204] = "RoleLecturerBusOperation"; | ||
/** | ||
* [大健康快车]场景负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBusScene"] = 205] = "RoleLecturerBusScene"; | ||
//#endregion | ||
// ------------------------------------ | ||
// 讲师也类似经销商账号,如果是以下三种角色,职位名称则要获取userInfo.user.outterRoletypename | ||
// 培训经理:培训经理,培训部经理,培训高级主管,电商培训部经理,健康快车培训经理 | ||
// 项目主管:项目主管,健康快车项目车长 | ||
// 培训主管:培训主管 | ||
// ------------------------------------ | ||
// #region | ||
/** | ||
* 培训经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingManager"] = 211] = "RoleTrainingManager"; | ||
/** | ||
* 培训主管 | ||
*/ | ||
RoleType[RoleType["RoleTrainingSupervisor"] = 212] = "RoleTrainingSupervisor"; | ||
/** | ||
* 项目主管 | ||
*/ | ||
RoleType[RoleType["RoleProjectSupervisor"] = 213] = "RoleProjectSupervisor"; | ||
/** | ||
* 培训副经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingDeputyManager"] = 214] = "RoleTrainingDeputyManager"; | ||
/** | ||
* 培训部经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingDepartmentManager"] = 215] = "RoleTrainingDepartmentManager"; | ||
/** | ||
* 培训高级主管 | ||
*/ | ||
RoleType[RoleType["RoleTrainingSeniorSupervisor"] = 216] = "RoleTrainingSeniorSupervisor"; | ||
/** | ||
* 电商培训部经理 | ||
*/ | ||
RoleType[RoleType["RoleElectricBusinessTrainingDepartmentManager"] = 217] = "RoleElectricBusinessTrainingDepartmentManager"; | ||
/** | ||
* 健康快车培训经理 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressTrainingManager"] = 218] = "RoleHealthExpressTrainingManager"; | ||
/** | ||
* 区培训主管 | ||
*/ | ||
RoleType[RoleType["RoleDistrictTrainingSupervisor"] = 219] = "RoleDistrictTrainingSupervisor"; | ||
/** | ||
* 健康快车项目车长 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressProjectDriver"] = 220] = "RoleHealthExpressProjectDriver"; | ||
/** | ||
* 健康车主管 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressSupervisor"] = 221] = "RoleHealthExpressSupervisor"; | ||
// #endregion | ||
// ------------ 销售 ------------ | ||
// #region | ||
/** | ||
* 销售总监 | ||
*/ | ||
RoleType[RoleType["RoleSaleManager"] = 301] = "RoleSaleManager"; | ||
/** | ||
* 大区经理 | ||
*/ | ||
RoleType[RoleType["RoleDistictManager"] = 302] = "RoleDistictManager"; | ||
/** | ||
* 区域经理 | ||
*/ | ||
RoleType[RoleType["RoleRegionManager"] = 303] = "RoleRegionManager"; | ||
/** | ||
* 城市经理 | ||
*/ | ||
RoleType[RoleType["RoleCityManager"] = 304] = "RoleCityManager"; | ||
/** | ||
* 市场代表 | ||
*/ | ||
RoleType[RoleType["RoleMarketRepresent"] = 305] = "RoleMarketRepresent"; | ||
/** | ||
* 大区推广经理 | ||
*/ | ||
RoleType[RoleType["RoleAreaPromotionManager"] = 306] = "RoleAreaPromotionManager"; | ||
/** | ||
* 公司区域助理 | ||
*/ | ||
RoleType[RoleType["RoleCompanyAreaMan"] = 307] = "RoleCompanyAreaMan"; | ||
/** | ||
* 区域助理 | ||
*/ | ||
RoleType[RoleType["RoleRegionalAssistant"] = 308] = "RoleRegionalAssistant"; | ||
// #endregion | ||
})(RoleType || (RoleType = {})); | ||
export var Gender; | ||
(function (Gender) { | ||
/** | ||
* 男 | ||
*/ | ||
Gender[Gender["Male"] = 0] = "Male"; | ||
/** | ||
* 女 | ||
*/ | ||
Gender[Gender["Female"] = 1] = "Female"; | ||
})(Gender || (Gender = {})); |
/** | ||
* BY-Health Front-end Team (https://www.by-health.com/) | ||
* | ||
* Copyright © 2016-present By-Health Co Ltd. All rights reserved. | ||
* 角色名称 | ||
*/ | ||
export declare enum RoleType { | ||
/** | ||
* 连锁管理者 | ||
*/ | ||
RoleChainManager = 1, | ||
/** | ||
* 店长 | ||
*/ | ||
RoleStoreManager = 2, | ||
/** | ||
* 店员 | ||
*/ | ||
RoleStoreAssistant = 3, | ||
/** | ||
* 经销商总经理 | ||
*/ | ||
RoleDealerGeneralManager = 100, | ||
/** | ||
* 经销商业务经理 | ||
*/ | ||
RoleDealerBusinessManager = 101, | ||
/** | ||
* 经销商副总经理 | ||
*/ | ||
RoleDealerViceGeneralManager = 102, | ||
/** | ||
* 经销商销售总监 | ||
*/ | ||
RoleDealerSalesDirector = 103, | ||
/** | ||
* 经销商业务主管 | ||
*/ | ||
RoleDealerAccountDirector = 104, | ||
/** | ||
* 经销商业务代表 | ||
*/ | ||
RoleDealerSalesRepresentative = 105, | ||
/** | ||
* 经销商促销员 | ||
*/ | ||
RoleDealerPromotionsSpecialist = 106, | ||
/** | ||
* 经销商资料管理员 | ||
*/ | ||
RoleDealerDataManager = 107, | ||
/** | ||
* 订单专员 | ||
*/ | ||
RoleDealerOrderSpecialist = 108, | ||
/** | ||
* 经销商高级管理员:经销商总经理 | ||
*/ | ||
RolePartnerSeniorAdministrator = 121, | ||
/** | ||
* 经销商管理员:经销商副总经理,经销商销售总监,订单专员 | ||
*/ | ||
RolePartnerAdministrator = 122, | ||
/** | ||
* 经销商业务员:经销商业务经理,经销商业务代表,经销商业务主管,经销商资料管理员 | ||
*/ | ||
RolePartnerBusinessManager = 123, | ||
/** | ||
* 总负责讲师 | ||
*/ | ||
RoleLecturerBoss = 201, | ||
/** | ||
* [健康管理]场景负责讲师 | ||
*/ | ||
RoleLecturerManageScene = 202, | ||
/** | ||
* [健康管理]现场操作讲师 | ||
*/ | ||
RoleLecturerManageOperation = 203, | ||
/** | ||
* [大健康快车]现场操作讲师 | ||
*/ | ||
RoleLecturerBusOperation = 204, | ||
/** | ||
* [大健康快车]场景负责讲师 | ||
*/ | ||
RoleLecturerBusScene = 205, | ||
/** | ||
* 培训经理 | ||
*/ | ||
RoleTrainingManager = 211, | ||
/** | ||
* 培训主管 | ||
*/ | ||
RoleTrainingSupervisor = 212, | ||
/** | ||
* 项目主管 | ||
*/ | ||
RoleProjectSupervisor = 213, | ||
/** | ||
* 培训副经理 | ||
*/ | ||
RoleTrainingDeputyManager = 214, | ||
/** | ||
* 培训部经理 | ||
*/ | ||
RoleTrainingDepartmentManager = 215, | ||
/** | ||
* 培训高级主管 | ||
*/ | ||
RoleTrainingSeniorSupervisor = 216, | ||
/** | ||
* 电商培训部经理 | ||
*/ | ||
RoleElectricBusinessTrainingDepartmentManager = 217, | ||
/** | ||
* 健康快车培训经理 | ||
*/ | ||
RoleHealthExpressTrainingManager = 218, | ||
/** | ||
* 区培训主管 | ||
*/ | ||
RoleDistrictTrainingSupervisor = 219, | ||
/** | ||
* 健康快车项目车长 | ||
*/ | ||
RoleHealthExpressProjectDriver = 220, | ||
/** | ||
* 健康车主管 | ||
*/ | ||
RoleHealthExpressSupervisor = 221, | ||
/** | ||
* 销售总监 | ||
*/ | ||
RoleSaleManager = 301, | ||
/** | ||
* 大区经理 | ||
*/ | ||
RoleDistictManager = 302, | ||
/** | ||
* 区域经理 | ||
*/ | ||
RoleRegionManager = 303, | ||
/** | ||
* 城市经理 | ||
*/ | ||
RoleCityManager = 304, | ||
/** | ||
* 市场代表 | ||
*/ | ||
RoleMarketRepresent = 305, | ||
/** | ||
* 大区推广经理 | ||
*/ | ||
RoleAreaPromotionManager = 306, | ||
/** | ||
* 公司区域助理 | ||
*/ | ||
RoleCompanyAreaMan = 307, | ||
/** | ||
* 区域助理 | ||
*/ | ||
RoleRegionalAssistant = 308 | ||
} | ||
export declare enum Gender { | ||
/** | ||
* 男 | ||
*/ | ||
Male = 0, | ||
/** | ||
* 女 | ||
*/ | ||
Female = 1 | ||
} | ||
export interface UserInfo { | ||
ruleType: number; | ||
user: {}; | ||
auth: {}; | ||
store: {}; | ||
storeMember: {}; | ||
roleType: RoleType; | ||
user: { | ||
usertel: string; | ||
usertypename: string; | ||
usercode: string; | ||
usertype: number; | ||
username: string; | ||
outterusername: string; | ||
outteruserid: string; | ||
}; | ||
userExt: { | ||
/** | ||
* 性别 | ||
*/ | ||
gender: Gender; | ||
/** | ||
* 手机号 | ||
*/ | ||
phone: string; | ||
/** | ||
* 门店编号 | ||
*/ | ||
storeNum: string; | ||
userName: string; | ||
/** | ||
* 生日(时间戳) | ||
*/ | ||
birthday: number; | ||
/** | ||
* 头像链接 | ||
*/ | ||
imageUrl: string; | ||
}; | ||
auth: { | ||
/** | ||
* 店员手机 | ||
*/ | ||
userName: string; | ||
memberType: string; | ||
}; | ||
store: { | ||
/** | ||
* 门店编号 | ||
*/ | ||
bhNo: string; | ||
/** | ||
* 门店名称 | ||
*/ | ||
bhName: string; | ||
bhStoreid: string; | ||
bhStoreType: string; | ||
bhManager: string; | ||
bhMemberId: string; | ||
}; | ||
storeMember: { | ||
bhStoreid: string; | ||
}; | ||
} | ||
@@ -13,0 +231,0 @@ export interface ShareInfo { |
"use strict"; | ||
/** | ||
/* | ||
* BY-Health Front-end Team (https://www.by-health.com/) | ||
* | ||
* Copyright © 2016-present By-Health Co Ltd. All rights reserved. | ||
* @file | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** | ||
* 角色名称 | ||
*/ | ||
var RoleType; | ||
(function (RoleType) { | ||
/** | ||
* 连锁管理者 | ||
*/ | ||
RoleType[RoleType["RoleChainManager"] = 1] = "RoleChainManager"; | ||
/** | ||
* 店长 | ||
*/ | ||
RoleType[RoleType["RoleStoreManager"] = 2] = "RoleStoreManager"; | ||
/** | ||
* 店员 | ||
*/ | ||
RoleType[RoleType["RoleStoreAssistant"] = 3] = "RoleStoreAssistant"; | ||
// ------------ 经销商 ------------ | ||
// #region | ||
/** | ||
* 经销商总经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerGeneralManager"] = 100] = "RoleDealerGeneralManager"; | ||
/** | ||
* 经销商业务经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerBusinessManager"] = 101] = "RoleDealerBusinessManager"; | ||
/** | ||
* 经销商副总经理 | ||
*/ | ||
RoleType[RoleType["RoleDealerViceGeneralManager"] = 102] = "RoleDealerViceGeneralManager"; | ||
/** | ||
* 经销商销售总监 | ||
*/ | ||
RoleType[RoleType["RoleDealerSalesDirector"] = 103] = "RoleDealerSalesDirector"; | ||
/** | ||
* 经销商业务主管 | ||
*/ | ||
RoleType[RoleType["RoleDealerAccountDirector"] = 104] = "RoleDealerAccountDirector"; | ||
/** | ||
* 经销商业务代表 | ||
*/ | ||
RoleType[RoleType["RoleDealerSalesRepresentative"] = 105] = "RoleDealerSalesRepresentative"; | ||
/** | ||
* 经销商促销员 | ||
*/ | ||
RoleType[RoleType["RoleDealerPromotionsSpecialist"] = 106] = "RoleDealerPromotionsSpecialist"; | ||
/** | ||
* 经销商资料管理员 | ||
*/ | ||
RoleType[RoleType["RoleDealerDataManager"] = 107] = "RoleDealerDataManager"; | ||
/** | ||
* 订单专员 | ||
*/ | ||
RoleType[RoleType["RoleDealerOrderSpecialist"] = 108] = "RoleDealerOrderSpecialist"; | ||
// #endregion | ||
// ------------------------------------ | ||
// 经销商 - 如果是以下三种角色,职位名称则要获取userInfo.user.outterRoletypename | ||
// ------------------------------------ | ||
// #region | ||
/** | ||
* 经销商高级管理员:经销商总经理 | ||
*/ | ||
RoleType[RoleType["RolePartnerSeniorAdministrator"] = 121] = "RolePartnerSeniorAdministrator"; | ||
/** | ||
* 经销商管理员:经销商副总经理,经销商销售总监,订单专员 | ||
*/ | ||
RoleType[RoleType["RolePartnerAdministrator"] = 122] = "RolePartnerAdministrator"; | ||
/** | ||
* 经销商业务员:经销商业务经理,经销商业务代表,经销商业务主管,经销商资料管理员 | ||
*/ | ||
RoleType[RoleType["RolePartnerBusinessManager"] = 123] = "RolePartnerBusinessManager"; | ||
// #endregion | ||
// ------------ 讲师 ------------ | ||
// #region | ||
/** | ||
* 总负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBoss"] = 201] = "RoleLecturerBoss"; | ||
/** | ||
* [健康管理]场景负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerManageScene"] = 202] = "RoleLecturerManageScene"; | ||
/** | ||
* [健康管理]现场操作讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerManageOperation"] = 203] = "RoleLecturerManageOperation"; | ||
/** | ||
* [大健康快车]现场操作讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBusOperation"] = 204] = "RoleLecturerBusOperation"; | ||
/** | ||
* [大健康快车]场景负责讲师 | ||
*/ | ||
RoleType[RoleType["RoleLecturerBusScene"] = 205] = "RoleLecturerBusScene"; | ||
//#endregion | ||
// ------------------------------------ | ||
// 讲师也类似经销商账号,如果是以下三种角色,职位名称则要获取userInfo.user.outterRoletypename | ||
// 培训经理:培训经理,培训部经理,培训高级主管,电商培训部经理,健康快车培训经理 | ||
// 项目主管:项目主管,健康快车项目车长 | ||
// 培训主管:培训主管 | ||
// ------------------------------------ | ||
// #region | ||
/** | ||
* 培训经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingManager"] = 211] = "RoleTrainingManager"; | ||
/** | ||
* 培训主管 | ||
*/ | ||
RoleType[RoleType["RoleTrainingSupervisor"] = 212] = "RoleTrainingSupervisor"; | ||
/** | ||
* 项目主管 | ||
*/ | ||
RoleType[RoleType["RoleProjectSupervisor"] = 213] = "RoleProjectSupervisor"; | ||
/** | ||
* 培训副经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingDeputyManager"] = 214] = "RoleTrainingDeputyManager"; | ||
/** | ||
* 培训部经理 | ||
*/ | ||
RoleType[RoleType["RoleTrainingDepartmentManager"] = 215] = "RoleTrainingDepartmentManager"; | ||
/** | ||
* 培训高级主管 | ||
*/ | ||
RoleType[RoleType["RoleTrainingSeniorSupervisor"] = 216] = "RoleTrainingSeniorSupervisor"; | ||
/** | ||
* 电商培训部经理 | ||
*/ | ||
RoleType[RoleType["RoleElectricBusinessTrainingDepartmentManager"] = 217] = "RoleElectricBusinessTrainingDepartmentManager"; | ||
/** | ||
* 健康快车培训经理 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressTrainingManager"] = 218] = "RoleHealthExpressTrainingManager"; | ||
/** | ||
* 区培训主管 | ||
*/ | ||
RoleType[RoleType["RoleDistrictTrainingSupervisor"] = 219] = "RoleDistrictTrainingSupervisor"; | ||
/** | ||
* 健康快车项目车长 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressProjectDriver"] = 220] = "RoleHealthExpressProjectDriver"; | ||
/** | ||
* 健康车主管 | ||
*/ | ||
RoleType[RoleType["RoleHealthExpressSupervisor"] = 221] = "RoleHealthExpressSupervisor"; | ||
// #endregion | ||
// ------------ 销售 ------------ | ||
// #region | ||
/** | ||
* 销售总监 | ||
*/ | ||
RoleType[RoleType["RoleSaleManager"] = 301] = "RoleSaleManager"; | ||
/** | ||
* 大区经理 | ||
*/ | ||
RoleType[RoleType["RoleDistictManager"] = 302] = "RoleDistictManager"; | ||
/** | ||
* 区域经理 | ||
*/ | ||
RoleType[RoleType["RoleRegionManager"] = 303] = "RoleRegionManager"; | ||
/** | ||
* 城市经理 | ||
*/ | ||
RoleType[RoleType["RoleCityManager"] = 304] = "RoleCityManager"; | ||
/** | ||
* 市场代表 | ||
*/ | ||
RoleType[RoleType["RoleMarketRepresent"] = 305] = "RoleMarketRepresent"; | ||
/** | ||
* 大区推广经理 | ||
*/ | ||
RoleType[RoleType["RoleAreaPromotionManager"] = 306] = "RoleAreaPromotionManager"; | ||
/** | ||
* 公司区域助理 | ||
*/ | ||
RoleType[RoleType["RoleCompanyAreaMan"] = 307] = "RoleCompanyAreaMan"; | ||
/** | ||
* 区域助理 | ||
*/ | ||
RoleType[RoleType["RoleRegionalAssistant"] = 308] = "RoleRegionalAssistant"; | ||
// #endregion | ||
})(RoleType = exports.RoleType || (exports.RoleType = {})); | ||
var Gender; | ||
(function (Gender) { | ||
/** | ||
* 男 | ||
*/ | ||
Gender[Gender["Male"] = 0] = "Male"; | ||
/** | ||
* 女 | ||
*/ | ||
Gender[Gender["Female"] = 1] = "Female"; | ||
})(Gender = exports.Gender || (exports.Gender = {})); |
{ | ||
"name": "@byhealth/native-app-jssdk", | ||
"version": "2.0.0-alpha.1", | ||
"version": "2.0.0-alpha.2", | ||
"description": "By-Health Native App Jssdk.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# By-Health Native App Jssdk | ||
汤臣倍健营养家App | ||
### 安装 | ||
* Yarn: `yarn add @byhealth/native-app-jssdk@next` | ||
* NPM: `npm install @byhealth/native-app-jssdk@next --save` | ||
### 使用 | ||
```javascript | ||
import { scanQrCode, closeWindow } from '@byhealth/native-app-jssdk'; | ||
scanQrCode() | ||
.then(result => { | ||
// result 是识别后的结果 | ||
console.log(result); | ||
}); | ||
closeWindow(); | ||
``` | ||
### 更新 | ||
* 生成 TypeScript 类型定义,使用 VSCode 可获得更佳体验; | ||
* 无回调或返回的接口,不再返回Promise对象; | ||
* 重写 iOS 端调用方法,支持连续调用接口(1.x不支持); | ||
* 部分接口名称或参数变化: | ||
- `userInfo()` => `getUserInfo()` | ||
- `mobileVibrate()` => `vibrate()` | ||
## API 文档 | ||
[文档地址](https://by-healthfed.github.io/native-app-jssdk/globals.html#alert) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
70350
1223
36
0