electron-egg electron-egg
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
❤️成为赞助商
  • 教程

  • ee-bin

  • ee-core

    • addon

      • 插件模块
      • window
    • bin
    • config
    • const
    • const/channel
    • controller
    • core
    • cross
    • ee
    • electron
    • electron/app
    • electron/window
    • exception
    • httpclient
    • jobs
    • jobs/ChildJob
    • jobs/ChildPoolJob
    • loader
    • log
    • message
    • message/childMessage
    • ps
    • services
      • socket
      • storage
      • storage/jsondb
      • storage/sqlite
      • tools
      • this-app

      • utils
      • utils/helper
      • utils/is
      • utils/json
      • utils/time
      • utils/ip
      • utils/get-port
      • oldUtils
    • ee-go

    目录

    services

    ee-core:v2.2.0

    # 介绍

    服务层模块

    # 使用方法

    const Services = require('ee-core/services');
    
    # 获取service/storage.js 实例化对象
    Services.get('storage');
    

    # 第三方使用

    1. 创建services业务文件

    在项目根目录创建 ./electron/service/example.js 文件,service示例代码 (opens new window)

    1. 使用方法同上

    # API列表

    # get()

    获取实例化后的service对象与方法调用。

    Services.get('framework').doCreatePool();
    
    // 多层文件夹调用
    // 如 ./electron/serivce/clan/info.js
    Services.get('clan.info').test();
    
    上次更新: 2025/06/06, 07:21:49
    ps
    socket

    ← ps socket→

    Theme by Vdoing | Copyright © 2023-2025 哆啦好梦 | 京ICP备15041380号-2
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×