doum
2025-09-26 9057e04efad1b7d61c77a72e5c37a504d0aee935
h5/main.js
@@ -1,36 +1,45 @@
import App from './App'
import store from './store/index.js'
import uView from "uview-ui"
// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
import store from './store/index.js'
import './uni.promisify.adaptor'
import Vconsole from 'vconsole'
import * as ww from '@wecom/jssdk'
Vue.config.productionTip = false
Vue.use(uView)
Vue.prototype.$store = store
Vue.prototype.showToast = (str) => {
   setTimeout(() => {
      uni.showToast({
        title: str,
        icon: 'none',
        duration: 2000
      })
   })
}
Vue.prototype.$eventBus = new Vue()
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif
Vue.use(uView);
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
// Vue.prototype.$baseUrl = 'https://dmtest.ahapp.net/lianhelihua_interface'
Vue.prototype.$baseUrl = 'http://192.168.0.134:10040'
Vue.prototype.$store = store;
Vue.prototype.$ww = ww;
Vue.prototype.$vConsole= new Vconsole()
//禁止滑动
Vue.prototype.stopScroll = function () {
   var box = function(e) { passive: false };
   document.body.style.overflow = 'hidden';
   document.addEventListener("touchmove", box, false);
}
// #endif
//可以滑动
Vue.prototype.canScroll = function () {
   var box = function(e) { passive: false };
   document.body.style.overflow= '';
   document.removeEventListener("touchmove", box, false);
}
const app = new Vue({
   store,
   ...App
})
// http接口API抽离
import httpApi from '@/utils/http.api.js'
Vue.use(httpApi, app)
// 请求拦截器
import interceptor from '@/utils/http.interceptor.js'
Vue.use(interceptor, app)
app.$mount()