代码拉取完成,页面将自动刷新
// // #ifdef H5
// import 'common/pc.js' //uniapp实现H5对PC的适配,使用的时候可以在最前面引用此js
// // #endif
import App from './App'
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
import uView from 'uview-ui'
Vue.use(uView);
import store from "@/store/index.js"
Vue.prototype.$store = store
import "@/store/user.js"
import "@/store/tabBar.js"
import '@/store/user.js'
// 引入uView对小程序分享的mixin封装
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
// import VueDraggable from '@/common/node_modules/vuedraggable/src/vuedraggable'
// Vue.component('draggable', VueDraggable)
import cxUI from 'cx-ui'
Vue.use(cxUI);
import '@/common/common.js'
import '@/common/my.js'
import '@/common/enum.js'
// 导入js文件
import cxCommon from '@/define/cxDefine.js'
// 挂载
Vue.prototype.$cx = cxCommon
// 导入js文件
import cxEnum from '@/common/enum.js'
// 挂载
Vue.prototype.$cxEnum = cxEnum
// 导入js文件
import cxThird from '@/define/thirdDefine.js'
// 挂载
Vue.prototype.$cxThird = cxThird;
// 导入js文件
import tabBar from '@/define/tabBar.js'
// 挂载
Vue.prototype.$cxTabBar = tabBar
//0代表测试环境,1代表pre环境,2代表生产环境
Vue.prototype.$env = "2"
// 测试
let urlDebug = "36.134.221.231:8888/ant-city-server"
// pre
let urlPrev = "36.148.19.20:7777/ant-city-server";
//生产
let urlProp = "36.148.19.20:7777/ant-city-server"
let url = "http://" + (Vue.prototype.$env === '0' ? urlDebug : (Vue.prototype.$env === '1' ? urlPrev : urlProp))
Vue.prototype.$baseUrl = url
let socketUrl = "ws://" + (Vue.prototype.$env === '0' ? urlDebug : (Vue.prototype.$env === '1' ? urlPrev : urlProp))
Vue.prototype.$socketUrl = socketUrl
Vue.prototype.$appid = 'wx5260b8c1d787db0d'
// 腾讯IM
// import TIM from 'static/IM-SDK/tim-wx.js';
// import TIMUploadPlugin from 'static/IM-SDK/index.js';
// let options = {
// SDKAppID: 20000918
// };
// let tim = TIM.create(options);
// tim.setLogLevel(4);
// tim.registerPlugin({
// 'tim-upload-plugin': TIMUploadPlugin
// });
// Vue.prototype.tim = tim;
//国际化
import messages from './locale/index'
import VueI18n from 'vue-i18n'
let i18nConfig = {
locale: uni.getLocale(),
messages
}
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
const app = new Vue({
store,
i18n,
...App
})
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import httpInterceptor from '@/api/http.interceptor.js';
Vue.use(httpInterceptor, app);
// http接口API抽离,免于写url或者一些固定的参数
import httpApi from '@/api/http.api.js';
Vue.use(httpApi, app);
require('./api/urlConfig')
app.$mount()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。