123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- import App from './App'
- import Vue from 'vue'
- import getOpenId from './apis/utils/init.js'
- import getALIOpenId from './apis/utils/initALI.js'
- //import './assets/font/font/font.css'
- 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: {
- recordStatusColor(val){
- var retu = ""
- val=val+''
- switch (val) {
- case '-1':
- retu = '#f29a38'
- break;
- case '0':
- retu = '#f29a38'
- break;
- case '1':
- retu = '#52b56b'
- break;
- case '2':
- retu = '#3a3bc2'
-
- break;
- case '3':
- retu = '#c94031'
- break;
- case '5':
- retu = '#c94031'
- break;
- case '6':
- retu = '#c94031'
- case '9':
- retu = '#c94031'
- break;
- default:
- retu = '#52b56b'
- break;
- }
-
- return retu
- },
- substrDate(date){
- if(date){
- return date.substr(0,11)
- }
- return ''
- },
- 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()
|