Commit 43e47646 authored by liwenhong's avatar liwenhong

fix:dateformat

parent 14324871
...@@ -220,7 +220,6 @@ ...@@ -220,7 +220,6 @@
end-placeholder="结束日期" end-placeholder="结束日期"
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
@change="pickerStartTime"
:disabled="checkedAddTime.online_type!=2" :disabled="checkedAddTime.online_type!=2"
> >
</el-date-picker> </el-date-picker>
...@@ -440,9 +439,14 @@ export default { ...@@ -440,9 +439,14 @@ export default {
this.showGoodsAddTime = true; this.showGoodsAddTime = true;
this.checkedAddTime.goods_spu_id = id; this.checkedAddTime.goods_spu_id = id;
}, },
changeDate(dateA) {
let time = new Date(dateA).toJSON();
let date = new Date(+new Date(time)+8*3600*1000).toISOString().replace(/T/g,' ').replace(/\.[\d]{3}Z/,'');
return date;
},
async handleConfirmRefund() { async handleConfirmRefund() {
this.checkedAddTime.online_start_time = this.addTimeRange[0]; this.checkedAddTime.online_start_time = this.changeDate(this.addTimeRange[0]);
this.checkedAddTime.online_end_time = this.addTimeRange[1]; this.checkedAddTime.online_end_time = this.changeDate(this.addTimeRange[1]);
let res = await putOnlineSite(this.checkedAddTime); let res = await putOnlineSite(this.checkedAddTime);
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
this.showGoodsAddTime = false; this.showGoodsAddTime = false;
......
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