From f7bc3c869438d48075bbe9d91f5fe07bb01fd7b0 Mon Sep 17 00:00:00 2001 From: houdunren <2300071698@qq.com> Date: Sun, 11 Feb 2024 05:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0=E6=A3=80?= =?UTF-8?q?=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron-builder-mas.yml | 1 - package.json | 2 +- pnpm-lock.yaml | 90 +++++++++++++---------- src/main/index.ts | 3 +- src/renderer/src/App.vue | 7 +- src/renderer/src/hd/Secret.vue | 58 --------------- src/renderer/src/hd/Updater.vue | 25 ------- src/renderer/src/hd/useSoft.ts | 57 -------------- src/renderer/src/stores/useConfigStore.ts | 10 ++- src/renderer/src/views/Camera.vue | 2 +- src/renderer/src/views/Secret.vue | 78 ++++++++++++++++++++ 11 files changed, 144 insertions(+), 189 deletions(-) delete mode 100644 src/renderer/src/hd/Secret.vue delete mode 100644 src/renderer/src/hd/Updater.vue delete mode 100644 src/renderer/src/hd/useSoft.ts create mode 100644 src/renderer/src/views/Secret.vue diff --git a/electron-builder-mas.yml b/electron-builder-mas.yml index 9930ee7..002a649 100644 --- a/electron-builder-mas.yml +++ b/electron-builder-mas.yml @@ -25,7 +25,6 @@ mac: entitlementsInherit: build/entitlements.mac.plist # 图标,看后盾人文档库 electron 章节有介绍生成方法 icon: build/icon.icns - # target: ['mas', 'pkg', 'dmg'] target: - mas extendInfo: diff --git a/package.json b/package.json index ac1a495..2df825a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "houdunren-camera", - "version": "1.0.77", + "version": "1.0.78", "description": "方便好用的桌面摄像头软件,适合直播、录课、内容分享时使用", "main": "./out/main/index.js", "author": "向军大叔", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 944c21b..3ffad55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -839,6 +839,7 @@ packages: /@types/minimatch@5.1.2: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + requiresBuild: true dev: true optional: true @@ -862,6 +863,7 @@ packages: /@types/plist@3.0.2: resolution: {integrity: sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==} + requiresBuild: true dependencies: '@types/node': 20.2.5 xmlbuilder: 15.1.1 @@ -878,6 +880,7 @@ packages: /@types/verror@1.10.6: resolution: {integrity: sha512-NNm+gdePAX1VGvPcGZCDKQZKYSiAWigKhKaz5KF94hG6f2s8de9Ow5+7AbXoeKxL8gavZfk4UquSAygOF2duEQ==} + requiresBuild: true dev: true optional: true @@ -895,8 +898,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@types/yauzl@2.10.0: - resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} + /@types/yauzl@2.10.3: + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: '@types/node': 20.2.5 @@ -1374,12 +1377,14 @@ packages: /assert-plus@1.0.0: resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} engines: {node: '>=0.8'} + requiresBuild: true dev: true optional: true /astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} + requiresBuild: true dev: true optional: true @@ -1412,7 +1417,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.21.7 - caniuse-lite: 1.0.30001495 + caniuse-lite: 1.0.30001585 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -1459,6 +1464,7 @@ packages: /boolean@3.2.0: resolution: {integrity: sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==} + requiresBuild: true optional: true /brace-expansion@1.1.11: @@ -1486,7 +1492,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001495 + caniuse-lite: 1.0.30001585 electron-to-chromium: 1.4.423 node-releases: 2.0.12 update-browserslist-db: 1.0.11(browserslist@4.21.7) @@ -1521,6 +1527,7 @@ packages: /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + requiresBuild: true dependencies: base64-js: 1.5.1 ieee754: 1.2.1 @@ -1606,8 +1613,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite@1.0.30001495: - resolution: {integrity: sha512-F6x5IEuigtUfU5ZMQK2jsy5JqUUlEFRVZq8bO2a+ysq5K7jD6PPc9YXZj78xDNS3uNchesp1Jw47YXEqr+Viyg==} + /caniuse-lite@1.0.30001585: + resolution: {integrity: sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==} dev: true /chalk@2.4.2: @@ -1639,7 +1646,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /chownr@2.0.0: @@ -1666,6 +1673,7 @@ packages: /cli-truncate@2.1.0: resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} engines: {node: '>=8'} + requiresBuild: true dependencies: slice-ansi: 3.0.0 string-width: 4.2.3 @@ -1756,6 +1764,7 @@ packages: /core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} + requiresBuild: true dev: true optional: true @@ -1765,6 +1774,7 @@ packages: /crc@3.8.0: resolution: {integrity: sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==} + requiresBuild: true dependencies: buffer: 5.7.1 dev: true @@ -1807,18 +1817,6 @@ packages: ms: 2.0.0 dev: true - /debug@3.2.7: - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - dev: true - optional: true - /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -1865,6 +1863,7 @@ packages: /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} engines: {node: '>= 0.4'} + requiresBuild: true dependencies: has-property-descriptors: 1.0.0 object-keys: 1.1.1 @@ -1899,6 +1898,7 @@ packages: /detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} + requiresBuild: true optional: true /didyoumean@1.2.2: @@ -2143,6 +2143,7 @@ packages: /es6-error@4.1.1: resolution: {integrity: sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==} + requiresBuild: true optional: true /esbuild@0.17.19: @@ -2361,13 +2362,14 @@ packages: get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: - '@types/yauzl': 2.10.0 + '@types/yauzl': 2.10.3 transitivePeerDependencies: - supports-color /extsprintf@1.4.1: resolution: {integrity: sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==} engines: {'0': node >=0.6.0} + requiresBuild: true dev: true optional: true @@ -2508,8 +2510,8 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -2531,6 +2533,7 @@ packages: /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + requiresBuild: true dependencies: function-bind: 1.1.1 has: 1.0.3 @@ -2608,6 +2611,7 @@ packages: /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} + requiresBuild: true dependencies: define-properties: 1.2.0 optional: true @@ -2683,6 +2687,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + requiresBuild: true dependencies: get-intrinsic: 1.2.1 optional: true @@ -2690,11 +2695,13 @@ packages: /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} + requiresBuild: true optional: true /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + requiresBuild: true optional: true /has@1.0.3: @@ -2750,6 +2757,7 @@ packages: resolution: {integrity: sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==} engines: {node: ^8.11.2 || >=10} os: [darwin] + requiresBuild: true dependencies: cli-truncate: 2.1.0 node-addon-api: 1.7.2 @@ -2765,6 +2773,7 @@ packages: /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + requiresBuild: true dev: true optional: true @@ -2956,6 +2965,7 @@ packages: /json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + requiresBuild: true optional: true /json5@2.2.3: @@ -3012,10 +3022,8 @@ packages: image-size: 0.5.5 make-dir: 2.1.0 mime: 1.6.0 - needle: 3.2.0 + needle: 3.3.1 source-map: 0.6.1 - transitivePeerDependencies: - - supports-color dev: true /levn@0.4.1: @@ -3124,6 +3132,7 @@ packages: /matcher@3.0.0: resolution: {integrity: sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==} engines: {node: '>=10'} + requiresBuild: true dependencies: escape-string-regexp: 4.0.0 optional: true @@ -3272,11 +3281,6 @@ packages: /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - optional: true - /muggle-string@0.2.2: resolution: {integrity: sha512-YVE1mIJ4VpUMqZObFndk9CJu6DBJR/GB13p3tXuNbwD4XExaI5EOuRl6BHeIDxIqXZVxSfAC+y6U1Z/IxCfKUg==} dev: true @@ -3302,22 +3306,20 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /needle@3.2.0: - resolution: {integrity: sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==} + /needle@3.3.1: + resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} engines: {node: '>= 4.4.x'} hasBin: true requiresBuild: true dependencies: - debug: 3.2.7 iconv-lite: 0.6.3 sax: 1.2.4 - transitivePeerDependencies: - - supports-color dev: true optional: true /node-addon-api@1.7.2: resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} + requiresBuild: true dev: true optional: true @@ -3372,6 +3374,7 @@ packages: /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + requiresBuild: true optional: true /ometa@0.2.2: @@ -3490,6 +3493,7 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + requiresBuild: true dev: true optional: true @@ -3633,6 +3637,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true @@ -3760,6 +3765,7 @@ packages: /roarr@2.15.4: resolution: {integrity: sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==} engines: {node: '>=8.0'} + requiresBuild: true dependencies: boolean: 3.2.0 detect-node: 2.1.0 @@ -3774,7 +3780,7 @@ packages: engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /run-parallel@1.2.0: @@ -3827,11 +3833,13 @@ packages: /semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + requiresBuild: true optional: true /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true + requiresBuild: true dev: true optional: true @@ -3854,6 +3862,7 @@ packages: /serialize-error@7.0.1: resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} engines: {node: '>=10'} + requiresBuild: true dependencies: type-fest: 0.13.1 optional: true @@ -3894,6 +3903,7 @@ packages: /slice-ansi@3.0.0: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} + requiresBuild: true dependencies: ansi-styles: 4.3.0 astral-regex: 2.0.0 @@ -3904,6 +3914,7 @@ packages: /smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} + requiresBuild: true dev: true optional: true @@ -3947,6 +3958,7 @@ packages: /sprintf-js@1.1.2: resolution: {integrity: sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==} + requiresBuild: true optional: true /stat-mode@1.0.0: @@ -4163,6 +4175,7 @@ packages: /type-fest@0.13.1: resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} engines: {node: '>=10'} + requiresBuild: true optional: true /type-fest@0.20.2: @@ -4228,6 +4241,7 @@ packages: /verror@1.10.1: resolution: {integrity: sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==} engines: {node: '>=0.6.0'} + requiresBuild: true dependencies: assert-plus: 1.0.0 core-util-is: 1.0.2 @@ -4267,7 +4281,7 @@ packages: rollup: 3.24.0 sass: 1.62.1 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /vue-demi@0.14.5(vue@3.3.4): diff --git a/src/main/index.ts b/src/main/index.ts index 7a05fb6..154314f 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -28,7 +28,8 @@ function createWindow(): void { sandbox: false } }) - if (is.dev) mainWindow.webContents.openDevTools() + // if (is.dev) + mainWindow.webContents.openDevTools() mainWindow.setAspectRatio(16 / 9) // mainWindow.webContents.openDevTools() diff --git a/src/renderer/src/App.vue b/src/renderer/src/App.vue index 8a403dd..688ed7e 100644 --- a/src/renderer/src/App.vue +++ b/src/renderer/src/App.vue @@ -1,9 +1,10 @@ @@ -11,12 +12,12 @@ config.page = 'camera' - - + + diff --git a/src/renderer/src/hd/Secret.vue b/src/renderer/src/hd/Secret.vue deleted file mode 100644 index a64b5ea..0000000 --- a/src/renderer/src/hd/Secret.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - 请输入口令 - - - - - 验证学习口令 - - - 获取口令 - - - - 向军大叔作品 - 微信: houdunren2021 - - - - - diff --git a/src/renderer/src/hd/Updater.vue b/src/renderer/src/hd/Updater.vue deleted file mode 100644 index cff10f3..0000000 --- a/src/renderer/src/hd/Updater.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 有新版本更新了 - - 马上下载 - - 苹果应用商店下载的,请使用app store更新 - - - - - diff --git a/src/renderer/src/hd/useSoft.ts b/src/renderer/src/hd/useSoft.ts deleted file mode 100644 index d4c5721..0000000 --- a/src/renderer/src/hd/useSoft.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { http } from '@renderer/axios' -import { useConfigStore } from '@renderer/stores/useConfigStore' -import { ref } from 'vue' -import packageJson from '../../../../package.json' - -export default () => { - const configStore = useConfigStore() - const isLatestVersion = ref(false) - //获取口令 - const getSecret = async (data: { secret: string }): Promise => { - return await http.request({ - url: '/softSecret/checkSoftSecret', - method: 'POST', - data - }) - } - - //软件更新检测 - const checkUpdate = async () => { - const res = await http.request({ - url: `/soft/checkUpdate`, - method: 'POST', - data: { - version: packageJson.version, - app: 'camera' - } - }) - if (res.data.code == 1) { - configStore.config.page = 'updater' - } else { - isLatestVersion.value = true - } - } - - //检测口令 - const checkSecret = async () => { - if (!configStore.config.secret) return - try { - await getSecret({ secret: configStore.config.secret }) - } catch (error) { - configStore.config.secret = '' - } - } - - //打开窗口 - const open = (url: string) => { - window.open(url) - } - - const init = async () => { - await checkUpdate() - // setTimeout(async () => { - // if (isLatestVersion) await checkSecret() - // }, 3000) - } - return { checkSecret, getSecret, checkUpdate, open, init } -} diff --git a/src/renderer/src/stores/useConfigStore.ts b/src/renderer/src/stores/useConfigStore.ts index c9292eb..2482de2 100644 --- a/src/renderer/src/stores/useConfigStore.ts +++ b/src/renderer/src/stores/useConfigStore.ts @@ -5,12 +5,10 @@ export const useConfigStore = defineStore( 'camera', () => { const config = ref({ - //验证口令 - secret: '', //边框颜色 borderColor: '#f39c12', //边框宽度 - borderWidth: 5, + borderWidth: 0, //摄像头设备ID deviceId: '', page: 'camera', @@ -23,7 +21,11 @@ export const useConfigStore = defineStore( //视频标签元素 videoElement: null as null | HTMLVideoElement, //镜像 - flip: false + flip: false, + token: { + uid: '', + secret: '' + } }) const updateConfig = () => {} diff --git a/src/renderer/src/views/Camera.vue b/src/renderer/src/views/Camera.vue index 3b51719..fa4d123 100644 --- a/src/renderer/src/views/Camera.vue +++ b/src/renderer/src/views/Camera.vue @@ -24,7 +24,7 @@ onMounted(() => { +import axios from 'axios' +import { useConfigStore } from '@renderer/stores/useConfigStore' +import { ElMessage } from 'element-plus' +import { ref } from 'vue' +import Package from '../../../../package.json' + +const { config } = useConfigStore() +const show = ref(false) +const secretCheck = () => { + axios + .post('https://www.houdunren.com/api/softSecret/check', { + uid: config.token.uid, + secret: config.token.secret + }) + .then((r: any) => { + if (r.data != 1) { + ElMessage.warning({ message: '口令错误', grouping: true }) + show.value = true + } else show.value = false + }) +} +secretCheck() + +const showUpgradeBox = ref(false) +const upgradeCheck = () => { + axios + .post('https://www.houdunren.com/api/soft/upgrade/check', { + soft: 'houdunren-camera', + version: Package.version + }) + .then((r: any) => { + if (r.data != 1) { + showUpgradeBox.value = true + } + }) + .catch(() => {}) +} +upgradeCheck() + + + + + 口令设置 + + 用户 uid + + + + 口令 + + + + 保存提交 + + + 请在网站会员中心查看 + + + + 有新版本了!请访问网站下载 + + + +