Quellcode durchsuchen

feature 班级页改造基本完成,但是体积没优化

tiedan vor 4 Jahren
Ursprung
Commit
7ef7a18c84

+ 6 - 1
app.json

@@ -1,9 +1,10 @@
 {
   "pages": [
+    "pages/myClass/myClass",
     "pages/index/index",
     "pages/welcome/welcome",
     
-    "pages/myClass/myClass",
+    
     "pages/groupsList/groupsList",
     "pages/answerAfterclass/answerAfterclass",
     "pages/zbDetails/zbDetails",
@@ -49,6 +50,10 @@
     "navigationBarTitleText": "自定义导航栏"
   },
   "usingComponents": {
+    "van-overlay": "/miniprogram_npm/vant-weapp/overlay/index",
+    "van-tag": "/miniprogram_npm/vant-weapp/tag/index",
+    "van-cell": "/miniprogram_npm/vant-weapp/cell/index",
+    "van-cell-group": "/miniprogram_npm/vant-weapp/cell-group/index",
     "van-progress": "/miniprogram_npm/vant-weapp/progress/index",
     "van-empty": "/miniprogram_npm/vant-weapp/empty/index",
     "van-button": "/miniprogram_npm/vant-weapp/button/index",

+ 9 - 0
app.wxss

@@ -12,6 +12,15 @@
   position: relative;
   /* font-family: "宋体" */
 } 
+.switch_tab_container {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  box-sizing: border-box;
+  position: relative;
+  /* font-family: "宋体" */
+} 
 /* page{
   font-family: "SourceHanSansCN-Medium"
 } */

BIN
images/fm.jpg


BIN
images/g_f.png


BIN
images/g_m.png


BIN
images/mm.jpg


+ 1 - 0
miniprogram_npm/vant-weapp/cell-group/index.d.ts

@@ -0,0 +1 @@
+export {};

+ 10 - 0
miniprogram_npm/vant-weapp/cell-group/index.js

@@ -0,0 +1,10 @@
+import { VantComponent } from '../common/component';
+VantComponent({
+  props: {
+    title: String,
+    border: {
+      type: Boolean,
+      value: true,
+    },
+  },
+});

+ 3 - 0
miniprogram_npm/vant-weapp/cell-group/index.json

@@ -0,0 +1,3 @@
+{
+  "component": true
+}

+ 9 - 0
miniprogram_npm/vant-weapp/cell-group/index.wxml

@@ -0,0 +1,9 @@
+<view
+  wx:if="{{ title }}"
+  class="van-cell-group__title"
+>
+  {{ title }}
+</view>
+<view class="custom-class van-cell-group {{ border ? 'van-hairline--top-bottom' : '' }}">
+  <slot />
+</view>

+ 1 - 0
miniprogram_npm/vant-weapp/cell-group/index.wxss

@@ -0,0 +1 @@
+@import '../common/index.wxss';.van-cell-group__title{padding:16px 16px 8px;padding:var(--cell-group-title-padding,16px 16px 8px);font-size:14px;font-size:var(--cell-group-title-font-size,14px);line-height:16px;line-height:var(--cell-group-title-line-height,16px);color:#969799;color:var(--cell-group-title-color,#969799)}

+ 1 - 0
miniprogram_npm/vant-weapp/cell/index.d.ts

@@ -0,0 +1 @@
+export {};

+ 37 - 0
miniprogram_npm/vant-weapp/cell/index.js

@@ -0,0 +1,37 @@
+import { link } from '../mixins/link';
+import { VantComponent } from '../common/component';
+VantComponent({
+  classes: [
+    'title-class',
+    'label-class',
+    'value-class',
+    'right-icon-class',
+    'hover-class',
+  ],
+  mixins: [link],
+  props: {
+    title: null,
+    value: null,
+    icon: String,
+    size: String,
+    label: String,
+    center: Boolean,
+    isLink: Boolean,
+    required: Boolean,
+    clickable: Boolean,
+    titleWidth: String,
+    customStyle: String,
+    arrowDirection: String,
+    useLabelSlot: Boolean,
+    border: {
+      type: Boolean,
+      value: true,
+    },
+  },
+  methods: {
+    onClick(event) {
+      this.$emit('click', event.detail);
+      this.jumpLink();
+    },
+  },
+});

+ 6 - 0
miniprogram_npm/vant-weapp/cell/index.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "van-icon": "../icon/index"
+  }
+}

+ 45 - 0
miniprogram_npm/vant-weapp/cell/index.wxml

@@ -0,0 +1,45 @@
+<wxs src="../wxs/utils.wxs" module="utils" />
+
+<view
+  class="custom-class {{ utils.bem('cell', [size, { center, required, borderless: !border, clickable: isLink || clickable }]) }}"
+  hover-class="van-cell--hover hover-class"
+  hover-stay-time="70"
+  style="{{ customStyle }}"
+  bind:tap="onClick"
+>
+  <van-icon
+    wx:if="{{ icon }}"
+    name="{{ icon }}"
+    class="van-cell__left-icon-wrap"
+    custom-class="van-cell__left-icon"
+  />
+  <slot wx:else name="icon" />
+
+  <view
+    style="{{ titleWidth ? 'max-width:' + titleWidth + ';min-width:' + titleWidth : '' }}"
+    class="van-cell__title title-class"
+  >
+    <block wx:if="{{ title }}">{{ title }}</block>
+    <slot wx:else name="title" />
+
+    <view wx:if="{{ label || useLabelSlot }}" class="van-cell__label label-class">
+      <slot wx:if="{{ useLabelSlot }}" name="label" />
+      <block wx:elif="{{ label }}">{{ label }}</block>
+    </view>
+  </view>
+
+  <view class="van-cell__value value-class">
+    <block wx:if="{{ value || value === 0 }}">{{ value }}</block>
+    <slot wx:else />
+  </view>
+
+  <van-icon
+    wx:if="{{ isLink }}"
+    name="{{ arrowDirection ? 'arrow' + '-' + arrowDirection : 'arrow' }}"
+    class="van-cell__right-icon-wrap right-icon-class"
+    custom-class="van-cell__right-icon"
+  />
+  <slot wx:else name="right-icon" />
+
+  <slot name="extra" />
+</view>

Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
miniprogram_npm/vant-weapp/cell/index.wxss


+ 1 - 1
miniprogram_npm/vant-weapp/progress/index.js

@@ -11,7 +11,7 @@ component_1.VantComponent({
     trackColor: String,
     showPivot: {
       type: Boolean,
-      value: true,
+      value: false,
     },
     color: {
       type: String,

+ 1 - 1
pages/index/index.wxml

@@ -1,4 +1,4 @@
-<view class="container">
+<view class="switch_tab_container">
     <van-notice-bar wx:if="{{noticeVis}}" left-icon="volume-o" mode="link" text="{{notice}}" bindtap="toNotice" style="padding-bottom:10rpx;" />
 	
 	<view class="banner">

+ 274 - 39
pages/myClass/myClass.js

@@ -23,6 +23,22 @@ Page({
     currentId: null,
     currentName: "",
     tva: 32,
+    noticeVis: false,
+    defAvatarm: "/images/mm.jpg",
+    defAvatarf: "/images/fm.jpg",
+    gender_icon_m: "/images/g_m.png",
+    gender_icon_f: "/images/g_f.png",
+    cardVis: false,
+    stuItem: null,
+    pageNum: 1,
+    pageSize: 4,
+    stuInfo: {},
+    jobArr: [],
+    classVis: false,
+    classErrVis: false,
+    classNVis: false,
+    scheduleList: [],
+
   },
   // 查询我是否认证
   isRz(sessionKey) {
@@ -33,6 +49,7 @@ Page({
         sessionKey
       },
       success: (res) => {
+
         if (res.data.code == 0 && (res.data.data !== null || res.data.data !== "")) {
           this.setData({
             isRz: false
@@ -60,6 +77,7 @@ Page({
   },
   // 查询我是否有班&&班级名字
   isClass(sessionKey) {
+    var that = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/student/selMyClas',
       method: "post",
@@ -67,45 +85,77 @@ Page({
         sessionKey
       },
       success: (res) => {
-        
+        console.log(res);
         if (res.data.code == 0) {
-          this.setData({
-            classInfo: res.data.data
+          let classInfo = res.data.data;
+          classInfo.clasBegin = app.timeFmt(classInfo.clasBegin, "yyyy\/MM\/dd hh:mm ");
+          classInfo.clasEnd = app.timeFmt(classInfo.clasEnd, "yyyy\/MM\/dd hh:mm ");
+          // classInfo.clasBegin=app.timeFilter(classInfo.clasBegin);
+          // classInfo.clasEnd=app.timeFilter(classInfo.clasEnd);
+          //console.log("classInfo.clasBegin:",app.timeFilter(classInfo.clasBegin));
+          that.setData({
+            classInfo: classInfo,
+            classVis: true
           })
-          
-         
+
+
           this.isAgree(sessionKey);
           this.getMynotice(sessionKey);
-          this.getMycourse(sessionKey);
-          this.checkTaskList(sessionKey);
-          this.checkTaskList3(sessionKey, res.data.data.id);
-          this.checkTaskList4(sessionKey, res.data.data.id);
+          // this.getMycourse(sessionKey);
+          // this.checkTaskList(sessionKey);
+          // this.checkTaskList3(sessionKey, res.data.data.id);
+          // this.checkTaskList4(sessionKey, res.data.data.id);
         } else {
           if (res.data.msg == "运行时异常:学员不可同时存在两个班级中。") {
-            wx.showModal({
-              content: "学员不可同时存在多个班级中哦",
-              showCancel: false,
-              success(res) {
-                if (res.confirm) {
-                  wx.switchTab({
-                    url: '../index/index'
-                  })
-                }
-              }
-            })
+            that.setData({ classErrVis: true });
+            // wx.showModal({
+            //   content: "学员不可同时存在多个班级中哦",
+            //   showCancel: false,
+            //   success(res) {
+            //     if (res.confirm) {
+            //       wx.switchTab({
+            //         url: '../index/index'
+            //       })
+            //     }
+            //   }
+            // })
             return false;
           } else {
-            wx.showModal({
-              content: "您当前还没有正在开放的班级!",
-              showCancel: false,
-              success(res) {
-                if (res.confirm) {
-                  wx.switchTab({
-                    url: '../index/index'
-                  })
-                }
+
+
+            that.setData({ classNVis: true });
+
+
+            wx.request({
+              url: app.globalData.publicUrl + '/wx/student/selClasToo',
+              method: "post",
+              data: {
+                sessionKey,
+                isActive: 0
+              },
+              success: (res) => {
+                console.log(res);
+                let list = res.data.data.map(item => {
+                  item.clasBegin = app.timeFmt(item.clasBegin, "yyyy\/MM\/dd hh:mm ");
+                  item.clasEnd = app.timeFmt(item.clasEnd, "yyyy\/MM\/dd hh:mm ");
+                  return item;
+                })
+                that.setData({ scheduleList: list })
+
+
               }
             })
+            // wx.showModal({
+            //   content: "您当前还没有正在开放的班级!",
+            //   showCancel: false,
+            //   success(res) {
+            //     if (res.confirm) {
+            //       wx.switchTab({
+            //         url: '../index/index'
+            //       })
+            //     }
+            //   }
+            // })
             return false;
           }
         }
@@ -233,12 +283,28 @@ Page({
         isSee: 1
         // isNotice: 0
       },
+      fail: () => {
+        this.setData({
+          noticeVis: false
+        })
+      },
       success: (res) => {
         if (res.data.code == 0) {
-          if (res.data.list && res.data.list.length !== 0)
+          if (res.data.list && res.data.list.length !== 0) {
             this.setData({
-              notice: res.data.list[0].noticeContent
+              notice: res.data.list[0].noticeContent,
+              noticeVis: true
             });
+          } else {
+            this.setData({
+              noticeVis: false
+            });
+          }
+
+        } else {
+          this.setData({
+            noticeVis: false
+          });
         }
       }
     })
@@ -942,12 +1008,12 @@ Page({
         console.log(res.data, "领取结业证提交")
 
         wx.hideLoading();
-        if(res.data.code==500){
+        if (res.data.code == 500) {
           wx.showModal({
             showCancel: false,
             content: "领取失败,请稍后再试"
           })
-        }else{
+        } else {
           that.setData({
             myCanvasId: that.data.myCanvasId + 1
           })
@@ -977,12 +1043,12 @@ Page({
           ctx.font = 'normal bold 14px sans-serif'
           ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
           let leftPositionAarr = [59, 30]
-          let graduationNum =res.data.data.graduationNum!=""? "编号:" + res.data.data.graduationNum:"";
+          let graduationNum = res.data.data.graduationNum != "" ? "编号:" + res.data.data.graduationNum : "";
           ctx.fillText(graduationNum, 130, 150);
-          let topPt=190-(strTar.length-4)*5;
-          let lineHeight=30-(strTar.length>4?strTar.length>6?10:(strTar.length-4)*5:0)
+          let topPt = 190 - (strTar.length - 4) * 5;
+          let lineHeight = 30 - (strTar.length > 4 ? strTar.length > 6 ? 10 : (strTar.length - 4) * 5 : 0)
           for (let i = 0; i < strTar.length; i++) {
-  
+
             ctx.fillText(strTar[i], i == 0 ? leftPositionAarr[0] : leftPositionAarr[1], topPt + i * lineHeight);
           }
           ctx.draw();
@@ -990,7 +1056,7 @@ Page({
             showzs: true
           });
         }
-        
+
       },
       fail: () => {
         wx.hideLoading();
@@ -1055,7 +1121,168 @@ Page({
       }
     })
   },
+  onClickShow(e) {
+
+    this.setData({ stuItem: e.currentTarget.dataset.item });
+
+    this.setData({ cardVis: true });
+  },
+
+  onClickHide() {
+    this.setData({ cardVis: false });
+  },
+
+
+  onUnload() {
+    this.setData({ cardVis: false });
+  },
+  onHide() {
+    this.setData({ cardVis: false });
+  },
+  studentList(page) {
+    var that = this;
+    return new Promise((resolve, reject) => {
+      wx.request({
+        url: app.globalData.publicUrl + '/wx/student/progress',
+        method: "post",
+        data: {
+          sessionKey: that.data.sessionKey,
+          pageNum: page,
+          pageSize: that.data.pageSize
+        },
+        success: (res) => {
+
+          if (res.data.code == 0) {
+            let info = res.data.data;
+
+            info.list = info.list.map(item => {
+              if (item.studentHead == "" || item.studentHead == null) {
+                item.avatar = item.studentSex == 1 ? that.data.defAvatarf : that.data.defAvatarm;
+              } else {
+                item.avatar = item.studentHead;
+              }
+              return item;
+            })
+            console.log(info);
+            resolve(info)
+          }
+
+        },
+        fail: (error) => {
+          reject(error)
+        }
+      })
+    })
+
+  },
+  getjob(sessionKey) {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/student/position',
+      method: "get",
+      data: {
+        sessionKey
+      },
+      success: (res) => {
+        console.log(res, '我是获取到的数组')
+        let Arr = [];
+        res.data.data.forEach(item => {
+          let newdata = {};
+          newdata.dictLabel = item.dictLabel;
+          newdata.dictValue = item.dictValue;
+          Arr.push(newdata);
+        });
+        this.setData({
+          jobArr: Arr
+        })
+
+      },
+      fail: () => {
+        wx.hideLoading();
+      }
+    })
+  },
+  onReachBottom() {
+    console.log("下拉刷新");
+    var that = this;
+    if (that.data.classVis && that.data.stuInfo.list.length > 0) {
+      var page = that.data.pageNum;
+      page++;
+      that.setData({ pageNum: page });
+      wx.showLoading({
+        title: '加载更多',
+      })
+      that.studentList(this.data.pageNum).then(res => {
+        wx.hideLoading();
+        
+        let oldList = that.data.stuInfo.list.slice();
+        let newInfo = Object.assign({}, that.data.stuInfo, res)
+        console.log("that.data.pageNum",that.data.pageNum);
+        console.log("res.pages:",res.pages);
+        if (that.data.pageNum <= res.pages) {
+          newInfo.list=oldList.concat(newInfo.list)
+          that.setData({
+            stuInfo:newInfo
+          });
+        }else{
+          wx.showToast({
+            title: '没有更多了',
+          })
+        }
+        console.log(res)
+
+      },()=>{
+        wx.hideLoading();
+        wx.showToast({
+          title: '加载失败',
+        })
+      })
+    }
+
+  },
+  // onReachBottom: function () {
+  //   var that = this;
+  //   console.log(that)
+  //   var page = that.data.page
+  //   page++;
+  //   that.setData({
+  //   page: page
+  //   })
+  //   // 显示加载图标
+  //   wx.showLoading({
+  //   title: '玩命加载中',
+  //   })
+  //   wx.request({
+  //   url: '',   //请求的接口地址
+  //   data: {
+  //   page: that.data.page,    //  页数
+
+  //   },
+  //   header: {
+  //   'content-type': 'application/json'
+  //   },
+
+  //   method: 'GET',
+  //   success: function (res) {
+  //   console.log(res)
+  //   var goods = that.data.grade.concat(res.data.data.list)     //grade  为一进入页面请求完数据定义的集合
+  //   if (res.data.data.list == '') {
+  //   console.log(1)
+  //   wx.showToast({
+  //   title: '暂无更多',
+  //   icon: 'none',
+  //   })
+  //   } else {
+  //   that.setData({
+  //   grade : goods,
+  //   });
+  //   }
+  //   wx.hideLoading();
+
+  //   },
+  //   })
+  //   },
   async onShow() {
+    var that = this;
     // wx.showLoading({
     //   title: '加载中',
     //   mask:true
@@ -1064,6 +1291,14 @@ Page({
     this.setData({
       sessionKey
     });
-    this.isRz(sessionKey)
+    await this.isRz(sessionKey)
+    that.getjob(sessionKey)
+    console.log(that.data.classVis);
+    this.studentList(this.data.pageNum).then((info) => {
+      this.setData({ stuInfo: info });
+      console.log(this.data.stuInfo)
+    })
+
+
   }
 })

+ 1 - 0
pages/myClass/myClass.json

@@ -1,4 +1,5 @@
 {
   "usingComponents": {},
+  "enablePullDownRefresh":true,
   "navigationBarTitleText":"我的班级"
 }

+ 95 - 86
pages/myClass/myClass.wxml

@@ -1,4 +1,9 @@
-<view class="container">
+<view class="switch_tab_container">
+    
+  
+    
+
+    <van-notice-bar wx:if="{{noticeVis}}" left-icon="volume-o" mode="link" text="{{'通知:'+notice}}" bindtap="gomyNotice"/>
 	<van-popup show="{{ show }}" bind:close="onClose">
 		<view class="nr_box">
 			<view class="title">学员培训协议</view>
@@ -21,96 +26,100 @@
 			<view class="thinking" bindtap="moreThink">我再想想</view>
 		</view>
 	</van-popup>
-	<view wx:if="{{isRz}}" class="rzbj" catchtouchmove='true'>
-		<view class="rzbox">
-			<view class="tip">提示</view>
-			<view class="tip1">
-				您还没有进行身份认证哦!
+
+	<!--    -->
+	
+
+    <view class="classInfo" wx:if="{{classVis}}">
+	  <van-image round width="120rpx" height="120rpx" src="{{classInfo.logoImg}}" fit="cover"/>
+	  <view class="classInfo_text">
+	    <view class="classInfo_title van-ellipsis">{{classInfo.clasName}}</view>
+		<view class="classInfo_tip"><van-icon name="clock-o" style="padding-right:10rpx;" /> {{classInfo.clasBegin}} - {{classInfo.clasEnd}}</view>
+	  </view>
+	</view>
+    <view class="classInfo_cell" >
+		<van-cell size="large"  bindtap="toAdd1" is-link >
+			<view slot="title">
+				<view class="van-cell-text"><van-icon name="hotel-o" /> 学院介绍</view> 
 			</view>
-			<view class="sure_box">
-				<view class="qx" catchtap="escRz">取消</view>
-				<view class="sure" catchtap="goRz">确定</view>
+		</van-cell>
+		<van-cell wx:if="{{classVis}}" size="large" bindtap="toAdd3" is-link >
+			<view slot="title">
+				<view class="van-cell-text"><van-icon name="friends-o" /> 项目组名单</view> 
 			</view>
-		</view>
-	</view>
-	<view class="notice" bindtap="gomyNotice">
-		<van-row>
-			<van-col span="2">
-				<image src='/images/wdtz.png' mode='aspectFill' class="ding"></image>
-			</van-col>
-			<van-col span="20">{{notice}}</van-col>
-			<van-col span="2">></van-col>
-		</van-row>
-	</view>
-	<van-divider contentPosition="center" customStyle="color: #eb3f33; border-color: #eb3f33; font-size: 30rpx;font-weight:900;position:relative">
-		<image src='{{classInfo.logoImg}}' mode='aspectFill' class="banjihz" wx:if="{{classInfo.logoImg}}"></image>
-		<view style="max-width:500rpx;">{{classInfo.clasName}}</view>
-	</van-divider>
-	<view class="layout" bindtap="goWrite">
-		<image src='/images/xydj_bj.png' mode='aspectFill' class="bgimg1"></image>
-		<view class="layout_text1">学员登记表</view>
-		<view class="layout_text2" wx:if='{{istask1}}'>查看详情</view>
-		<view class="layout_text2" wx:else>去填写</view>
+		</van-cell>
 	</view>
-	<view class="introuduce">
-		<view bindtap="toAdd1" class="one">学院介绍</view>|
-		<view bindtap="toAdd2">学员名单</view>|
-		<view bindtap="toAdd3">项目组名单</view>
+    
+
+
+
+	<!-- 没有认证 -->
+    <view wx:if="{{isRz}}" >
+        <van-empty  description="您还没有进行身份认证哦!" />
+		<view catchtap="goRz" class="empty_rz"><view class="button_rz">去认证</view></view>
+    </view>
+    <!-- 班级错误 -->
+	<view wx:if="{{classErrVis}}">
+        <van-empty image="error" description="学员不可同时存在两个班级中。" />
+    </view>
+    
+    <!-- 没有开班的班级 -->
+	<view wx:if="{{classNVis}}">
+        <van-empty description="您当前还没有正在开放的班级!" style="color:#ff0000"></van-empty>
+		
+		<view class="sche_list" wx:if="{{scheduleList.length>0}}">
+		  <view class="sche_list_sche" >您所在的班级:</view>
+		  <view wx:for="{{scheduleList}}">
+			<view class="sche_list_name van-ellipsis">{{item.clasName}}</view>
+			<view class="sche_list_time">开班时间: {{item.clasBegin}} - {{item.clasEnd}}</view>
+		  </view>
+		</view>
+    </view>
+
+
+
+
+	<view wx:if="{{classVis}}" class="stu_list">
+	  <view class="stu_item" wx:for="{{stuInfo.list}}" bindtap = "onClickShow" data-item="{{item}}">
+	    <van-image round width="120rpx" height="120rpx" src="{{item.avatar}}" fit="cover"/>
+		<view class="stu_con">
+		  <view class="stu_text"> 
+		    <view class="stu_line"><view class="stu_name">{{item.studentName}}</view><van-image width="32rpx" height="32rpx" src="{{item.studentSex==0?gender_icon_m:gender_icon_f}}" fit="cover"/> <van-tag class="stu_tag" type="warning">{{item.register==0?"已登记":"未登记"}}</van-tag> </view>
+            <view class="stu_check">查看名片 </view>
+		  </view>
+		  <view class="stu_progress">学习进度:{{item.studyProgress}}%</view>
+		  <van-progress percentage="{{item.studyProgress}}" color="#5FD387"/>
+		</view>
+	  </view>
 	</view>
-	<view class="{{!showMore? 'hiddenmore' : 'showmore'}}">
-		<view class="sp {{idx>2 ? 'none' : ''}}" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
-			<image src='{{item.courseImg}}' mode="aspectFill" class="spfm"></image>
-			<image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image>
-			<view class="sp_text">
-				<view class="fisrt_set">
-					<image src='/images/db.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==-1}}'></image>
-					<image src='/images/zb.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive == 1 && item.isActive==1}}'></image>
-					<image src='/images/dzb.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==1 && item.isActive==null}}'></image>
-					<image src='/images/zbjs.png' mode='aspectFill' class="dbimg" wx:if='{{item.isLive==1 && item.isActive==-1}}'></image>
-					<view class="start_text" wx:if='{{item.isLive==1}}'>开始时间:{{item.courseStart}}</view>
-					<view class="start_text" wx:if='{{item.isLive==-1}}'>视频时长: {{sfmArr[idx].courseTime}}</view>
-				</view>
-				<view class="name">{{item.courseName}}</view>
-				<view>
-					<image src='/images/startstudy.png' mode='aspectFill' class="an" data-item="{{item}}" bindtap="goStudy"></image>
-					<image src='/images/dtxs.png' wx:if='{{item.isNeedExam==1&&item.isExam==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gokhAnswer"></image>
-					<image src='/images/ckcj.png' wx:if='{{item.isNeedExam==1&&item.isExam==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockcj"></image>
-					<image src='/images/pjkc.png' wx:if='{{item.isFeedback==0}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gopjClass"></image>
-					<image src='/images/ckpj.png' wx:if='{{item.isFeedback==1}}' mode='aspectFill' class="an" data-item="{{item}}" bindtap="gockpj"></image>
+
+	<van-overlay show="{{ cardVis }}" bind:click="onClickHide">
+		<view class="card_wrapper">
+		    <view class="card_block">
+			  <view class="card_info">
+			    <view class="card_con">
+				  <view class="card_left">
+				    <van-image round width="120rpx" height="120rpx" src="{{stuItem.avatar}}" fit="cover"/>
+				    <van-tag class="class-tag" type="warning">{{stuItem.register==0?"已登记":"未登记"}}</van-tag>
+				  </view>
+				  <view class="card_right">
+				    <view class="card_line"><view class="card_name">{{stuItem.studentName}}</view> <view class="card_gender">{{stuItem.studentSex==0?"男":"女"}}</view></view>
+					<view class="card_duty">{{jobArr[stuItem.studentDuty-1].dictLabel}}</view>
+					<view class="card_tel"><van-icon name="phone" class="card_tel_icon"/> {{stuItem.studentPhone}}</view>
+				  </view>
 				</view>
+				<view class="card_progress">学习进度:{{stuItem.studyProgress}}%</view>
+				<van-progress percentage="{{stuItem.studyProgress}}" stroke-width="12rpx" color="#5FD387"/>
+			  </view>
 			</view>
 		</view>
-		<block wx:if="{{kcArr.length>3}}">
-			<view wx:if="{{showMore}}" class='openall' bindtap='listToggle'>
-				收起
-				<van-icon name="arrow-up" />
-			</view>
-			<view wx:else class='openall' bindtap='listToggle'>
-				展开全部
-				<image src='/images/openall.png' mode='aspectFill' class="openallimg"></image>
-			</view>
-		</block>
-	</view>
-	<view class="layout" style="margin-top:30rpx" bindtap="goQmks">
-		<image src='/images/finallytest.png' mode='aspectFill' class="bgimg1"></image>
-	</view>
-	<view class="layout" style="margin-top:40rpx" bindtap="goWrite2">
-		<image src='/images/zhfk_bj.png' mode='aspectFill' class="bgimg1"></image>
-		<view class="layout_text1">综合反馈表</view>
-		<view class="layout_text2" wx:if='{{istask4}}'>查看详情</view>
-		<view class="layout_text2" wx:if='{{!istask4}}'>去填写</view>
-	</view>
-	<view class="qy_title" bindtap="goMyPoints">
-		<view class="redk"></view>我的积分:0积分
-		<view class="more">></view>
-	</view>
-	<view class="lq">
-		<view class="lq_btn" bindtap="lq">领取结业证</view>
-		<view class="pz">注:领取结业证需完成所有课程</view>
-	</view>
-	<view wx:if="{{ showzs }}" catchtouchmove='true' style="position:fixed;bottom:0;height:100vh;width:100%;background-color:rgba(13,13,13,0.7)">
-		<canvas canvas-id="{{myCanvasId}}" style="width:300px;height:415px;margin:100rpx auto 30rpx auto;"></canvas>
-		<button bindtap="saveZs" size="mini" type="default" style="color:#000;font-size:14px;margin-left:200rpx;">保存证书</button>
-		<button bindtap="onClose1" size="mini" type="default" style="color:#000;font-size:14px;margin-left:20rpx;">关闭证书</button>
-	</view>
+    </van-overlay>
+
+
+
+
+
+
+
+
 </view>

+ 207 - 1
pages/myClass/myClass.wxss

@@ -2,6 +2,9 @@
 page{
   font-family: "SourceHanSansCN-Medium"
 } */
+page{
+  background-color: #f8f8f8;
+}
 .nr_box {
   width: 670rpx;
   height: 90vh;
@@ -456,4 +459,207 @@ page{
 .van-divider--right: after {
   margin-left: 0;
   margin-left: var(--divider-content-padding, 0px);
-} */
+} */
+
+
+.van-cell-text{
+  font-size:30rpx;
+}
+
+.classInfo{
+  box-sizing: border-box;
+  width: 100%;
+  padding:30rpx;
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: start;
+  align-items: center;
+  height:180rpx;
+  background-color:#ffffff;
+  
+}
+.classInfo_text{
+  display: flex;
+  flex-flow: column nowrap;
+  justify-content: space-between;
+  padding-left:30rpx;
+}
+.classInfo_title{
+  font-size: 30rpx;
+  color:#333333;
+  line-height: 36rpx;
+  padding-bottom:20rpx;
+
+}
+.classInfo_tip{
+  display: flex;
+  flex-flow: row nowrap;
+  align-items: center;
+  font-size: 26rpx;
+  color:#999999;
+  
+}
+.classInfo_cell{
+  margin-top:30rpx;
+  margin-bottom:30rpx;
+}
+.stu_list{
+  background-color: #ffffff;
+  width: 100%;
+}
+.stu_item{
+  width: 100%;
+  box-sizing: border-box;
+  padding:30rpx;
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: space-between;
+  align-items: center;
+  border-bottom:1rpx solid #eeeeee;
+}
+.stu_con{
+  width:540rpx;
+}
+.stu_text{
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: space-between;
+  align-items: center;
+  padding-bottom:20rpx;
+}
+.stu_line{
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: left;
+  align-items: center;
+}
+.stu_check{
+  padding: 5rpx 10rpx;
+  border:1rpx solid #cccccc;
+  color:#999999;
+  font-size:26rpx;
+  margin-top:5rpx;
+}
+.stu_name{
+  font-size:36rpx;
+  color: #333333;
+  padding-right:10rpx;
+}
+.stu_tag{
+  font-size:26rpx;
+}
+.stu_progress{
+  font-size:26rpx;
+  color:#999;
+  padding-bottom:8rpx;
+}
+
+.card_wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100%;
+}
+
+.card_block {
+  width: 690rpx;
+  height: 400rpx;
+  background-color: #fff;
+  border-radius: 20rpx;
+}
+.card_info{
+  box-sizing: border-box;
+  padding:60rpx 80rpx 0rpx 80rpx;
+
+}
+.card_con{
+  display: flex;
+  flex-flow: row nowrap;
+  align-items: center;
+  justify-content: space-between;
+}
+.card_left{
+  width: 120rpx;
+
+  text-align: center;
+  padding-right:80rpx;
+  display: flex;
+  flex-flow: column nowrap;
+  justify-content: space-between;
+}
+.card_right{
+  width:400rpx;
+}
+.card_name{
+  font-size: 40rpx;
+  color: #333333;
+  padding-right:50rpx;
+  
+}
+.card_gender{
+  font-size:30rpx;
+}
+.card_tag{
+  font-size: 26rpx;
+  margin-top: 20rpx;
+}
+.card_line{
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: start;
+  align-items: center;
+  padding-top:10rpx;
+  padding-bottom:5rpx;
+}
+.card_duty{
+  font-size:30rpx;
+  color: #999999;
+  padding-bottom:40rpx;
+}
+.card_tel{
+  font-size: 30rpx;
+  color:#333333
+}
+.card_tel_icon{
+  color:#999999
+}
+.card_progress{
+  font-size:26rpx;
+  color:#999;
+  padding-bottom:10rpx;
+  padding-top:20rpx;
+}
+
+
+.empty_rz{
+  width: 100%;
+  text-align: center;
+}
+.button_rz{
+  display: inline;
+  padding: 10rpx 50rpx;
+  border-radius: 10rpx;
+  color: #ffffff;
+  background: linear-gradient(#64AFF8, #5A51ED); 
+}
+.sche_list{
+  width:100%;
+  box-sizing: border-box;
+text-align: left;
+padding:0rpx 30rpx;
+}
+.sche_list_name{
+  font-size: 26rpx;
+  color: #666666;
+}
+.sche_list_sche{
+  font-size: 30rpx;
+  color: #666666;
+}
+.sche_list_time{
+  font-size:24rpx;
+  color:#999999;
+}
+.van-empty__description{
+  color: #d7301d;
+}

+ 1 - 1
pages/studentRegistration/studentRegistration.js

@@ -271,7 +271,7 @@ Page({
           unitLeader: this.data.dyzIndex, //单元长
           welfarePosition: this.data.gygIndex, //公益岗位
           partyMember: this.data.dyIndex, //党员
-          wxPicture:this.data.avatar//微信头像
+          studentHead:this.data.avatar//微信头像
         },
         success: () => {
           wx.showModal({

+ 38 - 1
utils/util.js

@@ -30,8 +30,45 @@ const dateFilter=function(date){
      })
    
 }
+const timeFilter=function(date){
+  console.log(date);
+  return date.replace(/([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})[\s]+([0-9]{1,2}):([0-9]{1,2})(:[0-9]{1,2})/g,function(){
+    console.log(arguments);
+   return arguments[1]+"/"+(arguments[2].length>1&&arguments[2][0]=="0"?arguments[2][1]:arguments[2])+"/"+(arguments[3].length>1&&arguments[3][0]=="0"?arguments[3][1]:arguments[3])+" "+(arguments[4].length>1&&arguments[4][0]=="0"?arguments[4][1]:arguments[4])+":"+(arguments[5].length>1&&arguments[5][0]=="0"?arguments[5][1]:arguments[5]);
+   })
+ 
+}
+
+
+
+  
+const timeFmt= function(str,fmt){
+    
+  let d=new Date(str)
+ 
+  let o = {   
+      "M+" : d.getMonth()+1,                 //月份   
+      "d+" : d.getDate(),                    //日   
+      "h+" : d.getHours(),                   //小时   
+      "m+" : d.getMinutes(),                 //分   
+      "s+" : d.getSeconds(),                 //秒   
+      "q+" : Math.floor((d.getMonth()+3)/3), //季度   
+      "S"  : d.getMilliseconds()             //毫秒   
+  };
+  if(/(y+)/.test(fmt))   
+  fmt=fmt.replace(RegExp.$1, (d.getFullYear()+"").substr(4 - RegExp.$1.length));   
+for(var k in o)   
+  if(new RegExp("("+ k +")").test(fmt))   
+fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));   
+return fmt; 
+}
+
+
+
 module.exports = {
   globalData,
   formatTime,
-  dateFilter
+  dateFilter,
+  timeFilter,
+  timeFmt
 }