PageSourceSearch

https://zhihuibei.pages.dev/js/word-data.js

js zhihuibei.pages.dev collected 2026-10-03 06:01:59 UTC 1,053 bytes, 54 lines download raw bytes

1/**
2 * 单词数据模块
3 * 仅包含单词 ID 列表,单词详情从后端 API 获取
4 * 总单词数:1295 个
5 */
6
7'use strict';
8
9const WORD_COUNT = 1295;
10
11/**
12 * 词表基础配置(前端静态配置,减少数据库查询)
13 */
14const WORDLISTS_CONFIG = {
15  'ket-core': {
16    id: 'ket-core',
17    name: 'KET/Keynote I核心',
18    description: '1295个核心词汇',
19    price: 0,
20    purchaseUrl: 'http://xhslink.com/o/ANOOLIEsnTB'
21  }
22};
23
24/**
25 * 获取单词 ID
26 * @param {number} index - 单词索引
27 * @returns {string} - 单词 ID
28 */
29function getWordId(index) {
30  return `ebv2_${index}`;
31}
32
33/**
34 * 获取所有单词 ID 列表
35 * 注意:此方法仅返回 ID,不返回单词内容
36 * @returns {string[]} - 单词 ID 数组
37 */
38function getAllWordIds() {
39  const ids = [];
40  for (let i = 0; i < WORD_COUNT; i++) {
41    ids.push(getWordId(i));
42  }
43  return ids;
44}
45
46// 导出模块
47if (typeof module !== 'undefined' && module.exports) {
48  module.exports = {
49    WORD_COUNT,
50    WORDLISTS_CONFIG,
51    getWordId,
52    getAllWordIds
53  };
54}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.