2024-02-02 14:44:30 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
|
import store from './store';
|
|
|
|
|
import App from './App'
|
|
|
|
|
import util from './untils/func.js'
|
2024-02-06 15:49:51 +08:00
|
|
|
import uView from '@/uni_modules/uview-ui'
|
|
|
|
|
|
2024-02-02 14:44:30 +08:00
|
|
|
// 注册全局组件
|
|
|
|
|
// 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)
|
|
|
|
|
|
2024-02-19 15:15:20 +08:00
|
|
|
function navTo(url, needLogin) {
|
2024-02-19 20:28:04 +08:00
|
|
|
console.log(url)
|
2024-02-19 15:15:20 +08:00
|
|
|
if(needLogin) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const msg = (title, duration=1500, mask=false, icon='none')=>{
|
|
|
|
|
if(typeof title === 'string'){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title,
|
|
|
|
|
duration,
|
|
|
|
|
mask,
|
|
|
|
|
icon
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-02 14:44:30 +08:00
|
|
|
// 注册全局组件
|
|
|
|
|
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)
|
|
|
|
|
|
2024-02-19 15:15:20 +08:00
|
|
|
Vue.prototype.$api = { msg }
|
|
|
|
|
Vue.prototype.navTo = navTo
|
2024-02-02 14:44:30 +08:00
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
|
|
|
|
|
Vue.use(util)
|
2024-02-06 15:49:51 +08:00
|
|
|
Vue.use(uView)
|
2024-02-02 14:44:30 +08:00
|
|
|
|
|
|
|
|
App.mpType = 'app'
|
|
|
|
|
const app = new Vue({
|
|
|
|
|
...App,store
|
|
|
|
|
})
|
|
|
|
|
app.$mount()
|