1 Star 0 Fork 570

MiasDad / 停车场系统小程序

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
main.js 1.01 KB
Copy Edit Raw Blame History
wangdefu authored 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/wangxin_it/parking_system_applet.git
git@gitee.com:wangxin_it/parking_system_applet.git
wangxin_it
parking_system_applet
停车场系统小程序
master

Search