Kaynağa Gözat

Codex升级Node.js到24.1

chengjie 3 hafta önce
ebeveyn
işleme
deed1a678e
100 değiştirilmiş dosya ile 13317 ekleme ve 2 silme
  1. 115 0
      MIGRATION_GUIDE.md
  2. 356 0
      public/1.html
  3. 366 0
      public/2.html
  4. 253 0
      public/3.html
  5. BIN
      public/fonts/Teko-Bold.ttf
  6. BIN
      public/fonts/Teko-SemiBold.ttf
  7. 5312 0
      public/help/phonics.htm
  8. BIN
      public/help/phonics_files/Group 2.png
  9. BIN
      public/help/phonics_files/Group 3.png
  10. BIN
      public/help/phonics_files/Group 324.png
  11. BIN
      public/help/phonics_files/Group 334s.png
  12. BIN
      public/help/phonics_files/Group 5.png
  13. BIN
      public/help/phonics_files/Group 6.png
  14. BIN
      public/help/phonics_files/Group w.png
  15. BIN
      public/help/phonics_files/happy-birthday-flower-images-with-cake-flower-cake-pictures-happy-birthday-cakes-and-flowers.jpg
  16. BIN
      public/help/phonics_files/icon_edit25ded2.png
  17. BIN
      public/help/phonics_files/videoplayback.mp4---00.02.20.965.jpg
  18. 18 0
      public/index2.html
  19. 128 0
      public/internal/20170411.html
  20. 147 0
      public/internal/20170411List.html
  21. 377 0
      public/jquery.html
  22. 199 0
      public/jquery2.html
  23. BIN
      public/sounds/pinyin/basic/a.m4a
  24. BIN
      public/sounds/pinyin/basic/ai.m4a
  25. BIN
      public/sounds/pinyin/basic/an.m4a
  26. BIN
      public/sounds/pinyin/basic/ang.m4a
  27. BIN
      public/sounds/pinyin/basic/ao.m4a
  28. BIN
      public/sounds/pinyin/basic/b.m4a
  29. BIN
      public/sounds/pinyin/basic/c.m4a
  30. BIN
      public/sounds/pinyin/basic/ch.m4a
  31. BIN
      public/sounds/pinyin/basic/chi.m4a
  32. BIN
      public/sounds/pinyin/basic/ci.m4a
  33. BIN
      public/sounds/pinyin/basic/d.m4a
  34. BIN
      public/sounds/pinyin/basic/e.m4a
  35. BIN
      public/sounds/pinyin/basic/ei.m4a
  36. BIN
      public/sounds/pinyin/basic/en.m4a
  37. BIN
      public/sounds/pinyin/basic/eng.m4a
  38. BIN
      public/sounds/pinyin/basic/er.m4a
  39. BIN
      public/sounds/pinyin/basic/f.m4a
  40. BIN
      public/sounds/pinyin/basic/g.m4a
  41. BIN
      public/sounds/pinyin/basic/h.m4a
  42. BIN
      public/sounds/pinyin/basic/i.m4a
  43. BIN
      public/sounds/pinyin/basic/ie.m4a
  44. BIN
      public/sounds/pinyin/basic/in.m4a
  45. BIN
      public/sounds/pinyin/basic/ing.m4a
  46. BIN
      public/sounds/pinyin/basic/iu.m4a
  47. BIN
      public/sounds/pinyin/basic/j.m4a
  48. BIN
      public/sounds/pinyin/basic/k.m4a
  49. BIN
      public/sounds/pinyin/basic/l.m4a
  50. BIN
      public/sounds/pinyin/basic/m.m4a
  51. BIN
      public/sounds/pinyin/basic/n.m4a
  52. BIN
      public/sounds/pinyin/basic/o.m4a
  53. BIN
      public/sounds/pinyin/basic/ong.m4a
  54. BIN
      public/sounds/pinyin/basic/ou.m4a
  55. BIN
      public/sounds/pinyin/basic/p.m4a
  56. BIN
      public/sounds/pinyin/basic/q.m4a
  57. BIN
      public/sounds/pinyin/basic/r.m4a
  58. BIN
      public/sounds/pinyin/basic/ri.m4a
  59. BIN
      public/sounds/pinyin/basic/s.m4a
  60. BIN
      public/sounds/pinyin/basic/sh.m4a
  61. BIN
      public/sounds/pinyin/basic/shi.m4a
  62. BIN
      public/sounds/pinyin/basic/si.m4a
  63. BIN
      public/sounds/pinyin/basic/t.m4a
  64. BIN
      public/sounds/pinyin/basic/u.m4a
  65. BIN
      public/sounds/pinyin/basic/ui.m4a
  66. BIN
      public/sounds/pinyin/basic/un.m4a
  67. BIN
      public/sounds/pinyin/basic/v.m4a
  68. BIN
      public/sounds/pinyin/basic/ve.m4a
  69. BIN
      public/sounds/pinyin/basic/vn.m4a
  70. BIN
      public/sounds/pinyin/basic/w.m4a
  71. BIN
      public/sounds/pinyin/basic/wu.m4a
  72. BIN
      public/sounds/pinyin/basic/x.m4a
  73. BIN
      public/sounds/pinyin/basic/y.m4a
  74. BIN
      public/sounds/pinyin/basic/ye.m4a
  75. BIN
      public/sounds/pinyin/basic/yi.m4a
  76. BIN
      public/sounds/pinyin/basic/yin.m4a
  77. BIN
      public/sounds/pinyin/basic/ying.m4a
  78. BIN
      public/sounds/pinyin/basic/yu.m4a
  79. BIN
      public/sounds/pinyin/basic/yuan.m4a
  80. BIN
      public/sounds/pinyin/basic/yue.m4a
  81. BIN
      public/sounds/pinyin/basic/yun.m4a
  82. BIN
      public/sounds/pinyin/basic/z.m4a
  83. BIN
      public/sounds/pinyin/basic/zh.m4a
  84. BIN
      public/sounds/pinyin/basic/zhi.m4a
  85. BIN
      public/sounds/pinyin/basic/zi.m4a
  86. 5223 0
      public/test.js
  87. 249 0
      src/api/activity/activityController.js
  88. 13 0
      src/api/activity/routes.js
  89. 66 0
      src/api/area/areaController.js
  90. 8 0
      src/api/area/routes.js
  91. 30 0
      src/api/common/commonController.js
  92. 4 2
      src/api/common/routes.js
  93. 62 0
      src/api/dataUpdateStatus/dataUpdateStatusController.js
  94. 12 0
      src/api/dataUpdateStatus/routes.js
  95. 322 0
      src/api/englishLearned/englishLearnedController.js
  96. 10 0
      src/api/englishLearned/routes.js
  97. 18 0
      src/api/enumeration/enumerationController.js
  98. 9 0
      src/api/enumeration/routes.js
  99. 20 0
      src/api/handWrite/handWriteController.js
  100. 0 0
      src/api/handWrite/routes.js

+ 115 - 0
MIGRATION_GUIDE.md

@@ -0,0 +1,115 @@
1
+# 迁移指南 - kylx365server → miaoguo_system_server
2
+
3
+## 核心转换规则
4
+
5
+### 1. 模块系统
6
+```js
7
+// 旧: CommonJS
8
+const xxx = require('xxx');
9
+exports.Fn = function* () { ... };
10
+
11
+// 新: ESM
12
+import xxx from 'xxx.js';
13
+export async function Fn(ctx) { ... }
14
+```
15
+
16
+### 2. Koa generator → async/await
17
+```js
18
+// 旧: Koa v1 generator
19
+exports.GetXxx = function* () {
20
+    var param = this.query;
21
+    var result = yield mysql.queryAsync(sql);
22
+    this.body = result;
23
+};
24
+
25
+// 新: Koa v2+ async/await
26
+export async function GetXxx(ctx) {
27
+    const param = ctx.query;
28
+    const result = await query(sql, params);
29
+    ctx.body = result;
30
+}
31
+```
32
+
33
+### 3. 数据库
34
+```js
35
+// 旧: mysql + bluebird, 字符串拼接
36
+var sql = "SELECT * FROM Users WHERE UserID=" + obj.UserID;
37
+return mysql.queryAsync(sql);
38
+
39
+// 新: mysql2/promise, 参数化查询
40
+import { query } from '../../util/db.js';
41
+const sql = "SELECT * FROM Users WHERE UserID=?";
42
+return await query(sql, [obj.UserID]);
43
+```
44
+
45
+### 4. HTTP 请求
46
+```js
47
+// 旧: request-promise
48
+var rp = require('request-promise');
49
+var result = yield rp(url).then(...);
50
+
51
+// 新: axios
52
+import axios from 'axios';
53
+const result = await axios.get(url).then(res => res.data);
54
+```
55
+
56
+### 5. 路由
57
+```js
58
+// 旧: 单文件 routes.js, koa-router v5
59
+var Router = require("koa-router")();
60
+Router.get('/api/Xxx', controller.Xxx);
61
+module.exports = function(app) { app.use(Router.routes()); };
62
+
63
+// 新: 模块化 routes.js, @koa/router v13
64
+import Router from '@koa/router';
65
+import * as controller from './controller.js';
66
+const router = new Router();
67
+router.get('/api/Xxx', controller.Xxx);
68
+export default router;
69
+```
70
+
71
+### 6. ctx 参数映射
72
+```
73
+this.query           → ctx.query
74
+this.request.body    → ctx.request.body / ctx.request (POST body)
75
+this.params          → ctx.params
76
+this.body            → ctx.body
77
+this.status          → ctx.status
78
+this.throw(status)   → ctx.throw(status)
79
+```
80
+
81
+### 7. 常用依赖替换
82
+```
83
+koa-router (v5)       → @koa/router (v13)
84
+koa-multer            → @koa/multer
85
+koa-bodyparser        → koa-bodyparser (已有)
86
+request-promise       → axios
87
+moment                → moment (保留)
88
+lodash                → lodash (保留)
89
+cos-nodejs-sdk-v5     → cos-nodejs-sdk-v5 (保留)
90
+bluebird              → 删除 (mysql2 内置 Promise)
91
+```
92
+
93
+### 8. 错误处理
94
+```js
95
+// 旧
96
+try { ... } catch(err) { console.log(err); }
97
+
98
+// 新
99
+try { ... } catch(err) { console.error('描述:', err); ctx.throw(500, err.message); }
100
+```
101
+
102
+## 文件放置规则
103
+- Controller: `src/api/<module>/<module>Controller.js`
104
+- Routes: `src/api/<module>/routes.js`
105
+- Model: `src/model/<module>.js`
106
+- 注册路由: 在 `src/app.js` 中 import 并 use
107
+
108
+## 注意事项
109
+1. 所有 SQL 必须参数化(? 占位符),禁止字符串拼接
110
+2. `global.config` 改为 `import config from '../../config/index.js'`
111
+3. `BufferMemory` 改为 `import { globalCache } from '../../util/GlobalCache.js'`
112
+4. 保留原有注释和业务逻辑不变
113
+5. `WXBizDataCrypt` 已存在于 `src/util/WXBizDataCrypt.js`
114
+6. `crypto` 工具已存在于 `src/util/crypto/index.js`
115
+7. `stringUtils` 已存在于 `src/util/stringClass.js`

Dosya farkı çok büyük olduğundan ihmal edildi
+ 356 - 0
public/1.html


+ 366 - 0
public/2.html

@@ -0,0 +1,366 @@
1
+<!DOCTYPE html>
2
+<html lang="zh-CN">
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+    <title>高阶傅里叶分形实验室</title>
7
+    <style>
8
+        body {
9
+            margin: 0;
10
+            overflow: hidden;
11
+            background-color: #050505;
12
+            font-family: 'Segoe UI', sans-serif;
13
+            color: #ddd;
14
+        }
15
+        canvas { display: block; }
16
+        
17
+        /* 控制面板样式 */
18
+        #controls {
19
+            position: absolute;
20
+            top: 10px;
21
+            left: 10px;
22
+            width: 280px;
23
+            max-height: 95vh;
24
+            overflow-y: auto;
25
+            background: rgba(20, 20, 30, 0.85);
26
+            backdrop-filter: blur(10px);
27
+            padding: 20px;
28
+            border-radius: 12px;
29
+            border: 1px solid #444;
30
+            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
31
+            transition: opacity 0.3s;
32
+        }
33
+        #controls:hover { opacity: 1; }
34
+        
35
+        h3 { margin: 0 0 15px 0; font-size: 16px; color: #fff; border-bottom: 1px solid #555; padding-bottom: 10px; }
36
+        .group { margin-bottom: 15px; }
37
+        .slider-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
38
+        label { font-size: 12px; color: #aaa; }
39
+        span.val { font-size: 12px; font-weight: bold; color: #4facfe; width: 40px; text-align: right;}
40
+        input[type=range] { width: 100%; margin: 5px 0; cursor: pointer; accent-color: #4facfe; }
41
+        select { width: 100%; background: #333; color: white; border: 1px solid #555; padding: 5px; border-radius: 4px; }
42
+        
43
+        button {
44
+            width: 100%; padding: 8px; margin-top: 10px;
45
+            background: linear-gradient(45deg, #4facfe, #00f2fe);
46
+            border: none; border-radius: 6px; color: #000; font-weight: bold; cursor: pointer;
47
+        }
48
+        button:hover { filter: brightness(1.1); }
49
+        
50
+        .preset-btn {
51
+            width: 30%; font-size: 10px; padding: 5px; margin: 2px 0; display: inline-block;
52
+            background: #333; color: white; border: 1px solid #555;
53
+        }
54
+
55
+        /* 隐藏滚动条但保留功能 */
56
+        ::-webkit-scrollbar { width: 6px; }
57
+        ::-webkit-scrollbar-track { background: #1a1a1a; }
58
+        ::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
59
+    </style>
60
+</head>
61
+<body>
62
+
63
+<div id="controls">
64
+    <h3>分形参数核心</h3>
65
+    
66
+    <div class="group">
67
+        <label>频率模式 (Frequency Mode)</label>
68
+        <select id="freqMode">
69
+            <option value="power">指数 (分形/Fractal)</option>
70
+            <option value="linear">线性 (万花尺/Spiro)</option>
71
+            <option value="prime">质数 (混沌/Chaos)</option>
72
+        </select>
73
+    </div>
74
+
75
+    <div class="group">
76
+        <div class="slider-row"><label>圆的数量 (N)</label><span class="val" id="nVal"></span></div>
77
+        <input type="range" id="nSlider" min="1" max="50" value="2">
78
+    </div>
79
+
80
+    <div class="group">
81
+        <div class="slider-row"><label>频率倍率 (Rate)</label><span class="val" id="kVal"></span></div>
82
+        <input type="range" id="kSlider" min="-10" max="10" step="0.05" value="0">
83
+        <div style="font-size:10px; color:#666;">负数=反向旋转, 非整数=不闭合</div>
84
+    </div>
85
+
86
+    <div class="group">
87
+        <div class="slider-row"><label>半径衰减 (Decay)</label><span class="val" id="rVal"></span></div>
88
+        <input type="range" id="rSlider" min="0.1" max="0.9" step="0.01" value="0.1">
89
+    </div>
90
+    
91
+    <div class="group">
92
+        <div class="slider-row"><label>相位偏移 (Phase Shift)</label><span class="val" id="pVal"></span></div>
93
+        <input type="range" id="pSlider" min="0" max="360" step="1" value="0">
94
+        <div style="font-size:10px; color:#666;">增加此值以扭曲图形</div>
95
+    </div>
96
+
97
+    <div class="group">
98
+        <div class="slider-row"><label>画笔粗细</label><span class="val" id="pwVal"></span></div>
99
+        <input type="range" id="pwSlider" min="1" max="30" step="0.5" value="1.5">
100
+        <div style="font-size:10px; color:#666;">改变半径的长度</div>
101
+    </div>
102
+
103
+    <h3>渲染设置</h3>
104
+    <div class="group">
105
+        <div class="slider-row"><label>绘制速度 (Speed)</label><span class="val" id="sVal"></span></div>
106
+        <input type="range" id="sSlider" min="1" max="50" step="1" value="5">
107
+    </div>
108
+    <div class="group">
109
+        <div class="slider-row"><label>分辨率 (Resolution)</label><span class="val" id="resVal"></span></div>
110
+        <input type="range" id="resSlider" min="0.001" max="0.05" step="0.001" value="0.005">
111
+        <div style="font-size:10px; color:#666;">越小越平滑 (需降低速度)</div>
112
+    </div>
113
+
114
+    <div style="border-top:1px solid #444; padding-top:10px;">
115
+        <label>预设 (Presets):</label><br>
116
+        <button class="preset-btn" onclick="setPreset(1)">经典分形</button>
117
+        <button class="preset-btn" onclick="setPreset(2)">方形填空</button>
118
+        <button class="preset-btn" onclick="setPreset(3)">生物触手</button>
119
+        <button class="preset-btn" onclick="setPreset(4)">量子云</button>
120
+        <button class="preset-btn" onclick="setPreset(5)">三叶结</button>
121
+        <button class="preset-btn" onclick="setPreset(6)">混乱风暴</button>
122
+    </div>
123
+    
124
+    <button onclick="resetPath()">清空画布并重绘</button>
125
+</div>
126
+
127
+<canvas id="canvas"></canvas>
128
+
129
+<script>
130
+    const canvas = document.getElementById('canvas');
131
+    const ctx = canvas.getContext('2d');
132
+    let width, height;
133
+
134
+    // 状态变量
135
+    let time = 0;
136
+    let path = [];
137
+    
138
+    // 参数对象
139
+    const params = {
140
+        N: 2,
141
+        k: -2,           // 频率系数
142
+        decay: 0.10,     // 半径衰减
143
+        penWidth: 1.5,     // 半径长度
144
+        phaseStep: 0,    // 相位偏移 (度)
145
+        speed: 5,        // 每一帧计算多少次 (绘制速度)
146
+        resolution: 0.005, // 时间步长
147
+        mode: 'power'    // 频率模式
148
+    };
149
+
150
+    // 绑定UI元素
151
+    const ui = {
152
+        N: document.getElementById('nSlider'),
153
+        k: document.getElementById('kSlider'),
154
+        decay: document.getElementById('rSlider'),
155
+        penWidth: document.getElementById('pwSlider'),
156
+        phase: document.getElementById('pSlider'),
157
+        speed: document.getElementById('sSlider'),
158
+        res: document.getElementById('resSlider'),
159
+        mode: document.getElementById('freqMode'),
160
+        vals: {
161
+            N: document.getElementById('nVal'),
162
+            k: document.getElementById('kVal'),
163
+            decay: document.getElementById('rVal'),
164
+            penWidth: document.getElementById('pwVal'),
165
+            phase: document.getElementById('pVal'),
166
+            speed: document.getElementById('sVal'),
167
+            res: document.getElementById('resVal')
168
+        }
169
+    };
170
+
171
+    function updateParams() {
172
+        params.N = parseInt(ui.N.value);
173
+        params.k = parseFloat(ui.k.value);
174
+        params.decay = parseFloat(ui.decay.value);
175
+        params.penWidth = parseFloat(ui.penWidth.value);
176
+        params.phaseStep = parseFloat(ui.phase.value) * (Math.PI / 180); // 转弧度
177
+        params.speed = parseInt(ui.speed.value);
178
+        params.resolution = parseFloat(ui.res.value);
179
+        params.mode = ui.mode.value;
180
+
181
+        // 更新显示数值
182
+        ui.vals.N.innerText = params.N;
183
+        ui.vals.k.innerText = params.k.toFixed(2);
184
+        ui.vals.decay.innerText = params.decay.toFixed(2);
185
+        ui.vals.penWidth.innerText = params.penWidth.toFixed(1);
186
+        ui.vals.phase.innerText = ui.phase.value + "°";
187
+        ui.vals.speed.innerText = params.speed;
188
+        ui.vals.res.innerText = params.resolution;
189
+    }
190
+
191
+    // 监听所有输入
192
+    Object.values(ui).forEach(el => {
193
+        if(el.tagName === 'DIV') return; // 跳过显示的div
194
+        if(el.addEventListener) {
195
+            el.addEventListener('input', () => {
196
+                updateParams();
197
+                if(el === ui.speed || el === ui.res) return; // 速度变化不重置
198
+                resetPath();
199
+            });
200
+        }
201
+    });
202
+
203
+    function resetPath() {
204
+        path = [];
205
+        time = 0;
206
+        // 稍微预热一下,避免从原点弹射
207
+        // time = -Math.PI; 
208
+    }
209
+
210
+    function resize() {
211
+        width = canvas.width = window.innerWidth;
212
+        height = canvas.height = window.innerHeight;
213
+    }
214
+    window.addEventListener('resize', resize);
215
+    resize();
216
+    updateParams();
217
+
218
+    // 预设功能
219
+    function setPreset(id) {
220
+        switch(id) {
221
+            case 1: // 经典
222
+                ui.mode.value = 'power'; ui.N.value = 12; ui.k.value = -2; ui.decay.value = 0.52; ui.phase.value = 0;ui.penWidth.value = 1.5;
223
+                break;
224
+            case 2: // 方形
225
+                ui.mode.value = 'power'; ui.N.value = 10; ui.k.value = -3; ui.decay.value = 0.45; ui.phase.value = 90;ui.penWidth.value =  1.5;
226
+                break;
227
+            case 3: // 生物
228
+                ui.mode.value = 'power'; ui.N.value = 20; ui.k.value = 1.1; ui.decay.value = 0.88; ui.phase.value = 12;ui.penWidth.value =  1.5;
229
+                break;
230
+            case 4: // 量子云
231
+                ui.mode.value = 'linear'; ui.N.value = 30; ui.k.value = 12; ui.decay.value = 0.85; ui.phase.value = 137;ui.penWidth.value =  1.5;
232
+                break;
233
+            case 5: // 三叶结
234
+                ui.mode.value = 'linear'; ui.N.value = 3; ui.k.value = -2; ui.decay.value = 0.4; ui.phase.value = 0;ui.penWidth.value =  1.5;
235
+                break;
236
+            case 6: // 混乱
237
+                ui.mode.value = 'power'; ui.N.value = 8; ui.k.value = -2.2; ui.decay.value = 0.6; ui.phase.value = 45;ui.penWidth.value =  1.5;
238
+                break;
239
+        }
240
+        updateParams();
241
+        resetPath();
242
+    }
243
+
244
+    // 核心渲染循环
245
+    function draw() {
246
+        ctx.fillStyle = '#050505';
247
+        ctx.fillRect(0, 0, width, height);
248
+
249
+        let cx = width / 2;
250
+        let cy = height / 2;
251
+
252
+        // 1. 批量计算点 (Speed 参数决定一次算多少个点,加快轨迹生成)
253
+        for (let s = 0; s < params.speed; s++) {
254
+            let x = cx;
255
+            let y = cy;
256
+            
257
+            // 初始半径
258
+            let r = Math.min(width, height) / 5;
259
+
260
+            for (let i = 0; i < params.N; i++) {
261
+                let freq;
262
+                
263
+                // --- 算法核心差异 ---
264
+                if (params.mode === 'power') {
265
+                    // 经典分形: freq = k^i
266
+                    freq = Math.pow(params.k, i);
267
+                } else if (params.mode === 'linear') {
268
+                    // 万花尺模式: freq = k * (i+1)
269
+                    freq = params.k * (i + 1);
270
+                } else {
271
+                    // 伪质数/混乱模式
272
+                    freq = (i % 2 === 0 ? 1 : -1) * (i * i + 1) * params.k * 0.1;
273
+                }
274
+
275
+                // 相位:每个圆比上一个多转 phaseStep
276
+                let currentPhase = i * params.phaseStep;
277
+
278
+                x += r * Math.cos(time * freq + currentPhase);
279
+                y += r * Math.sin(time * freq + currentPhase);
280
+
281
+                r *= params.decay;
282
+            }
283
+
284
+            path.push({x, y, h: (time * 40) % 360});
285
+            
286
+            // 限制轨迹长度 (防止内存爆炸,但要足够长以看到复杂图案)
287
+            if (path.length > 15000) path.shift();
288
+
289
+            time += params.resolution;
290
+        }
291
+
292
+        // 2. 绘制“机械臂” (只绘制当前时刻的结构,为了看清原理)
293
+        // 我们需要重新计算一次当前时刻的各级圆心位置
294
+        let armX = cx, armY = cy;
295
+        let armR = Math.min(width, height) / 5;
296
+        
297
+        ctx.lineWidth = 1;
298
+        for (let i = 0; i < params.N; i++) {
299
+            let prevX = armX;
300
+            let prevY = armY;
301
+            let freq;
302
+            if (params.mode === 'power') freq = Math.pow(params.k, i);
303
+            else if (params.mode === 'linear') freq = params.k * (i + 1);
304
+            else freq = (i % 2 === 0 ? 1 : -1) * (i * i + 1) * params.k * 0.1;
305
+            
306
+            let currentPhase = i * params.phaseStep;
307
+
308
+            armX += armR * Math.cos(time * freq + currentPhase);
309
+            armY += armR * Math.sin(time * freq + currentPhase);
310
+
311
+            // 画圆
312
+            ctx.strokeStyle = `rgba(255, 255, 255, 0.15)`;
313
+            ctx.beginPath();
314
+            ctx.arc(prevX, prevY, armR, 0, Math.PI * 2);
315
+            ctx.stroke();
316
+
317
+            // 画臂
318
+            ctx.strokeStyle = 'rgba(255, 255, 255, 0.15)';
319
+            ctx.beginPath();
320
+            ctx.moveTo(prevX, prevY);
321
+            ctx.lineTo(armX, armY);
322
+            ctx.stroke();
323
+            
324
+            // 关节
325
+            ctx.fillStyle = 'rgba(255, 255, 255, 0.15)';
326
+            ctx.beginPath();
327
+            ctx.arc(armX, armY, 2, 0, Math.PI*2);
328
+            ctx.fill();
329
+
330
+            armR *= params.decay;
331
+        }
332
+
333
+        // 3. 绘制轨迹
334
+        if (path.length > 1) {
335
+            ctx.lineWidth = params.penWidth;
336
+            // 使用 globalCompositeOperation 实现一种发光叠加效果
337
+            ctx.globalCompositeOperation = 'screen';
338
+            
339
+            // 为了性能,分段绘制
340
+            ctx.beginPath();
341
+            for (let i = 0; i < path.length - 1; i++) {
342
+                // 简单的性能优化:只有颜色变化大时才断开 stroke,
343
+                // 或者为了完美彩虹效果,我们每段都 stroke (较慢但好看)
344
+                // 这里采用折中:每 10 个点换一次颜色
345
+                if (i === 0) ctx.moveTo(path[i].x, path[i].y);
346
+                
347
+                ctx.lineTo(path[i+1].x, path[i+1].y);
348
+                
349
+                if (i % 20 === 0 || i === path.length - 2) {
350
+                     ctx.strokeStyle = `hsla(${path[i].h}, 80%, 60%, 0.8)`;
351
+                     ctx.stroke();
352
+                     ctx.beginPath();
353
+                     ctx.moveTo(path[i+1].x, path[i+1].y);
354
+                }
355
+            }
356
+            ctx.globalCompositeOperation = 'source-over';
357
+        }
358
+
359
+        requestAnimationFrame(draw);
360
+    }
361
+
362
+    draw();
363
+
364
+</script>
365
+</body>
366
+</html>

+ 253 - 0
public/3.html

@@ -0,0 +1,253 @@
1
+<!DOCTYPE html>
2
+<html lang="zh-CN">
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <title>3D Mandelbrot WebGL Renderer</title>
6
+    <style>
7
+        body { margin: 0; overflow: hidden; background: #000; }
8
+        canvas { display: block; width: 100vw; height: 100vh; }
9
+        #instruction {
10
+            position: absolute;
11
+            top: 10px; left: 10px;
12
+            color: rgba(255,255,255,0.8);
13
+            background: rgba(0,0,0,0.6);
14
+            padding: 15px;
15
+            border-radius: 8px;
16
+            font-family: sans-serif;
17
+            pointer-events: none;
18
+            user-select: none;
19
+        }
20
+    </style>
21
+</head>
22
+<body>
23
+    <div id="instruction">
24
+        <h3>复数分形探索器 (WebGL)</h3>
25
+        <p>• 滚轮:无极缩放 (Zoom)</p>
26
+        <p>• 拖拽:移动视野 (Pan)</p>
27
+        <p>• 算法:Distance Estimation (DEM) + Phong Lighting</p>
28
+        <p style="font-size:12px; color:#aaa;">对应你上传的图2风格</p>
29
+    </div>
30
+    <canvas id="glcanvas"></canvas>
31
+
32
+    <script id="vs" type="x-shader/x-vertex">
33
+        attribute vec2 position;
34
+        void main() {
35
+            gl_Position = vec4(position, 0.0, 1.0);
36
+        }
37
+    </script>
38
+
39
+    <script id="fs" type="x-shader/x-fragment">
40
+        precision highp float;
41
+
42
+        uniform vec2 u_resolution;
43
+        uniform vec2 u_center;
44
+        uniform float u_zoom;
45
+        uniform float u_time;
46
+
47
+        // 复数乘法
48
+        vec2 complexMul(vec2 a, vec2 b) {
49
+            return vec2(a.x*b.x - a.y*b.y, a.x*b.y + a.y*b.x);
50
+        }
51
+
52
+        // HSV转RGB辅助函数
53
+        vec3 hsv2rgb(vec3 c) {
54
+            vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
55
+            vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
56
+            return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
57
+        }
58
+
59
+        void main() {
60
+            // 1. 坐标归一化
61
+            vec2 uv = (gl_FragCoord.xy - 0.5 * u_resolution.xy) / u_resolution.y;
62
+            
63
+            // 2. 应用缩放和位移 (映射到复数平面 C)
64
+            vec2 c = u_center + uv * (4.0 / u_zoom);
65
+            
66
+            // Z用于迭代,DZ用于距离估算(导数)
67
+            vec2 z = vec2(0.0);
68
+            vec2 dz = vec2(0.0);
69
+            
70
+            float iter = 0.0;
71
+            const float max_iter = 500.0; // 最大迭代次数
72
+            float escapeRadius = 1024.0;  // 逃逸半径
73
+            
74
+            // 3. 核心迭代循环 Z = Z^2 + C
75
+            // 同时计算导数 dZ = 2*Z*dZ + 1 (用于计算距离)
76
+            float trap = 1e20; // 轨道陷阱变量(用于图1那种球体效果,这里简化做纹理)
77
+
78
+            for (float i = 0.0; i < max_iter; i++) {
79
+                // 导数迭代: dz = 2*z*dz + 1
80
+                dz = 2.0 * complexMul(z, dz) + vec2(1.0, 0.0);
81
+                
82
+                // 主函数迭代: z = z^2 + c
83
+                z = complexMul(z, z) + c;
84
+
85
+                // 记录最小距离作为纹理(类似Orbit Trap)
86
+                trap = min(trap, abs(z.x * z.y)); 
87
+
88
+                // 检查逃逸
89
+                if (dot(z, z) > escapeRadius) {
90
+                    iter = i;
91
+                    break;
92
+                }
93
+                iter = i;
94
+            }
95
+
96
+            // 4. 距离估算 (Distance Estimation)
97
+            // d = 0.5 * |z| * log(|z|) / |dz|
98
+            float r = length(z);
99
+            float dist = 0.5 * r * log(r) / length(dz);
100
+            
101
+            // 5. 渲染逻辑
102
+            vec3 color = vec3(0.0);
103
+
104
+            if (iter < max_iter) {
105
+                // --- 外部着色 (External) ---
106
+                
107
+                // 平滑迭代数 (消除颜色断层)
108
+                float smoothIter = iter - log2(log2(dot(z,z))) + 4.0;
109
+                
110
+                // 模拟3D光照 (基于距离场的法线计算)
111
+                // 我们不通过差分计算法线,而是直接用距离函数衰减来模拟光晕
112
+                float edge = clamp(pow(dist, 0.2) * 1.5, 0.0, 1.0);
113
+                
114
+                // 基础色调:蓝色 -> 奶油色 -> 深紫 (模仿图2)
115
+                float t = smoothIter * 0.05 - u_time * 0.02;
116
+                vec3 col1 = vec3(0.1, 0.2, 0.5); // 深蓝
117
+                vec3 col2 = vec3(0.95, 0.8, 0.6); // 奶油/金
118
+                vec3 col3 = vec3(0.4, 0.0, 0.4); // 紫
119
+                
120
+                vec3 baseColor = 0.5 + 0.5 * cos(6.28318 * (vec3(1.0) * t + vec3(0.0, 0.33, 0.67)));
121
+                
122
+                // 混合颜色
123
+                color = baseColor * edge;
124
+                
125
+                // 添加类似图2的"山脊"高光
126
+                // 如果距离非常小(靠近集合边界),则调亮
127
+                float ridge = 1.0 / (1.0 + 100.0 * dist); 
128
+                color += vec3(1.0, 0.9, 0.8) * ridge;
129
+
130
+            } else {
131
+                // --- 内部着色 (Internal / Mandelbrot Set) ---
132
+                color = vec3(0.0); // 黑色核心
133
+            }
134
+
135
+            gl_FragColor = vec4(color, 1.0);
136
+        }
137
+    </script>
138
+
139
+    <script>
140
+        // WebGL 初始化样板代码
141
+        const canvas = document.getElementById('glcanvas');
142
+        const gl = canvas.getContext('webgl');
143
+
144
+        if (!gl) { alert("您的浏览器不支持WebGL"); }
145
+
146
+        // 编译着色器
147
+        function createShader(gl, type, source) {
148
+            const shader = gl.createShader(type);
149
+            gl.shaderSource(shader, source);
150
+            gl.compileShader(shader);
151
+            if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
152
+                console.error(gl.getShaderInfoLog(shader));
153
+                gl.deleteShader(shader);
154
+                return null;
155
+            }
156
+            return shader;
157
+        }
158
+
159
+        const vsSource = document.getElementById('vs').text;
160
+        const fsSource = document.getElementById('fs').text;
161
+        const vertexShader = createShader(gl, gl.VERTEX_SHADER, vsSource);
162
+        const fragmentShader = createShader(gl, gl.FRAGMENT_SHADER, fsSource);
163
+
164
+        const program = gl.createProgram();
165
+        gl.attachShader(program, vertexShader);
166
+        gl.attachShader(program, fragmentShader);
167
+        gl.linkProgram(program);
168
+        gl.useProgram(program);
169
+
170
+        // 设置矩形顶点 (覆盖全屏)
171
+        const positionBuffer = gl.createBuffer();
172
+        gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);
173
+        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
174
+            -1, -1, 1, -1, -1,  1,
175
+            -1,  1, 1, -1,  1,  1,
176
+        ]), gl.STATIC_DRAW);
177
+
178
+        const positionLocation = gl.getAttribLocation(program, "position");
179
+        gl.enableVertexAttribArray(positionLocation);
180
+        gl.vertexAttribPointer(positionLocation, 2, gl.FLOAT, false, 0, 0);
181
+
182
+        // Uniforms 变量位置
183
+        const uResolution = gl.getUniformLocation(program, "u_resolution");
184
+        const uCenter = gl.getUniformLocation(program, "u_center");
185
+        const uZoom = gl.getUniformLocation(program, "u_zoom");
186
+        const uTime = gl.getUniformLocation(program, "u_time");
187
+
188
+        // 交互状态
189
+        let state = {
190
+            x: -0.745, // 经典的“海马谷”位置
191
+            y: 0.1,
192
+            zoom: 1.0,
193
+            targetZoom: 1.0,
194
+            dragging: false,
195
+            lastX: 0,
196
+            lastY: 0
197
+        };
198
+
199
+        function resize() {
200
+            canvas.width = window.innerWidth;
201
+            canvas.height = window.innerHeight;
202
+            gl.viewport(0, 0, canvas.width, canvas.height);
203
+        }
204
+        window.addEventListener('resize', resize);
205
+        resize();
206
+
207
+        // 交互逻辑
208
+        canvas.addEventListener('mousedown', e => {
209
+            state.dragging = true;
210
+            state.lastX = e.clientX;
211
+            state.lastY = e.clientY;
212
+        });
213
+        window.addEventListener('mouseup', () => state.dragging = false);
214
+        window.addEventListener('mousemove', e => {
215
+            if (state.dragging) {
216
+                const dx = e.clientX - state.lastX;
217
+                const dy = e.clientY - state.lastY;
218
+                state.lastX = e.clientX;
219
+                state.lastY = e.clientY;
220
+                
221
+                // 移动速度随缩放层级调整
222
+                const moveSpeed = 4.0 / (state.zoom * canvas.height);
223
+                state.x -= dx * moveSpeed;
224
+                state.y += dy * moveSpeed; // WebGL Y轴通常相反,但在复数平面视情况而定
225
+            }
226
+        });
227
+        canvas.addEventListener('wheel', e => {
228
+            e.preventDefault();
229
+            const zoomSpeed = 1.05;
230
+            if (e.deltaY < 0) state.targetZoom *= zoomSpeed;
231
+            else state.targetZoom /= zoomSpeed;
232
+        }, { passive: false });
233
+
234
+        // 渲染循环
235
+        function render(time) {
236
+            time *= 0.001;
237
+            
238
+            // 简单的平滑缩放
239
+            state.zoom += (state.targetZoom - state.zoom) * 0.1;
240
+
241
+            gl.uniform2f(uResolution, canvas.width, canvas.height);
242
+            gl.uniform2f(uCenter, state.x, state.y);
243
+            gl.uniform1f(uZoom, state.zoom);
244
+            gl.uniform1f(uTime, time);
245
+
246
+            gl.drawArrays(gl.TRIANGLES, 0, 6);
247
+            requestAnimationFrame(render);
248
+        }
249
+        requestAnimationFrame(render);
250
+
251
+    </script>
252
+</body>
253
+</html>

BIN
public/fonts/Teko-Bold.ttf


BIN
public/fonts/Teko-SemiBold.ttf


Dosya farkı çok büyük olduğundan ihmal edildi
+ 5312 - 0
public/help/phonics.htm


BIN
public/help/phonics_files/Group 2.png


BIN
public/help/phonics_files/Group 3.png


BIN
public/help/phonics_files/Group 324.png


BIN
public/help/phonics_files/Group 334s.png


BIN
public/help/phonics_files/Group 5.png


BIN
public/help/phonics_files/Group 6.png


BIN
public/help/phonics_files/Group w.png


BIN
public/help/phonics_files/happy-birthday-flower-images-with-cake-flower-cake-pictures-happy-birthday-cakes-and-flowers.jpg


BIN
public/help/phonics_files/icon_edit25ded2.png


BIN
public/help/phonics_files/videoplayback.mp4---00.02.20.965.jpg


+ 18 - 0
public/index2.html

@@ -0,0 +1,18 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <title>秒过学习</title>
6
+    <link rel="icon" href="/favicon.ico" type="image/x-icon" id="page_favionc">
7
+    <meta name="Description" content="秒过学习是根据青少年大脑记忆特点研发的学习方法和产品,专门挖掘学习中的记忆盲区,解决知识的薄弱环节,该方法需要在家长正确的辅导下使用。" />
8
+</head>
9
+<body style="overflow-x: 0;overflow-y: 0;margin: 0 auto;">
10
+    <div style="margin:0 auto;display:none;"><img src="/images/universalpic_logo_200x200.png" alt=""/></div>
11
+    <img src="/images/bg.jpg" width="100%"/>
12
+
13
+    <div style="width: 100%;text-align: center;color:#fff;margin-top:-30px;font-size:12px;">
14
+        Copyright ©2019 kylx365.com 沪ICP备17004832号
15
+    </div>
16
+
17
+</body>
18
+</html>

+ 128 - 0
public/internal/20170411.html

@@ -0,0 +1,128 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <title>刻意练习365</title>
6
+    <style>
7
+        body {
8
+            overflow-x: 0;
9
+            overflow-y: 0;
10
+            margin: 0 auto;
11
+            display: flex;
12
+            flex-direction: column;
13
+            align-items: center;
14
+            justify-content: center;
15
+        }
16
+
17
+        p {
18
+            font-size: 72px;
19
+            margin: 20px;
20
+        }
21
+
22
+        A:link {
23
+            text-decoration: none;
24
+        }
25
+    </style>
26
+</head>
27
+<body>
28
+<div style="height:30px;"></div>
29
+<p><a href="/20170411List?method=GetUserNumber500">每日新增用户数</a></p>
30
+<p><a href="/20170411List?method=GetUserPayName500">用户支付名单</a></p>
31
+<hr style="width:100%;"/>
32
+<p><a href="/20170411List?method=GetStatisticsMathStarNew">口算星球用户最新列表</a></p>
33
+<p><a href="/20170411List?method=GetStatisticsMathCalculationNew">计算题用户最新列表</a></p>
34
+<p><a href="/20170411List?method=GetStatisticsPinyinNew">拼音用户最新列表</a></p>
35
+<p><a href="/20170411List?method=GetStatisticsHanziNew">识字用户最新列表</a></p>
36
+<p><a href="/20170411List?method=GetStatisticsPhonicsNew">自然拼读用户最新列表</a></p>
37
+<p><a href="/20170411List?method=GetStatisticsYJBDCNew">语境用户最新列表</a></p>
38
+<p><a href="/20170411List?method=GetSchulteUserNew">专注力用户最新列表</a></p>
39
+<p><a href="/20170411List?method=GetStatisticsMPSNew">分数线用户最新列表</a></p>
40
+<hr style="width:100%;"/>
41
+<p><a href="/20170411List?method=GetStatisticsMiaoguoNew">秒过用户最新列表</a></p>
42
+<p><a href="/20170411List?method=GetStatisticsWebchatServiceNew">服务号用户最新列表</a></p>
43
+
44
+<p><a href="/miaoguouseradmin">秒过用户分班和开通</a></p>
45
+
46
+<p><a href="/20170411List?method=GetMiaoguoUserPayName">秒过用户支付名单</a></p>
47
+
48
+<p><a href="/miaoguouseragencycheck">秒过用户代理审核</a></p>
49
+<p><a href="/miaoguouseragency">秒过用户代理树</a></p>
50
+<p><a href="/add_info_edit">秒过加资料信息维护</a></p>
51
+
52
+<!--<p><a href="/literacyadmin">秒过资料库管理</a></p>-->
53
+
54
+<!--<p><a href="/20170411List?method=GetStatisticsMiaoguoGroup_IsPay__1">秒过学习小组用户统计</a></p>-->
55
+<!--<p><a href="/20170411List?method=GetStatisticsMiaoguoGroup_IsPay__0">秒过未付费用户统计</a></p>-->
56
+<hr style="width:100%;"/>
57
+<p><a href="/mps">秒过分数线数据管理</a></p>
58
+<p><a href="/mpsschool">秒过分数线学校信息管理</a></p>
59
+<p><a href="/mpserror">秒过分数线纠错管理</a></p>
60
+<hr style="width:100%;"/>
61
+
62
+<p><a href="/20170411List?method=GetScoresNew500">口算星球用户最新练习成绩</a></p>
63
+<hr style="width:100%;"/>
64
+
65
+<p><a href="/20170411List?method=GetStatisticsHanziMiniprogram">识字小程序导流统计</a></p>
66
+<p><a href="/20170411List?method=GetHanziUserPayName">识字用户支付名单</a></p>
67
+
68
+<hr style="width:100%;"/>
69
+
70
+<p><a href="/20170411List?method=GetStatisticsPhonicsMiniprogram">自然拼读小程序导流统计</a></p>
71
+<p><a href="/20170411List?method=GetPhonicsUserPayName">自然拼读用户支付名单</a></p>
72
+
73
+
74
+<hr style="width:100%;"/>
75
+
76
+<p><a href="/20170411List?method=GetStatisticsPinyinMiniprogram">拼音小程序导流统计</a></p>
77
+<p><a href="/20170411List?method=GetPinyinUserPayName">拼音用户支付名单</a></p>
78
+
79
+
80
+<hr style="width:100%;"/>
81
+<p><a href="/20170411List?method=GetSchulteUserNumber">注意力游戏上线用户数</a></p>
82
+<p><a href="/20170411List?method=GetSchulteUserScoreNew">注意力游戏最新成绩列表</a></p>
83
+<hr style="width:100%;"/>
84
+<p><a href="/20170411List?method=GetUserNew">口算用户最新列表</a></p>
85
+<p><a href="/20170411List?method=GetStatisticsMiniprogram">口算小程序导流统计</a></p>
86
+<p><a href="/20170411List?method=GetUserPayName">口算用户支付与打赏名单</a></p>
87
+<hr style="width:100%;"/>
88
+<p><a href="/20170411List?method=GetUserIntroducer">口算用户介绍人数</a></p>
89
+
90
+<p><a href="/20170411List?method=GetUserPracticeQuestionTypeNumberToday">口算用户当天练习题卡次数</a></p>
91
+
92
+<p><a href="/20170411List?method=GetScoresNew">口算用户最新练习成绩</a></p>
93
+
94
+<p><a href="/20170411List?method=GetUserSource">口算用户来源统计</a></p>
95
+
96
+<p><a href="/20170411List?method=GetPointList24HoursByIndex">24小时排行榜统计</a></p>
97
+
98
+<p><a href="/20170411List?method=GetUserReport">用户举报信息</a></p>
99
+
100
+<p><a href="/20170411List?method=GetUserAttention">用户关注列表</a></p>
101
+
102
+<hr style="width:100%;"/>
103
+
104
+<p><a href="/20170411List?method=GetGroupInfo">打卡群统计信息</a></p>
105
+
106
+<p><a href="/20170411List?method=GetUserDayNumber">用户使用天数</a></p>
107
+
108
+<p><a href="/20170411List?method=GetUserPracticeQuestionTypeNumber">用户练习题卡次数</a></p>
109
+
110
+<p><a href="/20170411List?method=GetActivityUserInfo">口算用户参加活动列表</a></p>
111
+
112
+<p><a href="/20170411List?method=GetUserProvince">用户省份统计</a></p>
113
+
114
+<p><a href="/20170411List?method=GetUserSex">用户性别统计</a></p>
115
+
116
+<p><a href="/20170411List?method=GetUserSystemCount">用户操作系统统计</a></p>
117
+
118
+<p><a href="/20170411List?method=GetUserNumber">用户数</a></p>
119
+
120
+<p><a href="/20170411List?method=GetUserNumber2">3.0上线用户数</a></p>
121
+
122
+<p><a href="/api/UpdateVersionStatus?ProgramID=166&Version=1.0.1&Flag=1">版本更新状态</a></p>
123
+<hr style="width:100%;"/>
124
+<p><a href="https://www.kylx365.com/userNumber.html">总数统计</a></p>
125
+[替换]
126
+
127
+</body>
128
+</html>

+ 147 - 0
public/internal/20170411List.html

@@ -0,0 +1,147 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+    <meta charset="UTF-8">
5
+    <title>刻意练习365</title>
6
+    <style type="text/css">
7
+        body {
8
+            TEXT-ALIGN: center;
9
+        }
10
+
11
+        #app {
12
+            margin: 0 auto;
13
+            font-size: 24px;
14
+        }
15
+
16
+        table {
17
+            border-collapse: collapse;
18
+            margin: 0 0 50px 0;
19
+            width: 100%;
20
+
21
+        }
22
+
23
+        .tdClass {
24
+            background-color: #eeeeee;
25
+        }
26
+
27
+        table, td {
28
+            border: 1px solid black;
29
+            height: 30px;
30
+            padding: 5px 10px 5px 10px;
31
+            flex: 1;
32
+        }
33
+
34
+        .main {
35
+            width: 100%;
36
+        }
37
+        
38
+        .Title{
39
+            font-size:36px;
40
+            font-weight: bolder;
41
+            margin:0px 0 10px 0;
42
+        }
43
+        #CurrentTime{
44
+            font-size:12px;
45
+            width: 100%;
46
+            text-align: right;
47
+        }
48
+
49
+    </style>
50
+    <script src="https://kylx365-1253256735.file.myqcloud.com/js/jquery-1.10.2.min.js"></script>
51
+    <script src="https://kylx365-1253256735.file.myqcloud.com/js/vue.min.js"></script>
52
+
53
+    <script>
54
+        var dataname="[数据名称]";
55
+        var url = "/data/" + QueryString(dataname);
56
+
57
+        var vm;
58
+        $(document).ready(function () {
59
+            vm = new Vue({
60
+                el: '#app',
61
+                data: {
62
+                    DataName:dataname,
63
+                    ListMain: [],
64
+                    ListMain2: [],
65
+                },
66
+                methods: {
67
+                    getList: function (event) {
68
+                        $.get(url, function (data) {
69
+                            var arr=[];
70
+                            if (dataname != "GetUserNumber2"
71
+                                    && dataname != "GetUserNumber500"
72
+                                    && dataname != "GetUserSource"
73
+                                    && dataname != "GetActivityUserInfo"
74
+                                    && dataname != "GetGroupInfo"
75
+                                    && dataname != "GetUserIntroducer"
76
+                                    && dataname != "GetSchulteUserNumber") {
77
+                                arr.push(data.result);
78
+                                vm.ListMain2=arr;
79
+                            }
80
+                            else {
81
+                                arr = data.result;
82
+                                vm.ListMain=arr;
83
+                            }
84
+                            $("#CurrentTime").html(new Date().toString());
85
+                        });
86
+                    },
87
+
88
+                }
89
+
90
+            });
91
+
92
+            vm.getList();
93
+
94
+
95
+        });
96
+        function QueryString(key) {
97
+            return key.replace("__","=").replace("_","?");
98
+        }
99
+
100
+    </script>
101
+</head>
102
+<body>
103
+
104
+<div id="app">
105
+    <div id="CurrentTime"></div>
106
+    <div class="main">
107
+        <table v-for="(valueMain, keyMain) in ListMain">
108
+            <caption class="Title" align="top">{{valueMain.title}}</caption>
109
+            <thead>
110
+            <tr>
111
+                <td class="tdClass">编号</td>
112
+                <td class="tdClass" v-for="(value, key) in valueMain.list[0]" v-if="key!='秒过ID'">{{ key }}</td>
113
+            </tr>
114
+            </thead>
115
+            <tbody>
116
+            <tr v-for="(item, index) in valueMain.list">
117
+                <td>{{ index+1 }}</td>
118
+                <td v-for="(value, key) in item" v-if="key!='秒过ID'">
119
+                    {{ value }}
120
+                </td>
121
+            </tr>
122
+            </tbody>
123
+        </table>
124
+        <table v-for="(valueMain, keyMain) in ListMain2">
125
+            <thead>
126
+            <tr>
127
+                <td class="tdClass">编号</td>
128
+                <td class="tdClass" v-for="(value, key) in valueMain[0]">{{ key }}</td>
129
+            </tr>
130
+            </thead>
131
+            <tbody>
132
+            <tr v-for="(item, index) in valueMain">
133
+                <td>{{ index+1 }}</td>
134
+                <td v-for="(value, key) in item" v-if="key=='秒过ID'">
135
+                    <a :href="'webuserinfo?UserID=' + item.秒过ID " target="_blank">{{ value }}</a>
136
+                </td>
137
+                <td v-for="(value, key) in item" v-if="key!='秒过ID'">
138
+                    {{ value }}
139
+                </td>
140
+            </tr>
141
+            </tbody>
142
+        </table>
143
+    </div>
144
+
145
+</div>
146
+</body>
147
+</html>

+ 377 - 0
public/jquery.html

@@ -0,0 +1,377 @@
1
+<html>
2
+<head>
3
+    <script type="text/javascript" src="./js/jquery-1.6.4.min.js"></script>
4
+
5
+    <style>
6
+        body{
7
+            margin:0;
8
+            padding: 0;
9
+        }
10
+
11
+        .tank{
12
+            width:50px;
13
+            height:50px;
14
+            position: absolute;
15
+            border-radius: 10%;
16
+
17
+        }
18
+
19
+        #tank_1{
20
+            background-color: deepskyblue;
21
+            left:5px;
22
+            top:5px;
23
+        }
24
+        #tank_2{
25
+            background-color: navy;
26
+            left:5px;
27
+            top:450px;
28
+        }
29
+
30
+
31
+
32
+        .Circle{
33
+            width:25px;
34
+            height:25px;
35
+            border-radius: 50%;
36
+            background-color: #ddd;
37
+            position: absolute;
38
+            left:12px;
39
+            top:12px;
40
+        }
41
+
42
+        .gun{
43
+            width:35px;
44
+            height:6px;
45
+            background-color: #ddd;
46
+            position: absolute;
47
+            left:25px;
48
+            top:22px;
49
+            z-index: 10;
50
+        }
51
+
52
+        .bullet{
53
+            width:6px;
54
+            height:6px;
55
+            border-radius: 50%;
56
+            background-color: #000;
57
+            z-index: 0;
58
+            position: absolute;
59
+            border-top-right-radius: ;
60
+            left:25px;
61
+            top:22px;
62
+            transform: rotate(0deg);
63
+        }
64
+
65
+        .wall{
66
+            background-color: blue;
67
+            position: absolute;
68
+            border-radius: 10px;
69
+            color:#fff;
70
+            font-size:40px;
71
+            text-align: center;
72
+        }
73
+    </style>
74
+    <script type="text/javascript">
75
+        var arrWall=[
76
+            [{x:0,y:0},{x:5,y:505},0,""],
77
+            [{x:0,y:0},{x:505,y:5},0,""],
78
+            [{x:500,y:0},{x:505,y:505},0,""],
79
+            [{x:0,y:500},{x:500,y:505},0,""],
80
+
81
+            [{x:400,y:100},{x:455,y:155},1,"10"],
82
+            [{x:400,y:200},{x:455,y:255},1,"80"],
83
+            [{x:400,y:300},{x:455,y:355},1,"50"],
84
+
85
+
86
+        ];
87
+        var isMove=true;
88
+
89
+        $(document).ready(function(){
90
+            buildWall();
91
+        });
92
+
93
+        $(document).keydown(function(event){
94
+            console.log(event.keyCode);
95
+            switch (event.keyCode) {
96
+                case 37:
97
+                case 38:
98
+                case 39:
99
+                case 40:
100
+                    move($("#tank_1"), event.keyCode, 50);
101
+                    break;
102
+                case 32:
103
+                    gun($("#tank_1"),null,800);
104
+                    break;
105
+            }
106
+
107
+            switch (event.keyCode) {
108
+                case 65:
109
+                case 87:
110
+                case 68:
111
+                case 83:
112
+                    move($("#tank_2"), event.keyCode, 50);
113
+                    break;
114
+                case 81:
115
+                    gun($("#tank_2"),null,800);
116
+                    break;
117
+            }
118
+        });
119
+
120
+        function move(obj,direction,step){
121
+            var directionStr="";
122
+            var pointSource={
123
+                x:Number($(obj).css("left").replace("px","")),
124
+                y:Number($(obj).css("top").replace("px","")),
125
+            };
126
+            var pointTarget={
127
+                x:pointSource.x,
128
+                y:pointSource.y,
129
+                direction:null,
130
+            }
131
+
132
+            switch (direction){
133
+                case 37:
134
+                case 65:
135
+                    $(obj).css("transform",'rotate(180deg)');
136
+                    pointTarget.x=pointSource.x-step;
137
+                    pointTarget.direction="left";
138
+                    break;
139
+                case 38:
140
+                case 87:
141
+                    $(obj).css("transform",'rotate(-90deg)');
142
+                    pointTarget.y=pointSource.y-step;
143
+                    pointTarget.direction="up";
144
+                    break;
145
+                case 39:
146
+                case 68:
147
+                    $(obj).css("transform",'rotate(0deg)');
148
+                    pointSource.x+=$(obj).width();
149
+                    //pointSource.y+=$(obj).height();
150
+                    pointTarget.x=pointSource.x+step;
151
+                    pointTarget.direction="right";
152
+                    break;
153
+                case 40:
154
+                case 83:
155
+                    $(obj).css("transform",'rotate(90deg)');
156
+                    //pointSource.x+=$(obj).width();
157
+                    pointSource.y+=$(obj).height();
158
+                    pointTarget.y=pointSource.y+step;
159
+                    pointTarget.direction="down";
160
+                    break;
161
+            }
162
+            console.log("pointSource.x:"+pointSource.x);
163
+            console.log("pointSource.y:"+pointSource.y);
164
+            console.log("pointTarget.x:"+pointTarget.x);
165
+            console.log("pointTarget.y:"+pointTarget.y);
166
+
167
+            pointTarget=checkWall(pointSource,pointTarget);
168
+
169
+            if (pointTarget.direction=="right") {
170
+                pointTarget.x -= $(obj).width();
171
+                //pointTarget.y -= $(obj).height();
172
+            }
173
+            else if (pointTarget.direction=="down") {
174
+                //pointTarget.x -= $(obj).width();
175
+                pointTarget.y -= $(obj).height();
176
+            }
177
+
178
+            console.log("pointTarget2.x:"+pointTarget.x);
179
+            console.log("pointTarget2.y:"+pointTarget.y);
180
+
181
+            //console.log("isMove:"+isMove);
182
+            if (isMove) {
183
+                isMove=false;
184
+                //console.log("isMove2:"+isMove);
185
+                $(obj).stop();
186
+                $(obj).animate({"left": pointTarget.x + "px", "top": pointTarget.y + "px"}, 400, null, function () {
187
+                    //console.log("isMove3:"+isMove);
188
+                    isMove = true;
189
+
190
+                });
191
+            }
192
+        }
193
+
194
+        function checkWall(pointSource,pointTarget){
195
+            var result=pointTarget;
196
+
197
+
198
+            if (pointSource.x>pointTarget.x && pointSource.y==pointTarget.y){
199
+                for(var x=pointSource.x;x>=pointTarget.x;x--){
200
+                    var r=getPoint(x,pointSource.y,pointTarget.direction);
201
+                    if (r.update)
202
+                        return r;
203
+                }
204
+            }
205
+            if (pointSource.x==pointTarget.x && pointSource.y>pointTarget.y){
206
+                for(var y=pointSource.y;y>=pointTarget.y;y--){
207
+                    var r=getPoint(pointSource.x,y,pointTarget.direction);
208
+                    if (r.update)
209
+                        return r;
210
+                }
211
+            }
212
+            if (pointSource.x<=pointTarget.x && pointSource.y==pointTarget.y){
213
+                for(var x=pointSource.x;x<=pointTarget.x;x++){
214
+                    var r=getPoint(x,pointSource.y,pointTarget.direction);
215
+                    if (r.update)
216
+                        return r;
217
+                }
218
+            }
219
+            if (pointSource.x==pointTarget.x && pointSource.y<=pointTarget.y){
220
+                for(var y=pointSource.y;y<=pointTarget.y;y++){
221
+                    var r=getPoint(pointSource.x,y,pointTarget.direction);
222
+                    if (r.update)
223
+                        return r;
224
+                }
225
+            }
226
+
227
+            return result;
228
+
229
+
230
+            function getPoint(x,y,direction){
231
+                var result={
232
+                    update:false,
233
+                    direction:direction,
234
+                };
235
+
236
+                for(var i=0;i<arrWall.length;i++){
237
+                    if (x>arrWall[i][0].x && x<arrWall[i][1].x && y>arrWall[i][0].y && y<arrWall[i][1].y){
238
+                        if (direction=="left") {
239
+                            result.update=true;
240
+                            result.x=arrWall[i][1].x;
241
+                        }
242
+                        else if (direction=="right") {
243
+                            result.update=true;
244
+                            result.x=arrWall[i][0].x;
245
+                        }
246
+                        if (direction=="up") {
247
+                            result.update=true;
248
+                            result.y=arrWall[i][1].y;
249
+                        }
250
+                        else if (direction=="down") {
251
+                            result.update=true;
252
+                            result.y=arrWall[i][0].y;
253
+                        }
254
+
255
+                        if (!result.x)
256
+                            result.x=x;
257
+                        if (!result.y)
258
+                            result.y=y;
259
+
260
+                        result.isDisappear=arrWall[i][2];
261
+                        result.WallObjectIndex=i;
262
+
263
+                        break;
264
+                    }
265
+                }
266
+                return result;
267
+            }
268
+        }
269
+
270
+        function gun(obj,direction,step) {
271
+
272
+            var pointSource = {
273
+                x: (Number($(obj).css("left").replace("px", "")) + 24),
274
+                y: (Number($(obj).css("top").replace("px", "")) + 22),
275
+            };
276
+            var pointTarget = {
277
+                x: pointSource.x,
278
+                y: pointSource.y,
279
+                direction: null,
280
+            }
281
+
282
+            var bulletID = new Date().getTime();
283
+            $(document.body).prepend("<div id=" + bulletID + " class='bullet'></div>");
284
+            $("#" + bulletID).css("left", pointSource.x + "px");
285
+            $("#" + bulletID).css("top", pointSource.y + "px");
286
+
287
+
288
+            if ($(obj).css("transform") == "matrix(1, 0, 0, 1, 0, 0)") {
289
+                pointTarget.x += step;
290
+                pointTarget.direction = "right";
291
+            }
292
+            else if ($(obj).css("transform") == "matrix(6.12323e-17, 1, -1, 6.12323e-17, 0, 0)") {
293
+                pointTarget.y += step;
294
+                pointTarget.direction = "down";
295
+            }
296
+            else if ($(obj).css("transform") == "matrix(-1, 1.22465e-16, -1.22465e-16, -1, 0, 0)") {
297
+                pointTarget.x -= step;
298
+                pointTarget.direction = "left";
299
+            }
300
+            else if ($(obj).css("transform") == "matrix(6.12323e-17, -1, 1, 6.12323e-17, 0, 0)") {
301
+                pointTarget.y -= step;
302
+                pointTarget.direction = "up";
303
+            }
304
+            pointTarget = checkWall(pointSource, pointTarget);
305
+
306
+            if (pointTarget.direction == "right")
307
+                pointTarget.x -= $("#" + bulletID).width();
308
+            else if (pointTarget.direction == "down")
309
+                pointTarget.y -= $("#" + bulletID).height();
310
+
311
+            $("#" + bulletID).animate({"left": pointTarget.x + "px", "top": pointTarget.y + 'px'}, 'fast',null,function(){
312
+                $("#" + bulletID).animate({
313
+                            "opacity": '0',
314
+                            "width": '30px',
315
+                            "height": '30px',
316
+                            "left": '-=10px',
317
+                            "top": '-=10px'
318
+                        },
319
+                        '100', '', function () {
320
+                            $(this).remove();
321
+                        });
322
+                if (pointTarget.isDisappear == 1) {
323
+
324
+                    if (Number(arrWall[pointTarget.WallObjectIndex][3])>1){
325
+                        arrWall[pointTarget.WallObjectIndex][3]=Number(arrWall[pointTarget.WallObjectIndex][3])-1;
326
+                        $("#wall_" + pointTarget.WallObjectIndex).text(arrWall[pointTarget.WallObjectIndex][3]);
327
+                    }
328
+                    else {
329
+                        $("#wall_" + pointTarget.WallObjectIndex).animate({
330
+                            "opacity": '0',
331
+                            "width": '100px',
332
+                            "height": '100px',
333
+                            "left": '-=20px',
334
+                            "top": '-=20px'
335
+                        }, 100, null, function () {
336
+                            $(this).remove();
337
+                            arrWall[pointTarget.WallObjectIndex][0].x = -1;
338
+                            arrWall[pointTarget.WallObjectIndex][0].y = -1;
339
+                            arrWall[pointTarget.WallObjectIndex][1].x = -1;
340
+                            arrWall[pointTarget.WallObjectIndex][1].y = -1;
341
+
342
+                        });
343
+                    }
344
+                }
345
+            });
346
+
347
+
348
+        }
349
+
350
+        function buildWall(){
351
+            for(var i=0;i<arrWall.length;i++){
352
+                var width=arrWall[i][1].x-arrWall[i][0].x;
353
+                var height=arrWall[i][1].y-arrWall[i][0].y;
354
+
355
+                $(document.body).append("<div id='wall_"+i+"' class='wall' style='left:"+arrWall[i][0].x+"px;top:"+arrWall[i][0].y+"px;width:"+width+"px;height:"+height+"px;'>"+arrWall[i][3]+"</div>")
356
+            }
357
+        }
358
+
359
+
360
+    </script>
361
+</head>
362
+
363
+<body>
364
+<div id="tank_1" class="tank">
365
+    <div class="Circle"></div>
366
+    <div class="gun"></div>
367
+</div>
368
+
369
+<div id="tank_2" class="tank">
370
+    <div class="Circle"></div>
371
+    <div class="gun"></div>
372
+</div>
373
+
374
+
375
+</body>
376
+
377
+</html> 

+ 199 - 0
public/jquery2.html

@@ -0,0 +1,199 @@
1
+<html>
2
+<head>
3
+    <script type="text/javascript" src="./js/jquery-1.6.4.min.js"></script>
4
+
5
+    <style>
6
+    </style>
7
+    <script type="text/javascript">
8
+
9
+//        //************************************
10
+//        //使用变量
11
+//        $(document).ready(function(){
12
+//            var a=22;
13
+//            var b=34;
14
+//            var c=a*b;
15
+//            $("#div1").text(a+"+"+b+"="+c);
16
+//        });
17
+//
18
+//        //************************************
19
+//        //使用函数1
20
+//        $(document).ready(function(){
21
+//            add();
22
+//            sub();
23
+//        });
24
+//
25
+//        function add(){
26
+//            var a=1;
27
+//            var b=2;
28
+//            var c=a+b;
29
+//            $("#div1").text(a+"+"+b+"="+c);
30
+//        }
31
+//
32
+//        function sub(){
33
+//            var a=2;
34
+//            var b=1;
35
+//            var c=a-b;
36
+//            $("#div2").text(a+"-"+b+"="+c);
37
+//        }
38
+
39
+//        //************************************
40
+//        //使用判断1
41
+//        $(document).ready(function(){
42
+//            operate(123,456,"+","#div1");
43
+//            operate(456,123,"-","#div2");
44
+//        });
45
+//
46
+//        function operate(a,b,operateAB,div) {
47
+//            var c=a+b;
48
+//            if (operateAB=="+"){
49
+//                c=a+b;
50
+//            }
51
+//            else if (operateAB=="-"){
52
+//                c=a-b;
53
+//            }
54
+//            $(div).text(a+operateAB+b+"="+c);
55
+//        }
56
+
57
+//        //************************************
58
+//        //使用判断2
59
+//        $(document).ready(function(){
60
+//            operate(123,456,"+","#div1");
61
+//            operate(456,123,"-","#div2");
62
+//            operate(456,123,"*","#div3");
63
+//            operate(456,123,"/","#div4");
64
+//        });
65
+//
66
+//        function operate(a,b,operateAB,div) {
67
+//            var c=a+b;
68
+//            switch (operateAB){
69
+//                case "+":
70
+//                    c=a+b;
71
+//                    break;
72
+//                case "-":
73
+//                    c=a-b;
74
+//                    break;
75
+//                case "*":
76
+//                    c=a*b;
77
+//                    break;
78
+//                case "/":
79
+//                    c=a/b;
80
+//                    break;
81
+//            }
82
+//
83
+//            $(div).text(a+operateAB+b+"="+c);
84
+//        }
85
+
86
+//        //************************************
87
+//        //使用循环
88
+//        $(document).ready(function(){
89
+//            var sum=0;
90
+//            for(var i=1;i<=100;i++){
91
+//                sum=sum+i;
92
+//            }
93
+//
94
+//            $("#div1").text("sum="+sum);
95
+//
96
+//            operate(1,100000000,"#div2")
97
+//        });
98
+//
99
+//        function operate(a,b,div) {
100
+//            var sum=0;
101
+//            for(var i=a;i<=b;i++){
102
+//                //使用中断
103
+//                if (i>100)
104
+//                    break;
105
+//
106
+//                //使用单次跳过
107
+//                if (i==50)
108
+//                    continue;
109
+//
110
+//                sum=sum+i;
111
+//
112
+//            }
113
+//
114
+//            $(div).text("sum="+sum);
115
+//        }
116
+
117
+        //************************************
118
+        //使用循环2
119
+        $(document).ready(function(){
120
+            run1("#div1");
121
+            run2("#div2");
122
+            run3("#div3");
123
+            run4("#div4");
124
+        });
125
+
126
+        function run1(div) {
127
+            var str="";
128
+            for(var i=1;i<=10;i++){
129
+                for(var j=1;j<=10;j++) {
130
+                    str = str + "*" ;
131
+                }
132
+                str = str+ "<br />";
133
+            }
134
+            $(div).html(str);
135
+        }
136
+
137
+        function run2(div) {
138
+            var str="";
139
+            for(var i=1;i<=10;i++){
140
+                for(var j=1;j<=i;j++) {
141
+                    str = str + "*" ;
142
+                }
143
+                str = str+ "<br />";
144
+            }
145
+            $(div).html(str);
146
+        }
147
+
148
+        function run3(div) {
149
+            var str="";
150
+            for(var i=1;i<=19;i++){
151
+                for(var j=1;j<=19;j++) {
152
+                    if (i<=10 && j<=i)
153
+                        str = str + "*" ;
154
+                    else if (i>10 && j>i)
155
+                        str = str + "*" ;
156
+                }
157
+                str = str+ "<br />";
158
+            }
159
+            $(div).html(str);
160
+        }
161
+
162
+        function run4(div) {
163
+            var str="";
164
+            for(var i=1;i<=11;i++){
165
+                if (i<=6) {
166
+                    for(var k=1;k<=6-i;k++)
167
+                        str = str + "_";
168
+
169
+                    for(var j=1;j<=2*i-1;j++) {
170
+                        str = str + "*" ;
171
+                    }
172
+                }
173
+
174
+                if (i>6) {
175
+                    for(var k=6+1;k<=i;k++)
176
+                        str = str + "_";
177
+
178
+                    for(var j=1;j<=(23-2*i);j++) {
179
+                        str = str + "*" ;
180
+                    }
181
+                }
182
+
183
+                str = str+ "<br />";
184
+            }
185
+            $(div).html(str);
186
+        }
187
+
188
+
189
+    </script>
190
+</head>
191
+
192
+<body>
193
+<div id="div1"></div>
194
+<div id="div2"></div>
195
+<div id="div3"></div>
196
+<div id="div4"></div>
197
+</body>
198
+
199
+</html> 

BIN
public/sounds/pinyin/basic/a.m4a


BIN
public/sounds/pinyin/basic/ai.m4a


BIN
public/sounds/pinyin/basic/an.m4a


BIN
public/sounds/pinyin/basic/ang.m4a


BIN
public/sounds/pinyin/basic/ao.m4a


BIN
public/sounds/pinyin/basic/b.m4a


BIN
public/sounds/pinyin/basic/c.m4a


BIN
public/sounds/pinyin/basic/ch.m4a


BIN
public/sounds/pinyin/basic/chi.m4a


BIN
public/sounds/pinyin/basic/ci.m4a


BIN
public/sounds/pinyin/basic/d.m4a


BIN
public/sounds/pinyin/basic/e.m4a


BIN
public/sounds/pinyin/basic/ei.m4a


BIN
public/sounds/pinyin/basic/en.m4a


BIN
public/sounds/pinyin/basic/eng.m4a


BIN
public/sounds/pinyin/basic/er.m4a


BIN
public/sounds/pinyin/basic/f.m4a


BIN
public/sounds/pinyin/basic/g.m4a


BIN
public/sounds/pinyin/basic/h.m4a


BIN
public/sounds/pinyin/basic/i.m4a


BIN
public/sounds/pinyin/basic/ie.m4a


BIN
public/sounds/pinyin/basic/in.m4a


BIN
public/sounds/pinyin/basic/ing.m4a


BIN
public/sounds/pinyin/basic/iu.m4a


BIN
public/sounds/pinyin/basic/j.m4a


BIN
public/sounds/pinyin/basic/k.m4a


BIN
public/sounds/pinyin/basic/l.m4a


BIN
public/sounds/pinyin/basic/m.m4a


BIN
public/sounds/pinyin/basic/n.m4a


BIN
public/sounds/pinyin/basic/o.m4a


BIN
public/sounds/pinyin/basic/ong.m4a


BIN
public/sounds/pinyin/basic/ou.m4a


BIN
public/sounds/pinyin/basic/p.m4a


BIN
public/sounds/pinyin/basic/q.m4a


BIN
public/sounds/pinyin/basic/r.m4a


BIN
public/sounds/pinyin/basic/ri.m4a


BIN
public/sounds/pinyin/basic/s.m4a


BIN
public/sounds/pinyin/basic/sh.m4a


BIN
public/sounds/pinyin/basic/shi.m4a


BIN
public/sounds/pinyin/basic/si.m4a


BIN
public/sounds/pinyin/basic/t.m4a


BIN
public/sounds/pinyin/basic/u.m4a


BIN
public/sounds/pinyin/basic/ui.m4a


BIN
public/sounds/pinyin/basic/un.m4a


BIN
public/sounds/pinyin/basic/v.m4a


BIN
public/sounds/pinyin/basic/ve.m4a


BIN
public/sounds/pinyin/basic/vn.m4a


BIN
public/sounds/pinyin/basic/w.m4a


BIN
public/sounds/pinyin/basic/wu.m4a


BIN
public/sounds/pinyin/basic/x.m4a


BIN
public/sounds/pinyin/basic/y.m4a


BIN
public/sounds/pinyin/basic/ye.m4a


BIN
public/sounds/pinyin/basic/yi.m4a


BIN
public/sounds/pinyin/basic/yin.m4a


BIN
public/sounds/pinyin/basic/ying.m4a


BIN
public/sounds/pinyin/basic/yu.m4a


BIN
public/sounds/pinyin/basic/yuan.m4a


BIN
public/sounds/pinyin/basic/yue.m4a


BIN
public/sounds/pinyin/basic/yun.m4a


BIN
public/sounds/pinyin/basic/z.m4a


BIN
public/sounds/pinyin/basic/zh.m4a


BIN
public/sounds/pinyin/basic/zhi.m4a


BIN
public/sounds/pinyin/basic/zi.m4a


Dosya farkı çok büyük olduğundan ihmal edildi
+ 5223 - 0
public/test.js


+ 249 - 0
src/api/activity/activityController.js

@@ -0,0 +1,249 @@
1
+import moment from 'moment';
2
+import activity from '../../model/activity.js';
3
+import { stringUtils } from '../../util/stringClass.js';
4
+import { globalCache } from '../../util/GlobalCache.js';
5
+import config from '../../config/index.js';
6
+import { query } from '../../util/db.js';
7
+
8
+// 以下模型在旧项目中独立存在,新项目暂用 query 直接调用
9
+// PayInfo.GetActivityMoneyList, Users.GetUsersInfoByUserID, Users.UpdateUsersIsRebateByUserID
10
+
11
+/**
12
+ * 得到当前活动信息
13
+ * 旧: exports.GetCurrentActivityInfo
14
+ */
15
+export async function GetCurrentActivityInfo(ctx) {
16
+    let param = {
17
+        UserID: ctx.query.UserID || 0,
18
+    };
19
+    if (param.UserID === "undefined")
20
+        param.UserID = 0;
21
+
22
+    const list = await activity.GetCurrentActivityInfo(param);
23
+    if (list && list.length > 0) {
24
+        const result = {};
25
+
26
+        result.MoneyNotPay = 0; //未领取金额
27
+        result.MoneyTotal = 0;  //累计回馈
28
+        result.MoneyPay = 0;    //领取金额
29
+        result.ActivityCurrent = null;
30
+        result.ActivityHistory = [];
31
+
32
+        for (let i = 0; i < list.length; i++) {
33
+            const item = list[i];
34
+            item.UserCreateTime = moment(item.UserCreateTime).format('YYYY年MM月DD日 HH:mm');
35
+            item.DateStartCHS = moment(item.DateStart).format('YYYY年MM月DD日');
36
+            item.DateEndCHS = moment(item.DateEnd).format('YYYY年MM月DD日');
37
+            item.DateStart = moment(item.DateStart).format('MM.DD');
38
+            item.DateEnd = moment(item.DateEnd).format('MM.DD');
39
+            const param2 = {
40
+                UserID: param.UserID,
41
+                ActivityInfoID: item.ActivityInfoID,
42
+            };
43
+
44
+            item.MoneyPlan = 0; //预计回馈
45
+
46
+            const detailList = await activity.GetUserActivityInfo(param2);
47
+            for (let j = 0; j < detailList.length; j++) {
48
+                const itemChild = detailList[j];
49
+
50
+                let payMoney = 0;
51
+                if (item.RuleCompute1 === "*") {
52
+                    payMoney = Math.round(itemChild.Money * Number(item.RuleCompute2));
53
+                }
54
+                else if (item.RuleCompute1 === "-") {
55
+                    payMoney = itemChild.Money - Number(item.RuleCompute2);
56
+                }
57
+
58
+                if (item.Status === -1 && itemChild.IsRebate === 0) {
59
+                    result.MoneyNotPay += payMoney;
60
+                    result.MoneyTotal += payMoney;
61
+                }
62
+                else if (item.Status === -1 && itemChild.IsRebate === 1) {
63
+                    result.MoneyPay += payMoney;
64
+                    result.MoneyTotal += payMoney;
65
+                }
66
+
67
+                item.MoneyPlan += payMoney;
68
+            }
69
+
70
+            item.MoneyPlan = stringUtils.FormatMoney(item.MoneyPlan);
71
+            item.List = detailList;
72
+
73
+            if (item.Status === 1) {
74
+                result.ActivityCurrent = item;
75
+            }
76
+            else {
77
+                result.ActivityHistory.push(item);
78
+            }
79
+        }
80
+
81
+        result.MoneyNotPay = stringUtils.FormatMoney(result.MoneyNotPay);
82
+        result.MoneyTotal = stringUtils.FormatMoney(result.MoneyTotal);
83
+        result.MoneyPay = stringUtils.FormatMoney(result.MoneyPay);
84
+
85
+        ctx.body = { "errcode": 10000, result: result };
86
+    }
87
+    else
88
+        ctx.body = { "errcode": 10000 };
89
+}
90
+
91
+/**
92
+ * 得到当前活动
93
+ * 旧: exports.GetCurrentActivity
94
+ */
95
+export async function GetCurrentActivity(ctx) {
96
+    const list = await activity.GetCurrentActivity();
97
+    if (list && list.length > 0) {
98
+        const item = list[0];
99
+        ctx.body = { "errcode": 10000, result: item };
100
+    }
101
+    else
102
+        ctx.body = { "errcode": 10000 };
103
+}
104
+
105
+/**
106
+ * 参加活动
107
+ * 旧: exports.AddActivity
108
+ */
109
+export async function AddActivity(ctx) {
110
+    let param = {
111
+        UserID: ctx.query.UserID || 0,
112
+        ActivityInfoID: ctx.query.ActivityInfoID || 0,
113
+    };
114
+    if (param.UserID === "undefined")
115
+        param.UserID = 0;
116
+
117
+    const list = await activity.GetUserActivityInfo4(param);
118
+    if (list && list.length > 0) {
119
+        ctx.body = { "errcode": 10000 };
120
+    }
121
+    else {
122
+        param.CreateTime = new Date();
123
+        param.Status = 0;
124
+        param.Flag = 0;
125
+
126
+        await activity.AddActivity(param);
127
+        ctx.body = { "errcode": 10000 };
128
+    }
129
+}
130
+
131
+/**
132
+ * 支付活动经费
133
+ * 旧: exports.PayActivity
134
+ * 使用 globalCache 替代旧的 BufferMemory 实现节流
135
+ */
136
+export async function PayActivity(ctx) {
137
+    let param = {
138
+        UserID: ctx.query.UserID || 0,
139
+    };
140
+    if (param.UserID === "undefined")
141
+        param.UserID = 0;
142
+
143
+    const cacheKey = "PayActivity?UserID=" + param.UserID;
144
+    const canPay = globalCache.get(cacheKey);
145
+
146
+    if (!canPay) {
147
+        //计算费用
148
+        const list = await activity.GetCurrentActivityInfo(param);
149
+        if (list && list.length > 0) {
150
+            const result = {};
151
+            result.MoneyNotPay = 0; //未领取金额
152
+
153
+            const userIDArr = [];
154
+
155
+            for (let i = 0; i < list.length; i++) {
156
+                const item = list[i];
157
+                const param2 = {
158
+                    UserID: param.UserID,
159
+                    ActivityInfoID: item.ActivityInfoID,
160
+                };
161
+
162
+                const detailList = await activity.GetUserActivityInfo(param2);
163
+                for (let j = 0; j < detailList.length; j++) {
164
+                    const itemChild = detailList[j];
165
+
166
+                    let payMoney = 0;
167
+                    if (item.RuleCompute1 === "*") {
168
+                        payMoney = Math.round(itemChild.Money * Number(item.RuleCompute2));
169
+                    }
170
+                    else if (item.RuleCompute1 === "-") {
171
+                        payMoney = itemChild.Money - Number(item.RuleCompute2);
172
+                    }
173
+
174
+                    if (item.Status === -1 && itemChild.IsRebate === 0) {
175
+                        result.MoneyNotPay += payMoney;
176
+                        userIDArr.push(itemChild.UserID);
177
+                    }
178
+                }
179
+            }
180
+
181
+            // 获取用户信息
182
+            const sql = "select * from WXUsers where UserID=?;";
183
+            const userInfo = await query(sql, [param.UserID]);
184
+
185
+            if (userInfo && userInfo.length > 0 && result.MoneyNotPay > 0) {
186
+                const text = "领取推广回馈,详见《数学练习小学口算版》小程序";
187
+
188
+                const url = "http://localhost:" + config.port + "/api/PayUserRebate/?PayType=2&UserID=" + param.UserID + "&OpenID=" + userInfo[0].OpenID + "&Money=" + result.MoneyNotPay + "&Text=" + text;
189
+
190
+                console.log("url:" + url);
191
+                // 异步调用支付接口(非阻塞)
192
+                import('axios').then(axios => {
193
+                    axios.default.get(encodeURI(url))
194
+                        .then(response => {
195
+                            if (response.data) {
196
+                                console.log("send ok:" + response.data.status);
197
+                                if (userIDArr.length > 0) {
198
+                                    const sqlUpdate = "Update WXUsers SET IsRebate=1 where UserID in (" + userIDArr.join(",") + ");";
199
+                                    query(sqlUpdate).catch(err => console.error(err));
200
+                                }
201
+                            }
202
+                        })
203
+                        .catch(err => console.error(err));
204
+                });
205
+            }
206
+        }
207
+
208
+        // 设置缓存节流
209
+        globalCache.set(cacheKey, true, config.BufferMemoryTimeLowNormal);
210
+    }
211
+    else {
212
+        console.log("CanNotPay");
213
+    }
214
+
215
+    ctx.body = { "errcode": 10000 };
216
+}
217
+
218
+/**
219
+ * 得到领取记录
220
+ * 旧: exports.GetActivityMoneyList
221
+ */
222
+export async function GetActivityMoneyList(ctx) {
223
+    let param = {
224
+        UserID: ctx.query.UserID || 0,
225
+    };
226
+    if (param.UserID === "undefined")
227
+        param.UserID = 0;
228
+
229
+    const result = {
230
+        MoneyTotal: 0,
231
+        List: [],
232
+    };
233
+
234
+    // 从 ProductPayInfo 和 PaybackInfo 获取活动领取记录
235
+    const sql = "select ID,TradeNo,CreateTime,Body,Money from PaybackInfo where UserID=? order by ID desc";
236
+    const list = await query(sql, [param.UserID]);
237
+
238
+    if (list && list.length > 0) {
239
+        for (let i = 0; i < list.length; i++) {
240
+            result.MoneyTotal += list[i].Money;
241
+            list[i].Money = stringUtils.FormatMoney(list[i].Money);
242
+            list[i].CreateTime = moment(list[i].CreateTime).format('YYYY年MM月DD日 HH:mm');
243
+        }
244
+        result.MoneyTotal = stringUtils.FormatMoney(result.MoneyTotal);
245
+        result.List = list;
246
+    }
247
+
248
+    ctx.body = { "errcode": 10000, result: result };
249
+}

+ 13 - 0
src/api/activity/routes.js

@@ -0,0 +1,13 @@
1
+import Router from '@koa/router';
2
+import * as controller from './activityController.js';
3
+
4
+const router = new Router();
5
+
6
+router.get('/api/GetCurrentActivityInfo', controller.GetCurrentActivityInfo);
7
+router.get('/api/GetCurrentActivity', controller.GetCurrentActivity);
8
+router.get('/api/AddActivity', controller.AddActivity);
9
+router.post('/api/AddActivity', controller.AddActivity);
10
+router.get('/api/PayActivity', controller.PayActivity);
11
+router.get('/api/GetActivityMoneyList', controller.GetActivityMoneyList);
12
+
13
+export default router;

+ 66 - 0
src/api/area/areaController.js

@@ -0,0 +1,66 @@
1
+import area from '../../model/area.js';
2
+import moment from 'moment';
3
+import _ from 'lodash';
4
+import config from '../../config/index.js';
5
+
6
+/**
7
+ * @api {GET} api/GetAreaList api/GetAreaList 得到景点客流信息列表
8
+ * @apiSampleRequest /GetAreaList
9
+ * @apiName GetAreaList
10
+ * @apiGroup Statistics
11
+ * @apiDescription 得到景点客流信息列表
12
+ * @apiParam {Number} sort 类型 0:按景点舒适度排序 1:按热门度排序 2:按人气排序
13
+ * @apiSuccess {Number} errcode 错误代码, 正确为10000
14
+ * @apiSuccess {Object[]} result 返回结果
15
+ * @apiSuccess {Number} result.ID 景点ID
16
+ * @apiSuccess {String} result.AreaName 景点名称
17
+ * @apiSuccess {String} result.District 所属区
18
+ * @apiSuccess {String} result.Level 景点等级
19
+ * @apiSuccess {String} result.TimeStart 景点开放起始时间
20
+ * @apiSuccess {String} result.TimeEnd 景点开放结束时间
21
+ * @apiSuccess {Number} result.FlowNum 当前人数
22
+ * @apiSuccess {Number} result.FlowMax 最大客流
23
+ * @apiSuccess {Number} result.Status 当前状态
24
+ * @apiSuccess {String} result.CreateTime 数据时间
25
+ */
26
+export async function GetAreaList(ctx) {
27
+    const param = {
28
+        Sort: ctx.params.sort || 0,
29
+    };
30
+
31
+    const areaIDArray = await area.GetCurrentAreaIDList();
32
+    // 得到ID数组
33
+    param.AreaIDArray = _.map(areaIDArray, 'ID');
34
+
35
+    const results = await area.GetAreaList(param);
36
+
37
+    const arr1 = _.filter(results, (item) => {
38
+        const a = moment(item.CreateTime);
39
+        const b = moment();
40
+        const t = b.diff(a, 'hours');
41
+        return t < 3 && item.Status === '正常';
42
+    });
43
+
44
+    const arr2 = _.filter(results, (item) => {
45
+        return item.Status === '闭园' && item.TimeStart !== item.TimeEnd;
46
+    });
47
+
48
+    const arr3 = _.filter(results, (item) => {
49
+        return item.Status === '季节性闭园';
50
+    });
51
+
52
+    const arr = _.concat(arr1, arr2, arr3);
53
+
54
+    _.map(arr, (item) => {
55
+        item.TimeStart = moment(item.TimeStart, 'HH:mm').format('HH:mm');
56
+        item.TimeEnd = moment(item.TimeEnd, 'HH:mm').format('HH:mm');
57
+        item.CreateTime = moment(item.CreateTime).format('YYYY-MM-DD HH:mm:ss');
58
+
59
+        item.PhotoList = [];
60
+        for (let j = 1; j <= item.PhotoNum; j++) {
61
+            item.PhotoList.push(config.CDNUrl + 'ScenicSpot/' + item.ID + '/' + j + '.jpg');
62
+        }
63
+    });
64
+
65
+    ctx.body = { errcode: 10000, result: arr };
66
+}

+ 8 - 0
src/api/area/routes.js

@@ -0,0 +1,8 @@
1
+import Router from '@koa/router';
2
+import * as controller from './areaController.js';
3
+
4
+const router = new Router();
5
+
6
+router.get('/api/GetAreaList/:sort', controller.GetAreaList);
7
+
8
+export default router;

+ 30 - 0
src/api/common/commonController.js

@@ -238,6 +238,36 @@ export async function GetBaiduToken (ctx) {
238
     ctx.body = { errcode: 10000, result };
238
     ctx.body = { errcode: 10000, result };
239
 }
239
 }
240
 
240
 
241
+export async function GetBaiduTokenDeprecated(ctx) {
242
+    ctx.body = { errcode: 10000, result: new Date().getTime() };
243
+}
244
+
245
+export async function Login20221228(ctx) {
246
+    const param = {
247
+        ProductID: ctx.query.ProductID || 0,
248
+        UserName: ctx.query.UserName || 0,
249
+        UserPwd: ctx.query.UserPwd || 0,
250
+    };
251
+
252
+    let result = -1;
253
+    if (param.UserName === "lorem" && param.UserPwd === "happy2023") {
254
+        if (param.ProductID == 98)
255
+            result = 277961;
256
+        else if (param.ProductID == 99)
257
+            result = 145372;
258
+        else if (param.ProductID == 106)
259
+            result = 243824;
260
+        else if (param.ProductID == 105)
261
+            result = 162271;
262
+        else if (param.ProductID == 164)
263
+            result = 7935;
264
+        else if (param.ProductID == 166)
265
+            result = 5;
266
+    }
267
+
268
+    ctx.body = { errcode: 10000, result };
269
+}
270
+
241
 
271
 
242
 // 内容审核(1.4.0及以后使用)
272
 // 内容审核(1.4.0及以后使用)
243
 export const MsgSecCheck2 = async (ctx) => {
273
 export const MsgSecCheck2 = async (ctx) => {

+ 4 - 2
src/api/common/routes.js

@@ -7,7 +7,9 @@ const router = new Router();
7
 // 文件上传路由
7
 // 文件上传路由
8
 router.post('/api/MiaoguoUploadFile2',uploadMiddleware,commonController.UploadFile);
8
 router.post('/api/MiaoguoUploadFile2',uploadMiddleware,commonController.UploadFile);
9
 router.post('/api/MsgSecCheck2',commonController.MsgSecCheck2);
9
 router.post('/api/MsgSecCheck2',commonController.MsgSecCheck2);
10
-router.get('/api/GetBaiduToken',commonController.GetBaiduToken);
10
+router.get('/api/GetBaiduToken',commonController.GetBaiduTokenDeprecated);
11
+router.get('/api/GetBaiduToken20220922',commonController.GetBaiduToken);
12
+router.get('/api/Login20221228',commonController.Login20221228);
11
 router.get('/api/GetProgramList',commonController.GetProgramList);
13
 router.get('/api/GetProgramList',commonController.GetProgramList);
12
 
14
 
13
-export default router;
15
+export default router;

+ 62 - 0
src/api/dataUpdateStatus/dataUpdateStatusController.js

@@ -0,0 +1,62 @@
1
+import commonModel from '../../model/commonModel.js';
2
+import { query } from '../../util/db.js';
3
+
4
+export async function GetDataUpdateStatus(ctx) {
5
+    const list = await commonModel.GetDataUpdateStatus();
6
+    ctx.body = { errcode: 10000, result: list };
7
+}
8
+
9
+// 4.1.15版本后使用
10
+export async function GetDataUpdateStatus2(ctx) {
11
+    const param = {
12
+        Version: ctx.query.Version || '4.1.15',
13
+        UserID: ctx.query.UserID || 1,
14
+    };
15
+
16
+    const list = await commonModel.GetDataUpdateStatus();
17
+    const result = {
18
+        List: list,
19
+    };
20
+
21
+    const param2 = {
22
+        ProgramID: 89,
23
+        Version: param.Version,
24
+    };
25
+    const result3 = await commonModel.GetProductVersionList(param2);
26
+
27
+    if (result3) {
28
+        if (
29
+            (param.Version === result3[0].Version && result3[0].IsShowPay <= 0) ||
30
+            param.Version > result3[0].Version
31
+        ) {
32
+            result.IsShow = result3[0].IsShowPay;
33
+        } else {
34
+            result.IsShow = 1;
35
+        }
36
+
37
+        const sql = "SELECT * FROM WXUsers WHERE UserID=?";
38
+        const userList = await query(sql, [param.UserID]);
39
+        if (userList && userList.length > 0) {
40
+            // 针对iPhone测试用户,永远是无支付状态
41
+            if (
42
+                userList[0].Brand === 'iPhone' &&
43
+                userList[0].WXLanguage === 'en-US' &&
44
+                userList[0].UserSource === '1001' &&
45
+                userList[0].IsPay === 0
46
+            ) {
47
+                result.IsShow = 0;
48
+            }
49
+        }
50
+    }
51
+
52
+    ctx.body = { errcode: 10000, result: result };
53
+}
54
+
55
+export async function GetTips(ctx) {
56
+    const list = await commonModel.GetTips();
57
+    ctx.body = { errcode: 10000, result: list };
58
+}
59
+
60
+export async function Ping(ctx) {
61
+    ctx.body = { errcode: 10000 };
62
+}

+ 12 - 0
src/api/dataUpdateStatus/routes.js

@@ -0,0 +1,12 @@
1
+import Router from '@koa/router';
2
+import * as controller from './dataUpdateStatusController.js';
3
+
4
+const router = new Router();
5
+
6
+router.get('/api/Ping', controller.Ping);
7
+router.get('/api/ping', controller.Ping);
8
+router.get('/api/GetDataUpdateStatus', controller.GetDataUpdateStatus);
9
+router.get('/api/GetDataUpdateStatus2', controller.GetDataUpdateStatus2);
10
+router.get('/api/GetTips', controller.GetTips);
11
+
12
+export default router;

Dosya farkı çok büyük olduğundan ihmal edildi
+ 322 - 0
src/api/englishLearned/englishLearnedController.js


+ 10 - 0
src/api/englishLearned/routes.js

@@ -0,0 +1,10 @@
1
+import Router from '@koa/router';
2
+import * as controller from './englishLearnedController.js';
3
+
4
+const router = new Router();
5
+
6
+router.post('/api/OCRImageData', controller.OCRImageData);
7
+router.post('/api/GenerateArticle', controller.GenerateArticle);
8
+router.post('/api/GeneratePDF', controller.GeneratePDF);
9
+
10
+export default router;

+ 18 - 0
src/api/enumeration/enumerationController.js

@@ -0,0 +1,18 @@
1
+import enumeration from '../../model/enumeration.js';
2
+
3
+export async function GetEnumerationList(ctx) {
4
+    const list = await enumeration.GetEnumerationList();
5
+    ctx.body = { errcode: 10000, result: list };
6
+}
7
+
8
+export async function AddChannel(ctx) {
9
+    const param = {
10
+        Name: ctx.query.Name,
11
+        Contact: ctx.query.Contact,
12
+        Category: 2,
13
+        ProgramID: ctx.query.ProgramID,
14
+        UserID: ctx.query.UserID,
15
+    };
16
+    const result = await enumeration.AddChannel(param);
17
+    ctx.body = { errcode: 10000, result: result };
18
+}

+ 9 - 0
src/api/enumeration/routes.js

@@ -0,0 +1,9 @@
1
+import Router from '@koa/router';
2
+import * as controller from './enumerationController.js';
3
+
4
+const router = new Router();
5
+
6
+router.get('/api/GetEnumerationList', controller.GetEnumerationList);
7
+router.get('/api/AddChannel', controller.AddChannel);
8
+
9
+export default router;

+ 20 - 0
src/api/handWrite/handWriteController.js

@@ -0,0 +1,20 @@
1
+import handWrite from '../../model/handWrite.js';
2
+
3
+export async function GetHandWriteList(ctx) {
4
+    try {
5
+        const list = await handWrite.GetHandWriteList();
6
+        ctx.body = { errcode: 10000, result: list };
7
+    } catch (error) {
8
+        ctx.body = { errcode: 10000 };
9
+    }
10
+}
11
+
12
+export async function AddHandWrite(ctx) {
13
+    try {
14
+        const param = ctx.request.body;
15
+        const result = await handWrite.AddHandWrite(param);
16
+        ctx.body = { errcode: 10000, result: result };
17
+    } catch (error) {
18
+        ctx.body = { errcode: 10000 };
19
+    }
20
+}

+ 0 - 0
src/api/handWrite/routes.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor