123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import Vue from 'vue'
- import store from './store'
- import App from './App'
- import home from './components/home/index.vue'
- const msg = (title, duration=1500, mask=false, icon='none')=>{
-
- if(Boolean(title) === false){
- return;
- }
- uni.showToast({
- title,
- duration,
- mask,
- icon
- });
- }
- const prePage = ()=>{
-
- let pages = getCurrentPages();
- let prePage = pages[pages.length - 2];
-
- return prePage;
-
- return prePage.$vm;
- }
- Vue.component('home',home)
- Vue.config.productionTip = false
- Vue.prototype.$fire = new Vue();
- Vue.prototype.$store = store;
- Vue.prototype.$api = {msg, prePage};
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
|