返回 AiToEarn
service.ts
1 /*
2 * @Author: nevin
3 * @Date: 2025-01-24 17:10:35
4 * @LastEditors: nevin
5 * @Description: 应用的服务
6 */
7 import { app } from 'electron';
8 import { Injectable } from './core/decorators';
9 import os from 'os';
10
11 @Injectable()
12 export class AppService {
13 getAppInfo() {
14 const platform = os.platform();
15 return {
16 version: app.getVersion(),
17 platform: platform,
18 };
19 }
20 }
21
21 lines TYPESCRIPT