From 4be3eb430ef3cf74c9d3fee908156b5be297bed4 Mon Sep 17 00:00:00 2001 From: "952108534@qq.com" <952108534@qq.com> Date: Mon, 24 Jan 2022 14:15:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rc-busness/pages/myorder/usertion.vue | 20 ++++++++-------- rc-busness/pages/personal/discount.vue | 2 +- rc-busness/pages/personal/useraddress.vue | 14 ++++++++---- rc-busness/static/js/date.js | 28 +++++++++++++++++++++++ 4 files changed, 50 insertions(+), 14 deletions(-) create mode 100644 rc-busness/static/js/date.js 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 From adf7febb659c1f1ae9eda4d0cfc99c09d37e26ba Mon Sep 17 00:00:00 2001 From: "952108534@qq.com" <952108534@qq.com> Date: Mon, 24 Jan 2022 14:48:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rc-busness/assets/css/orderquantity.less | 4 ++-- rc-busness/pages/personal/useraddress.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rc-busness/assets/css/orderquantity.less b/rc-busness/assets/css/orderquantity.less index 9b12653e..c92bd4a5 100644 --- a/rc-busness/assets/css/orderquantity.less +++ b/rc-busness/assets/css/orderquantity.less @@ -279,7 +279,7 @@ align-items: center; height: 164px; .rc-usercenter{ - width: 25%; + width: 27%; em{ font-size: 18px; } @@ -329,7 +329,7 @@ display: flex; justify-content: space-between; align-items: center; - width: 58%; + width: 56%; font-size: 20px; color: #E1001A; font-weight: bold; diff --git a/rc-busness/pages/personal/useraddress.vue b/rc-busness/pages/personal/useraddress.vue index dc9584a5..3d2c8771 100644 --- a/rc-busness/pages/personal/useraddress.vue +++ b/rc-busness/pages/personal/useraddress.vue @@ -58,9 +58,9 @@ ¥{{item.ecPrice}}
    - ¥{{ item.userprice }} - {{ item.orderstype }} - ¥{{ item.userprice }} + ¥{{ item.ecPrice }} + {{ item.pcs }} + ¥{{ item.salesAmount }}