diff --git a/images/popBac.png b/images/popBac.png index 9b6ef66..bbf6714 100644 Binary files a/images/popBac.png and b/images/popBac.png differ diff --git a/pages/center/center.wxml b/pages/center/center.wxml index 8f99535..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 fa2db45..da7af24 100644 --- a/pages/center/order/order.wxml +++ b/pages/center/order/order.wxml @@ -1,10 +1,10 @@ - + @@ -24,7 +24,7 @@ {{item.activityName}} - {{item.startTime}} - {{item.endTime}} + 开始:{{item.startTime}} 结束:{{item.endTime}} {{item.createdTime}}¥{{item.cost}} 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/center/orderdetail/orderdetail.wxml b/pages/center/orderdetail/orderdetail.wxml index 4f88864..2bff73c 100644 --- a/pages/center/orderdetail/orderdetail.wxml +++ b/pages/center/orderdetail/orderdetail.wxml @@ -47,7 +47,7 @@ 俱乐部电话 - {{company.clubTel}} + {{company.clubPhone}} diff --git a/pages/center/orderdetail/orderdetail.wxss b/pages/center/orderdetail/orderdetail.wxss index 4a2e191..47b934d 100644 --- a/pages/center/orderdetail/orderdetail.wxss +++ b/pages/center/orderdetail/orderdetail.wxss @@ -15,6 +15,7 @@ page{background: #EDEDED;} .carList .carInfo .carPrice{line-height:60rpx;width:100%;height:60rpx;font-size:24rpx;color:#E60303;} .carList .carInfo .carChange{line-height:50rpx;width:100%;height:50rpx;font-size:24rpx;color:#8C8989;display:flex;justify-content: space-between;} .contentCircle{padding:20rpx 0;} -.infomation{height:60rpx;line-height:60rpx;display: flex;justify-content: space-between;font-size:28rpx;} +.infomation{line-height:60rpx;font-size:28rpx;} +/* height:60rpx; display: flex;justify-content: space-between; */ .infomation .shoptitle{color:#807373} .footer{width:94%;height:96rpx;line-height:96rpx;text-align: center;background:#F66A01;color:#fff;margin:34rpx auto;border-radius:16rpx;} \ No newline at end of file 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/club.wxml b/pages/club/club.wxml index 1d08856..70a50a3 100644 --- a/pages/club/club.wxml +++ b/pages/club/club.wxml @@ -1,6 +1,6 @@ - + 活动:{{company.totalActivity?company.totalActivity:0}} | @@ -61,7 +61,7 @@ 相 册 - + 报名中 - + - + - {{item.intro}} - {{item.time}} - {{item.name}} + {{item.activityName}} + {{item.startRegisterTime}}至{{item.endRegisterTime}} + diff --git a/pages/club/manage/manage.js b/pages/club/manage/manage.js index 8ba02dd..2ee9941 100644 --- a/pages/club/manage/manage.js +++ b/pages/club/manage/manage.js @@ -11,7 +11,8 @@ Page({ {id:'0',name:'允许任何人加入'},{id:'1',name:'需验证加入'} ], accts:[ - {id:'1',name:'会长账户'},{id:'2',name:'管理员账户'} + {id:'1',name:'会长账户'}, + // {id:'2',name:'管理员账户'} ], acctindex:0, joinWay:'0', @@ -36,6 +37,11 @@ Page({ joinWay:that.data.array[e.detail.value].id }) }, + textDetailChange(e){ + this.setData({ + company: {...this.data.company, clubIntroduction: e.detail.value} + }) + }, accountChange: function(e) { var that = this; that.setData({ @@ -254,6 +260,7 @@ uploadcom: function (e) { joinWay:that.data.joinWay, payType:that.data.payType }; + re.request(Api.changeClub(), postData, header).then((res) => { let datas = res.data.data; console.log(datas); diff --git a/pages/club/manage/manage.wxml b/pages/club/manage/manage.wxml index 191d993..a430005 100644 --- a/pages/club/manage/manage.wxml +++ b/pages/club/manage/manage.wxml @@ -3,7 +3,7 @@
俱乐部名称 - + - + + 移除成员 diff --git a/pages/dateTimePicker.js b/pages/dateTimePicker.js index 89e8b15..a63d91e 100644 --- a/pages/dateTimePicker.js +++ b/pages/dateTimePicker.js @@ -69,7 +69,7 @@ function withData(param) { // 处理联动列表数据 /*年月日 时分秒*/ dateTimeArray[0] = getLoopArray(start, end); - dateTimeArray[1] = getLoopArray(1, 12); + dateTimeArray[1] = getLoopArray(+defaultDate[1], 12); dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]); dateTimeArray[3] = getLoopArray(0, 23); dateTimeArray[4] = getLoopArray(0, 59); diff --git a/pages/index/activeDetail/activeDetail.wxml b/pages/index/activeDetail/activeDetail.wxml index 70a49b0..b5b1a0d 100644 --- a/pages/index/activeDetail/activeDetail.wxml +++ b/pages/index/activeDetail/activeDetail.wxml @@ -5,7 +5,7 @@ {{detail.activityName}} - {{detail.lowestPrice?detail.lowestPrice:0}} + {{detail.lowestPrice?detail.lowestPrice:0}} 浏览{{detail.totalRead?detail.totalRead:0}} @@ -18,7 +18,7 @@ - {{detail.activityAddr}} + {{detail.activityAddr || '-'}} 查看地图 @@ -46,7 +46,7 @@ {{company.clubName}} - + 活动:{{company.totalActivity}} | diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 48290aa..fcb4e0a 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -2,7 +2,7 @@ - + @@ -119,16 +119,16 @@ {{item.activityName}} - {{item.startTime}} + {{item.startTime || '-'}} | - {{item.totalDay}}天 + {{item.totalDay || '-'}}天 | - {{item.activityAddr}} + {{item.activityAddr || '-'}} - {{item.clubName}} - + {{item.clubName || '-'}} + {{item.totalRegister?item.totalRegister:0}}人已参加 diff --git a/pages/index/myjoin/myjoin.js b/pages/index/myjoin/myjoin.js index 6731fd2..860f480 100644 --- a/pages/index/myjoin/myjoin.js +++ b/pages/index/myjoin/myjoin.js @@ -6,12 +6,12 @@ function Detail(nickname, realname, phone, idcard, gender) { this.realname = realname; // this.phone = phone; this.idcard = idcard; - this.gender = gender; + this.gender = gender || 1; } function Info() { - this.details = [{}]; + this.details = [new Detail()]; } @@ -40,7 +40,7 @@ Page({ clubId: '', isHava: false, info: {}, - checked: true + checked: false }, history: function () { wx.navigateTo({ @@ -52,7 +52,7 @@ Page({ */ onLoad: function (options) { var that = this; - console.log(options); + //console.log(options); that.setData({ clubId: options.clubId, activityId: options.acId, @@ -60,6 +60,11 @@ Page({ }) that.init(); }, + xieyi(e){ + this.setData({ + checked: e.detail.value.length > 0 + }); + }, init: function () { let that = this; this.setData({ @@ -153,7 +158,7 @@ Page({ var that = this; // if(this.data.info.details) console.log(this.data.info.details); - let isfl=false + let isfl=false, phoneCardErr = false; if(this.data.info.details.length==0){ wx.showToast({ title: '至少添加一个用户', @@ -161,18 +166,49 @@ Page({ }) return } - this.data.info.details.forEach(item => { - if(item.gender==undefined||item.idcard==undefined||item.nickname==undefined||item.phone==undefined||item.realname==undefined||item.gender==''||item.idcard==''||item.nickname==''||item.phone==''||item.realname==''){ - isfl=true - } - }); + try { + this.data.info.details.forEach((item, index) => { + if(!/^1[3-9][0-9]{9}$/.test(item.phone)){ + let err = `第${index + 1}个用户手机号填写有误`; + wx.showToast({ + title: err, + icon:'none' + }); + phoneCardErr=true + throw Error(err); + return; + } + if(!/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(item.idcard)){ + let err = `第${index + 1}个用户身份证号码填写有误`; + wx.showToast({ + title: err, + icon:'none' + }); + phoneCardErr=true + throw Error(err); + return; + } + if(item.gender==undefined||item.idcard==undefined||item.nickname==undefined||item.phone==undefined||item.realname==undefined||item.gender==''||item.nickname==''||item.realname==''){ + isfl=true + } + }); + } catch (error) {} + if(phoneCardErr) return; if(isfl){ wx.showToast({ title: '请确保表单全部填写完成', icon:'none' }) - return + return; } + if(!this.data.checked){ + wx.showToast({ + title: '请勾选协议', + icon:'none' + }); + return; + } + let postData = that.data.info.details; // 本地存储用于 diff --git a/pages/index/myjoin/myjoin.wxml b/pages/index/myjoin/myjoin.wxml index 10aa261..341645e 100644 --- a/pages/index/myjoin/myjoin.wxml +++ b/pages/index/myjoin/myjoin.wxml @@ -6,16 +6,16 @@ - + + 保险 由主办方统一购买 - - + + --> 昵称 diff --git a/pages/index/order/order.js b/pages/index/order/order.js index 67b5bf4..d613638 100644 --- a/pages/index/order/order.js +++ b/pages/index/order/order.js @@ -6,16 +6,12 @@ Page({ * 页面的初始数据 */ data: { - groups:[ - {name:'洒洒水',tel:'13222222222',price:'200'}, - {name:'洒洒水',tel:'13222222222',price:'200'}, - ], - allTotal:400, - trueTotal:400, - checked:true, + groups:[], + checked:false, id:'', payType:'1', orderId:'', + theOrderDetail: {} }, /** @@ -60,11 +56,12 @@ Page({ "Content-Type": "application/x-www-form-urlencoded" }; re.request(Api.getOrderPeople(), postData, header).then((res) => { - console.log(res) + // console.log('==>',res) that.setData({ - orderId:res.data.data[0].orderId - }) - this.getOrderDetail(res.data.data[0].orderId) + orderId:res.data.data[0].orderId, + groups: res.data.data + }); + this.getOrderDetail(res.data.data[0].orderId); }) }, getOrderDetail:function(id){ @@ -77,11 +74,32 @@ Page({ "Content-Type": "application/x-www-form-urlencoded" }; re.request(Api.getOrderDetail(), postData, header).then((res) => { - console.log(res) + + // console.log(">>>",res.data.data) + this.setData({ + theOrderDetail: res.data.data + }) + // this.setData({ + // allTotal:res.data. + // }) + + }) }, + checkboxChange(e){ + this.setData({ + checked: e.detail.value.length > 0 + }); + }, topay:function(){ var that = this; + if(!this.data.checked){ + wx.showToast({ + title: '请勾选协议', + icon: 'none' + }); + return; + } if(that.data.payType=='1'){ that.getwxpay() }else if(that.data.payType=='3'){ @@ -96,11 +114,11 @@ Page({ var postData = { orderSerial :that.data.id, openId:openId, - realCost:'0.01', - body:'备注', - cost:'0.01', + realCost: this.data.theOrderDetail.realCost, + body:'订单支付', + cost:this.data.theOrderDetail.cost, payWay:that.data.payType, - subject:'我的订单' + subject:'参加活动' }; var header = { token: wx.getStorageSync('token'), diff --git a/pages/index/order/order.wxml b/pages/index/order/order.wxml index 2b2cbf4..c7f1c05 100644 --- a/pages/index/order/order.wxml +++ b/pages/index/order/order.wxml @@ -1,33 +1,33 @@ - - + + - 报名成员(2) + 报名成员({{groups.length}}) - {{item.name}}-{{item.tel}} - 费用项目¥{{item.price}} + {{item.realname || ''}}-{{item.phone || ''}} + 费用项目¥{{item.realCost || '0'}} - 总费用¥{{allTotal}} + 总费用¥{{theOrderDetail.realCost || '0'}} - + @@ -56,7 +56,7 @@ --> - - - - 我同意《XXX服务协议》,并确认活动真实性,同意支付报名 + + diff --git a/pages/index/order/order.wxss b/pages/index/order/order.wxss index d32cda5..4c70033 100644 --- a/pages/index/order/order.wxss +++ b/pages/index/order/order.wxss @@ -21,4 +21,9 @@ radio,checkbox{transform:scale(0.6);} .agree{width:100%;margin-top:50rpx;font-size:24rpx;padding-left:12rpx;} .agree text{color:#ffac0c} .bottom{width:100%;margin-top:24rpx;background: #07C160;text-align: center;font-size:28rpx; - height:100rpx;line-height:100rpx;color:#fff;} \ No newline at end of file + height:100rpx;line-height:100rpx;color:#fff;} + + .xieyi-class{ + display: flex; + align-items: center; + } \ No newline at end of file diff --git a/pages/release/addactive/addactive.js b/pages/release/addactive/addactive.js index ded01d0..1b24fd9 100644 --- a/pages/release/addactive/addactive.js +++ b/pages/release/addactive/addactive.js @@ -6,7 +6,7 @@ var util = require('../../../utils/util.js'); Page({ /** - * 页面的初始数据 + * 页面的初始数据 */ data: { @@ -239,6 +239,11 @@ Page({ activityName: e.detail.value, }) }, + addressInput: function(e){ + this.setData({ + address: e.detail.value, + }) + }, appleChange: function (e) { this.setData({ isAppletNotify: e.detail.value, @@ -341,13 +346,12 @@ console.log(startT); startTFour: startTFour }) }, - onLoad: function (options) { var nowDate = util.formatTimeTwo(new Date()); // 时间ONE var start = nowDate; - var obj = dateTimePicker.dateTimePicker(2000,this.data.year,start); + var obj = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year, start); this.setData({ dateTime: obj.dateTime, dateTimeArray: obj.dateTimeArray @@ -360,7 +364,7 @@ console.log(startT); // 时间Two var startTwo = nowDate; - var objTwo = dateTimePicker.dateTimePicker(2000,this.data.year,startTwo); + var objTwo = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startTwo); this.setData({ dateTimeTwo: objTwo.dateTime, dateTimeArrayTwo: objTwo.dateTimeArray @@ -373,7 +377,7 @@ console.log(startT); // 时间three var startThree= nowDate; - var objThree = dateTimePicker.dateTimePicker(2000,this.data.year,startThree); + var objThree = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startThree); this.setData({ dateTimeThree: objThree.dateTime, dateTimeArrayThree: objThree.dateTimeArray @@ -386,7 +390,7 @@ console.log(startT); // 时间Four var startFour= nowDate; - var objFour = dateTimePicker.dateTimePicker(2000,this.data.year,startFour); + var objFour = dateTimePicker.dateTimePicker(new Date().getFullYear(),this.data.year,startFour); this.setData({ dateTimeFour: objFour.dateTime, dateTimeArrayFour: objFour.dateTimeArray @@ -499,6 +503,10 @@ console.log(startT); }) for (var i = 0; i < tempFilePaths.length; i++) { + wx.showLoading({ + title: `正在上传第${i + 1}张图片`, + mask: true + }); wx.uploadFile({ url: Api.uploadImg(), filePath: res.tempFilePaths[i], @@ -506,11 +514,12 @@ console.log(startT); formData: { }, success: function (res) { + wx.hideLoading(); var sss = JSON.parse(res.data); let showList = that.data.showList.concat(sss.msg); that.setData({ showList: showList - }) + }); } }) } @@ -640,6 +649,8 @@ uploadfront: function (e) { costListString:JSON.stringify(costLists), questionListString:'[]' }; + // console.log('send active data:', postData); + // return; var header = { token: wx.getStorageSync('token'), "Content-Type": "application/x-www-form-urlencoded" diff --git a/pages/release/addactive/addactive.wxml b/pages/release/addactive/addactive.wxml index 6a9ad8a..51e36c2 100644 --- a/pages/release/addactive/addactive.wxml +++ b/pages/release/addactive/addactive.wxml @@ -88,7 +88,7 @@ 活动地址 - + 选择定位 diff --git a/pages/release/manageac/manageac.wxml b/pages/release/manageac/manageac.wxml index 539a017..66dbe85 100644 --- a/pages/release/manageac/manageac.wxml +++ b/pages/release/manageac/manageac.wxml @@ -14,7 +14,7 @@ {{item.activityName}} {{item.startTime}}-{{item.endTime}} - {{item.activityAddr}} + {{item.activityAddr || '-'}} diff --git a/project.config.json b/project.config.json index 6e68f7e..231b232 100644 --- a/project.config.json +++ b/project.config.json @@ -31,18 +31,17 @@ "disablePlugins": [], "outputPath": "" }, - "enableEngineNative": false, - "useIsolateContext": true, + "useIsolateContext": false, "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], "minifyWXSS": true, "disableUseStrict": false, + "minifyWXML": true, "showES6CompileOption": false, "useCompilerPlugins": false, - "minifyWXML": true, - "useStaticServer": true, - "ignoreUploadUnusedFiles": true + "ignoreUploadUnusedFiles": true, + "useStaticServer": true }, "compileType": "miniprogram", "libVersion": "2.15.0",