deeke-script-app 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +1 -1
- package/@deekeScript/{@type → type}/Class/UiSelector.d.ts +191 -191
- package/@deekeScript/{@type → type}/interface/Storage.d.ts +110 -110
- package/README.md +35 -35
- package/deekeScript.json +597 -597
- package/deekeScriptZipBuild +48 -48
- package/images/test/statistics.png +0 -0
- package/init +32 -32
- package/jsconfig.json +10 -10
- package/obfuscator.config.json +13 -13
- package/package.json +41 -41
- package/script/common/common.js +7 -0
- package/script/index.js +1 -2
- package/script/statistics/statistics.js +121 -120
- package/script/task/dy.js +15 -55
- package/script/task/dyApp.js +6 -54
- package/script/task/dyCity.js +1 -43
- package/script/task/tool.js +14 -57
- package/script/task.html +4 -4
- package/src/common/common.js +7 -0
- package/src/statistics/statistics.js +121 -120
- package/src/task/dy.js +16 -14
- package/src/task/dyApp.js +7 -7
- package/src/task/tool.js +19 -19
- package/src/task.html +4 -4
- package/test/console.js +5 -5
- package/test/encrypt.js +3 -3
- package/test/engines.js +5 -5
- package/test/error.js +5 -0
- package/test/extension.js +26 -26
- package/test/files.js +7 -7
- package/test/http.js +4 -4
- package/test/log.js +10 -10
- package/test/package.js +3 -3
- package/test/permise.js +14 -14
- package/test/thread.js +11 -11
- package/test/timer.js +25 -25
- /package/@deekeScript/{@type → type}/Class/Rect.d.ts +0 -0
- /package/@deekeScript/{@type → type}/README.md +0 -0
- /package/@deekeScript/{@type → type}/interface/App.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Console.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/DeekeScript.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Device.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Dialogs.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Encrypt.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Engines.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/FloatDialogs.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Gesture.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Http.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/Intent.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/System.d.ts +0 -0
- /package/@deekeScript/{@type → type}/interface/UiObject.d.ts +0 -0
package/deekeScriptZipBuild
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
const path = require('path'); // CommonJS 方式引入 path:ml-citation{ref="1,2" data="citationList"}
|
|
2
|
-
const fs = require('fs'); // 引入 fs 模块:ml-citation{ref="5" data="citationList"}
|
|
3
|
-
const AdmZip = require('adm-zip'); // 引入 adm-zip 库:ml-citation{ref="3,4" data="citationList"}
|
|
4
|
-
|
|
5
|
-
// 获取上层目录路径
|
|
6
|
-
// const parentDir = path.join(__dirname, '..');
|
|
7
|
-
const parentDir = __dirname;
|
|
8
|
-
console.log('开始执行打包');
|
|
9
|
-
|
|
10
|
-
fs.unlink(path.join(parentDir, 'deekeScript.zip'), (err) => {
|
|
11
|
-
if (err) {
|
|
12
|
-
//没有文件
|
|
13
|
-
} else {
|
|
14
|
-
//console.log('deekeScript.zip文件已删除');
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
// 创建 zip 实例
|
|
19
|
-
const zip = new AdmZip();
|
|
20
|
-
|
|
21
|
-
// 递归添加文件并排除目录
|
|
22
|
-
function addFilesToZip(directory) {
|
|
23
|
-
const files = fs.readdirSync(directory);
|
|
24
|
-
|
|
25
|
-
files.forEach(file => {
|
|
26
|
-
const fullPath = path.join(directory, file);
|
|
27
|
-
const relativePath = path.relative(parentDir, fullPath);
|
|
28
|
-
|
|
29
|
-
// 排除 DeekeScript 和 node_modules 目录
|
|
30
|
-
if (relativePath.startsWith('src') || relativePath.startsWith('.vscode') || relativePath.startsWith('.git') || relativePath.startsWith('@deekeScript') || relativePath.startsWith('node_modules')) {
|
|
31
|
-
console.log('排除目录:' + relativePath);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 处理子目录或文件
|
|
36
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
37
|
-
addFilesToZip(fullPath); // 递归处理子目录
|
|
38
|
-
} else {
|
|
39
|
-
zip.addLocalFile(fullPath, path.dirname(relativePath));
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// 执行压缩
|
|
45
|
-
addFilesToZip(parentDir);
|
|
46
|
-
zip.writeZip(path.join(parentDir, 'deekeScript.zip'));
|
|
47
|
-
|
|
48
|
-
console.log('打包完成');
|
|
1
|
+
const path = require('path'); // CommonJS 方式引入 path:ml-citation{ref="1,2" data="citationList"}
|
|
2
|
+
const fs = require('fs'); // 引入 fs 模块:ml-citation{ref="5" data="citationList"}
|
|
3
|
+
const AdmZip = require('adm-zip'); // 引入 adm-zip 库:ml-citation{ref="3,4" data="citationList"}
|
|
4
|
+
|
|
5
|
+
// 获取上层目录路径
|
|
6
|
+
// const parentDir = path.join(__dirname, '..');
|
|
7
|
+
const parentDir = __dirname;
|
|
8
|
+
console.log('开始执行打包');
|
|
9
|
+
|
|
10
|
+
fs.unlink(path.join(parentDir, 'deekeScript.zip'), (err) => {
|
|
11
|
+
if (err) {
|
|
12
|
+
//没有文件
|
|
13
|
+
} else {
|
|
14
|
+
//console.log('deekeScript.zip文件已删除');
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// 创建 zip 实例
|
|
19
|
+
const zip = new AdmZip();
|
|
20
|
+
|
|
21
|
+
// 递归添加文件并排除目录
|
|
22
|
+
function addFilesToZip(directory) {
|
|
23
|
+
const files = fs.readdirSync(directory);
|
|
24
|
+
|
|
25
|
+
files.forEach(file => {
|
|
26
|
+
const fullPath = path.join(directory, file);
|
|
27
|
+
const relativePath = path.relative(parentDir, fullPath);
|
|
28
|
+
|
|
29
|
+
// 排除 DeekeScript 和 node_modules 目录
|
|
30
|
+
if (relativePath.startsWith('src') || relativePath.startsWith('.vscode') || relativePath.startsWith('.git') || relativePath.startsWith('@deekeScript') || relativePath.startsWith('node_modules')) {
|
|
31
|
+
console.log('排除目录:' + relativePath);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 处理子目录或文件
|
|
36
|
+
if (fs.statSync(fullPath).isDirectory()) {
|
|
37
|
+
addFilesToZip(fullPath); // 递归处理子目录
|
|
38
|
+
} else {
|
|
39
|
+
zip.addLocalFile(fullPath, path.dirname(relativePath));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 执行压缩
|
|
45
|
+
addFilesToZip(parentDir);
|
|
46
|
+
zip.writeZip(path.join(parentDir, 'deekeScript.zip'));
|
|
47
|
+
|
|
48
|
+
console.log('打包完成');
|
|
Binary file
|
package/init
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
function generateFiles(answers) {
|
|
5
|
-
const projectPath = path.dirname(path.dirname(__dirname)); // 输出:/Users/username/project
|
|
6
|
-
const files = fs.readdirSync(projectPath);
|
|
7
|
-
|
|
8
|
-
if (files.includes('init.lock')) {
|
|
9
|
-
return ;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const entries = fs.readdirSync(__dirname, { withFileTypes: true });
|
|
13
|
-
const excludeFiles = ['node_modules']; // 需排除的文件名列表
|
|
14
|
-
|
|
15
|
-
const filteredEntries = entries.filter(entry =>
|
|
16
|
-
!excludeFiles.includes(entry.name)
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
filteredEntries.forEach(entry => {
|
|
20
|
-
const srcPath = path.join(__dirname, entry.name);
|
|
21
|
-
const destPath = path.join(projectPath, entry.name);
|
|
22
|
-
|
|
23
|
-
if (entry.isFile()) {
|
|
24
|
-
fs.copyFileSync(srcPath, destPath);
|
|
25
|
-
} else if (entry.isDirectory()) {
|
|
26
|
-
fs.cpSync(srcPath, destPath, { recursive: true });
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
generateFiles({});
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
function generateFiles(answers) {
|
|
5
|
+
const projectPath = path.dirname(path.dirname(__dirname)); // 输出:/Users/username/project
|
|
6
|
+
const files = fs.readdirSync(projectPath);
|
|
7
|
+
|
|
8
|
+
if (files.includes('init.lock')) {
|
|
9
|
+
return ;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const entries = fs.readdirSync(__dirname, { withFileTypes: true });
|
|
13
|
+
const excludeFiles = ['node_modules']; // 需排除的文件名列表
|
|
14
|
+
|
|
15
|
+
const filteredEntries = entries.filter(entry =>
|
|
16
|
+
!excludeFiles.includes(entry.name)
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
filteredEntries.forEach(entry => {
|
|
20
|
+
const srcPath = path.join(__dirname, entry.name);
|
|
21
|
+
const destPath = path.join(projectPath, entry.name);
|
|
22
|
+
|
|
23
|
+
if (entry.isFile()) {
|
|
24
|
+
fs.copyFileSync(srcPath, destPath);
|
|
25
|
+
} else if (entry.isDirectory()) {
|
|
26
|
+
fs.cpSync(srcPath, destPath, { recursive: true });
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
generateFiles({});
|
package/jsconfig.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES6",
|
|
4
|
-
"lib": ["es6"], // 不包含 "dom"
|
|
5
|
-
"checkJs": true
|
|
6
|
-
},
|
|
7
|
-
"include": [
|
|
8
|
-
"src/**/*",
|
|
9
|
-
"@deekeScript/**/*"
|
|
10
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"lib": ["es6"], // 不包含 "dom"
|
|
5
|
+
"checkJs": true
|
|
6
|
+
},
|
|
7
|
+
"include": [
|
|
8
|
+
"src/**/*",
|
|
9
|
+
"@deekeScript/**/*"
|
|
10
|
+
]
|
|
11
11
|
}
|
package/obfuscator.config.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compact": false,
|
|
3
|
-
"rotateStringArray": true,
|
|
4
|
-
"controlFlowFlattening": true,
|
|
5
|
-
"deadCodeInjection": true,
|
|
6
|
-
"stringArray": true,
|
|
7
|
-
"stringArrayThreshold": 0.75,
|
|
8
|
-
"disableConsoleOutput": false,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"reservedNames": [],
|
|
11
|
-
"transformObjectKeys": true,
|
|
12
|
-
"unicodeEscapeSequence": true,
|
|
13
|
-
"exclude": ["script/statistics/**/*.js"]
|
|
1
|
+
{
|
|
2
|
+
"compact": false,
|
|
3
|
+
"rotateStringArray": true,
|
|
4
|
+
"controlFlowFlattening": true,
|
|
5
|
+
"deadCodeInjection": true,
|
|
6
|
+
"stringArray": true,
|
|
7
|
+
"stringArrayThreshold": 0.75,
|
|
8
|
+
"disableConsoleOutput": false,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"reservedNames": [],
|
|
11
|
+
"transformObjectKeys": true,
|
|
12
|
+
"unicodeEscapeSequence": true,
|
|
13
|
+
"exclude": ["script/statistics/**/*.js"]
|
|
14
14
|
}
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "deeke-script-app",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "DeekeScript应用",
|
|
5
|
-
"main": "src/index.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "cpx \"src/**/*\" script",
|
|
8
|
-
"build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
|
|
9
|
-
"build-obfuscator": "cpx \"src/**/*\" script && javascript-obfuscator script --output script --config obfuscator.config.json",
|
|
10
|
-
"build-obfuscator-zip": "cpx \"src/**/*\" script && javascript-obfuscator script --output script --config obfuscator.config.json && ts-node --esm ./deekeScriptZipBuild",
|
|
11
|
-
"postinstall": "ts-node --esm init"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/DeekeScript/deekeScript.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"DeekeScript应用"
|
|
19
|
-
],
|
|
20
|
-
"author": "DeekeScript",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/DeekeScript/deekeScript/issues"
|
|
24
|
-
},
|
|
25
|
-
"homepage": "https://github.com/DeekeScript/deekeScript#readme",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/adm-zip": "^0.5.7",
|
|
28
|
-
"@types/node": "^22.13.9",
|
|
29
|
-
"file-loader": "^6.2.0",
|
|
30
|
-
"glob": "^11.0.0",
|
|
31
|
-
"javascript-obfuscator": "^4.1.1",
|
|
32
|
-
"ts-loader": "^9.5.1",
|
|
33
|
-
"typescript": "^5.8.2"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"adm-zip": "^0.5.16",
|
|
37
|
-
"cpx": "^1.5.0",
|
|
38
|
-
"inquirer": "^12.4.2",
|
|
39
|
-
"ts-node": "^10.9.2"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "deeke-script-app",
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "DeekeScript应用",
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "cpx \"src/**/*\" script",
|
|
8
|
+
"build-zip": "cpx \"src/**/*\" script && ts-node --esm ./deekeScriptZipBuild",
|
|
9
|
+
"build-obfuscator": "cpx \"src/**/*\" script && javascript-obfuscator script --output script --config obfuscator.config.json",
|
|
10
|
+
"build-obfuscator-zip": "cpx \"src/**/*\" script && javascript-obfuscator script --output script --config obfuscator.config.json && ts-node --esm ./deekeScriptZipBuild",
|
|
11
|
+
"postinstall": "ts-node --esm init"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/DeekeScript/deekeScript.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"DeekeScript应用"
|
|
19
|
+
],
|
|
20
|
+
"author": "DeekeScript",
|
|
21
|
+
"license": "ISC",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/DeekeScript/deekeScript/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/DeekeScript/deekeScript#readme",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/adm-zip": "^0.5.7",
|
|
28
|
+
"@types/node": "^22.13.9",
|
|
29
|
+
"file-loader": "^6.2.0",
|
|
30
|
+
"glob": "^11.0.0",
|
|
31
|
+
"javascript-obfuscator": "^4.1.1",
|
|
32
|
+
"ts-loader": "^9.5.1",
|
|
33
|
+
"typescript": "^5.8.2"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"adm-zip": "^0.5.16",
|
|
37
|
+
"cpx": "^1.5.0",
|
|
38
|
+
"inquirer": "^12.4.2",
|
|
39
|
+
"ts-node": "^10.9.2"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/script/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
//这个文件不用编写代码
|
|
@@ -1,120 +1,121 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let
|
|
5
|
-
let
|
|
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
|
-
let
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//
|
|
36
|
-
let
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
'
|
|
70
|
-
'
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'
|
|
77
|
-
'
|
|
78
|
-
'
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
'
|
|
89
|
-
'
|
|
90
|
-
'
|
|
91
|
-
'
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
'
|
|
96
|
-
'
|
|
97
|
-
'
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
'
|
|
102
|
-
'
|
|
103
|
-
'
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
'
|
|
115
|
-
'
|
|
116
|
-
'
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
1
|
+
let storage = require('../common/common.js');
|
|
2
|
+
var deekeStatistics = {
|
|
3
|
+
getDate() {
|
|
4
|
+
let d = new Date();
|
|
5
|
+
let m = d.getMonth() + 1;
|
|
6
|
+
let date = d.getDate();
|
|
7
|
+
return (m >= 10 ? m : ('0' + m)) + '.' + (date >= 10 ? date : ('0' + date));
|
|
8
|
+
},
|
|
9
|
+
getData(time) {
|
|
10
|
+
time = time || this.getDate();
|
|
11
|
+
return {
|
|
12
|
+
s_viewVideo: Storage.getInteger('s_viewVideo' + time) || 0,
|
|
13
|
+
s_viewTargetVideo: Storage.getInteger('s_viewTargetVideo' + time) || 0,
|
|
14
|
+
s_zan: Storage.getInteger('s_zan' + time) || 0,
|
|
15
|
+
s_comment: Storage.getInteger('s_comment' + time) || 0,
|
|
16
|
+
s_zanComment: Storage.getInteger('s_zanComment' + time) || 0,
|
|
17
|
+
s_privateMsg: Storage.getInteger('s_privateMsg' + time) || 0,
|
|
18
|
+
s_focus: Storage.getInteger('s_focus' + time) || 0,
|
|
19
|
+
s_viewUser: Storage.getInteger('s_viewUser' + time) || 0,
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
getWeekDate() {
|
|
23
|
+
let dates = [];
|
|
24
|
+
// 获取当前日期
|
|
25
|
+
let now = new Date();
|
|
26
|
+
// 循环获取最近 7 天的日期
|
|
27
|
+
for (let i = 1; i <= 7; i++) {
|
|
28
|
+
// 获取当前日期的时间戳
|
|
29
|
+
let timestamp = now.getTime();
|
|
30
|
+
// 计算 i 天前的时间戳
|
|
31
|
+
let dayTimestamp = 24 * 60 * 60 * 1000; // 一天的毫秒数
|
|
32
|
+
let iDayAgoTimestamp = timestamp - i * dayTimestamp;
|
|
33
|
+
// 转换为日期对象
|
|
34
|
+
let date = new Date(iDayAgoTimestamp);
|
|
35
|
+
// 格式化日期为 "yyyy-MM-dd" 的字符串并存入数组
|
|
36
|
+
//let year = date.getFullYear();
|
|
37
|
+
let month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
38
|
+
let day = ("0" + date.getDate()).slice(-2);
|
|
39
|
+
dates.push(month + "." + day);
|
|
40
|
+
}
|
|
41
|
+
return dates;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
getWeekData() {
|
|
45
|
+
let dates = this.getWeekDate();
|
|
46
|
+
let data = [];
|
|
47
|
+
for (let i in dates) {
|
|
48
|
+
data.push([dates[i], this.getData(dates[i])]);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//数据整理
|
|
52
|
+
let res = [];
|
|
53
|
+
let ids = ['s_viewVideo', 's_viewTargetVideo', 's_zan', 's_comment', 's_zanComment', 's_privateMsg', 's_focus', 's_viewUser'];
|
|
54
|
+
for (let i in ids) {
|
|
55
|
+
res[ids[i]] = [];
|
|
56
|
+
for (let j = data.length - 1; j >= 0; j--) {
|
|
57
|
+
res[ids[i]].push([data[j][0], data[j][1][ids[i]]]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return res;
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
dataList() {
|
|
64
|
+
let data = this.getData(this.getDate());
|
|
65
|
+
let weekData = this.getWeekData();
|
|
66
|
+
//weight最大24
|
|
67
|
+
return [
|
|
68
|
+
{
|
|
69
|
+
'title': '今日累计视频',
|
|
70
|
+
'weight': 12,
|
|
71
|
+
'checked': true,
|
|
72
|
+
'value': data['s_viewVideo'],
|
|
73
|
+
'data': weekData['s_viewVideo'],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
'title': '今日目标视频',
|
|
77
|
+
'weight': 12,
|
|
78
|
+
'value': data['s_viewTargetVideo'],
|
|
79
|
+
'data': weekData['s_viewTargetVideo'],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
'title': '今日点赞',
|
|
83
|
+
'weight': 8,
|
|
84
|
+
'value': data['s_zan'],
|
|
85
|
+
'data': weekData['s_zan'],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
'title': '今日评论',
|
|
89
|
+
'count': 1,
|
|
90
|
+
'weight': 8,
|
|
91
|
+
'value': data['s_comment'],
|
|
92
|
+
'data': weekData['s_comment'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
'title': '今日赞评论',
|
|
96
|
+
'weight': 8,
|
|
97
|
+
'value': data['s_zanComment'],
|
|
98
|
+
'data': weekData['s_zanComment'],
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
'title': '今日私信',
|
|
102
|
+
'weight': 8,
|
|
103
|
+
'value': data['s_privateMsg'],
|
|
104
|
+
'data': weekData['s_privateMsg'],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
'title': '今日关注',
|
|
108
|
+
'count': 1,
|
|
109
|
+
'weight': 8,
|
|
110
|
+
'value': data['s_focus'],
|
|
111
|
+
'data': weekData['s_focus'],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
'title': '今日访问',
|
|
115
|
+
'weight': 8,
|
|
116
|
+
'value': data['s_viewUser'],
|
|
117
|
+
'data': weekData['s_viewUser'],
|
|
118
|
+
},
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
}
|
package/script/task/dy.js
CHANGED
|
@@ -1,56 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
'\x31\x37\x38\x38\x31\x36\x32\x45\x78\x7a\x6b\x6a\x4f',
|
|
13
|
-
'\x73\x68\x6f\x77',
|
|
14
|
-
'\x6c\x6f\x67',
|
|
15
|
-
'\x31\x39\x33\x39\x30\x6f\x6f\x74\x69\x62\x70',
|
|
16
|
-
'\x74\x6f\x6b\x65\x72\x5f\x76\x69\x65\x77\x5f\x76\x69\x64\x65\x6f\x5f\x73\x65\x63\x6f\x6e\x64',
|
|
17
|
-
'\x74\x6f\x6b\x65\x72\x5f\x76\x69\x65\x77\x5f\x76\x69\x64\x65\x6f\x5f\x6b\x65\x79\x77\x6f\x72\x64\x73',
|
|
18
|
-
'\x67\x65\x74\x41\x72\x72\x61\x79',
|
|
19
|
-
'\x31\x36\x64\x5a\x42\x58\x73\x4b',
|
|
20
|
-
'\x32\x31\x36\x37\x37\x38\x37\x30\x79\x79\x77\x4c\x7a\x42',
|
|
21
|
-
'\x31\x31\x34\x4c\x63\x65\x6f\x75\x47'
|
|
22
|
-
];
|
|
23
|
-
a1_0x17a5 = function () {
|
|
24
|
-
return _0x481597;
|
|
25
|
-
};
|
|
26
|
-
return a1_0x17a5();
|
|
1
|
+
let dyApp = require("./dyApp");
|
|
2
|
+
let common = require("../common/common");
|
|
3
|
+
console.log(dyApp.getName(), common.getName());
|
|
4
|
+
|
|
5
|
+
let tag = UiSelector().id('name').findOne();
|
|
6
|
+
|
|
7
|
+
console.log(tag.click());
|
|
8
|
+
let config = {
|
|
9
|
+
toker_view_video_keywords: Storage.get('toker_view_video_keywords'),
|
|
10
|
+
toker_view_video_second: Storage.getInteger('toker_view_video_second'),
|
|
11
|
+
toker_run_sex: Storage.getArray('toker_run_sex'),
|
|
27
12
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const _0x5e86ee = -parseInt(_0x48674d(0xee)) / 0x1 + -parseInt(_0x48674d(0xe3)) / 0x2 * (-parseInt(_0x48674d(0xe9)) / 0x3) + -parseInt(_0x48674d(0xe7)) / 0x4 * (parseInt(_0x48674d(0xef)) / 0x5) + parseInt(_0x48674d(0xe0)) / 0x6 + -parseInt(_0x48674d(0xed)) / 0x7 + parseInt(_0x48674d(0xec)) / 0x8 * (-parseInt(_0x48674d(0xeb)) / 0x9) + parseInt(_0x48674d(0xe8)) / 0xa;
|
|
33
|
-
if (_0x5e86ee === _0x47cb46)
|
|
34
|
-
break;
|
|
35
|
-
else
|
|
36
|
-
_0x4312a2['push'](_0x4312a2['shift']());
|
|
37
|
-
} catch (_0x2eb54e) {
|
|
38
|
-
_0x4312a2['push'](_0x4312a2['shift']());
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}(a1_0x17a5, 0x748a6));
|
|
42
|
-
function a1_0x106e(_0x3c6e2e, _0x22112f) {
|
|
43
|
-
const _0x17a599 = a1_0x17a5();
|
|
44
|
-
return a1_0x106e = function (_0x106ed4, _0x166735) {
|
|
45
|
-
_0x106ed4 = _0x106ed4 - 0xe0;
|
|
46
|
-
let _0x99ea30 = _0x17a599[_0x106ed4];
|
|
47
|
-
return _0x99ea30;
|
|
48
|
-
}, a1_0x106e(_0x3c6e2e, _0x22112f);
|
|
49
|
-
}
|
|
50
|
-
let dyApp = require(a1_0x53aa7a(0xf1)), config = {
|
|
51
|
-
'\x74\x6f\x6b\x65\x72\x5f\x76\x69\x65\x77\x5f\x76\x69\x64\x65\x6f\x5f\x6b\x65\x79\x77\x6f\x72\x64\x73': Storage['\x67\x65\x74'](a1_0x53aa7a(0xe5)),
|
|
52
|
-
'\x74\x6f\x6b\x65\x72\x5f\x76\x69\x65\x77\x5f\x76\x69\x64\x65\x6f\x5f\x73\x65\x63\x6f\x6e\x64': Storage[a1_0x53aa7a(0xf0)](a1_0x53aa7a(0xe4)),
|
|
53
|
-
'\x74\x6f\x6b\x65\x72\x5f\x72\x75\x6e\x5f\x73\x65\x78': Storage[a1_0x53aa7a(0xe6)]('\x74\x6f\x6b\x65\x72\x5f\x72\x75\x6e\x5f\x73\x65\x78')
|
|
54
|
-
};
|
|
55
|
-
console[a1_0x53aa7a(0xe2)](config, dyApp['\x67\x65\x74\x4e\x61\x6d\x65']()), FloatDialogs[a1_0x53aa7a(0xe1)]('\u63d0\u793a', a1_0x53aa7a(0xea));
|
|
56
|
-
//# sourceMappingURL=dy.js.map
|
|
13
|
+
|
|
14
|
+
console.log(config, dyApp.getName());//获取json文件中的配置参数
|
|
15
|
+
|
|
16
|
+
FloatDialogs.show('提示', '请编写业务代码');
|