diff --git a/src/api/auth.ts b/src/api/auth.ts index 5feea60..7f6fc97 100644 --- a/src/api/auth.ts +++ b/src/api/auth.ts @@ -12,3 +12,24 @@ export function dictDataCache() { url: '/system-boot/dictType/dictDataCache' }) } +export const queryAppInfo = (type) => { + let form = new FormData() + form.append('type', type) + return createAxios({ + url: '/cs-system-boot/appinfo/queryAppInfoByType', + method: 'post', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + data: form, + }) + } + export const queryAppInfoByType = (type) => { + let form = new FormData() + form.append('type', type) + return createAxios({ + url: '/cs-system-boot/appinfo/queryAppInfoByType', + method: 'post', + data: form, + }) +} \ No newline at end of file diff --git a/src/router/static.ts b/src/router/static.ts index d433dfc..83d4703 100644 --- a/src/router/static.ts +++ b/src/router/static.ts @@ -36,7 +36,7 @@ const staticRoutes: Array = [ adminBaseRoute, { path: '/', - redirect: (to) => { + redirect: to => { return { name: 'adminMainLoading' } @@ -56,7 +56,14 @@ const staticRoutes: Array = [ redirect: '/404' }, { - // 404 + path: '/:path(.*)*', + redirect: '/policy' + }, + { + path: '/:path(.*)*', + redirect: '/agreement' + }, + { path: '/404', name: 'notFound', component: () => import('@/views/common/error/404.vue'), @@ -64,10 +71,28 @@ const staticRoutes: Array = [ title: pageTitle('notFound') // 页面不存在 } }, + { + // 隐私政策 + path: '/policy', + name: 'policy', + component: () => import('@/views/common/policy/index.vue'), + meta: { + title: pageTitle('policy') // 页面不存在 + } + }, + { + // 用户协议 + path: '/agreement', + name: 'agreement', + component: () => import('@/views/common/agreement/index.vue'), + meta: { + title: pageTitle('agreement') // 页面不存在 + } + }, { // 后台找不到页面了-可能是路由未加载上 path: adminBaseRoutePath + ':path(.*)*', - redirect: (to) => { + redirect: to => { return { name: 'adminMainLoading', params: { diff --git a/src/views/common/agreement/index.vue b/src/views/common/agreement/index.vue new file mode 100644 index 0000000..4c987ba --- /dev/null +++ b/src/views/common/agreement/index.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/views/common/policy/index.vue b/src/views/common/policy/index.vue new file mode 100644 index 0000000..b5f2ad2 --- /dev/null +++ b/src/views/common/policy/index.vue @@ -0,0 +1,49 @@ + + +