123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <template>
- <div class="layout">
- <div class="header">
- <div class="navbar flex justify-between items-center">
- <div class="logo flex items-center">
- <img
- src="https://static.caimei365.com/www/authentic/h5/icon-logo.png"
- />
- <span>认证通</span>
- </div>
- <div class="user-info">
- <template v-if="false">
- <span>15872950940</span>
- <span class="underline logout">退出登录</span>
- </template>
- <template v-else>
- <div
- class="login pr-3 pl-3 border rounded-sm border-white leading-6"
- >
- 登录
- </div>
- </template>
- </div>
- </div>
- </div>
- <div class="content">
- <nuxt />
- </div>
- <div class="footer flex justify-center items-center">
- - 由采美网提供技术支持 -
- </div>
- <simple-login></simple-login>
- </div>
- </template>
- <script>
- export default {
- mounted() {
- this.init()
- },
- beforeDestroy() {},
- methods: {
- init() {
- this.responseWidth()
- },
- // 响应页面宽度变化
- responseWidth() {
- this.$store.commit('app/SET_SCREEN', window.innerWidth)
- window.addEventListener('resize', (e) => {
- this.$store.commit('app/SET_SCREEN', e.target.innerWidth)
- })
- },
- },
- }
- </script>
- <style scoped lang="scss">
- // PC端
- @media screen and (min-width: 768px) {
- .layout {
- padding-top: 80px;
- .header {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 80px;
- box-sizing: border-box;
- background: linear-gradient(90deg, #101010 0%, #404040 100%);
- .navbar {
- width: 1200px;
- margin: 0 auto;
- height: 100%;
- }
- .logo {
- img {
- display: block;
- width: 44px;
- height: 44px;
- }
- span {
- font-size: 24px;
- color: #fff;
- }
- }
- .user-info {
- color: #fff;
- font-size: 16px;
- .login,
- .logout {
- cursor: pointer;
- }
- }
- }
- .content {
- min-height: calc(100vh - 80px - 80px);
- background-color: #f7f7f7;
- overflow: hidden;
- }
- .footer {
- height: 80px;
- background-color: #2c3038;
- color: #fff;
- font-size: 14px;
- }
- }
- }
- // 移动端
- @media screen and (max-width: 768px) {
- .layout {
- padding-top: 12.8vw;
- .header {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- padding: 0 2.4vw;
- height: 12.8vw;
- box-sizing: border-box;
- background: linear-gradient(90deg, #101010 0%, #404040 100%);
- .navbar {
- height: 100%;
- }
- .logo {
- img {
- display: block;
- width: 8vw;
- height: 8vw;
- }
- span {
- font-size: 4vw;
- color: #fff;
- }
- }
- .user-info {
- color: #fff;
- font-size: 3vw;
- }
- }
- .content {
- min-height: calc(100vh - 12.8vw - 12.4vw);
- }
- .footer {
- height: 12.4vw;
- background-color: #2c3038;
- color: #fff;
- font-size: 3vw;
- }
- }
- }
- </style>
|