From 2ecb6b4672973dd79bb60f5002206b006d3a5a2f Mon Sep 17 00:00:00 2001 From: 31353 <31353751672@qq.com> Date: Sat, 30 Dec 2023 14:27:40 +0800 Subject: [PATCH] =?UTF-8?q?vue=E5=89=8D=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .editorconfig | 14 + .env.development | 5 + .env.production | 6 + .env.staging | 8 + .eslintignore | 5 + .eslintrc.js | 198 ++++++++++ .gitignore | 16 + .travis.yml | 5 + LICENSE | 21 ++ README-zh.md | 111 ++++++ README.md | 99 +++++ babel.config.js | 14 + build/index.js | 35 ++ jest.config.js | 24 ++ jsconfig.json | 9 + mock/index.js | 57 +++ mock/mock-server.js | 81 ++++ mock/table.js | 29 ++ mock/user.js | 84 +++++ mock/utils.js | 25 ++ package.json | 62 +++ postcss.config.js | 8 + public/favicon.ico | Bin 0 -> 67646 bytes public/index.html | 17 + src/App.vue | 11 + src/api/fried.js | 102 +++++ src/api/packet.js | 63 ++++ src/api/table.js | 9 + src/api/user.js | 62 +++ src/assets/404_images/404.png | Bin 0 -> 98071 bytes src/assets/404_images/404_cloud.png | Bin 0 -> 4766 bytes src/components/Breadcrumb/index.vue | 78 ++++ src/components/Hamburger/index.vue | 44 +++ src/components/SvgIcon/index.vue | 62 +++ src/icons/index.js | 9 + src/icons/svg/dashboard.svg | 1 + src/icons/svg/example.svg | 1 + src/icons/svg/eye-open.svg | 1 + src/icons/svg/eye.svg | 1 + src/icons/svg/form.svg | 1 + src/icons/svg/link.svg | 1 + src/icons/svg/nested.svg | 1 + src/icons/svg/password.svg | 1 + src/icons/svg/table.svg | 1 + src/icons/svg/tree.svg | 1 + src/icons/svg/user.svg | 1 + src/icons/svgo.yml | 22 ++ src/layout/components/AppMain.vue | 40 ++ src/layout/components/Navbar.vue | 139 +++++++ src/layout/components/Sidebar/FixiOSBug.js | 26 ++ src/layout/components/Sidebar/Item.vue | 41 ++ src/layout/components/Sidebar/Link.vue | 43 +++ src/layout/components/Sidebar/Logo.vue | 82 ++++ src/layout/components/Sidebar/SidebarItem.vue | 95 +++++ src/layout/components/Sidebar/index.vue | 56 +++ src/layout/components/index.js | 3 + src/layout/index.vue | 93 +++++ src/layout/mixin/ResizeHandler.js | 45 +++ src/main.js | 43 +++ src/permission.js | 64 ++++ src/router/index.js | 219 +++++++++++ src/settings.js | 16 + src/store/getters.js | 8 + src/store/index.js | 19 + src/store/modules/app.js | 48 +++ src/store/modules/settings.js | 32 ++ src/store/modules/user.js | 97 +++++ src/styles/element-ui.scss | 49 +++ src/styles/index.scss | 65 ++++ src/styles/mixin.scss | 28 ++ src/styles/sidebar.scss | 226 +++++++++++ src/styles/transition.scss | 48 +++ src/styles/variables.scss | 25 ++ src/utils/auth.js | 15 + src/utils/get-page-title.js | 10 + src/utils/index.js | 117 ++++++ src/utils/request.js | 85 +++++ src/utils/validate.js | 20 + src/views/404.vue | 228 +++++++++++ src/views/Adduser/index.vue | 163 ++++++++ src/views/Fried/index.vue | 240 ++++++++++++ src/views/dashboard/index.vue | 30 ++ src/views/form/index.vue | 85 +++++ src/views/login/index.vue | 353 ++++++++++++++++++ src/views/nested/menu1/index.vue | 7 + src/views/nested/menu1/menu1-1/index.vue | 7 + src/views/nested/menu1/menu1-2/index.vue | 7 + .../nested/menu1/menu1-2/menu1-2-1/index.vue | 5 + .../nested/menu1/menu1-2/menu1-2-2/index.vue | 5 + src/views/nested/menu1/menu1-3/index.vue | 5 + src/views/nested/menu2/index.vue | 5 + src/views/packets/index.vue | 315 ++++++++++++++++ src/views/table/index.vue | 79 ++++ src/views/tree/index.vue | 78 ++++ tests/unit/.eslintrc.js | 5 + tests/unit/components/Breadcrumb.spec.js | 98 +++++ tests/unit/components/Hamburger.spec.js | 18 + tests/unit/components/SvgIcon.spec.js | 22 ++ tests/unit/utils/formatTime.spec.js | 30 ++ tests/unit/utils/param2Obj.spec.js | 14 + tests/unit/utils/parseTime.spec.js | 35 ++ tests/unit/utils/validate.spec.js | 17 + vue.config.js | 131 +++++++ 103 files changed, 5285 insertions(+) create mode 100644 .editorconfig create mode 100644 .env.development create mode 100644 .env.production create mode 100644 .env.staging create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 README-zh.md create mode 100644 README.md create mode 100644 babel.config.js create mode 100644 build/index.js create mode 100644 jest.config.js create mode 100644 jsconfig.json create mode 100644 mock/index.js create mode 100644 mock/mock-server.js create mode 100644 mock/table.js create mode 100644 mock/user.js create mode 100644 mock/utils.js create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 public/favicon.ico create mode 100644 public/index.html create mode 100644 src/App.vue create mode 100644 src/api/fried.js create mode 100644 src/api/packet.js create mode 100644 src/api/table.js create mode 100644 src/api/user.js create mode 100644 src/assets/404_images/404.png create mode 100644 src/assets/404_images/404_cloud.png create mode 100644 src/components/Breadcrumb/index.vue create mode 100644 src/components/Hamburger/index.vue create mode 100644 src/components/SvgIcon/index.vue create mode 100644 src/icons/index.js create mode 100644 src/icons/svg/dashboard.svg create mode 100644 src/icons/svg/example.svg create mode 100644 src/icons/svg/eye-open.svg create mode 100644 src/icons/svg/eye.svg create mode 100644 src/icons/svg/form.svg create mode 100644 src/icons/svg/link.svg create mode 100644 src/icons/svg/nested.svg create mode 100644 src/icons/svg/password.svg create mode 100644 src/icons/svg/table.svg create mode 100644 src/icons/svg/tree.svg create mode 100644 src/icons/svg/user.svg create mode 100644 src/icons/svgo.yml create mode 100644 src/layout/components/AppMain.vue create mode 100644 src/layout/components/Navbar.vue create mode 100644 src/layout/components/Sidebar/FixiOSBug.js create mode 100644 src/layout/components/Sidebar/Item.vue create mode 100644 src/layout/components/Sidebar/Link.vue create mode 100644 src/layout/components/Sidebar/Logo.vue create mode 100644 src/layout/components/Sidebar/SidebarItem.vue create mode 100644 src/layout/components/Sidebar/index.vue create mode 100644 src/layout/components/index.js create mode 100644 src/layout/index.vue create mode 100644 src/layout/mixin/ResizeHandler.js create mode 100644 src/main.js create mode 100644 src/permission.js create mode 100644 src/router/index.js create mode 100644 src/settings.js create mode 100644 src/store/getters.js create mode 100644 src/store/index.js create mode 100644 src/store/modules/app.js create mode 100644 src/store/modules/settings.js create mode 100644 src/store/modules/user.js create mode 100644 src/styles/element-ui.scss create mode 100644 src/styles/index.scss create mode 100644 src/styles/mixin.scss create mode 100644 src/styles/sidebar.scss create mode 100644 src/styles/transition.scss create mode 100644 src/styles/variables.scss create mode 100644 src/utils/auth.js create mode 100644 src/utils/get-page-title.js create mode 100644 src/utils/index.js create mode 100644 src/utils/request.js create mode 100644 src/utils/validate.js create mode 100644 src/views/404.vue create mode 100644 src/views/Adduser/index.vue create mode 100644 src/views/Fried/index.vue create mode 100644 src/views/dashboard/index.vue create mode 100644 src/views/form/index.vue create mode 100644 src/views/login/index.vue create mode 100644 src/views/nested/menu1/index.vue create mode 100644 src/views/nested/menu1/menu1-1/index.vue create mode 100644 src/views/nested/menu1/menu1-2/index.vue create mode 100644 src/views/nested/menu1/menu1-2/menu1-2-1/index.vue create mode 100644 src/views/nested/menu1/menu1-2/menu1-2-2/index.vue create mode 100644 src/views/nested/menu1/menu1-3/index.vue create mode 100644 src/views/nested/menu2/index.vue create mode 100644 src/views/packets/index.vue create mode 100644 src/views/table/index.vue create mode 100644 src/views/tree/index.vue create mode 100644 tests/unit/.eslintrc.js create mode 100644 tests/unit/components/Breadcrumb.spec.js create mode 100644 tests/unit/components/Hamburger.spec.js create mode 100644 tests/unit/components/SvgIcon.spec.js create mode 100644 tests/unit/utils/formatTime.spec.js create mode 100644 tests/unit/utils/param2Obj.spec.js create mode 100644 tests/unit/utils/parseTime.spec.js create mode 100644 tests/unit/utils/validate.spec.js create mode 100644 vue.config.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ea6e20f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..de583d0 --- /dev/null +++ b/.env.development @@ -0,0 +1,5 @@ +# just a flag +ENV = 'development' + +# base api +VUE_APP_BASE_API = '/dev-api' diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..80c8103 --- /dev/null +++ b/.env.production @@ -0,0 +1,6 @@ +# just a flag +ENV = 'production' + +# base api +VUE_APP_BASE_API = '/prod-api' + diff --git a/.env.staging b/.env.staging new file mode 100644 index 0000000..a8793a0 --- /dev/null +++ b/.env.staging @@ -0,0 +1,8 @@ +NODE_ENV = production + +# just a flag +ENV = 'staging' + +# base api +VUE_APP_BASE_API = '/stage-api' + diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..36d5749 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,5 @@ +build/*.js +src/assets +public +dist +* diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..c977505 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,198 @@ +module.exports = { + root: true, + parserOptions: { + parser: 'babel-eslint', + sourceType: 'module' + }, + env: { + browser: true, + node: true, + es6: true, + }, + extends: ['plugin:vue/recommended', 'eslint:recommended'], + + // add your custom rules here + //it is base on https://github.com/vuejs/eslint-config-vue + rules: { + "vue/max-attributes-per-line": [2, { + "singleline": 10, + "multiline": { + "max": 1, + "allowFirstLine": false + } + }], + "vue/singleline-html-element-content-newline": "off", + "vue/multiline-html-element-content-newline":"off", + "vue/name-property-casing": ["error", "PascalCase"], + "vue/no-v-html": "off", + 'accessor-pairs': 2, + 'arrow-spacing': [2, { + 'before': true, + 'after': true + }], + 'block-spacing': [2, 'always'], + 'brace-style': [2, '1tbs', { + 'allowSingleLine': true + }], + 'camelcase': [0, { + 'properties': 'always' + }], + 'comma-dangle': [2, 'never'], + 'comma-spacing': [2, { + 'before': false, + 'after': true + }], + 'comma-style': [2, 'last'], + 'constructor-super': 2, + 'curly': [2, 'multi-line'], + 'dot-location': [2, 'property'], + 'eol-last': 2, + 'eqeqeq': ["error", "always", {"null": "ignore"}], + 'generator-star-spacing': [2, { + 'before': true, + 'after': true + }], + 'handle-callback-err': [2, '^(err|error)$'], + 'indent': [2, 2, { + 'SwitchCase': 1 + }], + 'jsx-quotes': [2, 'prefer-single'], + 'key-spacing': [2, { + 'beforeColon': false, + 'afterColon': true + }], + 'keyword-spacing': [2, { + 'before': true, + 'after': true + }], + 'new-cap': [2, { + 'newIsCap': true, + 'capIsNew': false + }], + 'new-parens': 2, + 'no-array-constructor': 2, + 'no-caller': 2, + 'no-console': 'off', + 'no-class-assign': 2, + 'no-cond-assign': 2, + 'no-const-assign': 2, + 'no-control-regex': 0, + 'no-delete-var': 2, + 'no-dupe-args': 2, + 'no-dupe-class-members': 2, + 'no-dupe-keys': 2, + 'no-duplicate-case': 2, + 'no-empty-character-class': 2, + 'no-empty-pattern': 2, + 'no-eval': 2, + 'no-ex-assign': 2, + 'no-extend-native': 2, + 'no-extra-bind': 2, + 'no-extra-boolean-cast': 2, + 'no-extra-parens': [2, 'functions'], + 'no-fallthrough': 2, + 'no-floating-decimal': 2, + 'no-func-assign': 2, + 'no-implied-eval': 2, + 'no-inner-declarations': [2, 'functions'], + 'no-invalid-regexp': 2, + 'no-irregular-whitespace': 2, + 'no-iterator': 2, + 'no-label-var': 2, + 'no-labels': [2, { + 'allowLoop': false, + 'allowSwitch': false + }], + 'no-lone-blocks': 2, + 'no-mixed-spaces-and-tabs': 2, + 'no-multi-spaces': 2, + 'no-multi-str': 2, + 'no-multiple-empty-lines': [2, { + 'max': 1 + }], + 'no-native-reassign': 2, + 'no-negated-in-lhs': 2, + 'no-new-object': 2, + 'no-new-require': 2, + 'no-new-symbol': 2, + 'no-new-wrappers': 2, + 'no-obj-calls': 2, + 'no-octal': 2, + 'no-octal-escape': 2, + 'no-path-concat': 2, + 'no-proto': 2, + 'no-redeclare': 2, + 'no-regex-spaces': 2, + 'no-return-assign': [2, 'except-parens'], + 'no-self-assign': 2, + 'no-self-compare': 2, + 'no-sequences': 2, + 'no-shadow-restricted-names': 2, + 'no-spaced-func': 2, + 'no-sparse-arrays': 2, + 'no-this-before-super': 2, + 'no-throw-literal': 2, + 'no-trailing-spaces': 2, + 'no-undef': 2, + 'no-undef-init': 2, + 'no-unexpected-multiline': 2, + 'no-unmodified-loop-condition': 2, + 'no-unneeded-ternary': [2, { + 'defaultAssignment': false + }], + 'no-unreachable': 2, + 'no-unsafe-finally': 2, + 'no-unused-vars': [2, { + 'vars': 'all', + 'args': 'none' + }], + 'no-useless-call': 2, + 'no-useless-computed-key': 2, + 'no-useless-constructor': 2, + 'no-useless-escape': 0, + 'no-whitespace-before-property': 2, + 'no-with': 2, + 'one-var': [2, { + 'initialized': 'never' + }], + 'operator-linebreak': [2, 'after', { + 'overrides': { + '?': 'before', + ':': 'before' + } + }], + 'padded-blocks': [2, 'never'], + 'quotes': [2, 'single', { + 'avoidEscape': true, + 'allowTemplateLiterals': true + }], + 'semi': [2, 'never'], + 'semi-spacing': [2, { + 'before': false, + 'after': true + }], + 'space-before-blocks': [2, 'always'], + 'space-before-function-paren': [2, 'never'], + 'space-in-parens': [2, 'never'], + 'space-infix-ops': 2, + 'space-unary-ops': [2, { + 'words': true, + 'nonwords': false + }], + 'spaced-comment': [2, 'always', { + 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] + }], + 'template-curly-spacing': [2, 'never'], + 'use-isnan': 2, + 'valid-typeof': 2, + 'wrap-iife': [2, 'any'], + 'yield-star-spacing': [2, 'both'], + 'yoda': [2, 'never'], + 'prefer-const': 2, + 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, + 'object-curly-spacing': [2, 'always', { + objectsInObjects: false + }], + 'array-bracket-spacing': [2, 'never'] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ad28d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +package-lock.json +tests/**/coverage/ + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f4be7a0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: 10 +script: npm run test +notifications: + email: false diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6151575 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present PanJiaChen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README-zh.md b/README-zh.md new file mode 100644 index 0000000..1beec9b --- /dev/null +++ b/README-zh.md @@ -0,0 +1,111 @@ +# vue-admin-template + +> 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。 + +[线上地址](http://panjiachen.github.io/vue-admin-template) + +[国内访问](https://panjiachen.gitee.io/vue-admin-template) + +目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-admin-template/tree/tag/3.11.0),它不依赖 `vue-cli`。 + +
+ SPONSORED BY +
+
+
+
+
+
+ SPONSORED BY +
+
+
+
+
+
^`O0VvXWT~NPo|G2l?}kY zf%3JpwPf&pi+OzdE$s7+#^YbjKA;U`?w+r}hx>UX)cIkXjo5IV-+@Om)BO=yZhKtY zGa{W0z*rL6p%&8tKZE{XXf*!J-xGAu4`klnkLYXJ_C>r#0(&ol7w7xw%Ngq04c@n_ zEy4Oh-I#!Vz^z;7ix@(S;r}M~oV(N<{Oy+kf75J$n2#p8pPsm|?PnXW!?{ASUziSa zAz$ Bi8;+%d8P&Kl~@O{l_pqA7=*shkMH~7hrz?&;29Fcsl^?|8{4o7PFnC z{YUIR#`k7ZCdLFL!hh}cv!H*pcp)*qL|-&iJ(ErOlHB_T=%O`7&j0D<>JZ=M8L}@$ zS>8=jo~$s?=Slw^+Zt_pw(*Frk3SNB&I#!6&G )%JK5{0i_bCuslr^+h*xuK?-* zGvq)0Gk$_SWUk;l_ssZoVC@Osq4#mr{f9=^-+RU({PV)@3*%3$N&Wo)xV8oTa#npZ z@TdNuFR)+U@v?xlur;ub$RawxiM<8SN1HSQex)O@lyd>&&<7j?{@m--uy#QFwe=m^ z{*4V)GsXH$uH|EFPXs5n+2${0AE!lIgTAA6HzwXMBqDn}Zdfzd3gf_Y;Q!3Gwtd7D z>?04sUPX)tC rsA9j9#A*P~SUUfAx~7c_03kGSvfnh)4zjL{mjzc-b<;&~!2 z2;+!|Y>B=A`i1krTd; r7kzQKKj8PBEzrd|+P{%Hfb%^4e2sV(bqxCkt~KR;qKpfr-`L3dr^)+O z*he$kU%nyIEKNOn{f=>nt!Y9T8Ha8NANJj&&CN3gM_?Z5i-8Bv(I3kg4X)M8RT+ps z_l)IyfUq;d&!pWi_K?GKx#ooWXY*$46@WFxxq5a6`TQR3Z>O)XX6%uk{Jew6eY%dm zz^g%T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0fQ;IhI z*PX%2v9#ehR(HcEFF)pU0P8)3j>TAUGWuBVHMa%Cwn@EAUn*lH*heH9H}E|D?EDRX z%RQ>-kD)#}1#)8C!MKDX$k?ZV^M%J=s;A!3bb1hTufufC-F&2sd!iQ@h%q!{NkTQ} zp%0$w4m#jFcdP?JFW8>|etp306%c)GJiY{ZLHxP>5qx)IOtux@?VziX{!1J$Mm`rD zdSUq(AKEzkaoNs|!!Q>)yZw02F>wM_oVXiyVr?Pt=e`pYaDF1rGu}8#z#p-P_VK`e z9DHwMy@Bd6zB3$`GY_#&4Y5hJ%HiPBTog~{VIl`y7%z&L5)oGtZogsK(C`)e5kzsO z@6|(nj(%MB FqYOb(5k~swGzeBT8Uz5tx8&TMIl6ny7Y8DK$jL7hO5sTL ;~ zlvtnU1N7 C!QI(h$xxtqM^J|3iKI-A_RE*W=R^fEL{kfJe%7F|G%7zi&qR zT#7U<>j8-u*!VQ%P2T`mJbijP(>jJ0$EBN@)-ixd9Rsum8LObkURU8_@$*;(o3(VL zg5lev6(TeFiAY>HyJ&&6tI-0B%JE#dfRUd^3RoQZeYk+pq*kEl?O~2I$F7qjy2~QN X;@D+E7Ad=S_FbjlW&KY_+xPzm3MBT? literal 0 HcmV?d00001 diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..fa2be91 --- /dev/null +++ b/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + <%= webpackConfig.name %> + + + + + + + diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..ec9032c --- /dev/null +++ b/src/App.vue @@ -0,0 +1,11 @@ + +++ + + diff --git a/src/api/fried.js b/src/api/fried.js new file mode 100644 index 0000000..4be4cd6 --- /dev/null +++ b/src/api/fried.js @@ -0,0 +1,102 @@ +import request from '@/utils/request' + +/** + * 好友列表 + * @param data + * @returns {*} + */ +export function friedList(data) { + return request({ + url: '/user/FriedList', + method: 'post', + data + }) +} + +/** + * 添加好友;列表 + * @param data + * @returns {*} + * @constructor + */ +export function Addfried(data) { + return request({ + url: '/user/Addfriends', + method: 'post', + data + }) +} + +/** + * 删除好友 + * @param userId + * @returns {*} + * @constructor + */ +export function Deleuser(userId) { + return request({ + url: '/user/deleUser/'+userId, + method: 'post' + }) +} + +/** + * 申请添加好友 + * @param userId + * @returns {*} + */ +export function shenqitianjia(userId) { + return request({ + url: '/user/FriedRequest/'+userId, + method: 'post' + }) +} + +/** + * 好友申请列表 + * @returns {*} + * @constructor + */ +export function FieList() { + return request({ + url: '/user/FieList', + method: 'get' + }) +} + +/** + * 查所有 + * @returns {*} + * @constructor + */ +export function AllProcut() { + return request({ + url: '/user/AllProcut', + method: 'get' + }) +} + +/** + * 查询子类 + * @returns {*} + */ +export function subclass() { + return request({ + url: '/user/subclass', + method: 'get' + }) +} + +/** + * 修改状态 + * @param feiId + * @param state + * @returns {*} + */ +export function updateFriedRequest(feiId,state) { + return request({ + url: '/user/updateFriedRequest/'+feiId+'/'+state, + method: 'post' + }) +} + diff --git a/src/api/packet.js b/src/api/packet.js new file mode 100644 index 0000000..f97adf9 --- /dev/null +++ b/src/api/packet.js @@ -0,0 +1,63 @@ +import request from '@/utils/request' + +/** + * 红包列表 + * @param data + * @returns {*} + */ +export function packetList(data) { + return request({ + url: '/packet/packetList', + method: 'post', + data + }) +} +/** + * 所有好友复选框 + * @param feiId + * @param state + * @returns {*} + */ +export function findFriends() { + return request({ + url: '/packet/findFriends', + method: 'get' + }) +} + +/** + * 添加红包 + * @returns {*} + */ +export function addPacket(data) { + return request({ + url: '/packet/addPacket', + method: 'post', + data + }) +} + +/** + * 获取当前登录人 + * @param data + * @returns {*} + */ +export function getInfos() { + return request({ + url: '/auth/info', + method: 'get' + }) +} + +/** + * 抢红包 + * @returns {AxiosPromise} + */ +export function redPacket(data) { + return request({ + url: '/packet/redPacket', + method: 'post', + data + }) +} + diff --git a/src/api/table.js b/src/api/table.js new file mode 100644 index 0000000..2752f52 --- /dev/null +++ b/src/api/table.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +export function getList(params) { + return request({ + url: '/vue-admin-template/table/list', + method: 'get', + params + }) +} diff --git a/src/api/user.js b/src/api/user.js new file mode 100644 index 0000000..6682d36 --- /dev/null +++ b/src/api/user.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +/** + * 登录 + * @param data + * @returns {*} + */ +export function login(data) { + return request({ + url: '/auth/login', + method: 'post', + data + }) +} + +/** + * 注册 + * @param data + * @returns {*} + */ +export function Sign(data) { + return request({ + url: '/user/Sign', + method: 'post', + data + }) +} + +/** + * 发送验证码 + * @param data + * @returns {*} + * @constructor + */ +export function sendCode(tel) { + return request({ + url: '/user/sendCode/'+tel, + method: 'post' + }) +} + +/** + * 获取当前登录人 + * @param token + * @returns {*} + */ +export function getInfo(token) { + return request({ + url: '/auth/info', + method: 'get', + params: { token } + }) +} + + + +// export function logout() { +// return request({ +// url: '/vue-admin-template/user/logout', +// method: 'post' +// }) +// } diff --git a/src/assets/404_images/404.png b/src/assets/404_images/404.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8e2305cc973ad2121403aee4bf08728f76c461 GIT binary patch literal 98071 zcmZsD1yoe)_qGfpFmxy&-5?DTB3;rUAxKDvbVzqeiAZ-S3L@QI(jWrT-5rArH4O2c zxq5&1-u3_1I%_Gcb+ l>@Z)@`}0ni zgTxS1Xz2Sp5LyN$jB+`(TK2go0$*ON+wYG~Qz71pR)(>+cvvo`d01{Xdj)u2?ZXzy zmA;x1Nzp_;m7?it6=)ebdFi9=K=7-zt#9B^kGF`IzK;CC(qMy@r8#>WqG2@cS5uox zXbf0B@ci)!^b0Mb!?4K=50dqjrDj)8Y7T(OQwKjh4xB0;y*hgfuAsToL#vtY-x2 zcDPC4UD@TJ&X)ylS~p2s{Vm(V1wS(C*u6kTtf;l}x2;9RDSK|B+2Q|vU# z5g|>`3ves^tw-x#pW$kM%4o{)rRUjP-bFAxh4kKaDr2nlD0Ny3>QcfT2w<51UE`{O zQGN&5UTB2YKA@#pXv;7`0|{yiD)FUE4eA?4@$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