12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import App from './App'
- // #ifndef VUE3
- import Vue from 'vue'
- Vue.config.productionTip = false
- App.mpType = 'app'
- import system from '@/utils/system.js'
- Vue.mixin(system);
- import CusHeader from '@/components/CusHeader'
- Vue.component('CusHeader',CusHeader);
- //日期格式处理
- import dateFormat from '@/utils/dateFormat.js'
- Vue.use(dateFormat);
- import regTest from './utils/reg.js'
- import api from '@/http/index.js'
- Vue.prototype.$api = api;
- Vue.prototype.$reg = regTest;
- Vue.prototype.$imgBase = "http://106.54.209.120:8666/image/";
- //重载uni.showToast,简化调用
- Vue.prototype.$showToast = function(title, duration = 2000, icon = "none") {
- return uni.showToast({
- title,
- duration,
- icon
- })
- }
- //重载uni.showModal,简化调用
- Vue.prototype.$showModal = function(content) {
- return uni.showModal({
- title:'温馨提示',
- content,
- showCancel:false,
- confirmText: '确定',
- confirmColor: '#007A69'
- })
- }
- // 引入全局uView
- import uView from '@/uni_modules/uview-ui'
- Vue.use(uView)
- uni.$u.config.unit = 'rpx'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import {
- createSSRApp
- } from 'vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
|