From c8acc547f1a4b6236ad076cda4b4f095d9a86dc4 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 2 Aug 2023 10:54:14 +0800 Subject: [PATCH] up --- .../pages/shopDetail/shopDetail.vue | 13 +- .../packageBuy/pages/shopList/shopList.vue | 10 +- pages/active/active.vue | 10 +- pages/active/detail.vue | 411 +++++++++++++----- 4 files changed, 322 insertions(+), 122 deletions(-) diff --git a/packages/packageBuy/pages/shopDetail/shopDetail.vue b/packages/packageBuy/pages/shopDetail/shopDetail.vue index 6b12094..24ceed2 100644 --- a/packages/packageBuy/pages/shopDetail/shopDetail.vue +++ b/packages/packageBuy/pages/shopDetail/shopDetail.vue @@ -4,7 +4,11 @@ - {{info.name}} + {{info.name}} + + ¥{{info.price}} + 免费 + @@ -51,7 +55,8 @@ 电话:{{tel}} - {{info.merchant.address}} + {{info.merchant.address}} + @@ -737,8 +742,8 @@ this.showPop = true; - if (weixin.isNull(this.form.member_name)) { - this.alert('请输入宝妈姓名') + if (weixin.isNull(this.form.member_name)||this.form.member_name=='微信用户') { + this.alert('请输入真实宝妈姓名') return } if (weixin.isNull(this.form.due_date)) { diff --git a/packages/packageBuy/pages/shopList/shopList.vue b/packages/packageBuy/pages/shopList/shopList.vue index 2afe27f..ffa4f62 100644 --- a/packages/packageBuy/pages/shopList/shopList.vue +++ b/packages/packageBuy/pages/shopList/shopList.vue @@ -51,8 +51,14 @@ - {{item.merchant.address}} - {{item.merchant.username}} + {{item.merchant.address}} + + ¥{{item.price}} + 免费 + + + {{item.merchant.username}} + diff --git a/pages/active/active.vue b/pages/active/active.vue index e5c880d..1987c65 100644 --- a/pages/active/active.vue +++ b/pages/active/active.vue @@ -78,7 +78,8 @@ dataList: [], currentPage: 1, product_type_id: 0, - isLoading: false + isLoading: false, + activeTypeId:'', } }, @@ -134,7 +135,9 @@ if (options.keyword) { this.keyword = options.keyword; } - + if(options.activeTypeId){ + this.activeTypeId = options.activeTypeId + } this.loadPage(1); }, onShow() {}, @@ -175,7 +178,8 @@ page_size: 6, keyword: that.keyword, sort_name:'sort', - sort_type:"ASC" + sort_type:"ASC", + active_type_id:this.activeTypeId }, utilSuccess: function(r) { var res = r.data; diff --git a/pages/active/detail.vue b/pages/active/detail.vue index 3e232ee..dd93c13 100644 --- a/pages/active/detail.vue +++ b/pages/active/detail.vue @@ -70,7 +70,78 @@ - + + 活动信息: + + + + + 开始时间: + + + {{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}} + + + + + + 结束时间: + + + {{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}} + + + + + + 活动地点: + + + {{info.address}} + + + + + + 活动人数: + + + {{info.member_sum}} + + + + + + 已报名数: + + + {{info.start_member_sum+info.total}} + + + + + 报名信息: + + + + + 开始时间: + + + {{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} + + + + + + 截止时间: + + + {{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} + + + + @@ -157,7 +234,79 @@ - + + + 活动信息: + + + + + 开始时间: + + + {{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}} + + + + + + 结束时间: + + + {{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}} + + + + + + 活动地点: + + + {{info.address}} + + + + + + 活动人数: + + + {{info.member_sum}} + + + + + + 已报名数: + + + {{info.start_member_sum+info.total}} + + + + + 报名信息: + + + + + 开始时间: + + + {{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} + + + + + + 截止时间: + + + {{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}} + + + + @@ -740,36 +892,36 @@ var h = this.shareHeight * this.scare; // ctx.fillStyle = '#fff'; // ctx.fillRect(0, 0, 214, 342); - console.log(1) ctx.drawImage('../../static/bg_haibao@2x.jpg', 0, 0, w, h ); //(SCREEN_HEIGHT - 50 - SCREEN_WIDTH * 0.8 * 1.65) /2, SCREEN_WIDTH * 0.8, SCREEN_WIDTH * 0.8 * 1.5); - ctx.drawImage('../../static/bg_haibao1.png', 20, 30 + 40, + ctx.drawImage('../../static/bg_haibao1.png', 20, 40, w - 40, h - 100); /* SCREEN_WIDTH * 0.15, (SCREEN_HEIGHT - SCREEN_WIDTH * 0.6 * 1.65) / 2, SCREEN_WIDTH * 0.695, SCREEN_WIDTH * 0.6 * 1.5); */ - ctx.drawImage(this.poster, 20, 30 + 40, + ctx.drawImage(this.poster, 20, 40, w - 40, (h - 60 - 60) * 0.5); /* SCREEN_WIDTH * 0.15, (SCREEN_HEIGHT - SCREEN_WIDTH * 0.6 * 1.65) / 2, SCREEN_WIDTH * 0.695, SCREEN_WIDTH * 0.695 / 1.6); */ - ctx.font = "22rpx bold"; - // 设置颜色 - ctx.fillStyle = "#fff"; - // 绘制文字(参数:要写的字,x坐标,y坐标) - ctx.fillText(this.info.active_name, 20, 50); + // ctx.font = "22rpx bold"; + // // 设置颜色 + // ctx.fillStyle = "#fff"; + // // 绘制文字(参数:要写的字,x坐标,y坐标) + // ctx.fillText(this.info.active_name, 20, 50); ctx.font = "16rpx bold"; // 设置颜色 ctx.fillStyle = "#000"; // 绘制文字(参数:要写的字,x坐标,y坐标) - ctx.fillText("相关活动", 40, (h + 50) * 0.5 + 20); + let active_title = this.info.template=='新'?'课程':'活动' + ctx.fillText(active_title, 40, (h + 50) * 0.5 -10); ctx.font = "14rpx bold"; // 设置颜色 @@ -777,43 +929,58 @@ // 绘制文字(参数:要写的字,x坐标,y坐标) 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_end, 40, (h + 50) * 0.5 + 60 + 60); - let user_info = uni.getStorageSync("user_info_yunyubang"); - - let userProfile = uni.getStorageSync('user_profile'); - - var img = this.imgAvatar; - uni.getImageInfo({ - src: userProfile.avatarUrl, // 头像 - success: rlogo => { - img = rlogo.path; - - } - }); - that.circleImg(ctx, - img, - 40, h - 50 - w * 0.15, - w * 0.15 / 2); - - ctx.font = "12rpx normal"; - // 设置颜色 - ctx.fillStyle = "#000"; - // 绘制文字(参数:要写的字,x坐标,y坐标) - if (!weixin.isNull(this.user_info.name)) - ctx.fillText(this.user_info.name, - 40, h - 40); - else - ctx.fillText("", - 40, h - 40); - - - this.circleImg(ctx, res.path, w - 40 - w * 0.2, h - 40 - + let active_time = this.info.template=='新'?'上课时间:':'活动时间:' + let active_add = this.info.template=='新'?'上课地点:':'活动地点:' + let active_name = this.info.active_name.length>17?this.info.active_name.substring(0,17):this.info.active_name + let active_name1 = this.info.active_name.length>17?this.info.active_name.substring(17,this.info.active_name.length):'' + + ctx.fillText("" + active_name, 40, (h + 50) * 0.5 + 20 ); + ctx.fillText("" + active_name1, 40, (h + 50) * 0.5 + 40 ); + ctx.fillText(active_time + this.info.start_date+' '+this.info.start_time, 40, (h + 50) * 0.5 + 50 + 20); + // ctx.fillText("结束时间:" + this.info.end_date, 40, (h + 50) * 0.5 + 50 + 40); + let address = this.info.address.length>14?this.info.address.substring(0,14):this.info.address + let address1 = this.info.address.length>14?this.info.address.substring(14,this.info.address.length):'' + + ctx.fillText(active_add + address, 40, (h + 50) * 0.5 + 50 + 40); + ctx.fillText(address1, 40, (h + 50) * 0.5 + 50 + 60); + // ctx.fillText(active_add + this.info.apply_end, 40, (h + 50) * 0.5 + 60 + 60); + + // let user_info = uni.getStorageSync("user_info_yunyubang"); + + // let userProfile = uni.getStorageSync('user_profile'); + + // var img = this.imgAvatar; + // uni.getImageInfo({ + // src: userProfile.avatarUrl, // 头像 + // success: rlogo => { + // img = rlogo.path; + + // } + // }); + // that.circleImg(ctx, + // img, + // 40, h - 50 - w * 0.15, + // w * 0.15 / 2); + + // ctx.font = "12rpx normal"; + // // 设置颜色 + // ctx.fillStyle = "#000"; + // // 绘制文字(参数:要写的字,x坐标,y坐标) + // // if(packagesFirst.template!='新'){ + + // // } + // if (!weixin.isNull(this.user_info.name)) + // ctx.fillText(this.user_info.name, + // 40, h - 40); + // else + // ctx.fillText("", + // 40, h - 40); + + + this.circleImg(ctx, res.path, w - 40 - w * 0.2, h - 65 - w * 0.2, w * 0.2 / 2); - - console.log(2) + ctx.draw(), // r: 半径 setTimeout(() => { @@ -821,8 +988,6 @@ canvasId: 'firstCanvas', fileType: 'jpg', success: (res) => { - - console.log(3) this.shareBtnDisplay = 'flex' uni.hideLoading(); @@ -938,8 +1103,8 @@ this.showPop = true; - if (weixin.isNull(this.form.name)) { - this.alert('请输入会员姓名') + if (weixin.isNull(this.form.name)||this.form.name=='微信用户') { + this.alert('请输入真实会员姓名') return } if (weixin.isNull(this.form.area)) { @@ -1034,6 +1199,11 @@ let apply_start = r.apply_start let enddate = r.end_date+" "+r.end_time let nowtime = that.getNowTime() + if(r.audit_status==2){ + that.isOrder = false + that.isOrderText = "不可报名" + return + } if(that.compareDate(apply_start,nowtime)){ that.isOrder = false that.isOrderText = "报名未开始" @@ -1696,13 +1866,28 @@ background: #fff; width: 100%; box-sizing: border-box; - + .viewchild{ + display: flex; + justify-content: space-between; + .viewfirst{ + width:30%; + image{ + width: 26rpx; + height: 26rpx; + display: inline-block; + margin-right: 12rpx; + } + } + .viewlast{ + width:70% + } + } u-col{ image{ - width: 26rpx; - height: 26rpx; - display: inline-block; - margin-right: 12rpx; + width: 26rpx; + height: 26rpx; + display: inline-block; + margin-right: 12rpx; } } }