新增 隐私政策 用户协议 页面
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
@@ -36,7 +36,7 @@ const staticRoutes: Array<RouteRecordRaw> = [
|
||||
adminBaseRoute,
|
||||
{
|
||||
path: '/',
|
||||
redirect: (to) => {
|
||||
redirect: to => {
|
||||
return {
|
||||
name: 'adminMainLoading'
|
||||
}
|
||||
@@ -56,7 +56,14 @@ const staticRoutes: Array<RouteRecordRaw> = [
|
||||
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<RouteRecordRaw> = [
|
||||
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: {
|
||||
|
||||
47
src/views/common/agreement/index.vue
Normal file
47
src/views/common/agreement/index.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="html-wrap" v-html="value"></div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { queryAppInfo, dictDataCache, queryAppInfoByType } from '@/api/auth'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const DataSelect = dictData.getBasicData('appInformationType')
|
||||
const value = ref('')
|
||||
const id = ref('')
|
||||
document.title = '用户协议'
|
||||
dictDataCache().then(res => {
|
||||
id.value = res.data
|
||||
.filter(item => item.code == 'appInformationType')[0]
|
||||
.children.filter(item => item.code == 'User_Agreement')[0].id
|
||||
|
||||
info()
|
||||
})
|
||||
const info = () => {
|
||||
queryAppInfoByType(id.value).then(res => {
|
||||
value.value = res.data.content
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
html,
|
||||
body {
|
||||
width: 100vw;
|
||||
}
|
||||
.html-wrap {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
padding: 10px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
box-sizing: border-box;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
49
src/views/common/policy/index.vue
Normal file
49
src/views/common/policy/index.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="html-wrap" v-html="value"></div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { queryAppInfo, dictDataCache } from '@/api/auth'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
const dictData = useDictData()
|
||||
const DataSelect = dictData.getBasicData('appInformationType')
|
||||
const value = ref('')
|
||||
const id = ref('')
|
||||
document.title = '个人信息保护政策'
|
||||
dictDataCache().then(res => {
|
||||
id.value = res.data
|
||||
.filter(item => item.code == 'appInformationType')[0]
|
||||
.children.filter(item => item.code == 'Personal_Infor_Protect')[0].id
|
||||
info()
|
||||
|
||||
})
|
||||
const info=()=>{
|
||||
queryAppInfo(id.value).then(res => {
|
||||
value.value = res.data.content
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
html,
|
||||
body {
|
||||
width: 100vw;
|
||||
}
|
||||
.html-wrap {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
padding: 10px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
box-sizing: border-box;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user