1234567891011121314151617181920212223242526272829303132333435363738 |
- import App from './App'
- import Vue from 'vue'
- import store from './store'
- import uvUI from '@/uni_modules/uv-ui-tools'
- Vue.use(uvUI);
- uni.$uv.setConfig({
- // 修改$uv.config对象的属性
- config: {
- // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
- unit: 'rpx'
- }
- })
- Vue.prototype.$store = store;
- import chat from './uitls/chat.js'
- chat.init();
- Vue.prototype.$chat = chat;
- Vue.prototype.$toast = msg => {
- uni.showToast({
- title: msg,
- icon: "none"
- })
- };
- Vue.prototype.$navigateTo = (url) => {
- if (!uni.getStorageSync('token') && url != '/pages/login/login') {
- url = '/pages/login/login';
- }
- uni.navigateTo({
- url: url
- })
- }
- Vue.config.productionTip = false;
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|