diff --git a/rc-busness/pages/myorder/usertion.vue b/rc-busness/pages/myorder/usertion.vue index 9fa62e32..bb03cd94 100644 --- a/rc-busness/pages/myorder/usertion.vue +++ b/rc-busness/pages/myorder/usertion.vue @@ -40,18 +40,18 @@
- +
{{ userlist.productName }}
- 规格:{{ item.productId }} + 规格:{{ userlist.specifications }}
- 数量:{{ item.pcs }}件 - ¥{{ 10 }} + 数量:{{ userlist.pcs }}件 + ¥{{ userlist.ecPrice }}
{{customer}}
@@ -96,7 +96,7 @@
  • 下单时间:: - {{ item.orderDate }} + {{ logisticsDate }}
  • 付款方式:: @@ -147,8 +147,12 @@ import Myheader from "~/components/header.vue"; import { mapMutations } from "vuex"; import { userin} from "../../ajax/getData"; - import MyFooter from '~/components/rc-footer.vue' + import MyFooter from '~/components/rc-footer.vue'; + import Vue from 'vue'; +let vm = new Vue(); + import formatConversion from '../../static/js/date' import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData"; + export default { data() { return { @@ -276,9 +280,7 @@ if(data){ else if(this.trackingstates==2){ this.trackingstates='未发货' } - console.log(this.goldmedal[i].orderDate); - this.logisticsDate=new Date(this.goldmedal[i].orderDate.toLocaleString())//时间戳 - console.log(this.logisticsDate); + this.logisticsDate=this.formatConversion(this.goldmedal[i].orderDate)//时间戳 this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司 this.orderNumber=this.goldmedal[i].orderNumber this.usersalesAmount=this.goldmedal[i].salesAmount; diff --git a/rc-busness/pages/personal/discount.vue b/rc-busness/pages/personal/discount.vue index 32045c60..cbf93649 100644 --- a/rc-busness/pages/personal/discount.vue +++ b/rc-busness/pages/personal/discount.vue @@ -41,7 +41,7 @@
  • - {{ item.couponName }} + {{ item.couponDesc }}
    有效期 diff --git a/rc-busness/pages/personal/useraddress.vue b/rc-busness/pages/personal/useraddress.vue index c50c5415..dc9584a5 100644 --- a/rc-busness/pages/personal/useraddress.vue +++ b/rc-busness/pages/personal/useraddress.vue @@ -44,18 +44,18 @@
    - +
    - {{ item.usereat }} + {{ item.productName }}
    - 规格:{{ item.num }} + 规格:{{ item.specifications }}
    数量:{{ item.pcs }}件 - ¥10 + ¥{{item.ecPrice}}
    ¥{{ item.userprice }} @@ -322,6 +322,12 @@ export default { this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName; this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber; this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount; + // this.useralllist[i].picFile = this.goldmedal[i].picFile; //图片路径 + // this.useralllist[i].productName=this.goldmedal[i].productName;//商品名称 + // this.useralllist[i].ecPrice=this.goldmedal[i].ecPrice//第一个的单价 + // this.useralllist[i].pcs=this.goldmedal[i].pcs//数量 + + this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length } console.log(this.obligation) diff --git a/rc-busness/static/js/date.js b/rc-busness/static/js/date.js new file mode 100644 index 00000000..5b05c6ac --- /dev/null +++ b/rc-busness/static/js/date.js @@ -0,0 +1,28 @@ + +//时间戳转化成格式时间 +import Vue from 'vue'; +Vue.prototype.formatConversion = function (te){ + if(te == ''){ + return ''; + }else if(te.length == 10){ + var time = new Date(te * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000 + var y = time.getFullYear(); + var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1; + var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate(); + var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours(); + var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes(); + var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds(); + var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s; + return timedate; + }else{ + var time = new Date(te); + var y = time.getFullYear(); + var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1; + var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate(); + var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours(); + var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes(); + var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds(); + var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s; + return timedate; + } +} \ No newline at end of file