diff --git a/packages/packageOrder/pages/myOrder/myOrder.vue b/packages/packageOrder/pages/myOrder/myOrder.vue index 425ba12..19b566a 100644 --- a/packages/packageOrder/pages/myOrder/myOrder.vue +++ b/packages/packageOrder/pages/myOrder/myOrder.vue @@ -7,9 +7,12 @@ - - {{item.txt}} + + + {{item.txt}} + + @@ -26,7 +29,7 @@ - {{$u.timeFormat(item.created_at, 'yyyy年mm月dd日')}} + {{$u.timeFormat(new Date(item.created_at.replace(/-/g,'/')), 'yyyy年mm月dd日')}} ¥{{item.total}} @@ -104,6 +107,10 @@ }, { state: "finished", txt: "已完成" + }, { + state: "canceled", + txt: "已取消", + showStatus:true }], user_info: {}, openid: "" @@ -229,7 +236,8 @@ for (var m of r.data.data) { var mod = this.statusLabels.filter((p) => { return p.state == m.state; - })[0]; + })[0]; + console.log("mod",mod) if (mod) m.statusName = mod.txt; } diff --git a/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue b/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue index 08d02e8..4860382 100644 --- a/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue +++ b/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue @@ -7,7 +7,7 @@ - 下单日期:{{$u.timeFormat(info.created_at, 'yyyy年mm月dd日 hh:MM')}} + 下单日期:{{$u.timeFormat(new Date(info.created_at.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM')}} 订单编号:{{info.serial}} @@ -110,6 +110,9 @@ }, { state: "finished", txt: "已完成" + },{ + state: "canceled", + txt: "已取消" }], corderstatusLabels: { @@ -230,20 +233,21 @@ data: { id: id }, - utilSuccess: res => { - console.log(res) - if (res.status == 1) { - uni.showModal({ - title: "订单已经删除!", - success: (res) => { - if (res.confirm) { - uni.navigateTo({ - url: "../myOrder/myOrder" - }) - } - } - }) - } + utilSuccess: r => { + console.log(r) + uni.showModal({ + title: "订单已取消!", + success: (re) => { + if (re.confirm) { + uni.navigateTo({ + url: "../myOrder/myOrder" + }) + } + } + }) + // if (res.status == 1) { + + // } }, utilFail: res => { uni.showToast({ diff --git a/pages/active/active.vue b/pages/active/active.vue index 3517c8c..58fd7f3 100644 --- a/pages/active/active.vue +++ b/pages/active/active.vue @@ -53,7 +53,7 @@ {{item.address}} 已报名数:{{item.start_member_sum+item.total}} - {{$u.timeFormat(item.start_date+' 00:00:00', 'yyyy年mm月dd日')}}至{{$u.timeFormat(item.end_date+' 00:00:00', 'yyyy年mm月dd日')}} + {{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}至{{$u.timeFormat(new Date(item.end_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} @@ -172,7 +172,9 @@ data: { page: page, page_size: 6, - keyword: that.keyword, + keyword: that.keyword, + sort_name:'sort', + sort_type:"ASC" }, utilSuccess: function(r) { var res = r.data; diff --git a/pages/active/detail.vue b/pages/active/detail.vue index b081111..38cab56 100644 --- a/pages/active/detail.vue +++ b/pages/active/detail.vue @@ -83,7 +83,7 @@ - {{$u.timeFormat(info.start_date+' 00:00:00', 'yyyy年mm月dd日')}} {{info.start_time}} + {{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}} @@ -92,7 +92,7 @@ - {{$u.timeFormat(info.end_date+' 00:00:00', 'yyyy年mm月dd日')}} {{info.end_time}} + {{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}} @@ -133,7 +133,7 @@ - {{$u.timeFormat(info.apply_start, 'yyyy年mm月dd日 hh:MM:ss')}} + {{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} @@ -142,7 +142,7 @@ - {{$u.timeFormat(info.apply_end, 'yyyy年mm月dd日 hh:MM:ss')}} + {{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} @@ -657,7 +657,7 @@ let packagesFirst = this.info ctx.fillText("" + this.info.active_name, 40, (h + 50) * 0.5 + 20 + 30); - ctx.fillText("报名时间:" + this.info.apply_start, 40, (h + 50) * 0.5 + 50 + 50); + ctx.fillText("报名开始:" + this.info.apply_start, 40, (h + 50) * 0.5 + 50 + 50); ctx.fillText("报名截止:" + this.info.apply_end, 40, (h + 50) * 0.5 + 60 + 60); let user_info = uni.getStorageSync("user_info_yunyubang"); @@ -864,19 +864,27 @@ api: "/api/member/active-apply", data: this.form, utilSuccess: res => { - uni.showToast({ - icon:'success', - title:res.msg, - duration:2000 - }) + console.log("res",res) + setTimeout(function(){ + uni.showToast({ + icon:'success', + title:res.msg, + duration:3000 + }) + },500) + this.showPop = false }, utilFail: err => { console.log(err,'err'); - uni.showToast({ - icon:'none', - title:err - }) + setTimeout(function(){ + uni.showToast({ + icon:'none', + title:err, + duration:3000 + }) + },500) + } }) }, diff --git a/pages/active/my.vue b/pages/active/my.vue index a353513..0926404 100644 --- a/pages/active/my.vue +++ b/pages/active/my.vue @@ -33,7 +33,7 @@ - {{$u.timeFormat(item.start_date+' 00:00:00', 'yyyy年mm月dd日')}} {{item.start_time}} + {{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{item.start_time}} @@ -42,7 +42,7 @@ - {{$u.timeFormat(item.end_date+' 00:00:00', 'yyyy年mm月dd日')}} {{item.end_time}} + {{$u.timeFormat(new Date(item.end_date), 'yyyy年mm月dd日')}} {{item.end_time}} diff --git a/utils/util.js b/utils/util.js index d15236c..23fdd1d 100755 --- a/utils/util.js +++ b/utils/util.js @@ -132,10 +132,14 @@ const request = options => { // 拼时间戳 options.data.ts = new Date().getTime(); } - + uni.request({ ...options, - success: function(res) { + success: function(res) { + // if(!options.hideload){ + // console.log("options.hideload") + // uni.hideLoading(); + // } uni.hideLoading(); if (res.statusCode != 200) { if (options.utilFail != undefined) {