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
__pycache__/
*.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:
# Logs
logs
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Flask stuff:
instance/
.webassets-cache
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Scrapy stuff:
.scrapy
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Sphinx documentation
docs/_build/
# Coverage directory used by tools like istanbul
coverage
# PyBuilder
target/
# nyc test coverage
.nyc_output
# Jupyter Notebook
.ipynb_checkpoints
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# IPython
profile_default/
ipython_config.py
# Bower dependency directory (https://bower.io/)
bower_components
# pyenv
.python-version
# node-waf configuration
.lock-wscript
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# 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
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Dependency directories
node_modules/
jspm_packages/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# Typescript v1 declaration files
typings/
# SageMath parsed files
*.sage.py
# Optional npm cache directory
.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
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
dist
output
# Rope project settings
.ropeproject
build/.cache
build/*.json
# mkdocs documentation
/site
.fuse_hidden*
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
.stfolder
.stignore
# Pyre type checker
.pyre/
package-lock.json
# cookies
cookies.json
config.toml
.vscode/

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') {
touchstone = this.getTouchstoneEvent({
event_value: {
aid: '',
cid: 11,
is_detail: true
cid: 'null',
is_detail: false
},
sourceMode: '我的_我的任务页',
sourcePage: `Android/栏目页//${keywordId}/`,
upperLevel_url: '长图文/P//'
sourceMode: '栏目页',
sourcePage: `Android/栏目页/${keyword}/${keywordId}/`,
source_page_type_id: String(keywordId),
upperLevel_url: '个人中心/赚奖励/',
source_area: {
lanmu_id: String(keywordId),
prev_source_scence: '我的_我的任务页'
}
});
}