WebApp【公共组件库】@前端(For Git Submodule)
‘chensiAb’
2025-04-01 196aac76666571c60536973418bff3da63bef1d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
description: 
globs: src/fetchers/F*.js
alwaysApply: false
---
 
# 请求集
 
## 请求集空白模板
 
```js
/**
 * FCommon - 公用请求集
 * @author 作者
 */
 
import { Fetcher } from '@components/bases/Fetcher';
 
class FCommon extends Fetcher {
 
    constructor() {
        super({
            // url前缀(本地路径, 服务器路径)
            urlPrefix: ['/api/common/', '/serverPath/'],
        });
    }
 
    // 读取页面详情
    getPageDetail() {
        const url = this.spellURL('getPageDetail', 'page/Detail');
        const send = {};
        return this.post(url, send);
    }
 
}
 
export const $fetchCommon = new FCommon();
```