| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <template>
- <div id="home">
- <div class="title">
- <div class="logo"></div>
- <div class="fontSize">
- <div class="fontLogo"></div>
- </div>
- </div>
- <div class="list_box">
- <div class="list">
- <div v-for="(item, index) in list" class="item" @click="openUrl(item)">
- <div><img :src="item.img" /></div>
- <div>{{ item.name }}</div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { getList } from '@/api/home';
- export default {
- data() {
- return {
- list: []
- };
- },
- created() {
- this.getPages();
- },
- methods: {
- openUrl(item) {
- let url = window.open('https://' + item.linkUrl, '_blank');
- },
- async getPages() {
- let { list } = await getList({ pageNum: 1, size: 9999 });
- this.list = list.map((item) => {
- return {
- ...item,
- img:
- window.location.origin +
- '/api/main/file/getFile?objectName=' +
- item.iconPath
- };
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- @font-face {
- font-family: '优设标题黑';
- src: url('@/assets/font_icon/优设标题黑.ttf');
- }
- #home {
- height: calc(100vh - 96px);
- width: 100%;
- display: flex;
- flex-direction: column;
- background: url('@/assets/boxBg.png');
- background-size: 100% 100%;
- background-repeat: no-repeat;
- .title {
- flex: 2;
- display: flex;
- justify-content: center;
- align-items: center;
- position: relative;
- .fontSize {
- margin-top: 7rem;
- .fontLogo {
- width: 25vw;
- aspect-ratio: 9.7/1;
- background: url('@/assets/fontTitle.png');
- background-size: 100% 100%;
- background-repeat: no-repeat;
- }
- }
- .logo {
- position: absolute;
- left: 30px;
- top: 30px;
- width: 14vw;
- aspect-ratio: 5.6/1;
- // background: url('@/assets/cglogo.png');
- // background-size: 100% 100%;
- // background-repeat: no-repeat;
- }
- }
- .list_box {
- flex: 4;
- .list {
- padding: 10px;
- box-sizing: border-box;
- display: flex;
- justify-content: center;
- .item {
- background: url('@/assets/bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- display: inline-block;
- width: 10vw;
- aspect-ratio: 0.7/1;
- padding: 10px;
- box-sizing: border-box;
- margin-right: 2rem;
- border-radius: 5px;
- cursor: pointer;
- display: flex;
- flex-direction: column;
- > div:first-child {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
- > img {
- width: 100%;
- aspect-ratio: 16/16;
- }
- }
- > div:last-child {
- flex: 1;
- font-family: '优设标题黑';
- color: #1383f1;
- font-size: 2.8rem;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- .margin_0 {
- margin-right: 0;
- }
- }
- }
- }
- </style>
|