This commit is contained in:
Hex
2023-03-18 09:10:00 +08:00
parent 2e8fc86e14
commit 85e33df473
4 changed files with 134 additions and 119 deletions

49
.eslintrc.json Normal file
View File

@@ -0,0 +1,49 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"overrides": [
],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"indent": ["warn", 2, {"SwitchCase": 1}],
"brace-style": [1, "stroustrup", {"allowSingleLine": true}],
"comma-style": [1, "last"],
"default-case": 2,
"no-floating-decimal": 2,
"space-before-function-paren": [1, {"anonymous": "never", "named": "never", "asyncArrow": "always"}],
"keyword-spacing": [2, {"after": true}],
"space-before-blocks": 1,
"wrap-iife": [2, "any"],
"no-alert": 2,
"curly": [2, "all"],
"no-empty": [2, {"allowEmptyCatch": true}],
"no-obj-calls": 2,
"no-unused-vars": [1, {"vars": "local", "args": "after-used"}],
"no-invalid-regexp": 2,
"comma-dangle": [1, "never"],
"no-undef": 2,
"no-new": 2,
"no-extra-semi": 0,
"no-debugger": 2,
"no-caller": 1,
"no-unreachable": 2,
"no-multi-str": 1,
"no-mixed-spaces-and-tabs": 1,
"no-trailing-spaces": 1,
"space-infix-ops": 1,
"no-with": 2,
"dot-notation": 1,
"semi-spacing": 1,
"key-spacing": [1, {"beforeColon": false, "afterColon": true, "mode": "minimum"}],
"space-in-parens": [1, "never"],
"prefer-const": 2,
"no-control-regex": 0,
"no-var": 1
}
}

166
.gitignore vendored
View File

@@ -1,133 +1,73 @@
# Byte-compiled / optimized / DLL files # Logs
__pycache__/ logs
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log *.log
local_settings.py npm-debug.log*
db.sqlite3 yarn-debug.log*
db.sqlite3-journal yarn-error.log*
# Flask stuff: # Runtime data
instance/ pids
.webassets-cache *.pid
*.seed
*.pid.lock
# Scrapy stuff: # Directory for instrumented libs generated by jscoverage/JSCover
.scrapy lib-cov
# Sphinx documentation # Coverage directory used by tools like istanbul
docs/_build/ coverage
# PyBuilder # nyc test coverage
target/ .nyc_output
# Jupyter Notebook # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.ipynb_checkpoints .grunt
# IPython # Bower dependency directory (https://bower.io/)
profile_default/ bower_components
ipython_config.py
# pyenv # node-waf configuration
.python-version .lock-wscript
# pipenv # Compiled binary addons (http://nodejs.org/api/addons.html)
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. build/Release
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow # Dependency directories
__pypackages__/ node_modules/
jspm_packages/
# Celery stuff # Typescript v1 declaration files
celerybeat-schedule typings/
celerybeat.pid
# SageMath parsed files # Optional npm cache directory
*.sage.py .npm
# Environments # Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env .env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings dist
.spyderproject output
.spyproject
# Rope project settings build/.cache
.ropeproject build/*.json
# mkdocs documentation .fuse_hidden*
/site
# mypy .stfolder
.mypy_cache/ .stignore
.dmypy.json
dmypy.json
# Pyre type checker package-lock.json
.pyre/
# cookies .vscode/
cookies.json
config.toml

22
package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "smzdm_script",
"version": "1.0.0",
"description": "什么值得买自用脚本 for 青龙面板,支持 App 端签到、转盘抽奖、每日任务等功能",
"main": "smzdm_checkin.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/hex-ci/smzdm_script.git"
},
"author": "Hex",
"license": "MIT",
"bugs": {
"url": "https://github.com/hex-ci/smzdm_script/issues"
},
"homepage": "https://github.com/hex-ci/smzdm_script",
"devDependencies": {
"eslint": "^8.36.0"
}
}

View File

@@ -466,13 +466,17 @@ class SmzdmTaskBot extends SmzdmBot {
else if (type === 'tag') { else if (type === 'tag') {
touchstone = this.getTouchstoneEvent({ touchstone = this.getTouchstoneEvent({
event_value: { event_value: {
aid: '', cid: 'null',
cid: 11, is_detail: false
is_detail: true
}, },
sourceMode: '我的_我的任务页', sourceMode: '栏目页',
sourcePage: `Android/栏目页//${keywordId}/`, sourcePage: `Android/栏目页/${keyword}/${keywordId}/`,
upperLevel_url: '长图文/P//' source_page_type_id: String(keywordId),
upperLevel_url: '个人中心/赚奖励/',
source_area: {
lanmu_id: String(keywordId),
prev_source_scence: '我的_我的任务页'
}
}); });
} }