Browse Source

Signed-off-by: yukangzhe <382985154@qq.com>

yukangzhe 3 years ago
parent
commit
9d43d4e190
40 changed files with 1387 additions and 50 deletions
  1. 2 1
      app.json
  2. BIN
      images/kab.png
  3. 3 3
      pages/Components/classList/classList.wxss
  4. 2 1
      pages/Components/selectDate/selectDate.js
  5. 186 0
      pages/Components/sharePianoImg/sharePianoImg.js
  6. 6 0
      pages/Components/sharePianoImg/sharePianoImg.json
  7. 25 0
      pages/Components/sharePianoImg/sharePianoImg.wxml
  8. 191 0
      pages/Components/sharePianoImg/sharePianoImg.wxss
  9. 1 1
      pages/Components/switchTab/switchTab.wxss
  10. 177 0
      pages/cardList/cardList.js
  11. 4 0
      pages/cardList/cardList.json
  12. 27 0
      pages/cardList/cardList.wxml
  13. 221 0
      pages/cardList/cardList.wxss
  14. 1 1
      pages/classOrder/classOrder.wxss
  15. 1 1
      pages/demo/demo.wxss
  16. 12 2
      pages/doTask/doTask.js
  17. 4 4
      pages/doTask/doTask.wxml
  18. 1 2
      pages/doTask/doTask.wxss
  19. 3 1
      pages/evaluation/evaluation.js
  20. 2 1
      pages/evaluation/evaluation.wxss
  21. 2 2
      pages/evaluationDetail/evaluationDetail.wxml
  22. 1 1
      pages/forBack/forBack.wxss
  23. 2 2
      pages/growUp/growUp.wxss
  24. 1 5
      pages/leave/leave.js
  25. 2 2
      pages/leaveDetail/leaveDetail.wxss
  26. 1 1
      pages/lessons/lessons.wxss
  27. 7 0
      pages/myself/myself.wxml
  28. 1 1
      pages/orderClassDetail/orderClassDetail.wxss
  29. 2 1
      pages/piano/piano.js
  30. 1 1
      pages/piano/piano.wxss
  31. 1 1
      pages/pianoDetail/pianoDetail.wxss
  32. 168 0
      pages/pianoDetailCode/pianoDetail.js
  33. 5 0
      pages/pianoDetailCode/pianoDetail.json
  34. 76 0
      pages/pianoDetailCode/pianoDetail.wxml
  35. 233 0
      pages/pianoDetailCode/pianoDetail.wxss
  36. 1 1
      pages/playShow/playShow.wxss
  37. 1 5
      pages/schedule/schedule.js
  38. 3 3
      pages/student/student.wxss
  39. 7 3
      pages/task/task.js
  40. 3 3
      pages/taskDetail/taskDetail.wxss

+ 2 - 1
app.json

@@ -34,7 +34,8 @@
     "pages/editMyself/editMyself",
     "pages/showVideoList/showVideoList",
     "pages/leaveDetail/leaveDetail",
-    "pages/uploadShow/uploadShow"
+    "pages/uploadShow/uploadShow",
+    "pages/pianoDetailCode/pianoDetail"
   ],
   "window": {
     "backgroundTextStyle": "dark",

BIN
images/kab.png


+ 3 - 3
pages/Components/classList/classList.wxss

@@ -20,7 +20,7 @@
   line-height: 60rpx;
 }
 .class-name,.class-time{
-  font-size: 36rpx;
+  font-size: 32rpx;
 }
 .class-time,.class-flag{
   text-align: right;
@@ -101,7 +101,7 @@
     border-radius: 50rpx 50rpx 0 0;
   }
   .title{
-    font-size: 36rpx;
+    font-size: 32rpx;
     height: 60rpx;
     line-height: 60rpx;
   }
@@ -153,7 +153,7 @@
     line-height: 80rpx;
     color: #FFF;
     border-radius: 50rpx;
-    font-size: 36rpx;
+    font-size: 32rpx;
     top: 50rpx;
   }
 

+ 2 - 1
pages/Components/selectDate/selectDate.js

@@ -70,7 +70,8 @@ Component({
         beginDate: this.data.initDate,
         endDate: this.data.lastDate
       })
-      const dateArr = [this.data.initDate, this.data.lastDate];
+      const date = new Date()
+      const dateArr = [date.getFullYear()+"-01"+"-01", this.data.lastDate];
       this.triggerEvent("getDates", dateArr);
       this.showSelect()
     },

+ 186 - 0
pages/Components/sharePianoImg/sharePianoImg.js

@@ -0,0 +1,186 @@
+// pages/Components/sharePianoImg/sharePianoImg.js
+const app = getApp()
+const util = require('../../../utils/util.js')
+const base64Util = require('../../../utils/base64')
+Component({
+  lifetimes: {
+    ready: function () {
+      var obj = this.data.piano
+      var str = ''
+      for (var i = 0; i < obj.code.length; i++) {
+        str += obj.code.substring(i, i + 1);
+        if ((i + 1) % 4 == 0) {
+          str += " "
+        }
+      }
+
+      const imgUrl = "https://app.schoolwisdoms.com/schoolbaby/api/code/generate?content=" + obj.code
+      const posterConfig = this.data.posterConfig
+      posterConfig.images[0].url = imgUrl
+      posterConfig.images[1].url = this.data.piano.imgUrl
+      posterConfig.texts[1].text = str
+      posterConfig.texts[2].text = this.data.piano.schemeType
+      posterConfig.texts[3].text = "购买日期:" + this.data.piano.createdDate
+      posterConfig.texts[4].text = app.globalData.orgTitle
+      this.setData({
+        posterConfig
+      })
+    },
+  },
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    code: {
+      type: String,
+      value: ''
+    },
+    piano: {
+      type: Object,
+      value: null
+    }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    code: '',
+    schoolName: app.globalData.orgTitle,
+    posterConfig: {
+      'width': 590,
+      'height': 840,
+      'backgroundColor': '#fff',
+      'debug': false,
+      'preload': true,
+      'hide-loading': true,
+      images: [{
+          x: 45,
+          y: 160,
+          url: 'https://app.schoolwisdoms.com/schoolbaby/api/code/generate?content=',
+          width: 500,
+          height: 500
+        },
+        {
+          x: 20,
+          y: 20,
+          url: '',
+          width: 180,
+          height: 120
+        },
+      ],
+      texts: [{
+          x: 247,
+          y: 700,
+          baseLine: 'middle',
+          text: '序列号',
+          fontSize: 32,
+          color: '#333',
+        },
+        {
+          x: 100,
+          y: 770,
+          baseLine: 'middle',
+          text: '',
+          fontSize: 32,
+          color: '#333',
+        },
+        {
+          x: 220,
+          y: 40,
+          baseLine: 'middle',
+          title: '',
+          fontSize: 32,
+          color: '#333',
+        },
+        {
+          x: 220,
+          y: 80,
+          baseLine: 'middle',
+          title: '',
+          fontSize: 24,
+          color: '#999',
+        },
+        {
+          x: 220,
+          y: 120,
+          baseLine: 'middle',
+          title: '',
+          fontSize: 24,
+          color: '#999',
+        }
+      ]
+    },
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //生成图片并保存
+    onPosterSuccess(e) {
+      let that = this;
+      let {
+        detail
+      } = e;
+      wx.saveImageToPhotosAlbum({
+        filePath: detail,
+        success(res) {
+          wx.showToast({
+            title: '图片已保存到本地相册',
+            icon: 'none'
+          })
+          that.setData({
+            showSaveImage: false
+          })
+          that.triggerEvent("callMethod")
+        },
+        fail(res) {
+          that.getSetting()
+        },
+        complete(res){
+          that.triggerEvent('closeWindow')
+        }
+      })
+    },
+
+    closeWindow:function(){
+      this.triggerEvent('closeWindow')
+    },
+
+    getSetting: function () {
+      // 相册授权
+      wx.getSetting({
+        success(res) {
+          // 进行授权检测,未授权则进行弹层授权
+          if (!res.authSetting["scope.writePhotosAlbum"]) {
+            wx.showModal({
+              title: '提示',
+              content: '您未授权相册使用权限,是否重新授权?',
+              success: function (res) {
+                if (res.confirm) {
+                  wx.openSetting({
+                    success(settingdata) {
+                      if (settingdata.authSetting["scope.writePhotosAlbum"]) {
+                        console.log("获取权限成功,再次点击图片保存到相册")
+                      } else {
+                        console.log("获取权限失败")
+                      }
+                    },
+                    fail(res) {
+                      console.log(res)
+                    }
+                  })
+                }
+              }
+            })
+          }
+        },
+        fail(res) {
+          console.log(res);
+        }
+      });
+    },
+
+  }
+})

+ 6 - 0
pages/Components/sharePianoImg/sharePianoImg.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "poster": "/pages/Components/miniprogram_dist/poster/index"
+  }
+}

+ 25 - 0
pages/Components/sharePianoImg/sharePianoImg.wxml

@@ -0,0 +1,25 @@
+<cover-view class="show-box">
+  <cover-view class="sb-top">
+    <cover-image class="sb-top-avatar" mode="aspectFill" src="{{posterConfig.images[1].url}}"></cover-image>
+    <cover-view class="sb-right">
+      <cover-view class="sb-right-name">
+        {{posterConfig.texts[2].text}}
+      </cover-view>
+      <cover-view>{{posterConfig.texts[3].text}}</cover-view>
+      <cover-view class="sb-right-remark">{{posterConfig.texts[4].text}}</cover-view>
+    </cover-view>
+  </cover-view>
+  <cover-view class="show-bottom">
+    <cover-image class="sb-image" mode="aspectFit" src="{{posterConfig.images[0].url}}"></cover-image>
+    <cover-view class="sb-mix_title">{{posterConfig.texts[0].text}}</cover-view>
+    <cover-view class="sb-title">{{posterConfig.texts[1].text}}</cover-view>
+  </cover-view>
+  <!-- <view class="isPosterBg"></view> -->
+  
+</cover-view>
+<view class="isPoster">
+    <poster hidden="{{!showSaveImage}}" id="poster" config="{{posterConfig}}" bind:success="onPosterSuccess">
+      <view class="save-image">保存图片</view>
+    </poster>
+  </view>
+<view class="bg" bindtap="closeWindow"></view>

+ 191 - 0
pages/Components/sharePianoImg/sharePianoImg.wxss

@@ -0,0 +1,191 @@
+/* pages/Components/sharePianoImg/sharePianoImg.wxss */
+.bg{
+  z-index: 1;
+  width: 750rpx;
+  height: 100%;
+  top: 0;
+  left: 0;
+  opacity: 0.3;
+  background: #333;
+  position: fixed;
+}
+.show-box {
+  top: 300rpx;
+  left: 50%;
+  margin-left: -295rpx;
+  width: 590rpx;
+  height: 840rpx;
+  box-sizing: border-box;
+  background-color: #fff;
+  border-radius: 10rpx;
+  padding: 30rpx 24rpx;
+  position: fixed;
+  z-index: 999;
+}
+
+.sb-top-avatar {
+  margin-right: 12rpx;
+  width: 180rpx;
+  height: 120rpx;
+}
+.avatar{
+  margin-right: 12rpx;
+  width: 64rpx;
+  height: 64rpx;
+  border-radius: 50%;
+}
+.avatar image{
+  border-radius: 50%;
+}
+.sb-top {
+  display: flex;
+  font-size: 22rpx;
+  color: #C5C5C5;
+}
+.sb-right{
+  height: 120rpx;
+}
+.sb-right cover-view{
+  height: 40rpx;
+  line-height: 40rpx;
+  word-wrap: break-word;
+  word-break: break-all;
+  width:420rpx;
+}
+.sb-right-name {
+  font-size: 32rpx;
+  font-weight: 700;
+  color: rgba(51, 51, 51, 1);
+  
+}
+
+.sb-image {
+  width: 500rpx;
+  height: 500rpx;
+  margin: 20rpx auto;
+}
+
+.QRcode-image {
+  width: 112rpx;
+  height: 112rpx;
+  margin-left: 16rpx;
+}
+
+.sb-mix_title {
+  margin-top: 22rpx;
+  font-size: 32rpx;
+  color: rgba(51, 51, 51, 1);
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  text-align: center;
+}
+
+.sb-title {
+  padding-bottom: 15rpx;
+  font-size: 32rpx;
+  font-weight: 700;
+  color: rgba(51, 51, 51, 1);
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  text-align: center;
+  height: 60rpx;
+  line-height: 60rpx;
+  margin-top: 20rpx;
+}
+
+.sb-QRcode view {
+  text-align: center;
+  font-size: 32rpx;
+}
+.code-view{
+  border: 1px solid #ccc;
+    height: 80rpx;
+    line-height: 80rpx;
+    margin: 10rpx 0;
+}
+
+.QR-title {
+  width: 110rpx;
+  height: auto;
+  font-size: 20rpx;
+  color: rgba(153, 153, 153, 1);
+  line-height: 34rpx;
+  white-space: initial;
+}
+
+
+.save-image {
+  font-weight: 600;
+  /* margin-top: 48rpx; */
+  width: 224rpx;
+  height: 64rpx;
+  line-height: 64rpx;
+  text-align: center;
+  border-radius: 40rpx;
+  font-size: 28rpx;
+  color: rgba(255, 255, 255, 1);
+  background: linear-gradient(90deg, rgba(236, 58, 78, 1) 0%, rgba(255, 115, 115, 1) 100%);
+}
+
+.bottom-author{
+  position: fixed;
+  bottom: 0;
+  height: 100rpx;
+  z-index: 999;
+  background: #000;
+  color: #FFF;
+  right: 10rpx;
+  width: 50% !important;
+  opacity: 0;
+}
+
+.share-view{
+  display: flex;
+}
+.share-view>view{
+  width: 50% !important;
+  background: #FFF;
+}
+.share-view>button:first-child{
+  width: 49%;
+  border-right: 1px solid #EEE !important;
+}
+.share-view button{
+  height: 210rpx;
+  line-height: 80rpx;
+  text-align: center;
+  width: 100% !important;
+  padding-top: 24rpx;
+  font-size: 28rpx;
+  border-radius: 0 !important;
+}
+.share-view button view{
+  height: 80rpx;
+  line-height: 80rpx;
+  position: relative;
+  bottom: 20rpx;
+
+}
+.share-view image{
+  width: 80rpx;
+  height: 80rpx;
+  position: relative;
+  top: 20rpx;
+}
+.isPoster{
+  position: fixed;
+  z-index: 999;
+  top: 1200rpx;
+  left: 50%;
+  margin-left: -112rpx;
+}
+.isPosterBg{
+  position: fixed;
+  background-color: rgba(0, 0, 0, 0.5);
+  width: 100%;
+  height: 100%;
+  top: 0;
+  z-index: 998;
+}

+ 1 - 1
pages/Components/switchTab/switchTab.wxss

@@ -8,7 +8,7 @@
   color: #005033;
   height: 80rpx;
   line-height: 80rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
 }
 
 .curTitle{

+ 177 - 0
pages/cardList/cardList.js

@@ -0,0 +1,177 @@
+// pages/cardList/cardList.js
+var app = getApp()
+var util = require('../../utils/util')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imageUrl: app.globalData.imageUrl,
+    left: 25,
+    titleIndex:1,
+    childTitle:'我的卡包',
+    loading:'正在加载',
+    loadingIndex:0,
+    loading2:"没有更多了",
+    orgTitle: app.globalData.orgTitle,
+    schoolName: '',
+    params: {
+      openId: '',
+      classesType: '1'
+    },
+    wcList: [],
+    pianoList:[],
+    params: {
+      appId: app.globalData.appId,
+      openId: wx.getStorageSync('openId'),
+      page: 0,
+      size: 10,
+      typeId: '1002',
+      status: 'select'
+    }
+  },
+
+  getPiano:function(e){
+    var index = e.currentTarget.dataset.index
+    wx.navigateTo({
+      url: '/pages/pianoDetailCode/pianoDetail?obj='+ JSON.stringify(this.data.pianoList[index]),
+    })
+  },
+
+  changeTitle:function(e){
+    var index = e.currentTarget.dataset.index
+    this.setData({
+      titleIndex: index,
+      left: e.currentTarget.dataset.leftnum
+    })
+  },
+
+  toWcsp:function(e){
+    wx.navigateTo({
+      url: '/pages/wcsp/wcsp?id=' 
+      + e.currentTarget.dataset.id 
+      + '&typeId=1002&validDay='+ e.currentTarget.dataset.day
+      + '&price=' + e.currentTarget.dataset.price
+      + '&total=' + e.currentTarget.dataset.price
+    })
+  },
+
+  getMySpecials: function () {
+    if (this.data.params.openId == '') {
+      const openId = "params.openId"
+      this.setData({
+        [openId]: app.globalData.openId
+      })
+    }
+    util.doPost(
+      'getMySpecials', this.data.params,
+    ).then(res => {
+      if (res.success == 1) {
+        this.setData({
+          wcList: this.data.wcList.concat(res.data.list),
+        })
+
+        if (this.data.params.page < res.data.pages - 1) {
+          this.setData({
+            loading: '上拉加载更多',
+            loadingIndex: 1
+          })
+          this.data.params.page++;
+        } else {
+          this.setData({
+            loading: '没有更多了',
+            loadingIndex: 2
+          })
+        }
+      }
+    })
+  },
+
+  callPhone:function(){
+    wx.makePhoneCall({
+      phoneNumber: wx.getStorageSync('campusInfo').telephone,
+    })
+  },
+
+  getPianoList:function(){
+    const params ={
+      openId: wx.getStorageSync('openId')
+      // openId : 'osm1O5MjCMIy_-wo4fmV8t0xjILs'
+    }
+    util.doPost(
+      "openExercuseRecordList",params
+    ).then(res =>{
+      if(res.success == 1){
+        this.setData({
+          pianoList: res.data
+        })
+      }
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) { 
+    this.getPianoList()
+    this.getMySpecials()
+    this.setData({
+      schoolName: wx.getStorageSync('campusInfo').name
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+    if(this.data.loadingIndex == 1){
+      this.setData({
+        loading:"正在加载"
+      })
+      this.getMySpecials()
+    }
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/cardList/cardList.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "我的卡包"
+}

+ 27 - 0
pages/cardList/cardList.wxml

@@ -0,0 +1,27 @@
+<view class="container">
+		<!-- 练琴卡 -->
+		<view class="pianoList" wx:if="{{titleIndex == 1}}">
+		<view class="piano-box" wx:for="{{pianoList}}" wx:key="index">
+			<view class="piano-title">
+				{{item.schemeType}}
+			</view>
+			<view class="piano-line"></view>
+			<view class="piano-msg">
+				<view class="piano-img">
+					<image src="{{item.imgUrl}}"></image>
+				</view>
+				<view class="piano-detail">
+					<!-- <view class="piano-type">卡片类型: {{item.schemeType}}</view> -->
+					<view class="piano-time">购卡时间: {{item.createdDate}}</view>
+					<view class="piano-type">购卡数量: 1 张</view>
+					<view class="piano-type">购卡金额: {{item.money}} 元</view>
+				</view>
+			</view>
+			<view class="piano-btn-view">
+				<view class="piano-btn" data-index="{{index}}" data-id="{{item.schemeId}}" data-code="{{item.code}}" bindtap="getPiano">查看详情</view>
+			</view>
+		</view>
+		<view class="loading-view no-more" wx:if="{{pianoList.length == 0}}">— {{loading2}} —</view>
+	</view>
+	<!-- 练琴卡end -->
+</view>

+ 221 - 0
pages/cardList/cardList.wxss

@@ -0,0 +1,221 @@
+/* pages/cardList/cardList.wxss */
+.card-view {
+  position: relative;
+  width: 700rpx;
+  height: 300rpx;
+  margin: 20rpx auto;
+
+}
+
+.bg-img {
+  position: absolute;
+  width: 700rpx;
+  height: 300rpx;
+  border-radius: 50rpx;
+}
+
+.card-detail {
+  color: #FFF;
+  width: 700rpx;
+  height: 300rpx;
+  position: absolute;
+  top: 0;
+  z-index: 2;
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.schoolName {
+  font-size: 24rpx;
+  width: 100%;
+  margin-bottom: 20rpx;
+  line-height: 40rpx;
+  height: 40rpx;
+  text-align: center;
+  border-bottom: 1px dashed #999;
+  padding: 10rpx 0;
+  color: #CCC;
+}
+
+.phone-view {
+  font-size: 24rpx;
+  text-align: center;
+}
+
+.callPhone-font {
+  color: blue;
+}
+
+.card-other {
+  position: relative;
+  top: -50rpx;
+  text-indent: 30rpx;
+  height: 60rpx;
+  width: 70%;
+  font-size: 32rpx;
+}
+
+.toUse {
+  width: 30%;
+  text-align: center;
+  position: relative;
+  top: -30rpx;
+  height: 50rpx;
+  left: 20rpx;
+}
+
+.toUse view {
+  border: 1px solid #FFF;
+  width: 150rpx;
+  height: 50rpx;
+  line-height: 50rpx;
+  border-radius: 150rpx;
+  font-size: 28rpx;
+}
+
+.cardNum {
+  line-height: 60rpx;
+  font-size: 28rpx;
+}
+
+.card-scan {
+  display: flex;
+  font-size: 24rpx;
+  margin-top: 10rpx;
+}
+
+.bottom-view {
+  font-size: 24rpx;
+  width: 100%;
+  text-align: center;
+  position: absolute;
+  bottom: 10rpx;
+  border-top: 1px dashed #999;
+  padding: 10rpx 0;
+  color: #CCC;
+}
+
+.loading-view {
+  margin-top: 96rpx;
+  padding-bottom: 100rpx;
+  width: 100%;
+  text-align: center;
+  font-size: 24rpx;
+  color: rgba(197, 197, 197, 1);
+}
+
+.tip-view {
+  position: fixed;
+  top: 0;
+  line-height: 60rpx;
+  width: 100%;
+  background: #FFF;
+  height: 60rpx;
+  z-index: 99;
+}
+
+/* .card-list{
+  padding-top: 60rpx;
+} */
+
+.title-box-view {
+  display: flex;
+  width: 750rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  position: relative;
+  background: #FFF;
+  padding-bottom: 20rpx;
+}
+
+.title-box-view view {
+  width: 50%;
+  font-size: 32rpx;
+  text-align: center;
+}
+
+.curTitle {
+  /* color: #EC3A4E; */
+  color: #cc6031;
+}
+
+.title-line {
+  width: 64rpx;
+  height: 4rpx;
+  /* background: #EC3A4E; */
+  background: #cc6031;
+  position: absolute;
+  margin-left: -32rpx;
+  margin-top: -20rpx;
+}
+
+.piano-box {
+  width: 700rpx;
+  margin: 25rpx;
+  box-shadow: 0 0 10rpx #eee;
+  background: #FFF;
+  border-radius: 10rpx;
+}
+
+.piano-title {
+  font-size: 32rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  width: 650rpx;
+  margin: 0 25rpx;
+}
+
+.piano-line {
+  width: 100%;
+  height: 6rpx;
+  background: #f1f1f1;
+  margin-bottom: 20rpx;
+}
+
+.piano-msg {
+  width: 650rpx;
+  margin: 0 25rpx;
+  display: flex;
+  height: 240rpx;
+  margin-bottom: 40rpx;
+}
+
+.piano-img {
+  width: 240rpx;
+  height: 180rpx;
+  margin-right: 20rpx;
+}
+
+.piano-img image {
+  width: 100%;
+  height: 100%;
+  border-radius: 10rpx;
+}
+
+.piano-detail view {
+  height: 40rpx;
+  margin-bottom: 8rpx;
+  color: #666;
+}
+
+.piano-btn-view {
+  position: relative;
+  width: 100%;
+  height: 60rpx;
+}
+
+.piano-btn {
+  width: 200rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: center;
+  border: 1px solid #ccc;
+  border-radius: 50rpx;
+  position: absolute;
+  top: -20rpx;
+  right: 25rpx;
+}
+
+page {
+  background: #F9F9F9;
+}

+ 1 - 1
pages/classOrder/classOrder.wxss

@@ -64,7 +64,7 @@ page{
 }
 .order-payMoney text{
   color: #cc6031;
-    font-size: 36rpx;
+    font-size: 32rpx;
 }
 .order-title{
   color: #999;

+ 1 - 1
pages/demo/demo.wxss

@@ -4,7 +4,7 @@
     color: #FFF;
     top: 20rpx;
     right: 20rpx;
-    font-size: 36rpx;
+    font-size: 32rpx;
     padding: 25rpx;
 }
 .camera-view{

+ 12 - 2
pages/doTask/doTask.js

@@ -24,9 +24,15 @@ Page({
     audioList: [],
     audioPause: false,
     content: '',
-    delItems: []
+    delItems: [],
+    contents:null,
   },
 
+  renderTime:function(date) { 
+    var dateee = new Date(date).toJSON(); 
+    return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')  
+  }, 
+
   getRecord: function () {
     const that = this
     if(that.data.audioList.length>=6){
@@ -329,7 +335,11 @@ Page({
         let entity = rs[0]
         let contents;
         try {
-          contents = JSON.parse(entity.content);
+          contents = entity
+          contents.receiveDate=this.renderTime(contents.receiveDate)
+          this.setData({
+            contents
+          })
         } catch (e) {
           contents = {};
           console.error(e);

+ 4 - 4
pages/doTask/doTask.wxml

@@ -1,9 +1,9 @@
 <view class="container">
-  <!-- 作业内容 -->
+  <!-- 作业内容 --> 
   <view class="task-view">
-    <view class="task-title">2021-02-21 课后作业</view>
-    <view class="task-time">2021-02-21 16:00</view>
-    <view class="task-class">小鹏钢琴课</view>
+    <view class="task-title">{{contents.title}}</view>
+    <view class="task-time">{{contents.receiveDate}}</view>
+    <view class="task-class">{{contents.classesName}}</view>
   </view>
   <!-- end -->
 

+ 1 - 2
pages/doTask/doTask.wxss

@@ -121,7 +121,6 @@
   justify-content: space-between;
   grid-template-columns: repeat(auto-fill, 130rpx);
   grid-gap: auto;
-  height: 180rpx;
   width: 600rpx;
   margin: 0 auto 20rpx;
 }
@@ -209,7 +208,7 @@
   color: #FFF;
   background: #cc6031;
   border-radius: 50rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
   position: relative;
   bottom: 40rpx;
   left: 50%;

+ 3 - 1
pages/evaluation/evaluation.js

@@ -35,7 +35,9 @@ Page({
     // 显示近7天的预约记录
     let ed = util.formatTime(now).substring(0, 10).replace(/\//g, '-')
     let bd = ed.substring(0, 5) + '01-01'
-    this.setData({ beginDate: bd, endDate: ed, list: [] });
+
+    const date = new Date()
+    this.setData({ beginDate: date.getFullYear() + '-01'+"-01", endDate: ed, list: [] });
     this.queryList()
   },
 

+ 2 - 1
pages/evaluation/evaluation.wxss

@@ -2,6 +2,7 @@
 .container{
   padding: 0;
   margin: 0;
+  font-size: 28rpx;
 }
 page{
   background: #f1f1f1;
@@ -41,7 +42,7 @@ page{
   font-size: 32rpx;
     height: 60rpx;
     line-height: 60rpx;
-    width: 420rpx;
+    width: 400rpx;
 }
 .date{
   margin-left: auto;

+ 2 - 2
pages/evaluationDetail/evaluationDetail.wxml

@@ -32,7 +32,7 @@
     </view>
   </view>
 
-  <view class="video-content">
+  <!-- <view class="video-content">
     <view class="title">视频</view>
     <view class="video-list">
       <view wx:for="{{item.videos}}" wx:key="index" class="video-img-view" data-url="{{item.playUrl}}" bindtap="videoShow">
@@ -42,7 +42,7 @@
     </view>
     <video id="play-video" bindfullscreenchange="bindfullscreenchange" wx:if="{{curVideo != ''}}" autoplay="true"
       src="{{curVideo}}" controls="true" downloadlist></video>
-  </view>
+  </view> -->
 
   <view class="audio-content">
     <view class="title">语音</view>

+ 1 - 1
pages/forBack/forBack.wxss

@@ -128,5 +128,5 @@
   margin-left: -200rpx;
   margin-bottom: 60rpx;
   border-radius: 50rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
 }

+ 2 - 2
pages/growUp/growUp.wxss

@@ -127,7 +127,7 @@
   color: #FFF;
   background: #005033;
   border-radius: 50rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
   position: fixed;
   bottom: 40rpx;
   left: 50%;
@@ -135,7 +135,7 @@
 }
 
 .done-title {
-  font-size: 36rpx;
+  font-size: 32rpx;
   margin-top: 60rpx;
 }
 

+ 1 - 5
pages/leave/leave.js

@@ -152,11 +152,7 @@ Page({
     let list = this.data.eventList.filter(o => {
       return o.attenceDate == v;
     });
-    if(list.length<=0){
-      setTimeout(() => {
-        this.selectDate(v)
-      }, 1000);
-    }
+   
     list.map(o => {
       o.bt = o.beginTime.substring(0, 5);
       o.et = o.endTime.substring(0, 5);

+ 2 - 2
pages/leaveDetail/leaveDetail.wxss

@@ -8,7 +8,7 @@
   
 }
 .view-box view{
-  font-size: 36rpx;
+  font-size: 32rpx;
   height: 110rpx;
   line-height: 110rpx;
   border-bottom: 1px solid #eee;
@@ -49,5 +49,5 @@
   left: 50%;
   margin-left: -200rpx;
   border-radius: 50rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
 }

+ 1 - 1
pages/lessons/lessons.wxss

@@ -13,7 +13,7 @@
   color: #FFF;
   background: #005033;
   text-align: center;
-  font-size: 36rpx;
+  font-size: 32rpx;
 }
 
 page{

+ 7 - 0
pages/myself/myself.wxml

@@ -22,6 +22,13 @@
 				</view>
 				<image lazy-load mode="aspectFill" class="li-arrow" src="{{imageUrl? imageUrl+'arrow0603.png' : ''}}"></image>
 			</view>
+			<view class="list-item" catchtap="goNavigateTo" data-url="/pages/cardList/cardList" wx:if="{{!isShow}}">
+				<view class="li-left">
+					<image lazy-load mode="aspectFill" class="li-icon" src="/images/kab.png" style="width:40rpx;height:40rpx;margin-left:4rpx;"></image>
+					<text>我的卡包</text>
+				</view>
+				<image lazy-load mode="aspectFill" class="li-arrow" src="{{imageUrl? imageUrl+'arrow0603.png' : ''}}"></image>
+			</view>
 			<view class="list-item" catchtap="goNavigateTo" data-url="/pages/classOrder/classOrder">
 				<view class="li-left">
 					<image lazy-load mode="aspectFill" class="li-icon" src="/images/my-classOrder.png"></image>

+ 1 - 1
pages/orderClassDetail/orderClassDetail.wxss

@@ -51,7 +51,7 @@
   line-height: 60rpx;
 }
 .money-price-other{
-  font-size: 36rpx;
+  font-size: 32rpx;
   color: #cc6031;
   height: 60rpx;
   line-height: 60rpx;

+ 2 - 1
pages/piano/piano.js

@@ -49,7 +49,8 @@ Page({
     let bd = util.formatTime(now).substring(0, 10).replace(/\//g, '-')
     let edd = new Date(now.setDate(now.getDate() + 7));
     let ed = util.formatTime(edd).substring(0, 10).replace(/\//g, '-')
-    this.setData({ beginDate: bd, endDate: ed, list: [] });
+    const date = new Date()
+    this.setData({ beginDate: date.getFullYear()+"-01"+"-01", endDate: ed, list: [] });
     this.queryList();
   },
 

+ 1 - 1
pages/piano/piano.wxss

@@ -46,7 +46,7 @@ page{
   background: #005033;
   color: #FFF;
   text-align: center;
-  font-size: 36rpx;
+  font-size: 32rpx;
   position: fixed;
   width: 750rpx;
   z-index: 3;

+ 1 - 1
pages/pianoDetail/pianoDetail.wxss

@@ -219,7 +219,7 @@
 }
 
 .tip-title {
-  font-size: 36rpx;
+  font-size: 32rpx;
   height: 60rpx;
   line-height: 60rpx;
 }

+ 168 - 0
pages/pianoDetailCode/pianoDetail.js

@@ -0,0 +1,168 @@
+// pages/pianoDetail/pianoDetail.js
+var app = getApp()
+var util = require('../../utils/util')
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imgShow: false,
+    childTitle:"练琴卡详情",
+    item:null,
+    schoolList:[],
+    moreFlag: 0,
+    code: ''
+  },
+  closeWindow:function(){
+    this.setData({
+      imgShow:false
+    })
+  },
+  showImg:function(){
+    this.setData({
+      imgShow:true
+    })
+  },
+
+  getSchool:function(id){
+    let params = {
+      id : id
+    }
+    util.doPost(
+      'exercuseSchool',params
+    ).then(rs =>{
+      if(rs.success == 1){
+        for (var i = 0; i < rs.data.length; i++) {
+          if (typeof rs.data[i].lat != 'undefined' && rs.data[i].lat != '' && rs.data[i].lat != null) {
+            rs.data[i].distance = util.distance(rs.data[i].LONGITUDE, rs.data[i].LONGITUDE, wx.getStorageSync('latlng').latitude, wx.getStorageSync('latlng').longitude)
+            rs.data[i].distance = parseFloat(rs.data[i].distance)
+          } else {
+            rs.data[i].distance = 999999
+          }
+          if (rs.data[i].id == id) {
+            list = rs.data[i]
+            rs.data.list.splice(i, 1)
+            i--;
+          }
+        }
+
+        for (var i = 0; i < rs.data.length; i++) {
+          for (var j = i; j < rs.data.length; j++) {
+            if (rs.data[i].distance > rs.data[j].distance) {
+              var tmp = rs.data[i];
+              rs.data[i] = rs.data[j];
+              rs.data[j] = tmp;
+            }
+          }
+        }
+
+        this.setData({
+          schoolList:rs.data
+        })
+      }
+    })
+  },
+
+  getMoreSchool:function(){
+    if(this.data.moreFlag == 0){
+      this.setData({
+        moreFlag: 1
+      })
+    } else{
+      this.setData({
+        moreFlag: 0
+      })
+    }
+  },
+
+  callPhone(e){
+    const index = e.currentTarget.dataset.index
+    
+    const phone = this.data.schoolList[index].CONTRACT_TELEPHONE
+   if(phone){
+    wx.makePhoneCall({
+      phoneNumber: phone
+    })
+   } else{
+     wx.showToast({
+       title: '暂无联系电话',
+       icon:"none"
+     })
+   }
+  },
+
+  getCode:function(content){
+    const params = {
+      content: content
+    }
+    util.codePost(
+      'generate',params
+    ).then(res =>{
+      console.log(res)
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    // options = '{"imgUrl":"https://file.schoolwisdoms.com/image/9fa41861-ac29-40ca-b7af-2307eea72c8d.jpg","code":"20210202163522308958","createdDate":"2021-02-02","money":0.01,"schemeType":"19.9元特惠练琴卡","orderId":"2961ccdb31ee4875b472df42e645bd54","openId":"osm1O5J-wFamXgipGs1JztHbWNC4","schemeId":"61f88dd017394c1f9e27593d20b8968a","id":"a7ffea33814d47cab6ee84fd9e1e927f","payStatus":1,"REMARK":"这是一个神奇的卡片,优惠多多","status":2}'
+    // const obj = JSON.parse(options)
+    const obj = JSON.parse(options.obj)
+    this.setData({
+      obj,
+      codeImg: 'https://app.schoolwisdoms.com/schoolbaby/api/code/generate?content='+obj.code
+    })
+    this.getSchool(obj.schemeId)
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 5 - 0
pages/pianoDetailCode/pianoDetail.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "sharePianoImg": "/pages/Components/sharePianoImg/sharePianoImg"
+  }
+}

+ 76 - 0
pages/pianoDetailCode/pianoDetail.wxml

@@ -0,0 +1,76 @@
+<view class="container">
+  <view class="top-view">
+    <view class="top-img">
+      <image src="{{obj.imgUrl}}"></image>
+    </view>
+    <view class="top-msg">
+      <view class="top-title">{{obj.schemeType}}</view>
+      <view class="top-content">{{obj.REMARK}}</view>
+      <view class="top-price">¥ {{obj.money}}</view>
+    </view>
+  </view>
+  <view class="style-view">
+    <view class="left-style"></view>
+    <view class="right-style"></view>
+  </view>
+  <view class="code-view">
+    <image class="{{obj.status != 0?'userCode':''}}" src="{{codeImg}}"></image>
+
+    <view class="share-view">
+      <view class="share-btn" wx:if="{{obj.status == 0}}" bindtap="showImg">
+        分享二维码
+      </view>
+
+      <view class="used-btn" wx:if="{{obj.status == 1}}">
+        <view>
+          已使用
+        </view>
+      </view>
+
+      <view class="used-btn" wx:if="{{obj.status == 2}}">
+        <view>
+          已核销
+        </view>
+      </view>
+    </view>
+  </view>
+  <view class="other-view">
+    <view>卡信息(1张可用)</view>
+    <view class="other-time">卡类型:{{obj.schemeType}}</view>
+    <view>{{obj.code}}</view>
+  </view>
+
+  <view class="school-list">
+    <view>
+      <view class="school-box">
+        <view class="school-title">
+          <view class="school-name">{{schoolList[0].name}}</view>
+          <view class="call-phone" data-index="0" catchtap="callPhone" wx:if="{{schoolList[0].CONTRACT_TELEPHONE}}">联系校区
+          </view>
+        </view>
+        <view class="school-addr">
+          <view class="school-dis" wx:if="{{schoolList[0].distance < 999999}}">{{schoolList[0].distance}}KM</view>
+          <view class="school-address">{{schoolList[0].address}}</view>
+        </view>
+      </view>
+    </view>
+
+    <view wx:if="{{moreFlag == 1}}" class="more-school-list">
+      <view class="school-box" wx:for="{{schoolList}}" wx:key="index" wx:if="{{index > 0}}">
+        <view class="school-title">
+          <view class="school-name">{{item.name}}</view>
+          <view class="call-phone" data-index="{{index}}" catchtap="callPhone" wx:if="{{item.CONTRACT_TELEPHONE}}">联系校区
+          </view>
+        </view>
+        <view class="school-addr">
+          <view class="school-dis" wx:if="{{schoolList[0].distance < 999999}}">{{item.distance}}KM</view>
+          <view class="school-address">{{item.address}}</view>
+        </view>
+      </view>
+    </view>
+    <view class="tip-more-school" bindtap="getMoreSchool">
+      {{schoolList.length}}家门店适用
+    </view>
+  </view>
+</view>
+<sharePianoImg piano="{{obj}}" wx:if="{{imgShow}}" bind:closeWindow="closeWindow"></sharePianoImg>

+ 233 - 0
pages/pianoDetailCode/pianoDetail.wxss

@@ -0,0 +1,233 @@
+/* pages/pianoDetail/pianoDetail.wxss */
+.container {
+  padding: 0;
+  margin: 0;
+  width: 750rpx;
+}
+
+page {
+  background: #f9f9f9;
+}
+
+.top-view {
+  width: 650rpx;
+  display: flex;
+  background: #FFF;
+  margin-top: 20rpx;
+  padding: 20rpx 25rpx;
+  border-bottom: 1px dashed #CCC;
+}
+
+.top-img {
+  width: 240rpx;
+  height: 180rpx;
+  margin-right: 20rpx;
+}
+
+.top-img image {
+  width: 100%;
+  height: 100%;
+}
+
+.top-msg {
+  width: 440rpx;
+  font-size: 32rpx;
+}
+
+.top-content,
+.top-price {
+  font-size: 28rpx;
+}
+
+.top-title {
+  height: 70rpx;
+  line-height: 35rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+
+.top-content {
+  height: 80rpx;
+  line-height: 40rpx;
+  color: #999;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+
+.top-price {
+  height: 30rpx;
+  line-height: 30rpx;
+}
+
+.style-view {
+  display: flex;
+  width: 700rpx;
+  margin: 0 25rpx;
+  position: relative;
+}
+
+.right-style {
+  height: 30rpx;
+  width: 30rpx;
+  background: #f9f9f9;
+  margin-left: auto;
+  border-radius: 50rpx 0 0 50rpx;
+  margin-top: -15rpx;
+  line-height: 20rpx;
+  position: absolute;
+  right: -15rpx;
+}
+
+.left-style {
+  height: 30rpx;
+  width: 30rpx;
+  background: #f9f9f9;
+  margin-left: auto;
+  border-radius: 0 50rpx 50rpx 0;
+  margin-top: -15rpx;
+  line-height: 20rpx;
+  position: absolute;
+  left: -15rpx;
+}
+
+.code-view {
+  background: #FFF;
+  width: 700rpx;
+  margin: 0 25rpx;
+  box-shadow: 0 0 10rpx #eee;
+}
+
+.code-view image {
+  height: 500rpx;
+  width: 500rpx;
+  margin: 40rpx 100rpx;
+}
+
+.other-view {
+  width: 700rpx;
+  background: #FFF;
+  margin: 0 25rpx;
+  padding-bottom: 20rpx;
+}
+
+.other-view view {
+  height: 50rpx;
+  line-height: 50rpx;
+  text-indent: 25rpx;
+}
+
+.other-time {
+  font-size: 24rpx;
+  color: #999;
+}
+
+.school-list {
+  width: 700rpx;
+  margin: 25rpx;
+  background: #FFF;
+}
+
+.school-title,
+.school-addr {
+  display: flex;
+  width: 650rpx;
+  margin: 0 25rpx;
+}
+
+.school-name {
+  height: 60rpx;
+  line-height: 60rpx;
+  width: 500rpx;
+  margin-right: 30rpx;
+  font-weight: 600;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.call-phone {
+  width: 120rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+  text-align: right;
+  font-size: 28rpx;
+}
+
+.school-addr {
+  font-size: 24rpx;
+  color: #999;
+  height: 60rpx;
+  line-height: 60rpx;
+}
+
+.school-dis {
+  max-width: 120rpx;
+  margin-right: 20rpx;
+}
+
+.school-address {
+  min-width: 510rpx;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.school-box {
+  border-bottom: 1px solid #eee;
+  padding: 20rpx 0;
+}
+
+.tip-more-school {
+  width: 700rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  text-align: center;
+  background: #FFF;
+}
+
+.share-btn {
+  width: 300rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  margin-left: 200rpx;
+  text-align: center;
+  border: 1px solid #cc6031;
+  color: #cc6031;
+  border-radius: 50rpx;
+  margin-bottom: 40rpx;
+}
+
+.used-btn {
+  width: 150rpx;
+  height: 150rpx;
+  line-height: 130rpx;
+  position: absolute;
+  margin-top: -250rpx;
+  right: 180rpx;
+  color: #cc6031;
+  z-index: 2;
+  border: 2px solid #cc6031;
+  text-align: center;
+  border-radius: 100rpx;
+  font-weight: 600;
+  font-size: 32rpx;
+  transform: rotate(-18deg);
+}
+
+.used-btn view {
+  border: 1px solid #cc6031;
+  width: 130rpx;
+  height: 130rpx;
+  border-radius: 100rpx;
+  margin: 10rpx;
+}
+
+.userCode {
+  opacity: 0.1;
+}

+ 1 - 1
pages/playShow/playShow.wxss

@@ -11,7 +11,7 @@
   padding: 10rpx 25rpx;
 }
 .title{
-  font-size: 36rpx;
+  font-size: 32rpx;
 }
 .desc{
   color: #999;

+ 1 - 5
pages/schedule/schedule.js

@@ -112,11 +112,7 @@ Page({
       o.bt = o.beginTime.substring(11, 16);
       o.et = o.endTime.substring(11, 16);
     })
-    if(list.length<=0){
-      setTimeout(() => {
-        this.selectDate(v)
-      }, 1000);
-    }
+    
     this.setData({ 'date': v, 'week': week, 'dateList': [{ items: list, date: v, week: week }] });
   },
   callSelectDate: function (d) {

+ 3 - 3
pages/student/student.wxss

@@ -100,7 +100,7 @@ image{
   margin: 0 auto;
   text-align: center;
   text-align: center;
-    font-size: 36rpx;
+    font-size: 32rpx;
     font-weight: 600;
 }
 .total-view view:last-child{
@@ -118,7 +118,7 @@ image{
   position: absolute;
     z-index: 2;
     color: #FFF;
-    font-size: 36rpx;
+    font-size: 32rpx;
     padding: 25rpx;
     bottom: 60rpx;
     width: 300rpx;
@@ -228,7 +228,7 @@ image{
     margin-top: -350rpx;
     left: 25rpx;
     text-align: center;
-    font-size: 36rpx;
+    font-size: 32rpx;
 }
 .shareCodeImg-view image{
   width: 400rpx;

+ 7 - 3
pages/task/task.js

@@ -41,6 +41,7 @@ Page({
 
   getDates: function (e) {
     this.setData({
+      list:[],
       beginDate: e.detail[0],
       endDate: e.detail[1],
       loading: '加载中'
@@ -54,11 +55,14 @@ Page({
   onLoad: function (options) {
     let bd = options.beginDate
     let ed = options.endDate
+
+    let today = util.curTime().substring(0, 10).replace(/\//g, '-')
+      const date = new Date();
+
     if (bd && ed) {
-      this.setData({ 'beginDate': bd, 'endDate': ed })
+      this.setData({ 'beginDate': date.getFullYear() + '-01'+"-01", 'endDate': ed })
     } else {
-      let today = util.curTime().substring(0, 10).replace(/\//g, '-')
-      this.setData({ 'beginDate': today.substring(0, 8) + '01', 'endDate': today })
+      this.setData({ 'beginDate': date.getFullYear() + '-01'+"-01", 'endDate': today })
     }
 
   },

+ 3 - 3
pages/taskDetail/taskDetail.wxss

@@ -13,7 +13,7 @@
 }
 
 .task-title {
-  font-size: 36rpx;
+  font-size: 32rpx;
   font-weight: 600;
   width: 450rpx;
   overflow: hidden;
@@ -133,7 +133,7 @@
   color: #FFF;
   background: #cc6031;
   border-radius: 50rpx;
-  font-size: 36rpx;
+  font-size: 32rpx;
   position: fixed;
   bottom: 40rpx;
   left: 50%;
@@ -141,7 +141,7 @@
 }
 
 .done-title {
-  font-size: 36rpx;
+  font-size: 32rpx;
   margin-top: 60rpx;
 }