You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
639 B
37 lines
639 B
7 months ago
|
import Vue from 'vue'
|
||
|
import store from './store'
|
||
|
import App from './App'
|
||
|
|
||
|
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];
|
||
|
// #ifdef H5
|
||
|
return prePage;
|
||
|
// #endif
|
||
|
return prePage.$vm;
|
||
|
}
|
||
|
|
||
|
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()
|