import Vue from 'vue' import App from './App' //import MyCommon from '@/components/Common.vue' //import CarLoading from '@/components/Loading.vue' import getOpenId from './utils/init.js' getOpenId.init() import 'remixicon/fonts/remixicon.css' import mixin from './utils/mixin.js' Vue.config.ignoredElements.push("wx-open-subscribe") ; Vue.prototype.carhelp=mixin import Vconsole from 'vconsole' //import './router' // 引入路由 import router from './bobo-router' //1.echarts 引入的时候,会优先判断当前的环境。 //2.由于uni app 中有一个 ‘wx’ 全局变量污染了echarts中的 wx 变量,导致这里的判断直接走第一个,echarts 部分功能无法生效。 window.wx = {} // main.js import uView from "uview-ui"; Vue.use(uView); Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) //Vue.component('my-common',MyCommon) //Vue.component('car-loading',CarLoading) //Vue.use(mixin) Vue.mixin({ onLoad( option){ if (option.test == 'test') { let vConsole = new Vconsole() } } ,methods:{ chargeUserPhoneXDT(phone,userType){ if(phone&&phone.indexOf('XDT')==0){ return '哪吒用户' } if(userType==1){ return '游客' }else if(userType==2){ return '会员' }else{ return '' } }, channelNoShow(channelNo,manufacturer,customNo ){ if(customNo){ return customNo } console.log(manufacturer) var text=channelNo; if(manufacturer=='szwinline'){ switch(channelNo){ case '1': text="A"; break; case '2': text="B"; break; case '3': text="C"; break; case 1: text="A"; break; case 2: text="B"; break; case 3: text="C"; break; } } return text }, showNumJP(val){ if(val||val==0){ val=""+val if(val.indexOf(".")>-1){ val= val.substring(0,val.indexOf(".")+3); } try{ val = parseFloat(val).toFixed(2); }catch(e){ console.log("error +++"+e) } } return val }, gotoUrl(url){ uni.navigateTo({ url:"/"+url }) } } }) app.$mount()