main.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import App from './App';
  2. import Vue from 'vue';
  3. import VHtmlPlugin from '@megalo/vhtml-plugin';
  4. import Vuex from 'vuex';
  5. import http from './plugins/http';
  6. import Dialog from './vant/dialog/dialog';
  7. import common from './mixins/common';
  8. import './styles/font.less';
  9. import './styles/vanIndex.less';
  10. Vue.prototype.$colors = {
  11. prim: '#FF7F1F',
  12. red: '#F42202'
  13. };
  14. Vue.use(VHtmlPlugin);
  15. Vue.use(Vuex);
  16. const store = require('./store').default;
  17. Vue.prototype.$store = store;
  18. Vue.use(http);
  19. Vue.prototype.$dialog = Dialog;
  20. Vue.mixin(common);
  21. const app = new Vue(App);
  22. app.$mount();
  23. export default {
  24. config: {
  25. // pages 的首个页面会被编译成首页
  26. pages: [
  27. 'pages/Home',
  28. 'pages/confirmorder',
  29. 'pages/mine',
  30. 'pages/receiving',
  31. 'pages/address',
  32. 'pages/details',
  33. 'pages/news',
  34. 'pages/orderdetails',
  35. 'pages/chat',
  36. 'pages/allorder',
  37. 'pages/follow',
  38. 'pages/setting',
  39. 'pages/wallet',
  40. 'pages/authorized',
  41. 'pages/questions',
  42. 'pages/rule',
  43. 'pages/minePublish',
  44. 'pages/mineFollow',
  45. 'pages/changeText',
  46. 'pages/chooseAddress'
  47. ],
  48. tabBar: {
  49. color: '#7E7E80',
  50. selectedColor: '#FF6C00',
  51. list: [
  52. {
  53. pagePath: 'pages/Home',
  54. text: '拼箱',
  55. iconPath: 'native/imgs/tabbar_icon_01.png',
  56. selectedIconPath: 'native/imgs/tabbar_icon_01_pre.png'
  57. },
  58. {
  59. pagePath: 'pages/news',
  60. text: '消息',
  61. iconPath: 'native/imgs/tabbar_icon_02.png',
  62. selectedIconPath: 'native/imgs/tabbar_icon_02_pre.png'
  63. },
  64. {
  65. pagePath: 'pages/mine',
  66. text: '我的',
  67. iconPath: 'native/imgs/tabbar_icon_03.png',
  68. selectedIconPath: 'native/imgs/tabbar_icon_03_pre.png'
  69. }
  70. ]
  71. },
  72. window: {
  73. backgroundTextStyle: 'light',
  74. navigationBarBackgroundColor: '#fff',
  75. navigationBarTextStyle: 'black'
  76. // navigationStyle: 'custom'
  77. },
  78. usingComponents: {
  79. 'van-image': '/vant/image/index',
  80. 'van-button': '/vant/button/index',
  81. 'van-tabs': '/vant/tabs/index',
  82. 'van-tab': '/vant/tab/index',
  83. 'van-notice-bar': '/vant/notice-bar/index',
  84. 'van-icon': '/vant/icon/index',
  85. 'van-grid-item ': '/vant/grid-item/index',
  86. 'van-count-down': '/vant/count-down/index',
  87. 'van-dialog': '/vant/dialog/index',
  88. 'van-search': '/vant/search/index',
  89. 'van-empty': '/vant/empty/index',
  90. 'van-sticky': '/vant/sticky/index',
  91. 'van-loading': '/vant/loading/index',
  92. 'van-action-sheet': '/vant/action-sheet/index',
  93. 'van-picker': '/vant/picker/index',
  94. 'van-cell-group': '/vant/cell-group/index',
  95. 'van-cell': '/vant/cell/index',
  96. 'van-field': '/vant/field/index',
  97. 'van-uploader': '/vant/uploader/index',
  98. 'van-checkbox': '/vant/checkbox/index',
  99. 'van-panel': '/vant/panel/index',
  100. 'van-overlay': '/vant/overlay/index',
  101. 'van-stepper': '/vant/stepper/index',
  102. 'van-steps': '/vant/steps/index',
  103. 'van-rate': '/vant/rate/index',
  104. 'van-popup': '/vant/popup/index',
  105. 'van-area': '/vant/area/index',
  106. 'van-goods-action': 'vant/goods-action/index',
  107. 'van-goods-action-icon': 'vant/goods-action-icon/index',
  108. 'van-goods-action-button': 'vant/goods-action-button/index',
  109. 'van-calendar': 'vant/calendar/index'
  110. }
  111. }
  112. };