App.vue 5.52 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: "Microsoft YaHei","Arial";
  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;
}

html,
body {
  -webkit-text-size-adjust: none;
}

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 {
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
select::-ms-expand {
  display: 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;
}

// input::-webkit-input-placeholder {
//   color: $cGray !important;
// }

::-webkit-input-placeholder {
  /* WebKit, Blink, Edge */
  color: $cGray;
  opacity: 1;
}
:-moz-placeholder {
  /* Mozilla Firefox 4 to 18 */
  color: $cGray;
  opacity: 1;
}
::-moz-placeholder {
  /* Mozilla Firefox 19+ */
  color: $cGray;
  opacity: 1;
}
:-ms-input-placeholder {
  /* Internet Explorer 10-11 */
  color: $cGray;
  opacity: 1;
}

select,
input,
option {
  color: $cLightBlack;
}

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

.cOrange {
  color: $cOrange;
}
.cGreen {
  color: $cGreen;
}
.cGray {
  color: $cGray;
}
.cDark {
  color: $cDark;
}

#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 {
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
}

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

.box {
  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>