diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3128e38..27c8944 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -25,8 +25,7 @@ module.exports = { extends: [ 'plugin:vue/vue3-recommended', // 使用插件支持vue3 'airbnb-base', - 'plugin:prettier/recommended', - './.eslintrc-auto-import.json' + 'plugin:prettier/recommended' ], ignorePatterns: ['utils/log.js', 'unpackage/**/*'], /** @@ -45,11 +44,26 @@ module.exports = { 'no-use-before-define': 'off', // 禁止在 函数/类/变量 定义之前使用它们 'no-irregular-whitespace': 'off', // 禁止不规则的空白 'no-undef': 'error', // 禁止使用未声明的变量 - 'no-unused-vars': 'error', // 禁止出现未使用过的变量 + 'no-unused-vars': [ + 'error', + { + vars: 'all', + args: 'after-used', + ignoreRestSiblings: false, + caughtErrors: 'all' + } + ], // 禁止出现未使用过的变量 'vue/script-setup-uses-vars': 'error', // 确保script setup中的变量必须正确定义 'vue/no-undef-components': 'off', // 关闭组件未定义的检查 'vue/no-undef-properties': 'off', // 关闭属性未定义的检查 - 'vue/no-unused-vars': 'error', // 禁止Vue组件中出现未使用的变量 + 'vue/no-unused-vars': [ + 'error', + { + ignorePattern: '' + } + ], // 禁止Vue组件中出现未使用的变量 + 'vue/no-unused-refs': 'error', // 禁止定义但未使用的ref + 'vue/require-component-is': 'error', // 禁止模板中未使用的组件 'import/no-unused-modules': 'off', // 关闭模块导出检查 'import/no-cycle': 0, 'no-nested-ternary': 0, diff --git a/api/sdk.js b/api/sdk.js index 5ec215c..c4dc3f4 100644 --- a/api/sdk.js +++ b/api/sdk.js @@ -10,3 +10,21 @@ export function passthrough(data) { data }) } + +// 获取视频列表 +export function getVideoList(data) { + return request({ + url: '/lockCloudStorage/list', + method: 'POST', + data + }) +} + +// 删除视频 +export function deleteVideo(data) { + return request({ + url: '/lockCloudStorage/delete', + method: 'POST', + data + }) +} diff --git a/pages.json b/pages.json index fbe944f..6107d0d 100644 --- a/pages.json +++ b/pages.json @@ -31,6 +31,24 @@ "navigationBarTitleText": "微信授权", "disableScroll": true } + }, + { + "path": "videoDetail", + "style": { + "navigationBarTitleText": "视频播放" + } + }, + { + "path": "videoLog", + "style": { + "navigationBarTitleText": "云存" + } + }, + { + "path": "videoEdit", + "style": { + "navigationBarTitleText": "视频编辑" + } } ], "plugins": { diff --git a/pages/main/lockDetail.vue b/pages/main/lockDetail.vue index b2a3cee..fd85034 100644 --- a/pages/main/lockDetail.vue +++ b/pages/main/lockDetail.vue @@ -202,7 +202,7 @@