npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gamebox-service

v1.5.2

Published

GB项目中h5与app的serviceCenter公共业务层

Readme

简介

service 为GB项目中h5与app公用的业务层,包含store(redux)、container(业务层)、 api/service(api数据层)、cache(缓存处理)、common(业务层公共工具方法)

安装

npm install gamebox-service --save --registry http://repository.gbboss.com:4873

or

yarn add gamebox-service --registry http://repository.gbboss.com:4873

项目引用

import ServiceCotaniner, { SeviceContxt, UserServiceContaroller, HttpService, ReduxTool } from 'gamebox-service'

示例

import ServiceCotaniner, { SeviceContxt, UserServiceContaroller } from 'gamebox-service'
const { HomePageContext } = SeviceContxt
const { useHomePageController } = UserServiceContaroller

const Homepage = props => {
    const { ... } = useHomePageController()
    return (
        <HomePageContext.Provider value={...}>
            ...
        </HomePageContext.Provider>
    )
}

export default ServiceCotaniner.HomePageContainer(Homepage)

说明

ServiceContainer

ServiceContainer 业务层集合,对应每个模块业务层; 业务层处理公共请求、 公共事件(下拉刷新、分页等)

示例

import ServiceContainer from 'gamebox-service'

const { LineDetectionContainer } = ServiceContainer

const LineDetection = props => {
  ...
}

export default LineDetectionContainer(LineDetection)
// 或者 export default ServiceContainer.LineDetectionContainer(LineDetection)

属性值

| 属性名 | 描述 | |:----------:|-------------------| | LineDetectionContainer | 线路检测container | | IndexPageContainer | 主框架container | | HomePageContainer | 首页container | | DrawerContainer | 右抽屉container | | RedPacketContainer | 红包container | | LoginContainer | 登录container | | RegisterContainer | 注册container | | ForgetPasswordContainer | 忘记密码container | | CaptchaContainer | 验证码container | | SavingContainer | 存款主框架container | | DepositContainer | 存款container | | DepositDetailsContainer | 存款详情container | | FundContainer | 资金container | | WithdrawalContainer | 取款container | | AuditContainer | 查看稽核container | | PromotionContainer | 优惠container | | PromotionDetailsContainer | 优惠详情container | | MineContainer | 我的container | | ServiceContainer | 定制化客服container | | InboxContainer | 收件箱主框架container | | SystemMessageContainer | 系统消息container | | MineMessageContainer | 我的消息container | | SendMessageContainer | 发送消息container | | AnnouncementContainer | 最新公告container | | BettingRecordContainer | 投注记录container | | TransactionRecordsContainer | 资金记录container | | ElectronicGamesContainer | 电子游戏container | | EnterGameContainer | 进入游戏container | | MyShareContainer | 全民推广我的分享container | | AwardRuleContainer | 全民推广奖励规则contianer | | AwardRecordContainer | 全民推广奖励记录container | | TeamRecordContainer | 全民推广团队记录container | | FriendShareContainer | 推荐好友container | | RebateContainer | 时时反水container | | FavoritesContainer | 我的收藏/最近玩过container | | SubpageContainer | 二级游戏container | | SecurityCenterContainer | 安全中心主框架container | | SetRealNameContainer | 设置真实姓名container | | BindBankCardContainer | 绑定银行卡container | | PhoneNumContainer | 绑定与修改手机container | | SecurityPasswordContainer | 创建与修改安全密码container | | UpdateLoginPasswordContainer | 修改登录密码container | | SettingContainer | 设置container | | VipContainer | Vipcontainer | | DownloadContainer | 下载container | | BindBtcContainer | 比特币container | | SignContainer | 签到container | | AppStoreContainer | AppStoreContainer | | ErrorContainer | 错误页面container | | TaskContainer | 任务页面container |

SeviceContxt

SeviceContxt 上下文集合, 对应每个模块上下文处理;

示例

import { SeviceContxt } from 'gamebox-service'

const { AppContext } = SeviceContxt

const App = props => {
  ...

  return (
    <AppContext.Provider value={{ key: value, ... }}></AppContext.Provider>
  )
}

属性值

| 属性名 | 描述 | |:----------:|-------------------| | AppContext | 主框架 | | HomePageContext | 首页 | | RedPacketContext | 红包 | | RegisterContext | 注册 | | DepositContext | 存款 | | DepositDetailsContext | 存款详情 | | FundContext | 资金 | | WithdrawalContext | 取款 | | PromotionContext | 优惠 | | CaptchContext | 验证码 | | DrawerContext | 抽屉 | | MineContext | 我的 | | InboxContext | 收件箱主框架 | | SystemMessageContext | 系统消息 | | MineMessageContext | 我的消息 | | AnnouncementContainerContext | 最新公告 | | ElectronicGameContext | 电子游戏 | | EnterGameContext | 进入游戏 | | AwardRuleContext | 奖励规则 | | AwardRecordContext | 奖励记录 | | FriendShareContext | 分享好友 | | FavoritesContainerContext | 我的收藏与最近玩过 | | SecurityCenterContext | 安全中心主框架 | | DownloadContext | 下载 | | ServiceContext | 定制化客服 | | SubPageContext | 二级页面 |

UserServiceContaroller

UserServiceContaroller 使用上下文集合,对应每个模块使用上下文;

import { UserServiceContaroller } from 'gamebox-service'

const { useAppController } = UserServiceContaroller

const App = props => {
  const { key, ... } = useAppController()
  ...
}

属性值

| 属性名 | 描述 | |:----------:|-------------------| | useAppController | 主框架 | | useHomePageController | 首页 | | useRedPacketController | 红包 | | useRegisterController | 注册 | | useDepositController | 存款 | | useDepositDetailsController | 存款详情 | | useFundController | 资金 | | useWithdrawalController | 取款 | | usePromotionontroller | 优惠 | | useCaptchController | 验证码 | | useDrawerController | 抽屉 | | useMineController | 我的 | | useInboxController | 收件箱主框架 | | useSystemMessageController | 系统消息 | | useMineMessageController | 我的消息 | | useAnnouncementController | 最新公告 | | useElectronicGameController | 电子游戏 | | useEnterGameController | 进入游戏 | | useAwardRuleController | 奖励规则 | | useAwardRecordController | 奖励记录 | | useFriendShareController | 分享好友 | | useFavoritesController | 我的收藏与最近玩过 | | useSecurityCenterController | 安全中心主框架 | | useDownloadController | 下载 | | useServiceController | 定制化客服 | | useSubPageController | 二级页面 |

HttpService

HttpService 接口层集合; 对应每个模块接口api

ReduxTool

ReduxTool redux

DelUserTool 删除user信息工具方法