Files

62 lines
1.3 KiB
JavaScript
Raw Permalink Normal View History

2025-11-07 09:56:20 +08:00
import App from "./App";
import Vue from "vue";
// vuex
import store from "./store";
// 引入全局uView
import uView from "@/uni_modules/uview-ui";
2025-11-27 03:55:38 +08:00
//import pagejson from "@/pages.json"
2025-11-07 09:56:20 +08:00
Vue.use(uView);
2025-11-27 03:55:38 +08:00
uni.addInterceptor('navigateTo',{
invoke(e){
// uni.showModal({
// content:"aaaaaaaa",
// })
//const pages = getCurrentPages(); // 获取当前页面栈
//const currentPage = pages[pages.length - 1]; // 获取当前页面对象
//console.log(currentPage.$page);
//return true;
},
returnValue(e){
// uni.showModal({
// content:"sss",
// })
//console.log(JSON.stringify(e))
}
});
uni.$u.setConfig({
// 修改$u.config对象的属性
config: {
// 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx'
//unit: 'rpx'
},
// 修改$u.props对象的属性
props: {
// 修改radio组件的size参数的默认值,相当于执行 uni.$u.props.radio.size = 30
radio: {
size: 15
},
tabs:{
lineColor:'#07c160'
}
// 其他组件属性配置
// ......
}
})
2025-11-07 09:56:20 +08:00
Vue.prototype.$store = store;
Vue.config.productionTip = false;
App.mpType = "app";
const app = new Vue({
store,
...App,
});
2025-12-17 09:13:15 +08:00
app.REQUEST_TRACE = process.env.NODE_ENV == 'development';
2026-01-01 04:15:30 +08:00
app.REQUEST_TRACE = false;
2025-11-07 09:56:20 +08:00
// 引入请求封装
2025-12-08 18:10:51 +08:00
import request from "./util/request/index";
request(app)
2025-11-07 09:56:20 +08:00
app.$mount();