1 Star 0 Fork 562

cctv1 / 停车场系统小程序

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.js 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
wangdefu 提交于 2020-08-05 11:23 . 第一版源代码
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.serviceUrl = "http://139.9.155.149/"
Vue.prototype.token = ""
//时间戳转换
Vue.prototype.add0 = function (m) {
return m < 10 ? '0' + m : m
};
Vue.prototype.getDatey = 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.getDate = function (str) {
if(str==0){
return "";
}
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) + ' ' + this.add0(h) + ':' + this.add0(mm) + ':' + this.add0(s);
};
const app = new Vue({
...App
})
app.$mount()
JavaScript
1
https://gitee.com/8684/parking_system_applet.git
git@gitee.com:8684/parking_system_applet.git
8684
parking_system_applet
停车场系统小程序
master

搜索帮助