flat: 添加config项目配置文件
This commit is contained in:
116
main.js
116
main.js
@@ -1,55 +1,61 @@
|
||||
import Vue from 'vue'
|
||||
import store from './store';
|
||||
import App from './App'
|
||||
import util from './untils/func.js'
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
|
||||
// 注册全局组件
|
||||
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
|
||||
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
|
||||
// Vue.component('mescroll-body', MescrollBody)
|
||||
// Vue.component('mescroll-uni', MescrollUni)
|
||||
|
||||
import empty from '@/components/empty/empty.vue'
|
||||
function navTo(url, needLogin) {
|
||||
console.log(url)
|
||||
if(needLogin) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
const msg = (title, duration=1500, mask=false, icon='none')=>{
|
||||
uni.showToast({
|
||||
title,
|
||||
duration,
|
||||
mask,
|
||||
icon
|
||||
});
|
||||
}
|
||||
|
||||
// 注册全局组件
|
||||
import JlButton from "@/components/jl-button/main.vue"
|
||||
import JlForm from "@/components/jl-form/main.vue"
|
||||
import JlFormItem from "@/components/jl-form/item.vue"
|
||||
import CSButton from "@/components/cs-button/main.vue"
|
||||
Vue.component('jl-button', JlButton)
|
||||
Vue.component('jl-form', JlForm)
|
||||
Vue.component('jl-form-item', JlFormItem)
|
||||
Vue.component('cs-button', CSButton)
|
||||
Vue.component('empty', empty)
|
||||
|
||||
Vue.prototype.$api = { msg }
|
||||
Vue.prototype.navTo = navTo
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(util)
|
||||
Vue.use(uView)
|
||||
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App,store
|
||||
})
|
||||
app.$mount()
|
||||
import Vue from 'vue'
|
||||
import store from './store';
|
||||
import App from './App'
|
||||
import util from './untils/func.js'
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
import config from './config';
|
||||
|
||||
// 注册全局组件
|
||||
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
|
||||
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
|
||||
// Vue.component('mescroll-body', MescrollBody)
|
||||
// Vue.component('mescroll-uni', MescrollUni)
|
||||
|
||||
import empty from '@/components/empty/empty.vue'
|
||||
|
||||
function navTo(url, needLogin) {
|
||||
console.log(url)
|
||||
if (needLogin) {
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
const msg = (title, duration = 1500, mask = false, icon = 'none') => {
|
||||
uni.showToast({
|
||||
title,
|
||||
duration,
|
||||
mask,
|
||||
icon
|
||||
});
|
||||
}
|
||||
|
||||
// 注册全局组件
|
||||
import JlButton from "@/components/jl-button/main.vue"
|
||||
import JlForm from "@/components/jl-form/main.vue"
|
||||
import JlFormItem from "@/components/jl-form/item.vue"
|
||||
import CSButton from "@/components/cs-button/main.vue"
|
||||
Vue.component('jl-button', JlButton)
|
||||
Vue.component('jl-form', JlForm)
|
||||
Vue.component('jl-form-item', JlFormItem)
|
||||
Vue.component('cs-button', CSButton)
|
||||
Vue.component('empty', empty)
|
||||
|
||||
Vue.prototype.$api = {
|
||||
msg
|
||||
}
|
||||
Vue.prototype.$config = config
|
||||
Vue.prototype.navTo = navTo
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(util)
|
||||
Vue.use(uView)
|
||||
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App,
|
||||
store
|
||||
})
|
||||
app.$mount()
|
||||
Reference in New Issue
Block a user