74 Star 871 Fork 562

隔壁小王子 / 停车场系统小程序,新能源电动车充电系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
//把vuex定义成全局组件
Vue.prototype.$store = store
App.mpType = 'app'
//时间戳转换
Vue.prototype.add0 = function(m) {
return m < 10 ? '0' + m : m
};
//#ifdef H5
// import VConsole from 'vconsole'
// const vConsole = new VConsole()
//#endif
// 引入JsonP
import {VueJsonp} from 'vue-jsonp'
Vue.use(VueJsonp)
// Vue.config.ignoredElements = ['wx-open-launch-weapp'];
Vue.prototype.getDateymd = function(str) {
var time = new Date(str);
var y = time.getFullYear();
var m = time.getMonth() + 1;
var d = time.getDate();
var h = time.getHours();
var mm = time.getMinutes();
var s = time.getSeconds();
return y + '.' + this.add0(m) + '.' + this.add0(d);
};
Vue.prototype.openMap = function(latitude, longitude, name, address) {
uni.openLocation({
latitude: latitude,
longitude: longitude,
name: name,
address: address,
success: function() {
console.log('success');
}
});
};
// 引入全局uView
import uView from 'uview-ui'
Vue.use(uView);
// 引入vuex
import store from '@/store';
// 引入uView提供的对vuex的简写法文件
let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);
const app = new Vue({
...App,
store
})
// http拦截器,此为需要加入的内容,如果不是写在common目录,请自行修改引入路径
import httpInterceptor from '@/common/http.interceptor.js'
// 这里需要写在最后,是为了等Vue创建对象完成,引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)
// http接口API集中管理引入部分
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
app.$mount()
JavaScript
1
https://gitee.com/wangdefu/parking_system_applet.git
git@gitee.com:wangdefu/parking_system_applet.git
wangdefu
parking_system_applet
停车场系统小程序,新能源电动车充电系统
master

搜索帮助