1.0.7 • Published 5 years ago

@beisen/helper v1.0.7

Weekly downloads
25
License
MIT
Repository
-
Last release
5 years ago

域名助手


根据BSGlobal中domain值生成域名的工具(BSGlobal.domain必须存在)

安装

  npm i -S @beisen/helper@latest
  or
  yarn add @beisen/helper@latest

API介绍

1. generateHost(host)

返回值: string 根据三级域名生成整体域名

host

类型: string 三级域名的名称. 必须为string类型.

示例
// 承载页上BSGlobal.domain = 'beisen.cn'

import BSHelper from '@beisen/helper';

const demoHost = BSHelper.generateHost('demo');

// demoHost === '//demo.beisen.cn'

2. getHostByType(type)

返回值: string 根据type获取平台域名(iTalent/多租赁/审批/租户配置中心等).

type

类型: string 平台域名. 枚举,必须为string 类型可选值:

type站点备注
italentiTalent-
tmiTalent 移动端-
settingiTalent 设置站点-
accountaccount-
cloud多租赁-
oceanocean-
appcenterappcenter-
robot机器人机器人
operationCloudoperationcloud-
appstore应用商店-
approval审批中心-
tmstms后台-
landingsitelandingsite-
docCloud文件预览-
settingCloud实施态-
devCloud开发态-
service帮助文档-
示例
// 承载页上BSGlobal.domain = 'beisen.cn'
import BSHelper from '@beisen/helper';
const demoHost = BSHelper.getHostByType('cloud');
// demoHost === '//cloud.beisen.cn'

3. getUserInfo(type)

返回值: Object 获取当前登录人信息(BSGloabl中loginUserInfo字段).

示例
import BSHelper from '@beisen/helper';
const userInfo = BSHelper.getUserInfo();

4. getTenantInfo()

返回值: Object 获取当前登录人租户信息(BSGloabl中tenantInfo字段).

示例
import BSHelper from '@beisen/helper';
const tenantInfo = BSHelper.getTenantInfo();

5. getUserId()

返回值: number 获取当前登录人Id.

示例
import BSHelper from '@beisen/helper';
const userId = BSHelper.getUserId();

6. getTenantId()

返回值: number 获取当前登录人租户Id.

示例
import BSHelper from '@beisen/helper';
const tenantId = BSHelper.getTenantId();

7. env.isDevelopment()

返回值: boolean 获取当前是否为开发环境.

示例
import BSHelper from '@beisen/helper';
const tenantId = BSHelper.env.isDevelopment();

8. env.isTesting()

返回值: boolean 获取当前是否为测试环境.

示例
import BSHelper from '@beisen/helper';
const isTesting = BSHelper.env.isTesting();

9. env.isProduction()

返回值: boolean 获取当前是否为线上.

示例
import BSHelper from '@beisen/helper';
const isProdction = BSHelper.env.isProduction();
@infinitebrahmanuniverse/nolb-_beisen_@everything-registry/sub-chunk-119identy-certificationitalent-create-taskitalent-portalitalent-task-itemitalent-task-operate-area@beisen-phoenix/mobile-reply-tools@beisen-platform/ux-standard-form@beisen-platform/ux-standard-search@beisen-platform/ux-standard-table@beisen-platform/platform-datatable@beisen-elearning/ux-p-man-question-bank@beisen-elearning/ux-p-man-question-lib@beisen/beisen-cloud-ui@beisen/ocean-helper@beisen/m-self-employment@beisen-elearning/manage-courses-edit@beisen-elearning/p-manage-course-catalogue@beisen-elearning/p-manage-courses-list@beisen-cmps/relation-work-pop@beisen/beisencloud-mobile@beisen/hooks@beisen/fetch@beisen/employment-contract@beisen-cmps/italent-m-user-selector@beisen-cmps/italent-task-common-component@beisen-cmps/italent-create-summary@beisen-cmps/italent-at-othersentry-manualpps-formula-editsen-welfare-configable-pagetest-configable-pagetemplate-welfare-centerzy-template-welfare-centerux-user-basic-infoux-user-basic-infosux-vacation-balanceux-work-calendarux-work-reportux-work-report-drawerux-work-report-settingux-work-report-statistics-drawerux-workforce-anagementux-total-defense-reportux-abnormal-attendanceux-adjusting-social-securityux-basic-inforux-bounty-increase-tree-compux-business-cardux-caption-componentsux-attachment-new-typeux-banner-componentux-job-trackux-last-test-resultsux-last-thas-resultux-m-head-infoux-m-job-resumeux-m-last-alldeg-scoreux-m-last-evaluation-scoreux-company-key-wordux-componentsux-details-editorux-digital-board-listux-diligence-listux-evaluation-reportsux-feature-avatarux-historical-social-securityux-increase-personnelux-chatrobot-indexviewux-company-announcementux-m-performance-historyux-report-last-evaluation-resultux-reward-cardux-reward-order-compux-reward-wrapux-staff-adjustmentux-mobile-noticeux-mobile-vacation-balanceux-mobile-vacation-detailux-my-all-bounty-componentux-my-bountyux-organization-chartux-performance-donelistux-performance-todolistux-person-evaluation-resultux-person-last-alldeg-scoresux-person-last-evaluation-scoreux-personal-development-willux-tl-templateux-todo-listux-stop-paymentux-store-affairsux-succession-sudokuux-sudokuux-tag-cloudux-task-drawerux-team-cardux-team-mapux-quick-checkin-material-confirmation
1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago