From 71b8c0f29f7ef8a91fdcf68d26d8a4c79009174c Mon Sep 17 00:00:00 2001 From: yuan Date: Thu, 4 Jan 2024 19:10:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E7=99=BB=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E6=B3=A8=E5=86=8C=EF=BC=8C=E7=99=BB=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 4 + config/index.js | 1 + package-lock.json | 48 +++++++-- package.json | 2 +- src/app.config.ts | 4 +- src/components/Auth.vue | 57 +++++++++++ src/components/ExternalLink.vue | 13 +++ src/components/contact-form/index.vue | 1 - src/components/contact/index.vue | 16 ++- src/components/notification/index.vue | 6 +- src/pages/contact-edit/index.vue | 2 +- src/pages/contact-new/index.vue | 2 +- src/pages/contact/index.vue | 4 +- src/pages/index/index.vue | 9 +- src/pages/login/background.jpg | Bin 0 -> 250224 bytes src/pages/login/index.config.ts | 6 ++ src/pages/login/index.scss | 17 ++++ src/pages/login/index.vue | 108 +++++++++++++++++++++ src/pages/login/logo.png | Bin 0 -> 25221 bytes src/pages/settings/index.vue | 98 ++++++++++++++++++- src/pages/web-view/index.config.ts | 4 + src/pages/web-view/index.scss | 4 + src/pages/web-view/index.vue | 24 +++++ src/stores/auth.ts | 26 +++++ src/utils/GQLRequest.ts | 42 ++++++++ src/utils/{StringUtil.ts => bjx-helper.ts} | 2 +- src/utils/date-helper.ts | 38 ++++++++ src/utils/index.ts | 6 ++ src/utils/route.ts | 61 ++++++++++++ src/utils/screen-helper.ts | 61 ++++++++++++ src/utils/session.ts | 14 +++ 31 files changed, 651 insertions(+), 29 deletions(-) create mode 100644 src/components/Auth.vue create mode 100644 src/components/ExternalLink.vue create mode 100644 src/pages/login/background.jpg create mode 100644 src/pages/login/index.config.ts create mode 100644 src/pages/login/index.scss create mode 100644 src/pages/login/index.vue create mode 100644 src/pages/login/logo.png create mode 100644 src/pages/web-view/index.config.ts create mode 100644 src/pages/web-view/index.scss create mode 100644 src/pages/web-view/index.vue create mode 100644 src/stores/auth.ts create mode 100644 src/utils/GQLRequest.ts rename src/utils/{StringUtil.ts => bjx-helper.ts} (96%) create mode 100644 src/utils/date-helper.ts create mode 100644 src/utils/index.ts create mode 100644 src/utils/route.ts create mode 100644 src/utils/screen-helper.ts create mode 100644 src/utils/session.ts diff --git a/components.d.ts b/components.d.ts index 09b69e7..79c0f6f 100644 --- a/components.d.ts +++ b/components.d.ts @@ -7,15 +7,18 @@ export {} declare module 'vue' { export interface GlobalComponents { + Auth: typeof import('./src/components/Auth.vue')['default'] BackgroundBasic: typeof import('./src/components/background-basic/index.vue')['default'] Contact: typeof import('./src/components/contact/index.vue')['default'] ContactForm: typeof import('./src/components/contact-form/index.vue')['default'] Counter: typeof import('./src/components/Counter.vue')['default'] + ExternalLink: typeof import('./src/components/ExternalLink.vue')['default'] Notification: typeof import('./src/components/notification/index.vue')['default'] NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'] NutButton: typeof import('@nutui/nutui-taro')['Button'] NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'] NutCell: typeof import('@nutui/nutui-taro')['Cell'] + NutCol: typeof import('@nutui/nutui-taro')['Col'] NutCollapse: typeof import('@nutui/nutui-taro')['Collapse'] NutCollapseItem: typeof import('@nutui/nutui-taro')['CollapseItem'] NutDivider: typeof import('@nutui/nutui-taro')['Divider'] @@ -24,6 +27,7 @@ declare module 'vue' { NutFormItem: typeof import('@nutui/nutui-taro')['FormItem'] NutInput: typeof import('@nutui/nutui-taro')['Input'] NutNavbar: typeof import('@nutui/nutui-taro')['Navbar'] + NutRow: typeof import('@nutui/nutui-taro')['Row'] NutSearchbar: typeof import('@nutui/nutui-taro')['Searchbar'] NutSwitch: typeof import('@nutui/nutui-taro')['Switch'] } diff --git a/config/index.js b/config/index.js index fadcc17..c4663c2 100644 --- a/config/index.js +++ b/config/index.js @@ -20,6 +20,7 @@ const config = { outputRoot: 'dist', plugins: ['@tarojs/plugin-html', 'tarojs-router-next-plugin'], defineConstants: { + SERVER_URL: '"https://test.digimeta.com.cn"', }, copy: { patterns: [ diff --git a/package-lock.json b/package-lock.json index 856353c..04d6d4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,6 @@ "pinia": "^2.1.7", "taro-icons": "^0.4.0", "tarojs-router-next": "^3.4.0", - "tarojs-router-next-plugin": "^3.4.0", "vue": "^3.3.8" }, "devDependencies": { @@ -54,6 +53,7 @@ "eslint-plugin-vue": "^9.18.1", "style-loader": "^3.3.3", "stylelint": "^15.11.0", + "tarojs-router-next-plugin": "^3.4.0", "ts-node": "^10.9.1", "typescript": "^5.3.2", "unplugin-vue-components": "^0.25.2", @@ -3007,6 +3007,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "devOptional": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3019,6 +3020,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "devOptional": true, "engines": { "node": ">= 8" } @@ -3027,6 +3029,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "devOptional": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -4456,6 +4459,7 @@ "version": "0.16.0", "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.16.0.tgz", "integrity": "sha512-SgJpzkTgZKLKqQniCjLaE3c2L2sdL7UShvmTmPBejAKd2OKV/yfMpQ2IWpAuA+VY5wy7PkSUaEObIqEK6afFuw==", + "dev": true, "dependencies": { "fast-glob": "^3.2.11", "minimatch": "^5.1.0", @@ -4467,6 +4471,7 @@ "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -6368,6 +6373,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "devOptional": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -7093,7 +7099,8 @@ "node_modules/code-block-writer": { "version": "11.0.3", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-11.0.3.tgz", - "integrity": "sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==" + "integrity": "sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==", + "dev": true }, "node_modules/color-convert": { "version": "1.9.3", @@ -10124,6 +10131,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "devOptional": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -10160,6 +10168,7 @@ "version": "1.16.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "devOptional": true, "dependencies": { "reusify": "^1.0.4" } @@ -13397,6 +13406,7 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "devOptional": true, "engines": { "node": ">= 8" } @@ -13802,6 +13812,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -14956,7 +14967,8 @@ "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==" + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true }, "node_modules/path-case": { "version": "3.0.4", @@ -16240,6 +16252,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "devOptional": true, "funding": [ { "type": "github", @@ -16343,13 +16356,13 @@ } }, "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "optional": true, + "peer": true, "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" @@ -16936,6 +16949,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "devOptional": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -16972,6 +16986,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "devOptional": true, "funding": [ { "type": "github", @@ -18681,6 +18696,19 @@ "react": "^16.13.0" } }, + "node_modules/taro-icons/node_modules/react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/tarojs-router-next": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/tarojs-router-next/-/tarojs-router-next-3.4.0.tgz", @@ -18693,6 +18721,7 @@ "version": "3.4.0", "resolved": "https://registry.npmjs.org/tarojs-router-next-plugin/-/tarojs-router-next-plugin-3.4.0.tgz", "integrity": "sha512-+kgU9wpx5CwY27FtT5PwymTw9HUEBjJPNlkRZY+8CABWuwRb5tN4OhMeva+J+EeNmSngMuJn4Jyi4WAxqdP/Ug==", + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "ts-morph": "^15.1.0" @@ -18972,6 +19001,7 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-15.1.0.tgz", "integrity": "sha512-RBsGE2sDzUXFTnv8Ba22QfeuKbgvAGJFuTN7HfmIRUkgT/NaVLfDM/8OFm2NlFkGlWEXdpW5OaFIp1jvqdDuOg==", + "dev": true, "dependencies": { "@ts-morph/common": "~0.16.0", "code-block-writer": "^11.0.0" diff --git a/package.json b/package.json index a6079bf..0008284 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "pinia": "^2.1.7", "taro-icons": "^0.4.0", "tarojs-router-next": "^3.4.0", - "tarojs-router-next-plugin": "^3.4.0", "vue": "^3.3.8" }, "devDependencies": { @@ -81,6 +80,7 @@ "eslint-plugin-vue": "^9.18.1", "style-loader": "^3.3.3", "stylelint": "^15.11.0", + "tarojs-router-next-plugin": "^3.4.0", "ts-node": "^10.9.1", "typescript": "^5.3.2", "unplugin-vue-components": "^0.25.2", diff --git a/src/app.config.ts b/src/app.config.ts index ee74a8f..b3991a4 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -5,7 +5,9 @@ export default defineAppConfig({ 'pages/contact-new/index', 'pages/contact-edit/index', 'pages/invite/index', - 'pages/settings/index' + 'pages/settings/index', + 'pages/login/index', + 'pages/web-view/index' ], window: { backgroundTextStyle: 'light', diff --git a/src/components/Auth.vue b/src/components/Auth.vue new file mode 100644 index 0000000..c38fb99 --- /dev/null +++ b/src/components/Auth.vue @@ -0,0 +1,57 @@ + + diff --git a/src/components/ExternalLink.vue b/src/components/ExternalLink.vue new file mode 100644 index 0000000..7b1b89e --- /dev/null +++ b/src/components/ExternalLink.vue @@ -0,0 +1,13 @@ + + + diff --git a/src/components/contact-form/index.vue b/src/components/contact-form/index.vue index 7b31a8f..4a25a99 100644 --- a/src/components/contact-form/index.vue +++ b/src/components/contact-form/index.vue @@ -2,7 +2,6 @@ import "./index.scss"; import Taro from "@tarojs/taro"; import { Router } from 'tarojs-router-next' -import StringUtil from "../../utils/StringUtil"; import { reactive, ref } from 'vue'; diff --git a/src/components/contact/index.vue b/src/components/contact/index.vue index 233b8a7..0f1b88f 100644 --- a/src/components/contact/index.vue +++ b/src/components/contact/index.vue @@ -1,10 +1,12 @@