127 lines
3.8 KiB
Vue
127 lines
3.8 KiB
Vue
|
|
import { createApp } from "vue";
|
||
|
|
import { Button, Tabs, Tab, NavBar, Grid, GridItem, Image as VanImage, Icon, Col, Row, Toast, Field, Collapse, CollapseItem, CellGroup, ConfigProvider, Tag, Dialog, Rate, Tabbar, TabbarItem, Empty, Picker, Popup, Uploader, Lazyload, PullRefresh, List, RadioGroup, Radio, ImagePreview, Swipe, SwipeItem, Form, Loading, Overlay, } from "vant";
|
||
|
|
import App from "./App.vue";
|
||
|
|
import router from "./router";
|
||
|
|
import config from "./config";
|
||
|
|
import "@/utils/tools";
|
||
|
|
// 修改后的主题样式必须放在最后面
|
||
|
|
import "amfe-flexible";
|
||
|
|
// import VConsole from 'vconsole';
|
||
|
|
// new VConsole();
|
||
|
|
const app = createApp(App);
|
||
|
|
// console.log(config);
|
||
|
|
// if (!window.openId) {
|
||
|
|
// window.openId = Request2("openid")
|
||
|
|
// }
|
||
|
|
// if (!window.openId) {
|
||
|
|
// let appId = config[
|
||
|
|
// import.meta.env.MODE].appId //正式
|
||
|
|
// let callbackUrl =
|
||
|
|
// config[
|
||
|
|
// import.meta.env.MODE].baseUrl + "/qdjx/home/getWechatUserInfo"
|
||
|
|
// let hash = window.location.hash;
|
||
|
|
// let callbackParam = {
|
||
|
|
// url: config[
|
||
|
|
// import.meta.env.MODE].h5Url + "/qdjx_h5/index.html",
|
||
|
|
// hash: hash.slice(2)
|
||
|
|
// }
|
||
|
|
// console.log('到这里')
|
||
|
|
// window.userInfo = null
|
||
|
|
// router.beforeEach((to, from, next) => {
|
||
|
|
// if (to.meta.title) {
|
||
|
|
// document.title = to.meta.title
|
||
|
|
// }
|
||
|
|
// if (!window.userInfo) {
|
||
|
|
// getUserInfo({
|
||
|
|
// openId: openId,
|
||
|
|
// }).then((data) => {
|
||
|
|
// window.userInfo = data
|
||
|
|
// window.userInfo.busiStatus = 0
|
||
|
|
// next()
|
||
|
|
// })
|
||
|
|
// .catch((data) => {
|
||
|
|
// next()
|
||
|
|
// })
|
||
|
|
// } else {
|
||
|
|
// next()
|
||
|
|
// }
|
||
|
|
// })
|
||
|
|
// // let callbackParam = {
|
||
|
|
// // url: config[
|
||
|
|
// // import.meta.env.MODE].baseUrl + "/qdjx_h5_bakk/index.html",
|
||
|
|
// // hash: hash.slice(2)
|
||
|
|
// // }
|
||
|
|
// // let replaceUrl =
|
||
|
|
// // "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +
|
||
|
|
// // appId +
|
||
|
|
// // "&redirect_uri=" +
|
||
|
|
// // callbackUrl +
|
||
|
|
// // "?callBackJson=" +
|
||
|
|
// // encodeURIComponent(JSON.stringify(callbackParam)) +
|
||
|
|
// // "&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
|
||
|
|
// // window.location.href = replaceUrl
|
||
|
|
// } else {
|
||
|
|
// console.log('到这里')
|
||
|
|
// window.userInfo = null
|
||
|
|
// router.beforeEach((to, from, next) => {
|
||
|
|
// if (to.meta.title) {
|
||
|
|
// document.title = to.meta.title
|
||
|
|
// }
|
||
|
|
// if (!window.userInfo) {
|
||
|
|
// getUserInfo({
|
||
|
|
// openId: openId,
|
||
|
|
// }).then((data) => {
|
||
|
|
// window.userInfo = data
|
||
|
|
// window.userInfo.busiStatus = 0
|
||
|
|
// next()
|
||
|
|
// })
|
||
|
|
// .catch((data) => {
|
||
|
|
// next()
|
||
|
|
// })
|
||
|
|
// } else {
|
||
|
|
// next()
|
||
|
|
// }
|
||
|
|
// })
|
||
|
|
// }
|
||
|
|
// 全局过滤器
|
||
|
|
app.config.globalProperties.$filters = {};
|
||
|
|
app
|
||
|
|
.use(router)
|
||
|
|
.use(Button)
|
||
|
|
.use(Tabs)
|
||
|
|
.use(Tab)
|
||
|
|
.use(NavBar)
|
||
|
|
.use(Grid)
|
||
|
|
.use(GridItem)
|
||
|
|
.use(VanImage)
|
||
|
|
.use(Icon)
|
||
|
|
.use(Col)
|
||
|
|
.use(Row)
|
||
|
|
.use(Toast)
|
||
|
|
.use(Form)
|
||
|
|
.use(Field)
|
||
|
|
.use(CellGroup)
|
||
|
|
.use(ConfigProvider)
|
||
|
|
.use(Empty)
|
||
|
|
.use(Tag)
|
||
|
|
.use(Collapse)
|
||
|
|
.use(CollapseItem)
|
||
|
|
.use(Dialog)
|
||
|
|
.use(Rate)
|
||
|
|
.use(Tabbar)
|
||
|
|
.use(TabbarItem)
|
||
|
|
.use(Picker)
|
||
|
|
.use(Popup)
|
||
|
|
.use(Uploader)
|
||
|
|
.use(Lazyload)
|
||
|
|
.use(PullRefresh)
|
||
|
|
.use(List)
|
||
|
|
.use(RadioGroup)
|
||
|
|
.use(Radio)
|
||
|
|
.use(ImagePreview)
|
||
|
|
.use(Swipe)
|
||
|
|
.use(SwipeItem)
|
||
|
|
.use(Loading)
|
||
|
|
.use(Overlay);
|
||
|
|
app.mount("#app");
|
||
|
|
//# sourceMappingURL=main.js.map
|