完善对外演示页面

pull/1/head
qzp 1 year ago
parent b7e095c528
commit 93c6a684ff

@ -15,25 +15,25 @@ const whiteList = ['/login', '/register'];
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()
if (getToken()) { // if (getToken()) {
to.meta.title && useSettingsStore().setTitle(to.meta.title) // to.meta.title && useSettingsStore().setTitle(to.meta.title)
/* has token*/ // /* has token*/
if (to.path === '/login') { // if (to.path === '/login') {
next({ path: '/' }) // next({ path: '/' })
NProgress.done() // NProgress.done()
} else { // } else {
next() // next()
} // }
} else { // } else {
// 没有token // // 没有token
if (whiteList.indexOf(to.path) !== -1) { // if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入 // // 在免登录白名单,直接进入
next() // next()
} else { // } else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 // next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
NProgress.done() // NProgress.done()
} // }
} // }
next() next()
}) })

@ -270,7 +270,7 @@ export const dynamicRoutes = [
{ {
path: 'transaction', path: 'transaction',
hidden: true, hidden: true,
component: () => import('@/views/visual/transaction/transaction.vue'), component: () => import('@/views/visual/components/transaction.vue'),
name: 'transaction', name: 'transaction',
meta: { title: '交易总览',activeMenu: '/visual/index' } meta: { title: '交易总览',activeMenu: '/visual/index' }
}, },
@ -278,7 +278,7 @@ export const dynamicRoutes = [
{ {
path: 'transaction-node', path: 'transaction-node',
hidden: true, hidden: true,
component: () => import('@/views/visual/transaction-node/transaction-node.vue'), component: () => import('@/views/visual/components/transaction-node.vue'),
name: 'transaction-node', name: 'transaction-node',
meta: { title: '交易节点',activeMenu: '/visual/index' } meta: { title: '交易节点',activeMenu: '/visual/index' }
}, },
@ -286,7 +286,7 @@ export const dynamicRoutes = [
{ {
path: 'transaction-block', path: 'transaction-block',
hidden: true, hidden: true,
component: () => import('@/views/visual/transaction-block/transaction-block.vue'), component: () => import('@/views/visual/components/transaction-block.vue'),
name: 'transaction-block', name: 'transaction-block',
meta: { title: '交易区块',activeMenu: '/visual/index' } meta: { title: '交易区块',activeMenu: '/visual/index' }
}, },
@ -294,7 +294,7 @@ export const dynamicRoutes = [
{ {
path: 'transaction-broadcast', path: 'transaction-broadcast',
hidden: true, hidden: true,
component: () => import('@/views/visual/transaction-broadcast/transaction-broadcast.vue'), component: () => import('@/views/visual/components/transaction-broadcast.vue'),
name: 'transaction-broadcast', name: 'transaction-broadcast',
meta: { title: '交易广播',activeMenu: '/visual/index' } meta: { title: '交易广播',activeMenu: '/visual/index' }
}, },
@ -302,7 +302,7 @@ export const dynamicRoutes = [
{ {
path: 'merkle', path: 'merkle',
hidden: true, hidden: true,
component: () => import('@/views/visual/merkle/merkle.vue'), component: () => import('@/views/visual/components/merkle.vue'),
name: 'merkle', name: 'merkle',
meta: { title: 'Merkle',activeMenu: '/visual/index' } meta: { title: 'Merkle',activeMenu: '/visual/index' }
}, },

@ -14,7 +14,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API, // baseURL: import.meta.env.VITE_APP_BASE_API,
baseURL: 'http://192.168.2.15:8800/', baseURL: 'http://118.31.7.2:8800/',
// 超时 // 超时
timeout: 10000 timeout: 10000
}) })
@ -114,9 +114,9 @@ service.interceptors.response.use(res => {
message = "系统接口请求超时"; message = "系统接口请求超时";
} else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
if(message.includes("code 401")){ if(message.includes("code 401")){
useUserStore().fedLogOut().then(() => { // useUserStore().fedLogOut().then(() => {
location.href = '/login'; // location.href = '/login';
}) // })
}else if(message.includes("code 400")){ }else if(message.includes("code 400")){
// ElNotification.error({ title: error.response.data }) // ElNotification.error({ title: error.response.data })
ElMessage({ message: error.response.data.msg, type: 'error' }) ElMessage({ message: error.response.data.msg, type: 'error' })

@ -102,6 +102,8 @@ getRedPacket()
v-model:limit="params.size" v-model:limit="params.size"
@pagination="getRedPacket" @pagination="getRedPacket"
/> />
<el-empty v-show="total===0" :image-size="150"></el-empty>
</div> </div>
<!-- 购买数字商品 --> <!-- 购买数字商品 -->
<el-row> <el-row>
@ -133,6 +135,7 @@ getRedPacket()
v-model:limit="params1.size" v-model:limit="params1.size"
@pagination="getDigital" @pagination="getDigital"
/> />
<el-empty v-show="total1===0" :image-size="150"></el-empty>
</div> </div>
<el-dialog <el-dialog
v-model="dialogVisible" v-model="dialogVisible"
@ -224,7 +227,7 @@ getRedPacket()
} }
} }
.red_packet{ .red_packet{
padding: 0px 20px; padding: 0px 20px 20px 20px;
width: 100%; width: 100%;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
@ -345,6 +348,14 @@ getRedPacket()
} }
} }
} }
}
:deep(.el-empty){
border: 1px solid #1854a6;
.el-empty__description{
p{
color: #ffffff;
}
}
} }
} }
</style> </style>

@ -0,0 +1,42 @@
<script setup>
</script>
<template>
<div class="app-study">
<div>
</div>
<!--<el-row>
<el-col :span="24">
<img src="../../assets/images/32.png" alt="" />
<span>操作记录和成绩</span>
</el-col>
</el-row> -->
</div>
</template>
<style lang='scss' scoped>
.app-study{
// padding: 20px;
height: 105vh;
// border: 1px solid #238AFF;
// border-radius: 5px;
div{
margin-top: -90px;
margin-left: -130px;
height: 995px;
background: url('../../../assets/images/Merkle根.png' ) no-repeat !important;
background-size: 102% 100% !important;
}
.el-col-24 {
height: 69px;
padding: 15px 13px;
display: flex;
align-items: center;
span {
padding-left: 15px;
font-weight: bold;
font-size: 14px;
color: #ffff;
}
}
}
</style>

@ -0,0 +1,42 @@
<script setup>
</script>
<template>
<div class="app-study">
<div>
</div>
<!--<el-row>
<el-col :span="24">
<img src="../../assets/images/32.png" alt="" />
<span>操作记录和成绩</span>
</el-col>
</el-row> -->
</div>
</template>
<style lang='scss' scoped>
.app-study{
// padding: 20px;
height: 105vh;
// border: 1px solid #238AFF;
// border-radius: 5px;
div{
margin-top: -90px;
margin-left: -130px;
height: 995px;
background: url('../../../assets/images/交易区块.png' ) no-repeat !important;
background-size: 102% 100% !important;
}
.el-col-24 {
height: 69px;
padding: 15px 13px;
display: flex;
align-items: center;
span {
padding-left: 15px;
font-weight: bold;
font-size: 14px;
color: #ffff;
}
}
}
</style>

@ -0,0 +1,42 @@
<script setup>
</script>
<template>
<div class="app-study">
<div>
</div>
<!--<el-row>
<el-col :span="24">
<img src="../../assets/images/32.png" alt="" />
<span>操作记录和成绩</span>
</el-col>
</el-row> -->
</div>
</template>
<style lang='scss' scoped>
.app-study{
// padding: 20px;
height: 105vh;
// border: 1px solid #238AFF;
// border-radius: 5px;
div{
margin-top: -90px;
margin-left: -130px;
height: 995px;
background: url('../../../assets/images/交易广播.png' ) no-repeat !important;
background-size: 102% 100% !important;
}
.el-col-24 {
height: 69px;
padding: 15px 13px;
display: flex;
align-items: center;
span {
padding-left: 15px;
font-weight: bold;
font-size: 14px;
color: #ffff;
}
}
}
</style>

@ -0,0 +1,42 @@
<script setup>
</script>
<template>
<div class="app-study">
<div>
</div>
<!--<el-row>
<el-col :span="24">
<img src="../../assets/images/32.png" alt="" />
<span>操作记录和成绩</span>
</el-col>
</el-row> -->
</div>
</template>
<style lang='scss' scoped>
.app-study{
// padding: 20px;
height: 106vh;
// border: 1px solid #238AFF;
// border-radius: 5px;
div{
margin-top: -90px;
margin-left: -130px;
height: 995px;
background: url('../../../assets/images/交易节点.png' ) no-repeat !important;
background-size: 102% 100% !important;
}
.el-col-24 {
height: 69px;
padding: 15px 13px;
display: flex;
align-items: center;
span {
padding-left: 15px;
font-weight: bold;
font-size: 14px;
color: #ffff;
}
}
}
</style>

@ -16,13 +16,15 @@
<style lang='scss' scoped> <style lang='scss' scoped>
.app-study{ .app-study{
// padding: 20px; // padding: 20px;
height: 130vh; height: 105vh;
// border: 1px solid #238AFF; // border: 1px solid #238AFF;
// border-radius: 5px; // border-radius: 5px;
div{ div{
height: 100%; margin-top: -90px;
background: url('../../../assets/images/Merkle根.png' ) no-repeat !important; margin-left: -130px;
background-size: 100% 100% !important; height: 995px;
background: url('../../../assets/images/央行可视化监控中心.png' ) no-repeat !important;
background-size: 102% 100% !important;
} }
.el-col-24 { .el-col-24 {
height: 69px; height: 69px;

@ -2,8 +2,10 @@
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
import * as centralBank from '@/api/centralBank' import * as centralBank from '@/api/centralBank'
import transaction from './components/transaction.vue'; import transaction from './components/transaction.vue';
// import currencyPut from '../digital-currency/currency-put.vue'; import transactionNode from './components/transaction-node.vue';
// import currency from '../currency/currency.vue'; import transactionBlock from './components/transaction-block.vue';
import transactionBroadcast from './components/transaction-broadcast.vue';
import merkle from './components/merkle.vue';
import useUserStore from "@/store/modules/user"; import useUserStore from "@/store/modules/user";
const userStore = useUserStore(); const userStore = useUserStore();
// //
@ -121,14 +123,18 @@ getTableData()
<template> <template>
<div class="app-central"> <div class="app-central">
<div class="central-bank-title"> <div class="central-bank-title">
<div @click.native="go(1)">信息验证</div> <div @click.native="go(1)">交易总览</div>
<div @click.native="go(2)">数字货币申请</div> <div @click.native="go(2)">交易节点</div>
<div @click.native="go(3)">数字货币投放</div> <div @click.native="go(3)">交易区块</div>
<div @click.native="go(4)">交易广播</div>
<div @click.native="go(5)">Merkle</div>
</div> </div>
<div class="central-ban-information"> <div class="central-ban-information">
<transaction v-show="isDeployed == 1"></transaction> <transaction v-show="isDeployed == 1"></transaction>
<!-- <currency v-show="isDeployed == 2"></currency> <transaction-node v-show="isDeployed == 2"></transaction-node>
<currencyPut v-show="isDeployed == 3"></currencyPut> --> <transactionBlock v-show="isDeployed == 3"></transactionBlock>
<transactionBroadcast v-show="isDeployed == 4"></transactionBroadcast>
<merkle v-show="isDeployed == 5"></merkle>
</div> </div>
</div> </div>
</template> </template>
@ -144,7 +150,7 @@ getTableData()
width: 202px; width: 202px;
height: 52px; height: 52px;
color: #ffffff; color: #ffffff;
background: url("../../assets/images/btn01.png") no-repeat; background: url("../../assets/images/btn07.png") no-repeat;
margin-right: 25px; margin-right: 25px;
text-align: center; text-align: center;
line-height: 52px; line-height: 52px;
@ -158,14 +164,21 @@ getTableData()
} }
} }
div:nth-child(2) { div:nth-child(2) {
background: url("../../assets/images/btn02.png") no-repeat; background: url("../../assets/images/btn08.png") no-repeat;
} }
div:nth-child(3) { div:nth-child(3) {
background: url("../../assets/images/btn03.png") no-repeat; background: url("../../assets/images/btn09.png") no-repeat;
}
div:nth-child(4) {
background: url("../../assets/images/btn10.png") no-repeat;
}
div:nth-child(5) {
background: url("../../assets/images/btn11.png") no-repeat;
} }
} }
.central-ban-information { .central-ban-information {
overflow: hidden;
width: 100%; width: 100%;
background: #0e2e68; background: #0e2e68;
border: 1px solid #238aff; border: 1px solid #238aff;

Loading…
Cancel
Save