5 次代碼提交 3b4e345c9a ... 86effacb95

作者 SHA1 備註 提交日期
  tiedan 86effacb95 Merge branch 'hou' of http://git.cc-lotus.info/ssfg/OnlineTraining0622 into hou 4 年之前
  tiedan bbcf659303 fix 优化小程序体积,图片存到图片服务器,我的班级图标设计 4 年之前
  tiedan 7ef7a18c84 feature 班级页改造基本完成,但是体积没优化 4 年之前
  tiedan a45b04cf44 feature 学员登记需要授权获取头像 4 年之前
  tiedan 12d318876f fix 修改首页样式问题,加入vant样式主题 4 年之前
共有 38 個文件被更改,包括 1097 次插入310 次删除
  1. 6 1
      app.json
  2. 11 0
      app.wxss
  3. 二進制
      images/gift1.jpg
  4. 二進制
      images/gift2.jpg
  5. 二進制
      images/gift3.jpg
  6. 二進制
      images/gift4.jpg
  7. 二進制
      images/gift5.jpg
  8. 二進制
      images/ic1.png
  9. 二進制
      images/ic2.png
  10. 二進制
      images/ic3.png
  11. 二進制
      images/intrducebj.jpg
  12. 二進制
      images/logo.png
  13. 二進制
      images/rsww.png
  14. 1 0
      miniprogram_npm/vant-weapp/cell-group/index.d.ts
  15. 10 0
      miniprogram_npm/vant-weapp/cell-group/index.js
  16. 3 0
      miniprogram_npm/vant-weapp/cell-group/index.json
  17. 9 0
      miniprogram_npm/vant-weapp/cell-group/index.wxml
  18. 1 0
      miniprogram_npm/vant-weapp/cell-group/index.wxss
  19. 1 0
      miniprogram_npm/vant-weapp/cell/index.d.ts
  20. 37 0
      miniprogram_npm/vant-weapp/cell/index.js
  21. 6 0
      miniprogram_npm/vant-weapp/cell/index.json
  22. 45 0
      miniprogram_npm/vant-weapp/cell/index.wxml
  23. 1 0
      miniprogram_npm/vant-weapp/cell/index.wxss
  24. 1 1
      miniprogram_npm/vant-weapp/progress/index.js
  25. 1 1
      pages/index/index.js
  26. 22 4
      pages/index/index.wxml
  27. 48 5
      pages/index/index.wxss
  28. 278 40
      pages/myClass/myClass.js
  29. 1 0
      pages/myClass/myClass.json
  30. 95 86
      pages/myClass/myClass.wxml
  31. 217 1
      pages/myClass/myClass.wxss
  32. 6 5
      pages/myPoints/myPoints.js
  33. 8 1
      pages/schoolIntrouce/schoolIntrouce.js
  34. 2 2
      pages/schoolIntrouce/schoolIntrouce.wxml
  35. 65 1
      pages/studentRegistration/studentRegistration.js
  36. 169 159
      pages/studentRegistration/studentRegistration.wxml
  37. 13 1
      pages/studentRegistration/studentRegistration.wxss
  38. 40 2
      utils/util.js

+ 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",
@@ -50,6 +51,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",

+ 11 - 0
app.wxss

@@ -1,5 +1,7 @@
 /**app.wxss**/
 /* @import "./fonts/SourceHanSansCN-Medium.wxss"; */
+@import '/miniprogram_npm/vant-weapp/common/index.wxss';
+   
 .container {
   width: 100%;
   margin-top: 20rpx;
@@ -10,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"
 } */

二進制
images/gift1.jpg


二進制
images/gift2.jpg


二進制
images/gift3.jpg


二進制
images/gift4.jpg


二進制
images/gift5.jpg


二進制
images/ic1.png


二進制
images/ic2.png


二進制
images/ic3.png


二進制
images/intrducebj.jpg


二進制
images/logo.png


二進制
images/rsww.png


+ 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>

文件差異過大導致無法顯示
+ 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.js

@@ -8,7 +8,7 @@ Page({
     isNeedlogin: false,
     // 课程轮播
     bnrUrl: [{
-      clasImg: "../../images/zbfm.png"
+      clasImg: app.globalData.imgUrl+"/images/zbfm.png"
     }],
     gridArr: [{
       url: "/images/icon1.png",

+ 22 - 4
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">
@@ -55,11 +55,11 @@
 
 
 
-	<van-tabs active="{{ active }}" bind:change="onChange">
+	<van-tabs active="{{ active }}" bind:change="onChange" line-width="60" line-height="2">
 
-		<van-tab  wx:for="{{vType}}" wx:for-item="titem" title="{{titem}}" wx:key="titem" title-style="font-size:25rpx">
+		<van-tab  wx:for="{{vType}}" wx:for-item="titem" title="{{titem}}" wx:key="titem" title-style="font-size:30rpx" >
 			<view class="xczs">
-				<view class="zb1" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
+				<!-- <view class="zb1" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
 					<image src='{{item.courseImg}}' mode='aspectFill' class="show1"></image>
 					<view class="grayblock">
 						<view class="show_text">{{item.courseName}}</view>
@@ -69,7 +69,25 @@
 							</view>
 						</view>
 					</view>
+				</view> -->
+
+
+
+
+             
+				<view class="ivlist" wx:for="{{xcpArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx" bindtap="goSeevideo" data-item="{{item}}">
+					
+					<view class="ivlist_text">
+						<view class="ivlist_title van-multi-ellipsis--l2">{{item.courseName}}</view>
+						<view class="ivlist_subt"><van-icon name="eye-o" class="ivlist_icon" /> {{item.playTimes}}人看过</view>
+					</view>
+					<!-- <van-image width="180" height="150" fit="cover" src="{{item.courseImg}}" /> -->
+					<image src='{{item.courseImg}}' mode='aspectFill' class="ivlist_img"></image>
+
 				</view>
+
+
+
 			</view>
 		</van-tab>		
 	</van-tabs>

+ 48 - 5
pages/index/index.wxss

@@ -149,13 +149,12 @@
 }
 
 .xczs {
-  width: 720rpx;
-  margin-left: 20rpx;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 30rpx;
   /* height: 250rpx; */
   /* border: 1px solid yellow; */
-  margin-top: 20rpx;
-  margin-bottom: 20rpx;
-  display: flex;
+ 
   display: block;
 }
 
@@ -199,4 +198,48 @@
   margin-left: 10rpx;
   margin-top: 5rpx;
   float: left;
+}
+
+
+
+
+.ivlist{
+  width: 100%;
+  height:150rpx;
+  display: flex;
+  flex-flow:row nowrap;
+  justify-content:  space-between ;
+  align-items:  center;
+  padding-bottom:30rpx;
+  margin-bottom:30rpx;
+  border-bottom:1rpx solid #f8f8f8;
+}
+.ivlist_img{
+  width: 230rpx;
+  height:150rpx;
+}
+.ivlist_text{
+  width:430rpx;
+  height:150rpx;
+  display: flex;
+  flex-flow:column nowrap;
+  justify-content:  space-between ;
+
+}
+.ivlist_title{
+  font-size: 32rpx;
+  color: #333333;
+  padding-top:5rpx;
+}
+.ivlist_subt{
+  font-size:26rpx;
+  color:#999999;
+  padding-bottom:5rpx;
+  display:flex;
+  align-items:center;
+  justify-content: start;
+}
+.ivlist_icon{
+  font-size:30rpx;
+  padding-right:10rpx;
 }

+ 278 - 40
pages/myClass/myClass.js

@@ -13,7 +13,7 @@ Page({
     studentName: "", //学生名字
     status: '', //状态
     myCanvasId: 0, //画布id
-    byzsbj: "../../images/zsbj.jpg", //结业证背景  用于合成图片
+    byzsbj: app.globalData.imgUrl+"/images/zsbj.jpg", //结业证背景  用于合成图片
     IngCourseArr: [], //如果有正在进行的课就存一下
     istask: false, //判断班级群是否添加
     istask1: false, //学员登记表是否完成
@@ -23,6 +23,24 @@ Page({
     currentId: null,
     currentName: "",
     tva: 32,
+    noticeVis: false,
+    defAvatarm:app.globalData.imgUrl+ "/images/mm.jpg",
+    defAvatarf: app.globalData.imgUrl+"/images/fm.jpg",
+    gender_icon_m:app.globalData.imgUrl+ "/images/g_m.png",
+    gender_icon_f: app.globalData.imgUrl+"/images/g_f.png",
+    cardVis: false,
+    stuItem: null,
+    pageNum: 1,
+    pageSize: 4,
+    stuInfo: {},
+    jobArr: [],
+    classVis: false,
+    classErrVis: false,
+    classNVis: false,
+    scheduleList: [],
+    icon_school:app.globalData.imgUrl+"/images/icon_school.png",
+    icon_doc:app.globalData.imgUrl+"/images/icon_doc.png"
+
   },
   // 查询我是否认证
   isRz(sessionKey) {
@@ -33,6 +51,7 @@ Page({
         sessionKey
       },
       success: (res) => {
+
         if (res.data.code == 0 && (res.data.data !== null || res.data.data !== "")) {
           this.setData({
             isRz: false
@@ -60,6 +79,7 @@ Page({
   },
   // 查询我是否有班&&班级名字
   isClass(sessionKey) {
+    var that = this;
     wx.request({
       url: app.globalData.publicUrl + '/wx/student/selMyClas',
       method: "post",
@@ -67,45 +87,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 +285,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 +1010,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 +1045,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 +1058,7 @@ Page({
             showzs: true
           });
         }
-        
+
       },
       fail: () => {
         wx.hideLoading();
@@ -1055,7 +1123,169 @@ 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() {
+    console.log(app.globalData.imgUrl);
+    var that = this;
     // wx.showLoading({
     //   title: '加载中',
     //   mask:true
@@ -1064,6 +1294,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-image width="24" height="24" src="{{icon_school}}" /> 学院介绍</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-image width="24" height="24" src="{{icon_doc}}" /> 项目组名单</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" wx:if="{{item.register==0}}">已登记</van-tag><van-tag class="stu_tag" type="warning" wx:else>未登记</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>

+ 217 - 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,217 @@ 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;
+}
+
+.van-cell-text{
+  display: flex;
+  flex-flow: row nowrap;
+  justify-content: start;
+  align-items: center;
+}
+.classInfo_cell .van-image{
+  margin-right:20rpx;
+}

+ 6 - 5
pages/myPoints/myPoints.js

@@ -1,27 +1,28 @@
+const app = require('../../utils/util.js');
 Page({
   data: {
     dataArr: [{
-      img: "/images/gift1.jpg",
+      img:app.globalData.imgUrl+"/images/gift1.jpg",
       prizeName: "定制马克杯",
       num: "限量100份",
       fraction: "190积分"
     }, {
-      img: "/images/gift2.jpg",
+      img:app.globalData.imgUrl+ "/images/gift2.jpg",
       prizeName: "书籍(可选择)",
       num: "限量50份",
       fraction: "225积分"
     }, {
-      img: "/images/gift3.jpg",
+      img: app.globalData.imgUrl+"/images/gift3.jpg",
       prizeName: "定制书签",
       num: "限量100份",
       fraction: "175积分"
     }, {
-      img: "/images/gift4.jpg",
+      img:app.globalData.imgUrl+ "/images/gift4.jpg",
       prizeName: "定制雨伞",
       num: "限量20份",
       fraction: "210积分"
     }, {
-      img: "/images/gift5.jpg",
+      img:app.globalData.imgUrl+ "/images/gift5.jpg",
       prizeName: "定制钥匙扣",
       num: "限量200份",
       fraction: "125积分"

+ 8 - 1
pages/schoolIntrouce/schoolIntrouce.js

@@ -1 +1,8 @@
-Page({})
+const app = require('../../utils/util.js');
+const tools = require('../../utils/tools.js');
+Page({
+  data: {
+    img:app.globalData.imgUrl+"/images/intrducebj.jpg",
+    logo:app.globalData.imgUrl+"/images/logo.png"
+  }
+})

+ 2 - 2
pages/schoolIntrouce/schoolIntrouce.wxml

@@ -1,7 +1,7 @@
 <view>
-	<image src="../../images/intrducebj.jpg" class="bj"></image>
+	<image src="{{img}}" class="bj"></image>
 	<view class="block">
-		<image src="../../images/logo.png" class="logo"></image>
+		<image src="{{logo}}" class="logo"></image>
 		<view class="name">吉林长春社区干部学院</view>
 		<view class="EnglishName">Jilin Changchun Community Cadre College</view>
 		<view class="dl" style="margin-top:20rpx">吉林长春社区干部学院坐落在长春市宽城区,傍依长春市的母亲河——伊通河,是长春市委直属事业单位,集教学、餐饮、住宿、健身于一体,配备罗马教室、模

+ 65 - 1
pages/studentRegistration/studentRegistration.js

@@ -2,6 +2,11 @@ const tools = require('../../utils/tools.js');
 const app = require('../../utils/util.js');
 Page({
   data: {
+    canIUse: wx.canIUse('button.open-type.getUserInfo'),
+    avatar:"",
+    loadvisible:false,
+    visible:false,
+
     jobArr: [],
     jobtext: '请选择',
     kaihutext: '请选择',
@@ -95,6 +100,20 @@ Page({
   //     currentDate: e.detail,
   //   });
   // },
+
+  bindGetUserInfo (e) {
+    var that=this;
+    console.log(e.detail.userInfo)
+    console.log(typeof e.detail.userInfo)
+    if(typeof e.detail.userInfo!='undefined'){
+      that.setData({avatar:e.detail.userInfo.avatarUrl});
+    }
+
+    that.setData({visible:true});
+    console.log(that.data.avatar);
+    
+  },
+
   onChange(event) {
     this.setData({
       radio: event.detail,
@@ -233,6 +252,7 @@ Page({
     e.detail.value.tenure = this.data.tenure;
     e.detail.value.sessionKey = this.data.sessionKey;
     let aa = e.detail.value
+    console.log(this.data.avatar);
     if (aa.culture && aa.school && aa.studentDuty && aa.tenure && aa.studentDept && aa.studentPhone) {
       wx.request({
         url: app.globalData.publicUrl + '/wx/student/upStudent',
@@ -250,7 +270,8 @@ Page({
           buildingLeader: this.data.ldzIndex, //楼栋长
           unitLeader: this.data.dyzIndex, //单元长
           welfarePosition: this.data.gygIndex, //公益岗位
-          partyMember: this.data.dyIndex //党员
+          partyMember: this.data.dyIndex, //党员
+          studentHead:this.data.avatar//微信头像
         },
         success: () => {
           wx.showModal({
@@ -328,7 +349,16 @@ Page({
     })
   },
   onReady: function () {},
+
+
+
+
+
+
+
   async onLoad() {
+    console.log(this.data.loadvisible);
+    var that=this;
     wx.showLoading({
       title: '加载中',
       mask: true
@@ -339,6 +369,40 @@ Page({
       sessionKey: sessionKey
     })
     this.getjob(sessionKey)
+
+
+
+    // 查看是否授权
+    wx.getSetting({
+      success (res){
+        if (res.authSetting['scope.userInfo']) {
+          // 已经授权,可以直接调用 getUserInfo 获取头像昵称
+          wx.getUserInfo({
+            success: function(res) {
+              that.setData({visible:true,loadvisible:true,avatar:res.userInfo.avatar});
+              console.log(res.userInfo)
+              console.log(that.data.loadvisible);
+            }
+          })
+        }else{
+          // 如果没有授权,表单不可见
+          that.setData({loadvisible:true,visible:false});
+        }
+      },
+      fail(){
+        //接口调用失败需要返回重试
+        wx.showModal({
+          showCancel: false,
+          content: '网络错误,请稍后再试',
+          success() {
+            wx.navigateBack({
+              delta: 1
+            })
+          }
+        })
+
+      }
+    })
   },
   getBanner(sessionKey) {
     wx.request({

+ 169 - 159
pages/studentRegistration/studentRegistration.wxml

@@ -1,179 +1,189 @@
 <view class="home">
-	<form bindsubmit="formSubmit">
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">姓名</view>
-			<view class='weui-input'>
-				<input name="username" disabled value="{{ info.miniName }}" placeholder="请输入姓名" placeholder-style="font-size:25rpx" />
-			</view>
+	
+		<view wx:if="{{loadvisible&&!visible}}" class="needAuth">
+			
+			<van-button type="primary" size="large" wx:if="{{canIUse}}" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">授权登录</van-button>
+			<view wx:else>请升级微信版本</view>
+			<view class="needAuth1">请你授权程序,确保正常使用小程序功能。</view>
+			
 		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">性别</view>
-			<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}'>
-				<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" checked="{{item.checked}}" wx:for-index="idx" wx:for="{{parameter}}">
-					<radio value="{{ item.value }}" />{{item.name}}
-				</label>
-			</radio-group>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">工作单位</view>
-			<view class='weui-input'>
-				<input class="" name="studentDept" value="{{ studentDept }}" placeholder="请输入工作单位" placeholder-style="font-size:25rpx" />
-			</view>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">文化程度</view>
-			<picker bindchange="kaihuListChange" name="culture" value="{{kaihuindex}}" range-key="{{'name'}}" range="{{kaihuList}}">
-				<view class="weui-input aaa">
-					{{kaihutext == null? '请选择':kaihutext}}
+		
+		<form bindsubmit="formSubmit" wx:if="{{loadvisible&&visible}}">
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">姓名</view>
+				<view class='weui-input'>
+					<input name="username" disabled value="{{ info.miniName }}" placeholder="请输入姓名" placeholder-style="font-size:25rpx" />
 				</view>
-			</picker>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">毕业学校</view>
-			<view class='weui-input'>
-				<input class="" name="school" value="{{ info.school }}" placeholder="请输入毕业学校" placeholder-style="font-size:25rpx" />
-			</view>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">所学专业</view>
-			<view class='weui-input'>
-				<input class="" name="mcajor" value="{{info.mcajor}}" placeholder="请输入所学专业" placeholder-style="font-size:25rpx" />
-			</view>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">现任职务</view>
-			<view class='weui-input'>
-				<picker bindchange="jobChange" range-key="{{'dictLabel'}}" name="studentDuty" value="{{zwIndex+1}}" range="{{jobArr}}">
-					<view class="weui-input aaa">
-						<!-- {{jobtext == null?'请选择':jobtext}} -->
-						{{jobArr[zwIndex].dictLabel}}
-					</view>
-				</picker>
-				<!-- <input class="" disabled name="studentDuty" value="{{ studentDuty }}" placeholder="请输入现任职务" placeholder-style="font-size:25rpx" /> -->
-			</view>
-		</view>
-		<!-- 是否党员 -->
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
-			</view>
-			<view class="xingbie">是否党员</view>
-			<view class='weui-input'>
-				<picker bindchange="dyChange" range-key="{{item}}" name="isdy" value="{{dyIndex}}" range="{{dyArr}}">
-					<view class="weui-input aaa">
-						<!-- {{dytext == null?'请选择':dytext}} -->
-						{{dyArr[dyIndex]}}
-					</view>
-				</picker>
-				<!-- <input class="" disabled name="studentDuty" value="{{ studentDuty }}" placeholder="请输入现任职务" placeholder-style="font-size:25rpx" /> -->
 			</view>
-		</view>
-		<!-- 是否网格长 -->
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">性别</view>
+				<radio-group name="{{item.name}}" data-index='{{index}}' data-idx='{{item.Id}}' data-questTypes='{{item.QuestType}}'>
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" checked="{{item.checked}}" wx:for-index="idx" wx:for="{{parameter}}">
+						<radio value="{{ item.value }}" />{{item.name}}
+					</label>
+				</radio-group>
+			</view>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">工作单位</view>
+				<view class='weui-input'>
+					<input class="" name="studentDept" value="{{ studentDept }}" placeholder="请输入工作单位" placeholder-style="font-size:25rpx" />
+				</view>
 			</view>
-			<view class="xingbie">是否网格长</view>
-			<view class='weui-input'>
-				<picker bindchange="wgzChange" range-key="{{item}}" name="isdy" value="{{wgzIndex}}" range="{{wgzArr}}">
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">文化程度</view>
+				<picker bindchange="kaihuListChange" name="culture" value="{{kaihuindex}}" range-key="{{'name'}}" range="{{kaihuList}}">
 					<view class="weui-input aaa">
-						<!-- {{wgztext == null?'请选择':wgztext}} -->
-						{{wgzArr[wgzIndex]}}
+						{{kaihutext == null? '请选择':kaihutext}}
 					</view>
 				</picker>
 			</view>
-		</view>
-		<!-- 是否楼栋长 -->
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">毕业学校</view>
+				<view class='weui-input'>
+					<input class="" name="school" value="{{ info.school }}" placeholder="请输入毕业学校" placeholder-style="font-size:25rpx" />
+				</view>
 			</view>
-			<view class="xingbie">是否楼栋长</view>
-			<view class='weui-input'>
-				<picker bindchange="ldzChange" range-key="{{item}}" name="isld" value="{{ldzIndex}}" range="{{ldzArr}}">
-					<view class="weui-input aaa">
-						<!-- {{ldztext == null?'请选择':ldztext}} -->
-						{{ldzArr[ldzIndex]}}
-					</view>
-				</picker>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">所学专业</view>
+				<view class='weui-input'>
+					<input class="" name="mcajor" value="{{info.mcajor}}" placeholder="请输入所学专业" placeholder-style="font-size:25rpx" />
+				</view>
 			</view>
-		</view>
-		<!-- 是否单元长 -->
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">现任职务</view>
+				<view class='weui-input'>
+					<picker bindchange="jobChange" range-key="{{'dictLabel'}}" name="studentDuty" value="{{zwIndex+1}}" range="{{jobArr}}">
+						<view class="weui-input aaa">
+							<!-- {{jobtext == null?'请选择':jobtext}} -->
+							{{jobArr[zwIndex].dictLabel}}
+						</view>
+					</picker>
+					<!-- <input class="" disabled name="studentDuty" value="{{ studentDuty }}" placeholder="请输入现任职务" placeholder-style="font-size:25rpx" /> -->
+				</view>
 			</view>
-			<view class="xingbie">是否单元长</view>
-			<view class='weui-input'>
-				<picker bindchange="dyzChange" range-key="{{item}}" name="isld" value="{{dyzIndex}}" range="{{dyzArr}}">
-					<view class="weui-input aaa">
-						<!-- {{dyztext == null?'请选择':dyztext}} -->
-						{{dyzArr[dyzIndex]}}
-					</view>
-				</picker>
+			<!-- 是否党员 -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">是否党员</view>
+				<view class='weui-input'>
+					<picker bindchange="dyChange" range-key="{{item}}" name="isdy" value="{{dyIndex}}" range="{{dyArr}}">
+						<view class="weui-input aaa">
+							<!-- {{dytext == null?'请选择':dytext}} -->
+							{{dyArr[dyIndex]}}
+						</view>
+					</picker>
+					<!-- <input class="" disabled name="studentDuty" value="{{ studentDuty }}" placeholder="请输入现任职务" placeholder-style="font-size:25rpx" /> -->
+				</view>
 			</view>
-		</view>
-		<!-- 是否公益岗 -->
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="" style="width:20rpx;height:20rpx"> </image>
+			<!-- 是否网格长 -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">是否网格长</view>
+				<view class='weui-input'>
+					<picker bindchange="wgzChange" range-key="{{item}}" name="isdy" value="{{wgzIndex}}" range="{{wgzArr}}">
+						<view class="weui-input aaa">
+							<!-- {{wgztext == null?'请选择':wgztext}} -->
+							{{wgzArr[wgzIndex]}}
+						</view>
+					</picker>
+				</view>
 			</view>
-			<view class="xingbie">是否公益岗</view>
-			<view class='weui-input'>
-				<picker bindchange="gygChange" range-key="{{item}}" name="isld" value="{{gygIndex}}" range="{{gygArr}}">
-					<view class="weui-input aaa">
-						<!-- {{gygtext == null?'请选择':gygtext}} -->
-						{{gygArr[gygIndex]}}
-					</view>
-				</picker>
+			<!-- 是否楼栋长 -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">是否楼栋长</view>
+				<view class='weui-input'>
+					<picker bindchange="ldzChange" range-key="{{item}}" name="isld" value="{{ldzIndex}}" range="{{ldzArr}}">
+						<view class="weui-input aaa">
+							<!-- {{ldztext == null?'请选择':ldztext}} -->
+							{{ldzArr[ldzIndex]}}
+						</view>
+					</picker>
+				</view>
 			</view>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx;"> </image>
+			<!-- 是否单元长 -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">是否单元长</view>
+				<view class='weui-input'>
+					<picker bindchange="dyzChange" range-key="{{item}}" name="isld" value="{{dyzIndex}}" range="{{dyzArr}}">
+						<view class="weui-input aaa">
+							<!-- {{dyztext == null?'请选择':dyztext}} -->
+							{{dyzArr[dyzIndex]}}
+						</view>
+					</picker>
+				</view>
 			</view>
-			<view class="xingbie">任职时间</view>
-			<view class='weui-input aaa' style="font-size: 26rpx;  line-height: 56rpx;" catchtap="share1">
-				{{tenure == null ? '':tenure  }}
-				<view wx:if='{{!tenure}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx">{{headmasterText}}</view>
+			<!-- 是否公益岗 -->
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">是否公益岗</view>
+				<view class='weui-input'>
+					<picker bindchange="gygChange" range-key="{{item}}" name="isld" value="{{gygIndex}}" range="{{gygArr}}">
+						<view class="weui-input aaa">
+							<!-- {{gygtext == null?'请选择':gygtext}} -->
+							{{gygArr[gygIndex]}}
+						</view>
+					</picker>
+				</view>
 			</view>
-			<van-popup show="{{postshow}}" position="bottom" custom-style="height: 50%;">
-				<!-- <van-datetime-picker bind:confirm="onConfirm" bind:cancel='onClose' type="date" value="{{currentDate}}" bind:input="onInput" min-date="{{ minDate }}" formatter="{{ formatter }}" /> -->
-				<van-datetime-picker bind:confirm="onConfirm" bind:cancel='onClose' min-date="{{minDate}}" max-date="{{currentDate}}" type="date" value="{{currentDate}}" formatter="{{formatter}}" />
-			</van-popup>
-		</view>
-		<view class='fwb'>
-			<view class="red-image">
-				<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx;"> </image>
+				</view>
+				<view class="xingbie">任职时间</view>
+				<view class='weui-input aaa' style="font-size: 26rpx;  line-height: 56rpx;" catchtap="share1">
+					{{tenure == null ? '':tenure  }}
+					<view wx:if='{{!tenure}}' style="color:#808080;display: inline-block;height:60rpx;line-height:60rpx;font-size:25rpx">{{headmasterText}}</view>
+				</view>
+				<van-popup show="{{postshow}}" position="bottom" custom-style="height: 50%;">
+					<!-- <van-datetime-picker bind:confirm="onConfirm" bind:cancel='onClose' type="date" value="{{currentDate}}" bind:input="onInput" min-date="{{ minDate }}" formatter="{{ formatter }}" /> -->
+					<van-datetime-picker bind:confirm="onConfirm" bind:cancel='onClose' min-date="{{minDate}}" max-date="{{currentDate}}" type="date" value="{{currentDate}}" formatter="{{formatter}}" />
+				</van-popup>
+			</view>
+			<view class='fwb'>
+				<view class="red-image">
+					<image src="/images/quan.png" style="width:20rpx;height:20rpx"> </image>
+				</view>
+				<view class="xingbie">联系电话</view>
+				<view class='weui-input'>
+					<input class="" name="studentPhone" value="{{ studentPhone }}" placeholder="请输入联系电话" placeholder-style="font-size:25rpx" />
+				</view>
 			</view>
-			<view class="xingbie">联系电话</view>
-			<view class='weui-input'>
-				<input class="" name="studentPhone" value="{{ studentPhone }}" placeholder="请输入联系电话" placeholder-style="font-size:25rpx" />
+			<view style="margin-top: 100rpx;margin-bottom:100rpx">
+				<van-button round formType="submit">提交报到信息</van-button>
 			</view>
-		</view>
-		<view style="margin-top: 100rpx;margin-bottom:100rpx">
-			<van-button round formType="submit">提交报到信息</van-button>
-		</view>
-	</form>
+		</form>
+
 </view>

+ 13 - 1
pages/studentRegistration/studentRegistration.wxss

@@ -1,6 +1,7 @@
 .home {
   margin: 0 40rpx;
   margin-top: 40rpx;
+  position: relative;
 }
 
 van-button {
@@ -130,4 +131,15 @@ radio {
   line-height: 60rpx;
   padding-left: 20rpx;
   width: 454rpx;
-}
+}
+.needAuth{
+  position: fixed;
+  bottom: 200rpx;
+}
+.needAuth1{
+  width:100%;
+  text-align: center;
+  font-size:26rpx;
+  padding-top:10rpx;
+}
+

+ 40 - 2
utils/util.js

@@ -1,12 +1,13 @@
 const globalData = {
   version:'3.0.17',
+
+  imgUrl:'https://edu-mp-img-1254259530.cos.ap-nanjing.myqcloud.com',
  publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
  //  publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
   // publicUrl:'http://10.16.10.139'//ly
   // publicUrl:'http://10.16.4.19:80'//hyb
   // publicUrl:'http://10.16.4.26:80'//zxq
   // publicUrl:'http://10.20.1.207:80'//dailin
-
   
 };
 const formatTime = date => {
@@ -30,8 +31,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
 }