123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- 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 mixin from './utils/mixin.js'
- Vue.config.ignoredElements.push("wx-open-subscribe");
- Vue.prototype.carhelp = mixin
- // 先运行yarn 初始化
- import Vconsole from 'vconsole'
- //import './router' // 引入路由
- import router from './bobo-router'
- // main.js
- // 先运行yarn 初始化
- 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({
- updated: function() {
- this.$nextTick(function() {
- var g=this.carhelp.get("getElderModeClass");
-
-
- // 仅在整个视图都被重新渲染之后才会运行的代码
- var list = document.getElementsByClassName("oldTextjp")
- var list2 = document.getElementsByClassName("oldTextjp2")
- for (var i = 0; i < list.length; i++) {
- var edit = list[i].getAttribute("oldstyle-edit");
- if(!edit){
- list[i].setAttribute("oldstyle-edit",list[i].style.cssText);
- }else{
- edit=""
- }
- if (g) {
- var str = list[i].getAttribute("oldstyle");
- if(str){
- list[i].style = str+";font-weight:bold !important;"
- }
- }else{
- list[i].style=edit
- }
-
- }
-
- for (var i = 0; i < list2.length; i++) {
- var edit = list2[i].getAttribute("oldstyle-edit");
- if(!edit){
- list2[i].setAttribute("oldstyle-edit",list2[i].style.cssText);
- }else{
- edit=""
- }
- if (g) {
- var str = list2[i].getAttribute("oldstyle");
- if(str){
- list2[i].style = str+";"
- }
- }else{
- list2[i].style=edit
- }
-
- }
-
- // for (var i = 0; i < list.length; i++) {
- // var str = ""
- // for (var j in relist) {
- // var num = list[i].getAttribute(j);
- // if (num) {
- // var k = relist[j]
- // k = k.replaceAll("[num]", num)
- // str += k + ";";
- // }
- // }
- // list[i].style = str
- // }
-
- })
- },
- onReady() {
- },
- onLoad(option) {
- if (option.test == 'test') {
- let vConsole = new Vconsole()
- }
- },
- methods: {
- gotoUrl(url) {
- uni.navigateTo({
- url: "/" + url
- })
- }
- }
- })
- app.$mount()
|