From c73e64db7f6341d65025188e5ae2f7ecb8a37c84 Mon Sep 17 00:00:00 2001 From: imax <373170631@qq.com> Date: Sat, 2 Jul 2022 19:24:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug-20220702-1924?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/center/center.wxml | 7 ++++--- pages/center/order/order.js | 20 +++++++++++++++++++- pages/center/order/order.wxml | 4 ++-- pages/center/order/order.wxss | 2 +- pages/center/orderdetail/orderdetail.js | 16 ++++++++++++++++ pages/club/club.js | 2 +- pages/club/clubDetail/clubDetail.wxml | 4 ++-- pages/index/myjoin/myjoin.js | 17 +++++++++++++++-- 8 files changed, 60 insertions(+), 12 deletions(-) diff --git a/pages/center/center.wxml b/pages/center/center.wxml index 3bf7b73..ab5079e 100644 --- a/pages/center/center.wxml +++ b/pages/center/center.wxml @@ -9,9 +9,10 @@ 我的活动 - 查看全部 + + - + diff --git a/pages/center/order/order.js b/pages/center/order/order.js index 30a08a7..f5b1f86 100644 --- a/pages/center/order/order.js +++ b/pages/center/order/order.js @@ -20,6 +20,17 @@ Page({ url: '../orderdetail/orderdetail?id='+e.currentTarget.dataset.id+'' }) }, + timeFormat(d, format = 'yyyy-MM-dd HH:mm:ss'){ + let fnumber = v => v > 10 ? `${v}` : ('0' + v); + let date = new Date(d); + let result = format.replace('yyyy', date.getFullYear()); + result = result.replace('MM', fnumber(date.getMonth() + 1)); + result = result.replace('dd', fnumber(date.getDay())); + result = result.replace('HH', fnumber(date.getHours())); + result = result.replace('mm', fnumber(date.getMinutes())); + result = result.replace('ss', fnumber(date.getSeconds())); + return result; + }, currentTab: function (e) { var that = this; if (that.data.currentTab == e.currentTarget.dataset.idx) { @@ -109,7 +120,14 @@ Page({ datas.cost = val.cost; datas.createdTime = val.createdTime; datas.orderId = val.orderId; - orderlist = orderlist.concat(datas); + // console.log('datas:', datas) + // orderlist.forEach(item => { + datas.startTime = that.timeFormat(datas.startTime, 'yyyy-MM-dd HH:mm'); + datas.endTime = that.timeFormat(datas.endTime, 'yyyy-MM-dd HH:mm'); + // }); + + orderlist = orderlist.concat([datas]); + // console.log('orderlist:', orderlist); that.setData({ // array:array, orderlist:orderlist diff --git a/pages/center/order/order.wxml b/pages/center/order/order.wxml index f2c563a..da7af24 100644 --- a/pages/center/order/order.wxml +++ b/pages/center/order/order.wxml @@ -1,10 +1,10 @@ - + diff --git a/pages/center/order/order.wxss b/pages/center/order/order.wxss index cfb51b1..8df20c3 100644 --- a/pages/center/order/order.wxss +++ b/pages/center/order/order.wxss @@ -4,7 +4,7 @@ .navtop> view{text-align:center;width:33%;} .navtop> view text{height:70rpx; display:inline-block;line-height: 70rpx;color:#979797;font-size: 28rpx;} .navtop .cur text{ border-bottom:4rpx solid #FE4C00; color:#494949;font-size: 30rpx;} -.circle{width:94%;margin:120rpx auto 0;} +.circle{width:94%;/*margin:120rpx auto 0;*/} .circle .list{width:94%;margin:24rpx auto;background:#fff;padding:0 24rpx;border-radius:16rpx;box-shadow: 0px 4rpx 12rpx 0px rgba(0,0,0,0.06); } .circle .list .list-top{display: flex;justify-content: space-between;height:86rpx;line-height:86rpx;font-size:28rpx;border-bottom:2rpx solid #f1f1f1;} .circle .list .list-content{display: flex;justify-content: start;padding:24rpx 0;} diff --git a/pages/center/orderdetail/orderdetail.js b/pages/center/orderdetail/orderdetail.js index dc5289b..69b1e7e 100644 --- a/pages/center/orderdetail/orderdetail.js +++ b/pages/center/orderdetail/orderdetail.js @@ -65,12 +65,28 @@ Page({ datas.cost = val.cost; datas.createdTime = val.createdTime; datas.orderId = val.orderId; + + datas.startRegisterTime = that.timeFormat(datas.startRegisterTime, 'yyyy-MM-dd HH:mm'); + datas.endRegisterTime = that.timeFormat(datas.endRegisterTime, 'yyyy-MM-dd HH:mm'); + datas.startTime = that.timeFormat(datas.startTime, 'yyyy-MM-dd HH:mm'); + datas.endTime = that.timeFormat(datas.endTime, 'yyyy-MM-dd HH:mm'); that.setData({ val:datas }) that.getClubInfo(datas.clubId); }) }, + timeFormat(d, format = 'yyyy-MM-dd HH:mm:ss'){ + let fnumber = v => v > 10 ? `${v}` : ('0' + v); + let date = new Date(d); + let result = format.replace('yyyy', date.getFullYear()); + result = result.replace('MM', fnumber(date.getMonth() + 1)); + result = result.replace('dd', fnumber(date.getDay())); + result = result.replace('HH', fnumber(date.getHours())); + result = result.replace('mm', fnumber(date.getMinutes())); + result = result.replace('ss', fnumber(date.getSeconds())); + return result; + }, getClubInfo:function(id){ var that = this; const imgUrl = wx.getStorageSync('imgUrl'); diff --git a/pages/club/club.js b/pages/club/club.js index 4be5653..3879039 100644 --- a/pages/club/club.js +++ b/pages/club/club.js @@ -3,7 +3,7 @@ var re = require('../../utils/request.js'); Page({ /** - * 页面的初始数据 + * 页面的初始数据 */ data: { scrolls:[], diff --git a/pages/club/clubDetail/clubDetail.wxml b/pages/club/clubDetail/clubDetail.wxml index e3b0695..29deb95 100644 --- a/pages/club/clubDetail/clubDetail.wxml +++ b/pages/club/clubDetail/clubDetail.wxml @@ -61,7 +61,7 @@ 相 册 - + diff --git a/pages/index/myjoin/myjoin.js b/pages/index/myjoin/myjoin.js index ce32318..860f480 100644 --- a/pages/index/myjoin/myjoin.js +++ b/pages/index/myjoin/myjoin.js @@ -40,7 +40,7 @@ Page({ clubId: '', isHava: false, info: {}, - checked: true + checked: false }, history: function () { wx.navigateTo({ @@ -60,6 +60,11 @@ Page({ }) that.init(); }, + xieyi(e){ + this.setData({ + checked: e.detail.value.length > 0 + }); + }, init: function () { let that = this; this.setData({ @@ -194,8 +199,16 @@ Page({ title: '请确保表单全部填写完成', icon:'none' }) - return + return; } + if(!this.data.checked){ + wx.showToast({ + title: '请勾选协议', + icon:'none' + }); + return; + } + let postData = that.data.info.details; // 本地存储用于