12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import App from './App'
- import Vue from 'vue'
- import store from './store'
- import uvUI from '@/uni_modules/uv-ui-tools'
- Vue.use(uvUI);
- Vue.prototype.$store = store;
- import chat from './uitls/chat.js'
- chat.init();
- import customerServe from './uitls/customerServe.js'
- customerServe.init();
- Vue.prototype.$chat = chat;
- Vue.prototype.$customerServe = customerServe;
- 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.prototype.initBadge = () => {
- if (uni.getStorageSync('chatBadge')) {
- let badge = uni.getStorageSync('chatBadge');
- if (badge === '0') {
- uni.removeTabBarBadge({
- index: 3
- })
- } else {
- uni.setTabBarBadge({
- index: 3,
- text: badge
- })
- }
- }
- };
- import config from "@/config";
- Vue.prototype.shopImage = (img) => {
- return config.baseUrl + '/prod-api/mobile-api/file/getImgStream?idFile=' + img;
- }
- Vue.config.productionTip = false;
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|