project/main.js

46 lines
857 B
JavaScript
Raw Normal View History

2024-07-14 15:48:34 +08:00
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
Vue.prototype.$attentClassType='';
//引入时间转换格式
import moment from 'moment'
moment.locale('zh-cn') //指定语言
Vue.prototype.$moment = moment;
import tabBar from "@/pages/common/tabBar.vue"
Vue.component('tabBar', tabBar)
App.mpType = 'app'
// import ws from '@/utils/scoket.js' //找好自己的路径
// Vue.prototype.$ws = ws
// const interval = setInterval(() => {
// if(uni.getStorageSync('token')){
// console.log('开启scoket');
// ws.init()
// }else{
// ws.completeClose()
// }
// }, 1000)
const app = new Vue({
...App,
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif