| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- import App from './App';
- import Vue from 'vue';
- import VHtmlPlugin from '@megalo/vhtml-plugin';
- import Vuex from 'vuex';
- import http from './plugins/http';
- import Dialog from './native/vant/dialog/dialog';
- import vuexI18n from 'vuex-i18n';
- import en from './locales/en.json';
- import zh from './locales/zh.json';
- import commont from './mixins/commont';
- require('dayjs/locale/zh-cn');
- Vue.mixin(commont);
- Vue.prototype.$colors = {
- prim: '#0F264D',
- warn: '#FFA526',
- info: '#BCC1CC',
- text: '#292C33',
- bg: '#f5f7fa'
- };
- Vue.prototype.$oss = {
- logo1: '?x-oss-process=image/resize,m_fill,h_280,w_120',
- normal: '?x-oss-process=image/resize,m_fill,h_500,w_500',
- mini: '?x-oss-process=image/resize,m_fill,h_300,w_300',
- big: '?x-oss-process=image/resize,m_fill,h_1080,w_1080',
- hotPro: '?x-oss-process=image/resize,m_fill,h_998,w_490'
- };
- Vue.use(Vuex);
- const store = require('./store').default;
- Vue.use(vuexI18n.plugin, store);
- Vue.use(VHtmlPlugin);
- Vue.use(http);
- Vue.i18n.add('en', en);
- Vue.i18n.add('zh', zh);
- Vue.i18n.set('zh');
- Vue.prototype.$store = store;
- Vue.prototype.$toast = function(title, icon) {
- if (!icon) {
- icon = 'none';
- }
- wx.showToast({
- icon: icon,
- title: title
- });
- };
- function $loading(title) {
- wx.showLoading({
- mask: true,
- title: title || ''
- });
- }
- $loading.close = function() {
- wx.hideLoading();
- };
- Vue.prototype.$loading = $loading;
- const app = new Vue(App);
- app.$mount();
- export default {
- config: {
- // pages 的首个页面会被编译成首页
- pages: ['pages/Home', 'pages/Chat', 'pages/Classify', 'pages/My'],
- subPackages: [
- {
- root: 'pagesHome',
- pages: [
- 'Product',
- 'Brand',
- 'InformationList',
- 'VendorList',
- 'ProductList',
- 'Authorized',
- 'FilterPage',
- 'Edit',
- 'Search',
- 'SearchList',
- 'ShowView'
- ]
- },
- {
- root: 'pagesImt',
- pages: ['Index', 'ServiceDetail']
- },
- {
- root: 'pagesChat',
- pages: ['ChatDetail', 'ChatForm']
- },
- {
- root: 'pagesMine',
- pages: [
- 'Upload',
- 'Collect',
- 'ReadRecords',
- 'Activity',
- 'Order',
- 'OrderDetail',
- 'Account',
- 'ChangePsd',
- 'ChangePhone',
- 'ChangeEmail',
- 'Enter'
- ]
- },
- {
- root: 'pagesProduct',
- pages: [
- 'Detail',
- 'Contrast',
- 'FilterVendor',
- 'FilterProduct',
- 'ContrastDetail',
- 'IntentionList',
- 'Inquiry',
- 'InquiryResult'
- ]
- },
- {
- root: 'pagesNews',
- pages: ['Detail', 'News', 'Submit']
- },
- {
- root: 'pagesVendor',
- pages: ['Detail', 'Connect', 'FilterProduct', 'Case', 'ProductList']
- }
- ],
- tabBar: {
- color: '#878D99',
- selectedColor: '#0F264D',
- borderStyle: 'white',
- list: [
- {
- pagePath: 'pages/Home',
- text: '首页',
- iconPath: 'native/tabbar/tabbar_icon_01.png',
- selectedIconPath: 'native/tabbar/tabbar_icon_01_pre.png'
- },
- {
- pagePath: 'pages/Classify',
- text: '类别',
- iconPath: 'native/tabbar/tabbar_icon_02.png',
- selectedIconPath: 'native/tabbar/tabbar_icon_02_pre.png'
- },
- {
- pagePath: 'pages/Chat',
- text: '咨询',
- iconPath: 'native/tabbar/tabbar_icon_03.png',
- selectedIconPath: 'native/tabbar/tabbar_icon_03_pre.png'
- },
- {
- pagePath: 'pages/My',
- text: '我的',
- iconPath: 'native/tabbar/tabbar_icon_04.png',
- selectedIconPath: 'native/tabbar/tabbar_icon_04_pre.png'
- }
- ]
- },
- window: {
- backgroundTextStyle: 'dark',
- navigationBarBackgroundColor: '#fff',
- navigationBarTitleText: 'imt',
- navigationBarTextStyle: 'black'
- },
- usingComponents: {
- robot: '/native/robot/index',
- 'van-button': '/native/vant/button/index',
- 'van-tabs': '/native/vant/tabs/index',
- 'van-tab': '/native/vant/tab/index',
- 'van-notice-bar': '/native/vant/notice-bar/index',
- 'van-icon': '/native/vant/icon/index',
- 'van-image': '/native/vant/image/index',
- 'van-grid': '/native/vant/grid/index',
- 'van-grid-item': '/native/vant/grid-item/index',
- 'van-dialog': '/native/vant/dialog/index',
- 'van-search': '/native/vant/search/index',
- 'van-empty': '/native/vant/empty/index',
- 'van-sticky': '/native/vant/sticky/index',
- 'van-loading': '/native/vant/loading/index',
- 'van-action-sheet': '/native/vant/action-sheet/index',
- 'van-picker': '/native/vant/picker/index',
- 'van-cell-group': '/native/vant/cell-group/index',
- 'van-cell': '/native/vant/cell/index',
- 'van-radio-group': '/native/vant/radio-group/index',
- 'van-radio': '/native/vant/radio/index',
- 'van-field': '/native/vant/field/index',
- 'van-uploader': '/native/vant/uploader/index',
- 'van-checkbox': '/native/vant/checkbox/index',
- 'van-panel': '/native/vant/panel/index',
- 'van-overlay': '/native/vant/overlay/index',
- 'van-stepper': '/native/vant/stepper/index',
- 'van-steps': '/native/vant/steps/index',
- 'van-rate': '/native/vant/rate/index',
- 'van-popup': '/native/vant/popup/index',
- 'van-transition': '/native/vant/transition/index',
- 'van-dropdown-menu': '/native/vant/dropdown-menu/index',
- 'van-dropdown-item': '/native/vant/dropdown-item/index',
- 'van-nav-bar': '/native/vant/nav-bar/index',
- 'van-tag': '/native/vant/tag/index',
- 'van-divider': '/native/vant/divider/index'
- }
- }
- };
|