diff --git a/.env b/.env index 68175fb..818cb46 100644 --- a/.env +++ b/.env @@ -1,2 +1,4 @@ VUE_APP_PORT='8800' -VUE_APP_TARGET_API='http://47.109.22.178:8401' \ No newline at end of file +VUE_APP_TARGET_API='http://47.109.22.178:8401' +VUE_APP_IMAGES_TARGET='http://www.octoveau.cn/images' + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a267390..1b600f5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: deploy sso-admin-portal 🚀 on: push: branches: - - main + - release jobs: build-sso-admin-portal-deploy: runs-on: ubuntu-latest diff --git a/.prettierrc b/.prettierrc index 1cddcb0..ff164cb 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,6 +7,5 @@ "trailingComma": "es5", "htmlWhitespaceSensitivity": "ignore", "endOfLine": "auto", - "proseWrap": "never" - + "proseWrap": "never", } diff --git a/bin/default.conf b/bin/default.conf index b50a393..bba0fa7 100644 --- a/bin/default.conf +++ b/bin/default.conf @@ -5,6 +5,9 @@ server { error_log /var/log/nginx/error.log error; root /usr/share/nginx/html; index index.html; + location /sso-login/openapi/ { + proxy_pass http://47.109.22.178:8401/openapi/; + } location /sso-login/api/ { proxy_pass http://47.109.22.178:8401/api/; } diff --git a/public/favicon.ico b/public/favicon.ico index 952c106..8d6b6b7 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 1812419..5ef74ca 100644 --- a/public/index.html +++ b/public/index.html @@ -12,7 +12,7 @@ We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.
- --> diff --git a/src/App.vue b/src/App.vue index bee0dd2..de5af89 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,7 +15,7 @@ export default { diff --git a/src/api/auth.js b/src/api/auth.js index 17c03fa..a38b820 100644 --- a/src/api/auth.js +++ b/src/api/auth.js @@ -19,3 +19,12 @@ export const smsCode = (phone) => phone, }, }); + +//根据siteKey登录之后获取ticket +export const getAuthTicket = (data) => + service.post('/api/auth/ticket', data, { + isNotShowError: true, + }); + +//退出登录 +export const logoutSso = (token) => service.post(`/openapi/auth/sites/${token}/logout`); diff --git a/src/api/interceptors.js b/src/api/interceptors.js index fea066c..ebd44f5 100644 --- a/src/api/interceptors.js +++ b/src/api/interceptors.js @@ -17,9 +17,9 @@ const handleRespCode = (respData) => { case 500: Message.error(respData.message || ERROR_MSG_500); break; - default: - Message.error(respData.message || ERROR_MSG_COMMON); - break; + // default: + // Message.error(respData.message || ERROR_MSG_COMMON); + // break; } }; const setupInterceptors = (request) => { @@ -49,7 +49,7 @@ const setupInterceptors = (request) => { // 响应拦截器 request.interceptors.response.use( (resp) => { - //从xios里取出api返回的data + //从axios里取出api返回的data let respData = resp.data; if (respData.code !== 200) { handleRespCode(respData); @@ -59,7 +59,7 @@ const setupInterceptors = (request) => { //httpcode不在200-300时候会到异常拦截器,请求异常 (error) => { let message = error?.message || error?.message || ERROE_MSG; - Message.error(message); + error.config.isNotShowError ? void 0 : Message.error(message); return Promise.reject(error); } ); diff --git a/src/assets/images/avator.png b/src/assets/images/avator.png deleted file mode 100644 index 12e1ea3..0000000 Binary files a/src/assets/images/avator.png and /dev/null differ diff --git a/src/assets/images/footer.png b/src/assets/images/footer.png deleted file mode 100644 index 0c8bc7b..0000000 Binary files a/src/assets/images/footer.png and /dev/null differ diff --git a/src/assets/images/loginicon.png b/src/assets/images/loginicon.png deleted file mode 100644 index 4561dc6..0000000 Binary files a/src/assets/images/loginicon.png and /dev/null differ diff --git a/src/assets/images/loginicon3.png b/src/assets/images/loginicon3.png deleted file mode 100644 index 2512662..0000000 Binary files a/src/assets/images/loginicon3.png and /dev/null differ diff --git a/src/assets/images/loginicon4.png b/src/assets/images/loginicon4.png deleted file mode 100644 index 5b6b836..0000000 Binary files a/src/assets/images/loginicon4.png and /dev/null differ diff --git a/src/assets/images/slider/1.png b/src/assets/images/slider/1.png deleted file mode 100644 index ec1a727..0000000 Binary files a/src/assets/images/slider/1.png and /dev/null differ diff --git a/src/assets/images/slider/2.png b/src/assets/images/slider/2.png deleted file mode 100644 index 06f1ef2..0000000 Binary files a/src/assets/images/slider/2.png and /dev/null differ diff --git a/src/assets/images/slider/3.png b/src/assets/images/slider/3.png deleted file mode 100644 index 3f3e294..0000000 Binary files a/src/assets/images/slider/3.png and /dev/null differ diff --git a/src/assets/images/slider/4.png b/src/assets/images/slider/4.png deleted file mode 100644 index 7bb4c41..0000000 Binary files a/src/assets/images/slider/4.png and /dev/null differ diff --git a/src/assets/images/slider/5.png b/src/assets/images/slider/5.png deleted file mode 100644 index ec4544f..0000000 Binary files a/src/assets/images/slider/5.png and /dev/null differ diff --git a/src/assets/images/slider/6.png b/src/assets/images/slider/6.png deleted file mode 100644 index 3e5616c..0000000 Binary files a/src/assets/images/slider/6.png and /dev/null differ diff --git a/src/assets/images/ssoback.png b/src/assets/images/ssoback.png deleted file mode 100644 index a98e0bc..0000000 Binary files a/src/assets/images/ssoback.png and /dev/null differ diff --git a/src/components/Auth/AuthBack.vue b/src/components/Auth/AuthBack.vue index 2701f74..60db8e6 100644 --- a/src/components/Auth/AuthBack.vue +++ b/src/components/Auth/AuthBack.vue @@ -9,7 +9,6 @@ -
@@ -20,12 +19,11 @@ + + diff --git a/src/components/Loading/RingLoader.vue b/src/components/Loading/RingLoader.vue new file mode 100644 index 0000000..e3a5567 --- /dev/null +++ b/src/components/Loading/RingLoader.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/components/SlideVerify/index.vue b/src/components/SlideVerify/index.vue index 6f1bf47..8e53680 100644 --- a/src/components/SlideVerify/index.vue +++ b/src/components/SlideVerify/index.vue @@ -30,12 +30,12 @@ export default { return { dialogVisible: true, imgsList: [ - require('../../assets/images/slider/1.png'), - require('../../assets/images/slider/2.png'), - require('../../assets/images/slider/3.png'), - require('../../assets/images/slider/4.png'), - require('../../assets/images/slider/5.png'), - require('../../assets/images/slider/6.png'), + `${process.env.VUE_APP_IMAGES_TARGET}/slider1.png`, + `${process.env.VUE_APP_IMAGES_TARGET}/slider2.png`, + `${process.env.VUE_APP_IMAGES_TARGET}/slider3.png`, + `${process.env.VUE_APP_IMAGES_TARGET}/slider4.png`, + `${process.env.VUE_APP_IMAGES_TARGET}/slider5.png`, + `${process.env.VUE_APP_IMAGES_TARGET}/slider6.png`, ], }; }, diff --git a/src/css/element.less b/src/css/element.less index e181fc8..68c2961 100644 --- a/src/css/element.less +++ b/src/css/element.less @@ -20,7 +20,13 @@ .el-menu { height: 100%; + + .el-menu-item { + min-width: auto !important; + width: 100% !important; + } } + .el-main { padding: 0 !important; } diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index de86ca6..7e085e3 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -44,7 +44,7 @@ export default { handleLogout() { this.$router.push({ - name: 'Logout', + name: 'ClientLogout', }); }, }, diff --git a/src/router/auth.js b/src/router/auth.js index 632c76d..843e8c1 100644 --- a/src/router/auth.js +++ b/src/router/auth.js @@ -24,12 +24,12 @@ const loginRoutes = [ component: () => import('@/views/auth/passwordReset'), }, { - path: '/logout', - name: 'Logout', + path: '/clinet/logout', + name: 'ClientLogout', meta: { - title: '退出登录', + title: '客户端退出登录', }, - component: () => import('@/views/auth/logout'), + component: () => import('@/views/openLogin/openLogout'), }, ]; diff --git a/src/router/config/router.guards.js b/src/router/config/routerGuards.js similarity index 97% rename from src/router/config/router.guards.js rename to src/router/config/routerGuards.js index 39f452a..d8bbb0c 100644 --- a/src/router/config/router.guards.js +++ b/src/router/config/routerGuards.js @@ -4,7 +4,7 @@ import authStorage from '@/utils/auth'; class RouterGuards { constructor(router) { this.router = router; - this.whiteRouter = ['Login', 'PasswordReset', 'Logout', 'Register']; + this.whiteRouter = ['Login', 'PasswordReset', 'Logout', 'Register', 'OpenLogin', 'OpenLogout']; } // 初始化调用全部方法 diff --git a/src/router/index.js b/src/router/index.js index 90148b7..8546dce 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,16 +1,16 @@ import Vue from 'vue'; import VueRouter from 'vue-router'; -import RouterGuards from './config/router.guards'; +import RouterGuards from './config/routerGuards'; import adminRoutes from './admin'; import authRoutes from './auth'; +import openLoginRoutes from './openLogin'; Vue.use(VueRouter); const router = new VueRouter({ mode: 'history', base: process.env.NODE_ENV === 'production' ? '/sso-login/' : '/', - routes: [...adminRoutes, ...authRoutes], + routes: [...openLoginRoutes, ...adminRoutes, ...authRoutes], }); // 路由守卫 new RouterGuards(router).initRouterGuards(); - export default router; diff --git a/src/router/openLogin.js b/src/router/openLogin.js new file mode 100644 index 0000000..7fe7d21 --- /dev/null +++ b/src/router/openLogin.js @@ -0,0 +1,20 @@ +const openLoginRoutes = [ + { + path: '/openLogin/:sitekey', + name: 'OpenLogin', + meta: { + title: '接入验证', + }, + component: () => import('@/views/openLogin/openLogin.vue'), + }, + { + path: '/openLogout/:sitetoken', + name: 'OpenLogout', + meta: { + title: '退出登录', + }, + component: () => import('@/views/openLogin/openLogout.vue'), + }, +]; + +export default openLoginRoutes; diff --git a/src/views/auth/comp/LoginContainer.vue b/src/views/auth/comp/LoginContainer.vue index 971232e..3ded24a 100644 --- a/src/views/auth/comp/LoginContainer.vue +++ b/src/views/auth/comp/LoginContainer.vue @@ -24,14 +24,13 @@ diff --git a/src/views/auth/passwordReset.vue b/src/views/auth/passwordReset.vue index 9126d80..7d8092e 100644 --- a/src/views/auth/passwordReset.vue +++ b/src/views/auth/passwordReset.vue @@ -12,16 +12,13 @@ diff --git a/src/views/openLogin/openLogin.vue b/src/views/openLogin/openLogin.vue new file mode 100644 index 0000000..8ba20b5 --- /dev/null +++ b/src/views/openLogin/openLogin.vue @@ -0,0 +1,87 @@ + + + + diff --git a/src/views/openLogin/openLogout.vue b/src/views/openLogin/openLogout.vue new file mode 100644 index 0000000..b6c387d --- /dev/null +++ b/src/views/openLogin/openLogout.vue @@ -0,0 +1,87 @@ + + + + diff --git a/src/views/siteKey/createSiteKey.vue b/src/views/siteKey/createSiteKey.vue index 66eb78c..c400507 100644 --- a/src/views/siteKey/createSiteKey.vue +++ b/src/views/siteKey/createSiteKey.vue @@ -1,9 +1,129 @@ - + diff --git a/src/views/siteKey/siteKeyDetail.vue b/src/views/siteKey/siteKeyDetail.vue index b9d37ab..9eef250 100644 --- a/src/views/siteKey/siteKeyDetail.vue +++ b/src/views/siteKey/siteKeyDetail.vue @@ -1,7 +1,7 @@