main.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import App from './App'
  5. /* 路由 */
  6. import router from './router'
  7. /* axios */
  8. import axios from './api'
  9. import api from './api/api'
  10. Vue.prototype.http = axios;
  11. Vue.prototype.api = api;
  12. /* swiper */
  13. import 'swiper/dist/css/swiper.min.css';
  14. /* 重置样式 */
  15. import './assets/css/reset.min.css'
  16. /* 全局布局边距系统 */
  17. import './assets/css/layout-spacing.css'
  18. /* 全局通用样式系统 (新增) */
  19. import './assets/css/global-styles.css'
  20. /* 解决方案页面通用样式 (新增) */
  21. import './assets/css/solutions-common.css'
  22. /* 产品页面通用样式 (新增) */
  23. import './assets/css/products-common.css'
  24. /* RAG 解决方案样式 (新增) */
  25. import './assets/css/rag-solutions.css'
  26. /* jquery */
  27. import 'jquery'
  28. /* bootstarp */
  29. import './assets/css/bootstrap.min.css'
  30. import './assets/js/bootstrap.min'
  31. /* animate.css */
  32. import 'animate.css'
  33. /* 头部组件 */
  34. import Header from './components/Header'
  35. Vue.component(Header.name, Header)
  36. /* 尾部组件 */
  37. import Footer from './components/Footer'
  38. Vue.component(Footer.name, Footer)
  39. /* 回到顶部 */
  40. import GoTop from './components/GoTop'
  41. Vue.component(GoTop.name, GoTop)
  42. Vue.config.productionTip = false
  43. router.beforeEach((to, from, next) => {
  44. if (to.meta.title) {
  45. document.title = to.meta.title
  46. }
  47. next();
  48. });
  49. new Vue({
  50. el: '#app',
  51. router,
  52. components: {App},
  53. template: '<App/>'
  54. })