12 Star 107 Fork 205

macro / mall-app-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 639 Bytes
一键复制 编辑 原始数据 按行查看 历史
macro 提交于 2022-12-15 15:19 . 移动商城代码上传
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()
JavaScript
1
https://gitee.com/macrozheng/mall-app-web.git
git@gitee.com:macrozheng/mall-app-web.git
macrozheng
mall-app-web
mall-app-web
master

搜索帮助