import App from './App' import Vue from 'vue' import getOpenId from './apis/utils/init.js' import getALIOpenId from './apis/utils/initALI.js' var IS_WEIXIN = /MicroMessenger/.test(window.navigator.userAgent) var IS_ALI = /AlipayClient/.test(window.navigator.userAgent) if (IS_ALI) { getALIOpenId.init() } else { getOpenId.init() } import mixin from './apis/utils/mixin.js' import carhelpStudent from './apis/utils/mixin-student.js' Vue.prototype.carhelp = mixin Vue.prototype.carhelpStudent = carhelpStudent import Vconsole from 'vconsole' //import uView from "uview-ui"; import uView from '@/uni_modules/uview-ui' Vue.use(uView); Vue.mixin({ updated: function() { this.$nextTick(function() { var g = ''; var aaa = this.carhelp.get("getElderModeClass"); if (aaa == "长辈模式") { g = true; } else { g = false; } var body = document.getElementsByTagName('uni-page-body')[0].childNodes; classold(g, body); function classold(g, list) { for (var i = 0; i < list.length; i++) { try { var myclass = list[i].getAttribute("class"); if (myclass) { myclass = myclass.trim().replace("oldTextClassF", ""); } else { myclass = "" } if (g) { myclass = myclass.trim() myclass = " oldTextClassF " + myclass; } else { } list[i].setAttribute("class", myclass); } catch (e) { console.log("---error--classold--") console.log(list[i]) } } } }) }, onReady() { }, onLoad(option) { if (option.test == 'test') { let vConsole = new Vconsole() } }, methods: { 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 }) } } }) Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ ...App }) app.$mount()