App.vue 4.9 KB
<template>
	<div id="app">
		<v-header></v-header>
		<main ref="container" class="main-container">
			<router-view/>
		</main>
		<v-footer></v-footer>
	</div>
</template>


<script>
import { mapGetters, mapActions, mapState } from "vuex";
import VHeader from "@components/home/header/header.vue";
import VFooter from "@components/home/footer/footer.vue";
var UA = require("ua-device");

export default {
  name: "app",
  components: {
    VHeader,
    VFooter
  },
  computed: {
    ...mapState({
      isMobile: state => state.isMobile
    })
  },
  methods: {
    ...mapActions(["pcorphone"])
  },
  created() {
    let _this = this;
    // 设置UA
    let output = new UA(navigator.userAgent);
    let deviceType = output.device.type;
    let isMobile = deviceType == "mobile";
    this.$store.commit("IS_MOBILE", isMobile);
  }
};
</script>

<style lang="scss">
@import "@/styles/_support";

html {
  font-family: SourceHanSansCN, -apple-system, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, Helvetica Neue, Arial, sans-serif;
  font-size: 12px;
  word-spacing: 1px;
  word-break: break-word;
  text-rendering: optimizeLegibility;
  color: #333;
  background-color: #ffffff;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body,
div {
  border: 0;
  margin: 0;
  padding: 0;
}

*,
*:before,
*:after {
  box-sizing: border-box;
  margin: 0;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
blockquote,
dl,
dt,
dd,
ul,
ol,
li,
pre,
form,
fieldset,
legend,
button,
input,
textarea,
th,
td,
iframe {
  margin: 0;
  padding: 0;
}

img,
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section,
summary,
time,
mark,
audio,
video {
  display: block;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
}

fieldset,
img {
  border: 0;
}

address,
caption,
cite,
dfn,
em,
th,
var,
i,
em {
  font-style: normal;
  font-weight: normal;
}

ol,
ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  &:hover {
    text-decoration: none;
  }
}

a,
label,
button,
input,
select {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input,
select,
button {
  font: 100% tahoma, "\5b8b\4f53", arial;
  vertical-align: baseline;
  border-radius: 0;
  background-color: transparent;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
}

input {
  background: none;
  outline: none;
  border: none;
}

button::-moz-focus-inner,
input,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner {
  border: none;
}

input[type="checkbox"],
input[type="radio"] {
  vertical-align: middle;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  margin: 0;
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset;
}

input[type="search"],
input[type="tel"],
input[type="text"],
input {
  -webkit-appearance: none; /*去除系统默认的样式*/
  -webkit-box-sizing: content-box;
  font-family: inherit;
  font-size: 100%;
  box-sizing: border-box;
}
input::-webkit-search-decoration,
input::-webkit-search-cancel-button {
  display: none;
}

textarea {
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  overflow: auto;
  resize: none;
  font: 100% tahoma, "\5b8b\4f53", arial;
}

#app {
  border: 0;
  margin: 0;
  padding: 0;
}

.main-container {
  position: relative;
  margin: 0 auto;
  width: 100%;
  // max-width: 1024px; // 设计稿宽度
  // min-height: 40rem;

  &::after {
    display: table;
    content: "";
    clear: both;
  }
}

.content {
  // width: 1024px;
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
}

.box-w {
  // width: 1024px;
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
}

.box {
  // width: 950px;
  max-width: 950px;
  width: 100%;
  margin: 0 auto;
}

.app__width {
  width: 750px;
}

.app__width {
  width: 750px;
}

.app__inner {
  margin: 20px;
}

.app__title {
  font-size: $fontSize;
  line-height: $fontSize + 4px;
  font-weight: bold;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 0.5px solid #eeeeee;
}

.app__desc {
  font-size: $fontSizeSmaller;
  line-height: $fontSizeSmaller + 2px;
  margin-bottom: 20px;
  color: $colorGray;
}

.app__bgc {
  position: fixed;
  background-color: #ffffff;
  width: 100%;
  height: 100%;
}

.app__bg {
  position: absolute;
  width: 100%;
  height: 100%;
}

.app__top-shadow {
  position: fixed;
  width: 750px;
  height: 1px;
  box-shadow: 0px 4px 0.9px 0.1px rgba(6, 0, 1, 0.07);
  background-color: #ffffff;
}

.app__content {
  position: relative;
}

.swiper-pagination-bullet {
  width: 1rem !important;
  height: 1rem !important;
}

.swiper-pagination-bullet-active {
  background: #f05a23 !important;
}
</style>