create-young-proj 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/dist/index.mjs +0 -0
- package/package.json +36 -28
- package/template-admin-server/.editorconfig +0 -0
- package/template-admin-server/.nvmrc +0 -0
- package/template-admin-server/.vscode/extensions.json +0 -0
- package/template-admin-server/.vscode/settings.json +0 -0
- package/template-admin-server/README.md +0 -0
- package/template-admin-server/_gitignore +0 -0
- package/template-admin-server/boot.mjs +0 -0
- package/template-admin-server/package.json +0 -0
- package/template-admin-server/rome.json +0 -0
- package/template-admin-server/src/config/config.default.ts +0 -0
- package/template-admin-server/src/configuration.ts +0 -0
- package/template-admin-server/src/controller/admin.controller.ts +0 -0
- package/template-admin-server/src/controller/api.controller.ts +0 -0
- package/template-admin-server/src/controller/base.controller.ts +0 -0
- package/template-admin-server/src/controller/dto/api.ts +0 -0
- package/template-admin-server/src/controller/dto/index.ts +0 -0
- package/template-admin-server/src/controller/dto/menu.ts +0 -0
- package/template-admin-server/src/controller/dto/role.ts +0 -0
- package/template-admin-server/src/controller/dto/user.ts +0 -0
- package/template-admin-server/src/controller/menu.controller.ts +0 -0
- package/template-admin-server/src/controller/role.controller.ts +0 -0
- package/template-admin-server/src/controller/user.controller.ts +0 -0
- package/template-admin-server/src/entities/Api.ts +0 -0
- package/template-admin-server/src/entities/BaseCreate.ts +0 -0
- package/template-admin-server/src/entities/Menu.ts +0 -0
- package/template-admin-server/src/entities/Role.ts +0 -0
- package/template-admin-server/src/entities/User.ts +0 -0
- package/template-admin-server/src/entities/index.ts +0 -0
- package/template-admin-server/src/filter/default.filter.ts +0 -0
- package/template-admin-server/src/filter/notfound.filter.ts +0 -0
- package/template-admin-server/src/middleware/helper.middleware.ts +0 -0
- package/template-admin-server/src/middleware/index.ts +0 -0
- package/template-admin-server/src/middleware/jwt.middleware.ts +0 -0
- package/template-admin-server/src/middleware/report.middleware.ts +0 -0
- package/template-admin-server/src/service/api.service.ts +0 -0
- package/template-admin-server/src/service/basic.ts +0 -0
- package/template-admin-server/src/service/index.ts +0 -0
- package/template-admin-server/src/service/menu.service.ts +0 -0
- package/template-admin-server/src/service/role.service.ts +0 -0
- package/template-admin-server/src/service/user.service.ts +0 -0
- package/template-admin-server/src/strategy/jwt.strategy.ts +0 -0
- package/template-admin-server/src/types/index.ts +0 -0
- package/template-admin-server/src/types/types.d.ts +0 -0
- package/template-admin-server/tsconfig.json +0 -0
- package/template-nuxt-admin/.eslintrc +14 -0
- package/template-nuxt-admin/.vscode/extensions.json +12 -0
- package/template-nuxt-admin/.vscode/settings.json +25 -0
- package/template-nuxt-admin/Dockerfile +0 -0
- package/template-nuxt-admin/README.md +29 -1
- package/template-nuxt-admin/_gitignore +23 -0
- package/template-nuxt-admin/_npmrc +2 -0
- package/template-nuxt-admin/app.vue +12 -12
- package/template-nuxt-admin/boot.mjs +0 -0
- package/template-nuxt-admin/components/ScreenFull.vue +5 -4
- package/template-nuxt-admin/components/TopSearch.vue +35 -31
- package/template-nuxt-admin/components/TopUser.vue +12 -9
- package/template-nuxt-admin/components/YoungChangePassword.vue +54 -44
- package/template-nuxt-admin/components/YoungCodeInput.vue +31 -25
- package/template-nuxt-admin/components/YoungLink.vue +3 -2
- package/template-nuxt-admin/components/YoungLoading.vue +1 -1
- package/template-nuxt-admin/components/layout/Footer.vue +1 -1
- package/template-nuxt-admin/components/layout/Logo.vue +7 -5
- package/template-nuxt-admin/components/layout/Main.vue +2 -17
- package/template-nuxt-admin/components/layout/NavBar.vue +12 -9
- package/template-nuxt-admin/components/layout/SideBar.vue +7 -6
- package/template-nuxt-admin/components/layout/SubMenu.vue +12 -13
- package/template-nuxt-admin/components/layout/TabsBar.vue +45 -43
- package/template-nuxt-admin/composables/api.ts +39 -37
- package/template-nuxt-admin/composables/apis/delete.ts +7 -7
- package/template-nuxt-admin/composables/apis/get.ts +13 -13
- package/template-nuxt-admin/composables/apis/index.ts +4 -4
- package/template-nuxt-admin/composables/apis/patch.ts +11 -11
- package/template-nuxt-admin/composables/apis/post.ts +17 -17
- package/template-nuxt-admin/composables/config.ts +1 -1
- package/template-nuxt-admin/composables/icon.ts +4 -4
- package/template-nuxt-admin/composables/nav.ts +19 -21
- package/template-nuxt-admin/composables/tags.ts +50 -50
- package/template-nuxt-admin/composables/user.ts +10 -11
- package/template-nuxt-admin/config/.devrc +0 -0
- package/template-nuxt-admin/config/.onlinerc +0 -0
- package/template-nuxt-admin/config/.testrc +0 -0
- package/template-nuxt-admin/env.d.ts +0 -0
- package/template-nuxt-admin/error.vue +37 -29
- package/template-nuxt-admin/layouts/blank.vue +0 -0
- package/template-nuxt-admin/layouts/default.vue +18 -17
- package/template-nuxt-admin/middleware/auth.global.ts +31 -20
- package/template-nuxt-admin/nuxt.config.ts +8 -7
- package/template-nuxt-admin/package.json +39 -19
- package/template-nuxt-admin/pages/home/[id].vue +6 -6
- package/template-nuxt-admin/pages/index.vue +4 -4
- package/template-nuxt-admin/pages/login.vue +74 -56
- package/template-nuxt-admin/pages/system/api.vue +77 -64
- package/template-nuxt-admin/pages/system/hooks/useRole.ts +127 -128
- package/template-nuxt-admin/pages/system/menuList.vue +171 -146
- package/template-nuxt-admin/pages/system/role.vue +66 -38
- package/template-nuxt-admin/pages/system/user.vue +85 -74
- package/template-nuxt-admin/plugins/directive.ts +9 -9
- package/template-nuxt-admin/public/default_avatar.svg +0 -0
- package/template-nuxt-admin/public/favicon.ico +0 -0
- package/template-nuxt-admin/public/image_placeholder.svg +0 -0
- package/template-nuxt-admin/public/tabbar_bg.png +0 -0
- package/template-nuxt-admin/server/api/[...all].ts +3 -3
- package/template-nuxt-admin/server/plugins/env.ts +19 -20
- package/template-nuxt-admin/server/routes/get/env.ts +3 -3
- package/template-nuxt-admin/server/tsconfig.json +0 -0
- package/template-nuxt-admin/server/utils/index.ts +15 -14
- package/template-nuxt-admin/styles/element.scss +0 -0
- package/template-nuxt-admin/styles/index.scss +0 -0
- package/template-nuxt-admin/styles/variable.scss +0 -0
- package/template-nuxt-admin/tsconfig.json +0 -0
- package/template-nuxt-admin/typings/global.d.ts +0 -0
- package/template-nuxt-admin/typings/system.d.ts +0 -0
- package/template-nuxt-admin/typings/user.d.ts +0 -0
- package/template-nuxt-admin/uno.config.ts +1 -1
- package/template-nuxt-admin/utils/tool.ts +65 -65
- package/template-nuxt-admin/yarn.lock +3321 -1535
- package/template-uni-app/.eslintignore +1 -0
- package/template-uni-app/.eslintrc +16 -0
- package/template-uni-app/.vscode/.server-controller-port.log +5 -0
- package/template-uni-app/.vscode/css.code-snippets +0 -0
- package/template-uni-app/.vscode/extensions.json +5 -2
- package/template-uni-app/.vscode/js.code-snippets +0 -0
- package/template-uni-app/.vscode/settings.json +24 -6
- package/template-uni-app/.vscode/vue-html.code-snippets +0 -0
- package/template-uni-app/README.md +20 -0
- package/template-uni-app/_env +1 -1
- package/template-uni-app/_env.development +2 -2
- package/template-uni-app/_env.production +0 -3
- package/template-uni-app/_env.test +0 -3
- package/template-uni-app/_gitignore +0 -0
- package/template-uni-app/_npmrc +0 -0
- package/template-uni-app/auto-imports.d.ts +3 -0
- package/template-uni-app/components.d.ts +0 -0
- package/template-uni-app/custom-plugins/index.ts +2 -2
- package/template-uni-app/custom-plugins/multiconf.ts +17 -19
- package/template-uni-app/custom-plugins/polyfill.ts +9 -9
- package/template-uni-app/dist/dev/mp-weixin/apis/index.js +44 -0
- package/template-uni-app/dist/dev/mp-weixin/apis/lib/index.js +90 -0
- package/template-uni-app/dist/dev/mp-weixin/apis/requests/get.js +10 -0
- package/template-uni-app/dist/dev/mp-weixin/apis/requests/index.js +1 -0
- package/template-uni-app/dist/dev/mp-weixin/apis/requests/post.js +15 -0
- package/template-uni-app/dist/dev/mp-weixin/app.js +93 -0
- package/template-uni-app/dist/dev/mp-weixin/app.json +51 -0
- package/template-uni-app/dist/dev/mp-weixin/app.wxss +2378 -0
- package/template-uni-app/dist/dev/mp-weixin/common/assets.js +13 -0
- package/template-uni-app/dist/dev/mp-weixin/common/vendor.js +10189 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.js +22 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.json +4 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading/young-loading.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.js +22 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.json +4 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-loading-mini/young-loading-mini.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.js +82 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.json +4 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-navbar/young-navbar.wxss +108 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.js +56 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.json +4 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/components/young-tabbar/young-tabbar.wxss +88 -0
- package/template-uni-app/dist/dev/mp-weixin/config/enum.js +21 -0
- package/template-uni-app/dist/dev/mp-weixin/config/index.js +1 -0
- package/template-uni-app/dist/dev/mp-weixin/config/map.js +1 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/default.js +30 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/default.json +6 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/default.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/default.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.js +56 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.json +9 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/layouts/tabbar.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.js +98 -0
- package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.json +4 -0
- package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/node-modules/@dcloudio/uni-ui/lib/uni-card/uni-card.wxss +125 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.js +38 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.json +5 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/demo/index.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/index.js +51 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/index.json +5 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/index.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/index.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/my.js +22 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/my.json +3 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/my.wxml +1 -0
- package/template-uni-app/dist/dev/mp-weixin/pages/my.wxss +0 -0
- package/template-uni-app/dist/dev/mp-weixin/project.config.json +56 -0
- package/template-uni-app/dist/dev/mp-weixin/static/back.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/h.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/home.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/home_active.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/more.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/my.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/my_active.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/static/network.png +0 -0
- package/template-uni-app/dist/dev/mp-weixin/store/index.js +8 -0
- package/template-uni-app/dist/dev/mp-weixin/store/local/index.js +11 -0
- package/template-uni-app/dist/dev/mp-weixin/store/system.js +14 -0
- package/template-uni-app/dist/dev/mp-weixin/utils/modal.js +82 -0
- package/template-uni-app/dist/dev/mp-weixin/utils/route.js +85 -0
- package/template-uni-app/dist/dev/mp-weixin/utils/system.js +27 -0
- package/template-uni-app/index.html +0 -0
- package/template-uni-app/manifest.config.ts +11 -11
- package/template-uni-app/package.json +24 -6
- package/template-uni-app/pages.config.ts +11 -11
- package/template-uni-app/pnpm-lock.yaml +2677 -500
- package/template-uni-app/src/App.vue +24 -26
- package/template-uni-app/src/apis/index.ts +25 -21
- package/template-uni-app/src/apis/lib/index.ts +77 -78
- package/template-uni-app/src/apis/requests/get.ts +38 -38
- package/template-uni-app/src/apis/requests/index.ts +2 -2
- package/template-uni-app/src/apis/requests/post.ts +8 -8
- package/template-uni-app/src/components/young-loading/young-loading.vue +17 -19
- package/template-uni-app/src/components/young-loading-mini/young-loading-mini.vue +14 -17
- package/template-uni-app/src/components/young-navbar/young-navbar.vue +43 -44
- package/template-uni-app/src/components/young-tabbar/young-tabbar.vue +39 -35
- package/template-uni-app/src/config/enum.ts +1 -1
- package/template-uni-app/src/config/index.ts +2 -2
- package/template-uni-app/src/config/map.ts +4 -4
- package/template-uni-app/src/env.d.ts +0 -0
- package/template-uni-app/src/layouts/default.vue +8 -10
- package/template-uni-app/src/layouts/tabbar.vue +25 -15
- package/template-uni-app/src/main.ts +7 -7
- package/template-uni-app/src/manifest.json +1 -1
- package/template-uni-app/src/pages/demo/index.vue +16 -10
- package/template-uni-app/src/pages/index.vue +46 -25
- package/template-uni-app/src/pages/my.vue +17 -8
- package/template-uni-app/src/pages.json +9 -3
- package/template-uni-app/src/static/back.png +0 -0
- package/template-uni-app/src/static/h.png +0 -0
- package/template-uni-app/src/static/home.png +0 -0
- package/template-uni-app/src/static/home_active.png +0 -0
- package/template-uni-app/src/static/more.png +0 -0
- package/template-uni-app/src/static/my.png +0 -0
- package/template-uni-app/src/static/my_active.png +0 -0
- package/template-uni-app/src/static/network.png +0 -0
- package/template-uni-app/src/store/index.ts +6 -6
- package/template-uni-app/src/store/local/index.ts +23 -21
- package/template-uni-app/src/store/system.ts +11 -10
- package/template-uni-app/src/typings/global.d.ts +7 -0
- package/template-uni-app/src/uni.scss +0 -0
- package/template-uni-app/src/utils/auth.ts +137 -58
- package/template-uni-app/src/utils/index.ts +5 -5
- package/template-uni-app/src/utils/map.ts +45 -45
- package/template-uni-app/src/utils/modal.ts +61 -39
- package/template-uni-app/src/utils/route.ts +40 -38
- package/template-uni-app/src/utils/system.ts +25 -24
- package/template-uni-app/tsconfig.json +11 -11
- package/template-uni-app/unocss.config.ts +4 -4
- package/template-uni-app/vite.config.ts +15 -15
- package/template-uni-app/volar.config.js +2 -2
- package/template-vue-admin/.vscode/extensions.json +0 -0
- package/template-vue-admin/.vscode/list-add.code-snippets +0 -0
- package/template-vue-admin/.vscode/list-export.code-snippets +0 -0
- package/template-vue-admin/.vscode/list.code-snippets +0 -0
- package/template-vue-admin/.vscode/settings.json +0 -0
- package/template-vue-admin/Dockerfile +0 -0
- package/template-vue-admin/README.md +0 -0
- package/template-vue-admin/_env +0 -0
- package/template-vue-admin/_gitignore +0 -0
- package/template-vue-admin/boot.mjs +0 -0
- package/template-vue-admin/build/custom-plugin.ts +0 -0
- package/template-vue-admin/build/index.ts +0 -0
- package/template-vue-admin/build/plugins.ts +0 -0
- package/template-vue-admin/config/.devrc +0 -0
- package/template-vue-admin/config/.onlinerc +0 -0
- package/template-vue-admin/config/.testrc +0 -0
- package/template-vue-admin/index.html +0 -0
- package/template-vue-admin/nitro.config.ts +0 -0
- package/template-vue-admin/package.json +0 -0
- package/template-vue-admin/plugins/init.ts +0 -0
- package/template-vue-admin/public/vite.svg +0 -0
- package/template-vue-admin/rome.json +0 -0
- package/template-vue-admin/routes/api/[...all].ts +0 -0
- package/template-vue-admin/routes/get/env.ts +0 -0
- package/template-vue-admin/src/App.vue +0 -0
- package/template-vue-admin/src/apis/delete.ts +0 -0
- package/template-vue-admin/src/apis/get.ts +0 -0
- package/template-vue-admin/src/apis/index.ts +0 -0
- package/template-vue-admin/src/apis/patch.ts +0 -0
- package/template-vue-admin/src/apis/post.ts +0 -0
- package/template-vue-admin/src/assets/img/login_background.jpg +0 -0
- package/template-vue-admin/src/auto-components.d.ts +0 -0
- package/template-vue-admin/src/auto-imports.d.ts +0 -0
- package/template-vue-admin/src/layouts/blank.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/Link.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/Logo.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/Menu.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/NavSearch.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/ScrollPane.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/TagsView.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/TopMenu.vue +0 -0
- package/template-vue-admin/src/layouts/default/components/UserCenter.vue +0 -0
- package/template-vue-admin/src/layouts/default/index.vue +0 -0
- package/template-vue-admin/src/main.ts +0 -0
- package/template-vue-admin/src/modules/1-router.ts +0 -0
- package/template-vue-admin/src/modules/2-pinia.ts +0 -0
- package/template-vue-admin/src/modules/3-net.ts +0 -0
- package/template-vue-admin/src/modules/4-auth.ts +0 -0
- package/template-vue-admin/src/modules/5-checkupdate.ts +0 -0
- package/template-vue-admin/src/shims.d.ts +0 -0
- package/template-vue-admin/src/stores/index.ts +0 -0
- package/template-vue-admin/src/stores/local/index.ts +0 -0
- package/template-vue-admin/src/stores/session/index.ts +0 -0
- package/template-vue-admin/src/stores/tags.ts +0 -0
- package/template-vue-admin/src/typings/global.d.ts +0 -0
- package/template-vue-admin/src/typings/index.ts +0 -0
- package/template-vue-admin/src/typings/system.d.ts +0 -0
- package/template-vue-admin/src/views/403.vue +0 -0
- package/template-vue-admin/src/views/[...all_404].vue +0 -0
- package/template-vue-admin/src/views/base/login.vue +0 -0
- package/template-vue-admin/src/views/dashboard/[name].vue +0 -0
- package/template-vue-admin/src/views/index.vue +0 -0
- package/template-vue-admin/src/views/system/api.vue +0 -0
- package/template-vue-admin/src/views/system/hooks/useRole.ts +0 -0
- package/template-vue-admin/src/views/system/menuList.vue +3 -3
- package/template-vue-admin/src/views/system/role.vue +0 -0
- package/template-vue-admin/src/views/system/user.vue +0 -0
- package/template-vue-admin/src/vite-env.d.ts +0 -0
- package/template-vue-admin/tsconfig.json +0 -0
- package/template-vue-admin/tsconfig.node.json +0 -0
- package/template-vue-admin/unocss.config.ts +0 -0
- package/template-vue-admin/vite.config.ts +0 -0
- package/template-vue-mobile/.vscode/base.code-snippets +0 -0
- package/template-vue-mobile/.vscode/extensions.json +0 -0
- package/template-vue-mobile/.vscode/settings.json +0 -0
- package/template-vue-mobile/Dockerfile +0 -0
- package/template-vue-mobile/README.md +0 -0
- package/template-vue-mobile/_env +0 -0
- package/template-vue-mobile/_gitignore +0 -0
- package/template-vue-mobile/boot.mjs +0 -0
- package/template-vue-mobile/build/custom-plugin.ts +0 -0
- package/template-vue-mobile/build/index.ts +0 -0
- package/template-vue-mobile/build/plugins.ts +0 -0
- package/template-vue-mobile/config/.devrc +0 -0
- package/template-vue-mobile/config/.onlinerc +0 -0
- package/template-vue-mobile/config/.testrc +0 -0
- package/template-vue-mobile/index.html +0 -0
- package/template-vue-mobile/nitro.config.ts +0 -0
- package/template-vue-mobile/package.json +0 -0
- package/template-vue-mobile/plugins/env.ts +0 -0
- package/template-vue-mobile/public/vite.svg +0 -0
- package/template-vue-mobile/rome.json +0 -0
- package/template-vue-mobile/routes/[...all].ts +0 -0
- package/template-vue-mobile/routes/get/env.ts +0 -0
- package/template-vue-mobile/src/App.vue +0 -0
- package/template-vue-mobile/src/auto-components.d.ts +0 -0
- package/template-vue-mobile/src/auto-imports.d.ts +0 -0
- package/template-vue-mobile/src/components/Init.vue +0 -0
- package/template-vue-mobile/src/global.d.ts +0 -0
- package/template-vue-mobile/src/hooks/useVerifyCode.ts +0 -0
- package/template-vue-mobile/src/layouts/blank.vue +0 -0
- package/template-vue-mobile/src/layouts/default.vue +0 -0
- package/template-vue-mobile/src/layouts/sub.vue +0 -0
- package/template-vue-mobile/src/main.ts +0 -0
- package/template-vue-mobile/src/modules/1-router.ts +0 -0
- package/template-vue-mobile/src/modules/2-pinia.ts +0 -0
- package/template-vue-mobile/src/modules/3-net.ts +0 -0
- package/template-vue-mobile/src/modules/4-auth.ts +0 -0
- package/template-vue-mobile/src/views/[...all_404].vue +0 -0
- package/template-vue-mobile/src/views/base/login.vue +0 -0
- package/template-vue-mobile/src/views/base/resetPasswd.vue +0 -0
- package/template-vue-mobile/src/views/index.vue +0 -0
- package/template-vue-mobile/src/views/my.vue +0 -0
- package/template-vue-mobile/src/views/sub.vue +0 -0
- package/template-vue-mobile/src/vite-env.d.ts +0 -0
- package/template-vue-mobile/tsconfig.json +0 -0
- package/template-vue-mobile/tsconfig.node.json +0 -0
- package/template-vue-mobile/unocss.config.ts +0 -0
- package/template-vue-mobile/vite.config.ts +0 -0
- package/template-vue-mobile/yarn.lock +0 -0
- package/template-vue-thin/.vscode/extensions.json +0 -0
- package/template-vue-thin/.vscode/settings.json +0 -0
- package/template-vue-thin/README.md +0 -0
- package/template-vue-thin/_env +0 -0
- package/template-vue-thin/_gitignore +0 -0
- package/template-vue-thin/index.html +0 -0
- package/template-vue-thin/package.json +0 -0
- package/template-vue-thin/public/vite.svg +0 -0
- package/template-vue-thin/src/App.vue +0 -0
- package/template-vue-thin/src/layouts/blank.vue +0 -0
- package/template-vue-thin/src/layouts/default.vue +0 -0
- package/template-vue-thin/src/layouts/list.vue +0 -0
- package/template-vue-thin/src/main.ts +0 -0
- package/template-vue-thin/src/views/[...all_404].vue +0 -0
- package/template-vue-thin/src/views/index.vue +0 -0
- package/template-vue-thin/src/views/list.vue +0 -0
- package/template-vue-thin/src/vite-env.d.ts +0 -0
- package/template-vue-thin/tsconfig.json +0 -0
- package/template-vue-thin/tsconfig.node.json +0 -0
- package/template-vue-thin/unocss.config.ts +0 -0
- package/template-vue-thin/vite.config.ts +0 -0
- package/template-nuxt-admin/rome.json +0 -26
- package/template-uni-app/rome.json +0 -26
@@ -5,14 +5,14 @@
|
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
export const useUserStore = defineStore('useUserStore', () => {
|
8
|
-
const cookie = useLocalStorage<UserLoginRes>('token', {} as UserLoginRes)
|
8
|
+
const cookie = useLocalStorage<UserLoginRes>('token', {} as UserLoginRes)
|
9
9
|
|
10
|
-
const hasLogin = computed(() => !!cookie.value?.uuid)
|
11
|
-
const avatar = computed(() => cookie.value?.headimgurl)
|
12
|
-
const nick = computed(() => cookie.value?.nickname)
|
13
|
-
const token = computed(() => cookie.value?.token)
|
10
|
+
const hasLogin = computed(() => !!cookie.value?.uuid)
|
11
|
+
const avatar = computed(() => cookie.value?.headimgurl)
|
12
|
+
const nick = computed(() => cookie.value?.nickname)
|
13
|
+
const token = computed(() => cookie.value?.token)
|
14
14
|
|
15
|
-
const SaveFlag = useLocalStorage('n天免登', true)
|
15
|
+
const SaveFlag = useLocalStorage('n天免登', true)
|
16
16
|
|
17
17
|
return {
|
18
18
|
cookie,
|
@@ -21,9 +21,8 @@ export const useUserStore = defineStore('useUserStore', () => {
|
|
21
21
|
nick,
|
22
22
|
token,
|
23
23
|
SaveFlag,
|
24
|
-
}
|
25
|
-
})
|
24
|
+
}
|
25
|
+
})
|
26
26
|
|
27
|
-
if (import.meta.hot)
|
28
|
-
import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot))
|
29
|
-
}
|
27
|
+
if (import.meta.hot)
|
28
|
+
import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot))
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,53 +1,61 @@
|
|
1
1
|
<!--
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-06-12 15:00:07
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-09-06 16:05:20
|
5
5
|
* @Description:
|
6
6
|
-->
|
7
7
|
<script lang="ts" setup>
|
8
|
-
import type { NuxtError } from '#app'
|
8
|
+
import type { NuxtError } from '#app'
|
9
9
|
|
10
10
|
const props = defineProps<{
|
11
|
-
error: NuxtError
|
12
|
-
}>()
|
11
|
+
error: NuxtError
|
12
|
+
}>()
|
13
13
|
|
14
|
-
let timer: NodeJS.
|
14
|
+
let timer: NodeJS.Timeout
|
15
15
|
|
16
|
-
const i = ref(5)
|
16
|
+
const i = ref(5)
|
17
17
|
|
18
|
-
|
19
|
-
clearError()
|
20
|
-
clearInterval(timer)
|
21
|
-
location.replace('/')
|
22
|
-
}
|
18
|
+
function clear() {
|
19
|
+
clearError()
|
20
|
+
clearInterval(timer)
|
21
|
+
location.replace('/')
|
22
|
+
}
|
23
23
|
|
24
24
|
const NotShowError = computed(() => {
|
25
|
-
return props.error.message === 'Request failed with status code 401'
|
26
|
-
})
|
25
|
+
return props.error.message === 'Request failed with status code 401'
|
26
|
+
})
|
27
27
|
|
28
28
|
onMounted(() => {
|
29
|
-
if (process.server)
|
30
|
-
return
|
31
|
-
|
32
|
-
console.log(props.error, props.error.statusCode)
|
29
|
+
if (process.server)
|
30
|
+
return
|
31
|
+
|
32
|
+
console.log(props.error, props.error.statusCode)
|
33
33
|
if (process.dev) {
|
34
|
-
console.log('开发模式,不自动清理')
|
35
|
-
return
|
34
|
+
console.log('开发模式,不自动清理')
|
35
|
+
return
|
36
36
|
}
|
37
37
|
timer = setInterval(() => {
|
38
|
-
i.value
|
39
|
-
if (i.value === 0)
|
40
|
-
clear()
|
41
|
-
|
42
|
-
|
43
|
-
});
|
38
|
+
i.value--
|
39
|
+
if (i.value === 0)
|
40
|
+
clear()
|
41
|
+
}, 1e3)
|
42
|
+
})
|
44
43
|
</script>
|
44
|
+
|
45
45
|
<template>
|
46
46
|
<div v-if="!NotShowError" class="flex w-full h-full flex-col justify-center items-center">
|
47
|
-
<div class="text-5xl my-6">
|
48
|
-
|
47
|
+
<div class="text-5xl my-6">
|
48
|
+
{{ error.statusCode }}
|
49
|
+
</div>
|
50
|
+
<div class="text-lg my-2">
|
51
|
+
{{ error.message || error.statusMessage || '出错啦~' }}
|
52
|
+
</div>
|
49
53
|
|
50
|
-
<div class="mb-2">
|
51
|
-
|
54
|
+
<div class="mb-2">
|
55
|
+
{{ i }}s 后自动跳转首页
|
56
|
+
</div>
|
57
|
+
<ElButton @click="clear">
|
58
|
+
立即返回首页
|
59
|
+
</ElButton>
|
52
60
|
</div>
|
53
61
|
</template>
|
File without changes
|
@@ -5,42 +5,43 @@
|
|
5
5
|
* @Description:
|
6
6
|
-->
|
7
7
|
<script lang="ts" setup>
|
8
|
-
const { isCollapse } = storeToRefs(useNavStore())
|
9
|
-
const { enter, isSupported } = useFullscreen()
|
8
|
+
const { isCollapse } = storeToRefs(useNavStore())
|
9
|
+
const { enter, isSupported } = useFullscreen()
|
10
10
|
|
11
|
-
const fullTip = useLocalStorage('全屏提示', false)
|
11
|
+
const fullTip = useLocalStorage('全屏提示', false)
|
12
12
|
|
13
13
|
onMounted(() => {
|
14
|
-
const { innerWidth, innerHeight } = window
|
14
|
+
const { innerWidth, innerHeight } = window
|
15
15
|
if (innerHeight > innerWidth) {
|
16
|
-
isCollapse.value = true
|
16
|
+
isCollapse.value = true
|
17
17
|
|
18
|
-
if (fullTip.value)
|
19
|
-
return
|
20
|
-
}
|
18
|
+
if (fullTip.value)
|
19
|
+
return
|
21
20
|
|
22
21
|
if (!isSupported.value) {
|
23
22
|
showDialog({
|
24
23
|
title: '推荐使用场景',
|
25
24
|
message: '系统浏览器 + 横屏使用',
|
26
|
-
}).finally(() => fullTip.value = true)
|
27
|
-
}
|
25
|
+
}).finally(() => fullTip.value = true)
|
26
|
+
}
|
27
|
+
else {
|
28
28
|
showDialog({
|
29
29
|
title: '推荐使用场景',
|
30
30
|
message: '系统浏览器 + 全屏模式 + 横屏使用',
|
31
|
-
confirmButtonText: '进入全屏'
|
31
|
+
confirmButtonText: '进入全屏',
|
32
32
|
}).then(async () => {
|
33
33
|
try {
|
34
|
-
await enter()
|
35
|
-
}
|
34
|
+
await enter()
|
35
|
+
}
|
36
|
+
catch (e) {
|
36
37
|
showDialog({
|
37
|
-
message: '您的设备暂不支持全屏功能,请解锁系统方向锁定后横屏使用!'
|
38
|
-
})
|
38
|
+
message: '您的设备暂不支持全屏功能,请解锁系统方向锁定后横屏使用!',
|
39
|
+
})
|
39
40
|
}
|
40
|
-
}).catch(() => null).finally(() => fullTip.value = true)
|
41
|
+
}).catch(() => null).finally(() => fullTip.value = true)
|
41
42
|
}
|
42
43
|
}
|
43
|
-
})
|
44
|
+
})
|
44
45
|
</script>
|
45
46
|
|
46
47
|
<template>
|
@@ -1,39 +1,50 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-21 10:02:19
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-08-02 14:57:03
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
export default defineNuxtRouteMiddleware(async (to, from) => {
|
8
|
-
if (to.matched.length === 0)
|
9
|
-
throw createError({ message: '页面不存在', statusCode: 404 })
|
8
|
+
if (to.matched.length === 0)
|
9
|
+
throw createError({ message: '页面不存在', statusCode: 404 })
|
10
|
+
|
11
|
+
const { hasLogin } = storeToRefs(useUserStore())
|
12
|
+
const { nav_arr, flat_nav_arr } = storeToRefs(useNavStore())
|
13
|
+
|
14
|
+
const changeTitle = () => {
|
15
|
+
const nav = flat_nav_arr.value.find(item => item.component === to.path)
|
16
|
+
if (nav && nav.title)
|
17
|
+
to.meta.title = nav.title
|
18
|
+
|
19
|
+
document.title = (to.meta.title as string) || window.__YOUNG_ENV__.NUXT_PUBLIC_TITLE
|
10
20
|
}
|
11
21
|
|
12
|
-
const { addView } = useTagsStore()
|
22
|
+
const { addView } = useTagsStore()
|
13
23
|
|
14
24
|
// 页面无需登录
|
15
25
|
if (to.meta.auth === false) {
|
16
|
-
|
17
|
-
|
26
|
+
changeTitle()
|
27
|
+
addView(to)
|
28
|
+
return
|
18
29
|
}
|
19
30
|
|
20
|
-
const { hasLogin } = storeToRefs(useUserStore());
|
21
|
-
const { nav_arr } = storeToRefs(useNavStore());
|
22
|
-
|
23
31
|
if (!hasLogin.value && to.path !== '/login') {
|
24
32
|
// 页面需要登录,但是未登录
|
25
|
-
showFailToast('未登录或登录过期,请重新登录')
|
26
|
-
return navigateTo(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
27
|
-
}
|
33
|
+
showFailToast('未登录或登录过期,请重新登录')
|
34
|
+
return navigateTo(`/login?redirect=${encodeURIComponent(to.fullPath)}`)
|
35
|
+
}
|
36
|
+
else if (hasLogin.value && to.path === '/login') {
|
28
37
|
// 已登录进入登录页
|
29
|
-
return navigateTo('/')
|
30
|
-
}
|
31
|
-
|
38
|
+
return navigateTo('/')
|
39
|
+
}
|
40
|
+
else {
|
41
|
+
nav_arr.value.length === 0 && (await generateNavData())
|
32
42
|
if (hasPermission(to.path)) {
|
33
|
-
|
34
|
-
|
35
|
-
}
|
36
|
-
|
43
|
+
changeTitle()
|
44
|
+
addView(to)
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
throw createError({ message: '无权限,请联系系统管理员', statusCode: 403 })
|
37
48
|
}
|
38
49
|
}
|
39
|
-
})
|
50
|
+
})
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-05-25 19:45:20
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-09-06 16:13:06
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
|
-
import { resolve } from 'node:path'
|
7
|
+
import { resolve } from 'node:path'
|
8
8
|
|
9
9
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
10
10
|
export default defineNuxtConfig({
|
@@ -56,7 +56,7 @@ export default defineNuxtConfig({
|
|
56
56
|
// native: true,
|
57
57
|
// js 实现,仅指令生效 v-lazy-load
|
58
58
|
// directiveOnly: true,
|
59
|
-
// @ts-
|
59
|
+
// @ts-expect-error js 实现的占位图
|
60
60
|
defaultImage: '/image_placeholder.svg',
|
61
61
|
},
|
62
62
|
|
@@ -66,9 +66,10 @@ export default defineNuxtConfig({
|
|
66
66
|
},
|
67
67
|
},
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
// 开发调试工具,按需启用
|
70
|
+
// devtools: {
|
71
|
+
// enabled: true,
|
72
|
+
// },
|
72
73
|
|
73
74
|
modules: [
|
74
75
|
'@vueuse/nuxt',
|
@@ -98,4 +99,4 @@ export default defineNuxtConfig({
|
|
98
99
|
},
|
99
100
|
},
|
100
101
|
},
|
101
|
-
})
|
102
|
+
})
|
@@ -1,44 +1,64 @@
|
|
1
1
|
{
|
2
2
|
"name": "nuxt-app",
|
3
|
+
"version": "0.0.0",
|
3
4
|
"private": true,
|
4
5
|
"scripts": {
|
5
6
|
"build": "nuxt build",
|
6
|
-
"dev": "nuxt dev",
|
7
|
+
"dev": "nuxt dev --host",
|
7
8
|
"generate": "nuxt generate",
|
8
|
-
"preview": "nuxt preview",
|
9
|
-
"postinstall": "nuxt prepare"
|
9
|
+
"preview": "nuxt preview --host",
|
10
|
+
"postinstall": "nuxt prepare",
|
11
|
+
"lint": "eslint .",
|
12
|
+
"lint:fix": "eslint . --fix"
|
13
|
+
},
|
14
|
+
"dependencies": {
|
15
|
+
"@bluesyoung/casdoor-auth": "^0.1.0",
|
16
|
+
"@bluesyoung/http": "^0.3.4",
|
17
|
+
"@bluesyoung/ui-vue3": "^0.1.1",
|
18
|
+
"@bluesyoung/ui-vue3-element-plus": "0.11.6",
|
19
|
+
"@bluesyoung/utils": "0.2.1",
|
20
|
+
"@wangeditor/editor": "^5.1.23",
|
21
|
+
"@wangeditor/editor-for-vue": "^5.1.12",
|
22
|
+
"c12": "^1.4.2",
|
23
|
+
"file-saver": "^2.0.5",
|
24
|
+
"http-proxy": "^1.18.1",
|
25
|
+
"jszip": "^3.10.1",
|
26
|
+
"md5": "^2.3.0",
|
27
|
+
"qrcode": "^1.5.3",
|
28
|
+
"sortablejs": "^1.15.0",
|
29
|
+
"vue-cropper": "^1.0.9"
|
10
30
|
},
|
11
31
|
"devDependencies": {
|
32
|
+
"@antfu/eslint-config": "^0.41.0",
|
12
33
|
"@bluesyoung/logger": "^0.0.1",
|
13
34
|
"@element-plus/nuxt": "^1.0.5",
|
14
35
|
"@iconify/json": "^2.2.93",
|
15
|
-
"@nuxt/devtools": "^0.
|
36
|
+
"@nuxt/devtools": "^0.8.2",
|
16
37
|
"@pinia/nuxt": "^0.4.11",
|
17
38
|
"@types/file-saver": "^2.0.5",
|
18
|
-
"@types/
|
39
|
+
"@types/md5": "^2.3.2",
|
40
|
+
"@types/node": "20.5.9",
|
19
41
|
"@types/qrcode": "^1.5.1",
|
20
|
-
"@unocss/nuxt": "^0.
|
42
|
+
"@unocss/nuxt": "^0.55.6",
|
21
43
|
"@vant/nuxt": "^1.0.2",
|
22
44
|
"@vueuse/nuxt": "^10.2.1",
|
45
|
+
"add": "^2.0.6",
|
23
46
|
"dayjs": "^1.11.9",
|
24
47
|
"element-plus": "^2.3.8",
|
25
|
-
"
|
48
|
+
"eslint": "^8.48.0",
|
49
|
+
"lint-staged": "^14.0.1",
|
50
|
+
"nuxt": "^3.7.1",
|
26
51
|
"nuxt-lazy-load": "^3.0.4",
|
27
52
|
"pinia": "^2.1.4",
|
28
53
|
"sass": "^1.64.0",
|
54
|
+
"simple-git-hooks": "^2.9.0",
|
55
|
+
"typescript": "^5.2.2",
|
29
56
|
"vant": "^4.6.2"
|
30
57
|
},
|
31
|
-
"
|
32
|
-
"
|
33
|
-
|
34
|
-
|
35
|
-
"
|
36
|
-
"c12": "^1.4.2",
|
37
|
-
"file-saver": "^2.0.5",
|
38
|
-
"http-proxy": "^1.18.1",
|
39
|
-
"jszip": "^3.10.1",
|
40
|
-
"qrcode": "^1.5.3",
|
41
|
-
"sortablejs": "^1.15.0",
|
42
|
-
"vue-cropper": "^0.6.2"
|
58
|
+
"simple-git-hooks": {
|
59
|
+
"pre-commit": "npx lint-staged"
|
60
|
+
},
|
61
|
+
"lint-staged": {
|
62
|
+
"*": "eslint --fix"
|
43
63
|
}
|
44
64
|
}
|
@@ -8,15 +8,15 @@
|
|
8
8
|
definePageMeta({
|
9
9
|
title: '工作台',
|
10
10
|
auth: false,
|
11
|
-
noCache: true
|
12
|
-
})
|
11
|
+
noCache: true,
|
12
|
+
})
|
13
13
|
|
14
|
-
const { nick } = storeToRefs(useUserStore())
|
15
|
-
const { nav_arr } = storeToRefs(useNavStore())
|
14
|
+
const { nick } = storeToRefs(useUserStore())
|
15
|
+
const { nav_arr } = storeToRefs(useNavStore())
|
16
16
|
|
17
17
|
onMounted(() => {
|
18
|
-
nav_arr.value.length === 0 && generateNavData()
|
19
|
-
})
|
18
|
+
nav_arr.value.length === 0 && generateNavData()
|
19
|
+
})
|
20
20
|
</script>
|
21
21
|
|
22
22
|
<template>
|
@@ -1,19 +1,19 @@
|
|
1
1
|
<!--
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-21 10:03:11
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-08-02 10:39:05
|
5
5
|
* @Description:
|
6
6
|
-->
|
7
7
|
<script lang="ts" setup>
|
8
|
-
import { isMobile } from '@bluesyoung/utils'
|
9
|
-
import type { FormInstance } from 'element-plus'
|
8
|
+
import { isMobile } from '@bluesyoung/utils'
|
9
|
+
import type { FormInstance } from 'element-plus'
|
10
10
|
|
11
11
|
definePageMeta({
|
12
12
|
auth: false,
|
13
13
|
title: '用户登录',
|
14
14
|
noCache: true,
|
15
|
-
layout: 'blank'
|
16
|
-
})
|
15
|
+
layout: 'blank',
|
16
|
+
})
|
17
17
|
|
18
18
|
const {
|
19
19
|
NUXT_PUBLIC_LOGIN_LOGO: LoginLogo,
|
@@ -21,100 +21,117 @@ const {
|
|
21
21
|
NUXT_PUBLIC_TITLE: Title,
|
22
22
|
NUXT_PUBLIC_SUB_TITLE: SubTitle,
|
23
23
|
NUXT_PUBLIC_SLOGAN: SloGan,
|
24
|
-
NUXT_PUBLIC_CURRENT_VERSION: Version
|
25
|
-
} = window.__YOUNG_ENV__
|
24
|
+
NUXT_PUBLIC_CURRENT_VERSION: Version,
|
25
|
+
} = window.__YOUNG_ENV__
|
26
26
|
|
27
|
-
const { SaveFlag, hasLogin, cookie } = storeToRefs(useUserStore())
|
27
|
+
const { SaveFlag, hasLogin, cookie } = storeToRefs(useUserStore())
|
28
28
|
|
29
|
-
const loginType = ref<'account' | 'code'>('account')
|
29
|
+
const loginType = ref<'account' | 'code'>('account')
|
30
30
|
|
31
31
|
const form = reactive<LoginForm>({
|
32
32
|
mobile: '',
|
33
33
|
vercode: '',
|
34
34
|
password: '',
|
35
|
-
})
|
35
|
+
})
|
36
36
|
|
37
|
-
const formRef = ref<FormInstance>()
|
37
|
+
const formRef = ref<FormInstance>()
|
38
38
|
|
39
|
-
|
39
|
+
function loginHandler() {
|
40
40
|
formRef.value?.validate(async (valid: boolean) => {
|
41
41
|
try {
|
42
42
|
if (valid) {
|
43
|
-
const { enter } = useFullscreen()
|
44
|
-
const { width, height } = useWindowSize()
|
43
|
+
const { enter } = useFullscreen()
|
44
|
+
const { width, height } = useWindowSize()
|
45
45
|
|
46
|
-
const data = await apis.post.login(form)
|
46
|
+
const data = await apis.post.login(form)
|
47
47
|
if (data) {
|
48
|
-
cookie.value = data
|
49
|
-
height.value > width.value && enter()
|
50
|
-
showSuccessToast('登录成功!')
|
51
|
-
navigateTo('/')
|
48
|
+
cookie.value = data
|
49
|
+
height.value > width.value && enter()
|
50
|
+
showSuccessToast('登录成功!')
|
51
|
+
navigateTo('/')
|
52
52
|
}
|
53
|
-
} else {
|
54
|
-
ElMessage.error('请仔细检查输入内容');
|
55
|
-
return;
|
56
53
|
}
|
57
|
-
|
58
|
-
|
54
|
+
else {
|
55
|
+
ElMessage.error('请仔细检查输入内容')
|
56
|
+
}
|
57
|
+
}
|
58
|
+
catch (error) {
|
59
|
+
console.error(error)
|
59
60
|
}
|
60
|
-
})
|
61
|
-
}
|
61
|
+
})
|
62
|
+
}
|
62
63
|
|
63
64
|
onMounted(() => {
|
64
65
|
if (SaveFlag.value && hasLogin.value) {
|
65
66
|
navigateTo({
|
66
67
|
path: '/',
|
67
|
-
replace: true
|
68
|
-
})
|
68
|
+
replace: true,
|
69
|
+
})
|
69
70
|
}
|
70
|
-
})
|
71
|
+
})
|
71
72
|
</script>
|
72
73
|
|
73
74
|
<template>
|
74
|
-
<img :src="LoginBg" class="absolute object-center object-cover w-100vw h-100vh blur-6 brightness-50"
|
75
|
+
<img :src="LoginBg" class="absolute object-center object-cover w-100vw h-100vh blur-6 brightness-50">
|
75
76
|
<div class="flex flex-col items-center login-container pt-6%">
|
76
77
|
<div class="w-80px h-80px">
|
77
|
-
<img class="h-full" :src="LoginLogo" referrerpolicy="no-referrer"
|
78
|
+
<img class="h-full" :src="LoginLogo" referrerpolicy="no-referrer">
|
78
79
|
</div>
|
79
|
-
<div class="title">
|
80
|
-
|
80
|
+
<div class="title">
|
81
|
+
{{ Title }}
|
82
|
+
</div>
|
83
|
+
<div v-if="SubTitle" class="sub-title" v-html="SubTitle" />
|
81
84
|
|
82
85
|
<ElCard class="w-430px mt-3%" lt-sm="w-[96%] mx-[2%]">
|
83
86
|
<ElForm ref="formRef" :model="form">
|
84
87
|
<VanTabs v-model:active="loginType" size="large" @change="formRef?.resetFields?.()">
|
85
88
|
<VanTab name="account" title="账密登录">
|
86
|
-
<ElFormItem
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
89
|
+
<ElFormItem
|
90
|
+
prop="mobile" :rules="[
|
91
|
+
{ required: true, trigger: 'blur', message: '请输入手机号' },
|
92
|
+
{ message: '请输入合法的手机号', trigger: 'blur', validator: (_: any, v: string) => isMobile(v) },
|
93
|
+
]" class="mt-20px"
|
94
|
+
>
|
95
|
+
<ElInput v-model.trim="form.mobile" placeholder="请输入手机号" maxlength="11" class="!h-52px" clearable />
|
91
96
|
</ElFormItem>
|
92
|
-
<ElFormItem
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
97
|
+
<ElFormItem
|
98
|
+
v-if="loginType === 'account'" prop="password" :rules="[
|
99
|
+
{ required: true, trigger: 'blur', message: '请输入密码' },
|
100
|
+
{ min: 8, max: 16, trigger: 'blur', message: '请输入8-16位字符!' },
|
101
|
+
]"
|
102
|
+
>
|
103
|
+
<ElInput
|
104
|
+
v-model.trim="form.password" type="password" minlength="8" maxlength="16" placeholder="请输入密码"
|
105
|
+
class="!h-52px" clearable show-password @keyup.enter="loginHandler"
|
106
|
+
/>
|
98
107
|
</ElFormItem>
|
99
108
|
</VanTab>
|
100
109
|
<VanTab name="code" title="短信登录">
|
101
|
-
<ElFormItem
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
110
|
+
<ElFormItem
|
111
|
+
prop="mobile" :rules="[
|
112
|
+
{ required: true, trigger: 'blur', message: '请输入手机号' },
|
113
|
+
{ message: '请输入合法的手机号', trigger: 'blur', validator: (_: any, v: string) => isMobile(v) },
|
114
|
+
]" class="mt-20px"
|
115
|
+
>
|
116
|
+
<ElInput v-model.trim="form.mobile" placeholder="请输入手机号" maxlength="11" class="!h-52px" clearable />
|
106
117
|
</ElFormItem>
|
107
|
-
<ElFormItem
|
108
|
-
|
109
|
-
|
118
|
+
<ElFormItem
|
119
|
+
v-if="loginType === 'code'" prop="vercode"
|
120
|
+
:rules="[{ required: true, trigger: 'blur', message: '请输入验证码' }]"
|
121
|
+
>
|
122
|
+
<YoungCodeInput v-model.trim="form.vercode" :tel="form.mobile" @enter="loginHandler" />
|
110
123
|
</ElFormItem>
|
111
124
|
</VanTab>
|
112
125
|
</VanTabs>
|
113
126
|
|
114
127
|
<ElFormItem>
|
115
128
|
<div class="flex justify-between w-full">
|
116
|
-
<ElCheckbox v-model="SaveFlag"
|
117
|
-
|
129
|
+
<ElCheckbox v-model="SaveFlag">
|
130
|
+
三天之内免登录
|
131
|
+
</ElCheckbox>
|
132
|
+
<ElButton v-show="loginType === 'account'" type="warning" link @click="useChangePassword">
|
133
|
+
忘记密码?
|
134
|
+
</ElButton>
|
118
135
|
</div>
|
119
136
|
</ElFormItem>
|
120
137
|
</ElForm>
|
@@ -128,7 +145,9 @@ onMounted(() => {
|
|
128
145
|
{{ SloGan }}
|
129
146
|
</div>
|
130
147
|
<div class="content-wrapper">
|
131
|
-
<div class="mb-5% text-[#c0c0c0] text-16px">
|
148
|
+
<div class="mb-5% text-[#c0c0c0] text-16px">
|
149
|
+
{{ Version }}
|
150
|
+
</div>
|
132
151
|
</div>
|
133
152
|
</div>
|
134
153
|
</template>
|
@@ -176,4 +195,3 @@ onMounted(() => {
|
|
176
195
|
}
|
177
196
|
}
|
178
197
|
</style>
|
179
|
-
|