From 6be5e8a2a94c5d8eebe78fae2d371f09b21ec973 Mon Sep 17 00:00:00 2001 From: 边少东 <2879594283@qq.com> Date: Wed, 26 Oct 2022 16:08:57 +0800 Subject: [PATCH] 1.4版本 --- pages/index/achievement/achievement.wxml | 2 +- pages/index/newPunch/newPunch.js | 5 +++-- pages/index/newPunch/newPunch.wxml | 6 +++--- pages/index/newPunch/newPunch.wxss | 3 ++- pages/index/punchDetail/punchDetail.js | 27 ++++++++++++++++++++------- pages/index/punchDetail/punchDetail.wxml | 4 ++-- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/pages/index/achievement/achievement.wxml b/pages/index/achievement/achievement.wxml index 7bbef34..7861eeb 100644 --- a/pages/index/achievement/achievement.wxml +++ b/pages/index/achievement/achievement.wxml @@ -20,7 +20,7 @@ <view class="grey_line"></view> <view class="box" wx:if="{{recordVoShow}}"> <view class="box_title">打卡成果</view> - <view class="box_blue" wx:if="{{recordVo.hasData==1}}">本次打卡坚持了<span>{{recordVo.taskStatisticsParam}}{{taskVo.statisticsUnit}}</span></view> + <view class="box_blue" wx:if="{{taskVo.hasData==1}}">本次打卡坚持了<span>{{recordVo.taskStatisticsParam}}{{taskVo.statisticsUnit}}</span></view> <view class="box_grey">"{{recordVo.taskRecordDesc}}"</view> <view class="box_pic"> <view class="box_img" wx:for="{{recordVo.files}}" wx:key="index" wx:for-item="value"> diff --git a/pages/index/newPunch/newPunch.js b/pages/index/newPunch/newPunch.js index c952716..0dc2419 100644 --- a/pages/index/newPunch/newPunch.js +++ b/pages/index/newPunch/newPunch.js @@ -64,19 +64,20 @@ Page({ }, // 第二列 { - values: ['8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00'], + values: ['5:00','6:00','7:00','8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00', '24:00'], defaultIndex: 1, }, ], //打卡缺卡提醒 clockLackShow: false, - columnsClockLack: [1,2,3], + columnsClockLack: [1,2,3,4,5,6,7,8,9,10], //必须包含 containShow: false, columnsContain: ['无限制','图片'], }, //获取模板详情 / 空模板 getDetail() { + if(this.data.tempId == 0) return request({ url: `/wx/temp/getTempDetail`, method: 'get', diff --git a/pages/index/newPunch/newPunch.wxml b/pages/index/newPunch/newPunch.wxml index e05df48..225c74d 100644 --- a/pages/index/newPunch/newPunch.wxml +++ b/pages/index/newPunch/newPunch.wxml @@ -2,12 +2,12 @@ <view class="punch_detail"> <view class="title_card"> <van-cell-group border="{{ false }}"> - <van-field value="{{ form.taskTitle }}" placeholder="请输入标题" border="{{ false }}" bind:change="onfieldChange" /> + <van-field value="{{ form.taskTitle }}" placeholder="请输入标题" border="{{ false }}" bind:change="onfieldChange" /> </van-cell-group> <view class="grey_line"></view> <view class="box_card"> <van-cell-group border="{{ false }}"> - <van-field value="{{ form.taskDesc }}" type="textarea" placeholder="请输入" autosize border="{{ false }}" bind:change="onfieldDescChange" /> + <van-field value="{{ form.taskDesc }}" type="textarea" placeholder="请输入" border="{{ false }}" bind:change="onfieldDescChange" /> </van-cell-group> </view> <view class="tip_card"> @@ -77,7 +77,7 @@ 学生如缺卡达到一定条件,将会提醒家长 </view> <view class="white_card_nopadding"> - <van-cell-group border="{{ false }}" > + <van-cell-group border="{{ false }}"> <van-cell title="提交时必须包含" value="{{ form.submitCondition }}" is-link border="{{ false }}" bindtap="openContainShow" /> </van-cell-group> </view> diff --git a/pages/index/newPunch/newPunch.wxss b/pages/index/newPunch/newPunch.wxss index 41408ad..08d75c8 100644 --- a/pages/index/newPunch/newPunch.wxss +++ b/pages/index/newPunch/newPunch.wxss @@ -79,4 +79,5 @@ background-color: #fff; padding: 20px 30px 80px; box-sizing: border-box; -} \ No newline at end of file +} + diff --git a/pages/index/punchDetail/punchDetail.js b/pages/index/punchDetail/punchDetail.js index 56146b3..bf257ba 100644 --- a/pages/index/punchDetail/punchDetail.js +++ b/pages/index/punchDetail/punchDetail.js @@ -23,7 +23,7 @@ Page({ hideHeader: true, // 隐藏日历头部操作栏 disableMode: { // 禁用某一天之前/之后的所有日期 type: 'after', // [‘before’, 'after'] - // 无该属性或该属性值为假,则默认为当天 + // 无该属性或该属性值为假,则默认为当天 }, }, isDisplay: false, @@ -231,14 +231,27 @@ Page({ title: '打卡成功', icon: 'none' }) - let e = { - detail: { - date: moment(this.data.form.repairDate).format('DD'), - month: moment(this.data.form.repairDate).format('MM'), - year: moment(this.data.form.repairDate).format('YYYY') + let e + if (this.data.form.isRepair == 2) { + e = { + detail: { + date: moment(this.data.form.repairDate).format('DD'), + month: moment(this.data.form.repairDate).format('MM'), + year: moment(this.data.form.repairDate).format('YYYY') + } } + this.getInfo(moment(this.data.form.repairDate).format('YYYY-MM-DD'), 1, e) + } else { + e = { + detail: { + date: moment().date(), + month: moment().month() + 1, + year: moment().year() + } + } + this.getInfo(moment(new Date().getTime()).format('YYYY-MM-DD'), 0, e) } - this.getInfo(moment(this.data.form.repairDate).format('YYYY-MM-DD'), 1, e) + this.closeClockShow() } else { wx.showToast({ diff --git a/pages/index/punchDetail/punchDetail.wxml b/pages/index/punchDetail/punchDetail.wxml index ab9e23c..fc123c1 100644 --- a/pages/index/punchDetail/punchDetail.wxml +++ b/pages/index/punchDetail/punchDetail.wxml @@ -17,9 +17,9 @@ </view> </view> <view class="btn_box"> - <van-button round color="#F4F4F4" bindtap='toAchieve' custom-style="color: #000;">我 的 成 果</van-button> + <van-button round color="#F4F4F4" bindtap='toAchieve' custom-style="color: #000;">我 的 成 果</van-button> <van-button round type="info" bindtap='toClock' wx:if="{{isToday}}">立 即 打 卡</van-button> - <van-button round type="warning" bindtap='toRepairClock' wx:if="{{taskVo.allowRepairCard == 1&&repairText=='缺卡'&&!isToday&&!isLarge}}">补 卡</van-button> + <van-button round type="warning" bindtap='toRepairClock' wx:if="{{taskVo.allowRepairCard == 1&&repairText=='缺卡'&&!isToday&&!isLarge}}">补 卡</van-button> </view> <!--打卡--> -- libgit2 0.21.0