Commit 24103ef1 by damodmg

截取时间为时分秒

parent 03d2d4f3
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.8562191dfd41046ca7bcf2df02598ce3.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.033f1bc81ae229cf9d6a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.298340dca964282543362dbb6435a9d8.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.3ea0c93b2e2e96337349.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -50,6 +50,16 @@ export default {
date >= 10 ? (date = date) : (date = '0' + date); //判断小于10日的情况
return year + '-' + month + '-' + date;
},
getTime2: function(time) {
if (!isNaN(time)) time = Number(time);
var now = new Date(time);
var year = now.getFullYear();
var month = now.getMonth() + 1;
month >= 10 ? (month = month) : (month = '0' + month); //判断小于10月份的情况
var date = now.getDate();
date >= 10 ? (date = date) : (date = '0' + date); //判断小于10日的情况
return year + '.' + month + '.' + date;
},
// 时间戳转换成时分秒
getSeconds: function(time) {
if (!isNaN(time)) time = Number(time);
......
......@@ -201,6 +201,7 @@ export default {
return {
getTimeAll: getInputVal.formatDate,
getTime: getInputVal.getTime,
getTime2: getInputVal.getTime2,
getHours: getInputVal.getHours,
fixedWidth: document.documentElement.clientWidth - 200,
// 卡券数据
......@@ -432,8 +433,8 @@ export default {
if (this.cardList) {
this.couponForm.cardType = this.cardList[0].cardType;
for (let item of this.cardList) {
item.beginDate = this.getTimeAll(item.beginDate);
item.endDate = this.getTimeAll(item.endDate);
item.beginDate = this.getTime2(item.beginDate);
item.endDate = this.getTime2(item.endDate);
}
}
if (res.data.result.status === 0) {
......
......@@ -330,6 +330,7 @@ export default {
return {
getTimeAll: getInputVal.formatDate,
getTime: getInputVal.getTime,
getTime2: getInputVal.getTime2,
getHours: getInputVal.getHours,
fixedWidth: document.documentElement.clientWidth - 200,
projectName: 'integral-mall',
......@@ -498,8 +499,8 @@ export default {
this.cardList.push(res.data.result);
if (this.cardList) {
for (let item of this.cardList) {
item.beginDate = this.getTimeAll(item.beginDate);
item.endDate = this.getTimeAll(item.endDate);
item.beginDate = this.getTime2(item.beginDate);
item.endDate = this.getTime2(item.endDate);
}
}
this.couponCardStock = res.data.result.couponStock; //兑换券库存
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment