mirror of
https://github.com/KingHWJ/WeReadBoard.git
synced 2026-11-03 18:24:58 +08:00
refactor(api): 去除代码版本命名
This commit is contained in:
1 parent
bbc4bdd140
commit
dcf4cb0719
31 files changed
+174
-154
No files matched your search
+3
-3
@@ -1,14 +1,14 @@
|
||||
/* ==========================================================================
|
||||
阅间 · 数据层(v2)
|
||||
阅间 · 数据层
|
||||
--------------------------------------------------------------------------
|
||||
把后端 /api/v2/* 接口封装成前端可直接使用的数据结构。
|
||||
把后端 /api/reading/* 接口封装成前端可直接使用的数据结构。
|
||||
设计稿(Design Demo)原本使用 demo-data.js 里的静态示例数据,
|
||||
这里替换为真实接口调用,字段名与设计稿保持一致。
|
||||
========================================================================== */
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
const BASE = '/api/v2';
|
||||
const BASE = '/api/reading';
|
||||
|
||||
async function request(path, params, method = 'GET', body) {
|
||||
const url = new URL(BASE + path, global.location.origin);
|
||||
|
||||
Reference in new issue
Block a user