y595705120 3 years ago
parent
commit
275d4d6070
100 changed files with 327 additions and 2730 deletions
  1. 1 0
      .gitignore
  2. 25 18
      app.js
  3. 9 4
      app.json
  4. 1 0
      app.wxss
  5. BIN
      assets/carousel/1.jpg
  6. BIN
      assets/carousel/2.jpg
  7. BIN
      assets/carousel/3.jpg
  8. BIN
      assets/carousel/4.jpg
  9. BIN
      assets/icon/1.jpg
  10. BIN
      assets/icon/10.jpg
  11. BIN
      assets/icon/11.jpg
  12. BIN
      assets/icon/12.jpg
  13. BIN
      assets/icon/13.jpg
  14. BIN
      assets/icon/14.jpg
  15. BIN
      assets/icon/15.jpg
  16. BIN
      assets/icon/16.jpg
  17. BIN
      assets/icon/17.jpg
  18. BIN
      assets/icon/18.jpg
  19. BIN
      assets/icon/19.jpg
  20. BIN
      assets/icon/2.jpg
  21. BIN
      assets/icon/20.jpg
  22. BIN
      assets/icon/21.jpg
  23. BIN
      assets/icon/22.jpg
  24. BIN
      assets/icon/23.jpg
  25. BIN
      assets/icon/3.jpg
  26. BIN
      assets/icon/4.jpg
  27. BIN
      assets/icon/5.jpg
  28. BIN
      assets/icon/6.jpg
  29. BIN
      assets/icon/7.jpg
  30. BIN
      assets/icon/8.jpg
  31. BIN
      assets/icon/9.jpg
  32. 75 0
      pages/artical/info/index.js
  33. 4 4
      pages/artical/info/index.json
  34. 23 0
      pages/artical/info/index.wxml
  35. 1 0
      pages/artical/info/index.wxss
  36. 18 0
      pages/department/account/index.js
  37. 0 0
      pages/department/account/index.json
  38. 2 0
      pages/department/account/index.wxml
  39. 1 0
      pages/department/account/index.wxss
  40. 100 0
      pages/department/artical/index.js
  41. 6 0
      pages/department/artical/index.json
  42. 29 0
      pages/department/artical/index.wxml
  43. 18 0
      pages/department/artical/index.wxss
  44. 0 67
      pages/exam/collection/index.js
  45. 0 17
      pages/exam/collection/index.json
  46. 0 94
      pages/exam/collection/index.wxml
  47. 0 31
      pages/exam/collection/index.wxss
  48. 0 160
      pages/exam/do/index.js
  49. 0 17
      pages/exam/do/index.json
  50. 0 88
      pages/exam/do/index.wxml
  51. 0 76
      pages/exam/do/index.wxss
  52. 0 46
      pages/exam/error/index.js
  53. 0 14
      pages/exam/error/index.json
  54. 0 21
      pages/exam/error/index.wxml
  55. 0 1
      pages/exam/error/index.wxss
  56. 0 122
      pages/exam/index/index.js
  57. 0 15
      pages/exam/index/index.json
  58. 0 71
      pages/exam/index/index.wxml
  59. 0 35
      pages/exam/index/index.wxss
  60. 0 49
      pages/exam/read/index.js
  61. 0 18
      pages/exam/read/index.json
  62. 0 95
      pages/exam/read/index.wxml
  63. 0 136
      pages/exam/read/index.wxss
  64. 0 47
      pages/exam/record/index.js
  65. 0 14
      pages/exam/record/index.json
  66. 0 21
      pages/exam/record/index.wxml
  67. 0 1
      pages/exam/record/index.wxss
  68. 5 48
      pages/index/index.js
  69. 2 4
      pages/index/index.wxml
  70. 0 2
      pages/my/collection/index.wxml
  71. 0 1
      pages/my/collection/index.wxss
  72. 0 58
      pages/my/index/index.wxml
  73. 0 32
      pages/my/log/index.js
  74. 0 9
      pages/my/log/index.json
  75. 0 18
      pages/my/log/index.wxml
  76. 0 24
      pages/my/log/index.wxss
  77. 0 79
      pages/my/message/info/index.js
  78. 0 7
      pages/my/message/info/index.json
  79. 0 19
      pages/my/message/info/index.wxml
  80. 0 16
      pages/my/message/info/index.wxss
  81. 0 72
      pages/my/message/list/index.js
  82. 0 10
      pages/my/message/list/index.json
  83. 0 10
      pages/my/message/list/index.wxml
  84. 0 1
      pages/my/message/list/index.wxss
  85. 1 1
      pages/search/file/index.js
  86. 3 0
      pages/search/file/index.json
  87. 2 0
      pages/search/file/index.wxml
  88. 1 0
      pages/search/file/index.wxss
  89. 0 159
      pages/study/course/index.js
  90. 0 55
      pages/study/course/index.wxml
  91. 0 5
      pages/study/course/index.wxss
  92. 0 141
      pages/study/exam/index.js
  93. 0 16
      pages/study/exam/index.json
  94. 0 89
      pages/study/exam/index.wxml
  95. 0 88
      pages/study/exam/index.wxss
  96. 0 115
      pages/study/index/index.js
  97. 0 16
      pages/study/index/index.json
  98. 0 81
      pages/study/index/index.wxml
  99. 0 145
      pages/study/index/index.wxss
  100. 0 127
      pages/study/market/index.js

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/push.bat

+ 25 - 18
app.js

@@ -49,29 +49,28 @@ App({
       url: `/pages/user/identify/index`,
     })
   },
-  checkLogin: function (cb) {
-    let _this = this
-    let openid = wx.getStorageSync('@openid');
-    if( !openid ) {
-      cb&&cb({})
-      return
+  checkLogin: function(cb){
+    if( this.globalData.userInfo){
+      cb&&cb( this.globalData.userInfo );
+    }else{
+      this.formPost("user/info", {}).then( res=>{
+        if( res.code == 200){
+          this.setUserInfo( res.data )
+          cb&&cb( this.data.user )
+        }else{
+          this.gotoLogin()
+        }
+      })
     }
-    let param = {"openid": openid};
-    _this.formPost('Auth.wxLogin', param).then( res =>{
-      if (res.code == 200) {
-        _this.setUserInfo(res.data);
-      }
-      cb && cb(res.data);
-    })
   },
-  message: function (content, type="info") {
+  message: function (content, type) {
     $Message({
       content: content,
       type: type
     });
   },
   formPost: function (action, data) {
-    let uid = wx.getStorageSync('@uid')||0;
+    let uid = wx.getStorageSync('@userId')||0;
     let token = wx.getStorageSync('@token')||'';
     let timestamp = Date.now()
     let signstr = `weixin_${uid}_${token}_${timestamp}_${secret}`
@@ -94,6 +93,11 @@ App({
           if (res.statusCode !== 200 || typeof res.data !== 'object') {
             showMsg( "请求异常" )
           }
+          if( res.data.data && res.data.data.reload  ){
+            wx.navigateTo({
+              url: '/pages/user/identify/index',
+            })
+          }
           resolve(res.data);
         },
         fail(res) {
@@ -155,8 +159,11 @@ App({
       }
     )
   },
-  setUserInfo: function (userInfo) {
-    this.globalData.userInfo = userInfo;
-    wx.setStorageSync('@openid', userInfo.openid)
+  setUserInfo: function (info) {
+    let {token, user} = info
+    this.globalData.userInfo = user;
+    wx.setStorageSync('@token', token)
+    wx.setStorageSync('@userId', user.userId )
+    this.loadDepartments()
   }
 })

+ 9 - 4
app.json

@@ -1,8 +1,13 @@
 {
   "pages": [
+    "pages/artical/info/index",
+    "pages/user/index/index",
     "pages/index/index",
-    "pages/my/index/index",
-    "pages/user/identify/index"
+    "pages/department/artical/index",
+    "pages/user/identify/index",
+    "pages/search/file/index",
+    "pages/department/account/index"
+    
   ],
   "tabBar": {
     "color": "#6e6d6b",
@@ -17,7 +22,7 @@
         "selectedIconPath": "/assets/tabBar/index-select.png"
       },
       {
-        "pagePath": "pages/my/index/index",
+        "pagePath": "pages/user/index/index",
         "text": "我的",
         "iconPath": "/assets/tabBar/my.png",
         "selectedIconPath": "/assets/tabBar/my-select.png"
@@ -26,7 +31,7 @@
   },
   "window": {
     "navigationBarBackgroundColor": "#ffffff",
-    "navigationBarTitleText": "八大员在线练习",
+    "navigationBarTitleText": "内业管理系统",
     "navigationBarTextStyle": "black",
     "backgroundTextStyle": "dark"
   },

+ 1 - 0
app.wxss

@@ -127,6 +127,7 @@ page {
 .mt30{margin-top: 30rpx;}
 .mt40{margin-top: 40rpx;}
 .mt50{margin-top: 50rpx;}
+.mt120{margin-top: 120rpx;}
 .tc{text-align: center;}
 .tl{text-align: left;}
 .tr{text-align: right;}

BIN
assets/carousel/1.jpg


BIN
assets/carousel/2.jpg


BIN
assets/carousel/3.jpg


BIN
assets/carousel/4.jpg


BIN
assets/icon/1.jpg


BIN
assets/icon/10.jpg


BIN
assets/icon/11.jpg


BIN
assets/icon/12.jpg


BIN
assets/icon/13.jpg


BIN
assets/icon/14.jpg


BIN
assets/icon/15.jpg


BIN
assets/icon/16.jpg


BIN
assets/icon/17.jpg


BIN
assets/icon/18.jpg


BIN
assets/icon/19.jpg


BIN
assets/icon/2.jpg


BIN
assets/icon/20.jpg


BIN
assets/icon/21.jpg


BIN
assets/icon/22.jpg


BIN
assets/icon/23.jpg


BIN
assets/icon/3.jpg


BIN
assets/icon/4.jpg


BIN
assets/icon/5.jpg


BIN
assets/icon/6.jpg


BIN
assets/icon/7.jpg


BIN
assets/icon/8.jpg


BIN
assets/icon/9.jpg


+ 75 - 0
pages/artical/info/index.js

@@ -0,0 +1,75 @@
+const util = require("../../../utils/util")
+const app = getApp()
+
+Page({
+  data: {
+    articalId:0,
+    isLike:0,
+    info:{},
+    logs:[]
+  },
+
+  onLoad: function (options) {
+    let articalId = options.articalId||271;
+    this.setData({articalId})
+    this.loadData()
+  },
+
+  loadData(){
+    let articalId = this.data.articalId
+    app.formPost( "artical/getArticalInfo", {articalId}).then( res=>{
+      if( res.code == 200 ){
+        let {isLike,info,logs} = res.data
+        this.setData({isLike,info,logs})
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 4
pages/study/course/index.json → pages/artical/info/index.json

@@ -8,10 +8,10 @@
     "i-message": "/component/iView/message/index",
     "i-spin": "/component/iView/spin/index",
     "i-icon": "/component/iView/icon/index",
-    "i-card": "/component/iView/card/index",
-    "i-avatar": "/component/iView/avatar/index",
-    "i-badge": "/component/iView/badge/index"
+    "i-badge": "/component/iView/badge/index",
+    "i-card": "../../../component/iView/card/index",
+    "i-avatar": "/component/iView/avatar/index"
   },
   "enablePullDownRefresh": true,
-  "navigationBarTitleText": "鸿鹄在线练习系统"
+  "navigationBarTitleText": "内业管理系统"
 }

+ 23 - 0
pages/artical/info/index.wxml

@@ -0,0 +1,23 @@
+<wxs src="../../../wxs/util-fun.wxs" module="util"></wxs>
+
+<i-cell-group>
+    <view class="bg-white p20 fc" style="text-align:center;font-size:40rpx;margin-top:10rpx" > {{info.title}}</view>
+    <i-cell title="部门" value="{{info.department}}"> </i-cell>
+    <i-cell title="分类" value="{{util.getCategory(info.category)}}"> </i-cell>
+
+    <i-cell title="文件状态" value="{{util.getStatus(info.status)}}" is-link> </i-cell>
+
+    <i-cell title="发布人" value="{{info.username}}"> </i-cell>
+    <i-cell title="下载量" value="{{info.downloadCount}}"> </i-cell>
+    <i-cell title="浏览量" value="{{info.viewCount}}"> </i-cell>
+    <i-cell title="文件简介" label="{{info.brief}}"> </i-cell>
+
+    <i-cell title="操作记录"> 
+      <view wx:for="{{logs}}" wx:key="articalId" wx:for-index="index" bindtap="getDetail" class="mt20" >
+        <i-card extra="{{item.nickname}}" title="{{item.action}}" full>
+          <view slot="content">操作描述: {{item.content}}</view>
+          <view slot="footer">操作时间:{{util.getDatetime(item.createAt)}}</view>
+        </i-card>
+      </view>
+    </i-cell>
+</i-cell-group>

+ 1 - 0
pages/artical/info/index.wxss

@@ -0,0 +1 @@
+/* pages/artical/info/index.wxss */

+ 18 - 0
pages/department/account/index.js

@@ -0,0 +1,18 @@
+// pages/department/account/index.js
+Page({
+
+  data: {
+
+  },
+
+  onPullDownRefresh: function () {
+
+  },
+
+  onReachBottom: function () {
+
+  },
+  onShareAppMessage: function () {
+
+  }
+})

+ 0 - 0
pages/my/collection/index.json → pages/department/account/index.json


+ 2 - 0
pages/department/account/index.wxml

@@ -0,0 +1,2 @@
+<!--pages/department/account/index.wxml-->
+<text>pages/department/account/index.wxml</text>

+ 1 - 0
pages/department/account/index.wxss

@@ -0,0 +1 @@
+/* pages/department/account/index.wxss */

+ 100 - 0
pages/department/artical/index.js

@@ -0,0 +1,100 @@
+const util = require("../../../utils/util")
+
+//获取应用实例
+const app = getApp()
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    departmentId:0,
+    keyword:'',
+    from:0,
+    size:10,
+    department:{departmentId:0},
+    articalList:[]
+  },
+  onLoad: function (options) {
+    let departmentId = +options.departmentId
+    if( departmentId ){
+      wx.setStorageSync('@departmentId', departmentId)
+      this.setData({departmentId})
+    }
+    app.checkLogin( this.loadData )
+  },
+  loadData(){
+    let departmentId = this.data.departmentId;
+    app.getDepartments( departments=>{
+      let department = {}
+      for( let i in departments){
+        if( departments[i].departmentId == departmentId){
+          department = departments[i]
+          break
+        }
+      }
+      this.setData({department, from:0})
+      // 
+      wx.setNavigationBarTitle({
+        title: department.department
+      })
+    })
+    this.loadArtical(   )
+  },
+  loadArtical(  cb ){
+    let {from, size, departmentId,keyword, articalList} = this.data
+    let param = { from, size, departmentId, keyword }
+    app.formPost( "weixin/getArticalList", param).then( res=>{
+      if( res.code == 200 ){
+        if( from == 0) articalList = []
+        from= res.data.from;
+        articalList = articalList.concat( res.data.list );
+        this.setData( {from, articalList})
+      }
+      cb &&cb()
+    })
+  },
+  onInputEvent(e){
+    let {value} = e.detail;
+    if( this.data.keyword == value) return;
+    this.setData({keyword: value, from:0})
+  },
+  onReady: function () {
+
+  },
+  onShow: function () {
+  },
+  onHide: function () {
+
+  },
+
+  onUnload: function () {
+
+  },
+
+  onPullDownRefresh: function () {
+    wx.showNavigationBarLoading();
+    this.setData( {from:0})
+    this.loadArtical( ()=>{
+      wx.hideNavigationBarLoading(); 
+      wx.stopPullDownRefresh();
+    })
+  },
+  onReachBottom: function () {
+    var that = this
+    let newFrom = that.data.from
+    if (newFrom == -1) {
+      wx.stopPullDownRefresh();
+      return;
+    }
+    this.loadArtical( );
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 6 - 0
pages/department/artical/index.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "i-card": "../../../component/iView/card/index"
+  },
+  "navigationBarTitleText": "内业管理系统"
+}

+ 29 - 0
pages/department/artical/index.wxml

@@ -0,0 +1,29 @@
+<wxs src="../../../wxs/util-fun.wxs" module="util"></wxs>
+<scroll-view scroll-y class="scrollPage">
+
+  <view class='searchbar'>
+    <view class='search-input-group'>
+      <input class='search-input' placeholder="搜一搜" bindinput="onInputEvent"></input>
+    </view>
+  </view>
+  <view class="mt120">
+    <view wx:for="{{articalList}}" wx:key="articalId" wx:for-index="index" bindtap="getDetail" class="mt10">
+      <i-card title="{{item.department}}" extra="{{util.getCategory(item.category)}}">
+        <view slot="content">{{item.title}}</view>
+        <view slot="footer">创建时间: {{util.getDatetime(item.createAt)}}</view>
+      </i-card>
+    </view>
+  </view>
+
+  <view wx:if="{{from==-1}}" class="flex-sub text-center">
+    <view class="padding">没有更多了</view>
+    <view class='cu-tabbar-height'></view>
+  </view>
+  <view class='cu-tabbar-height'></view>
+</scroll-view>
+
+
+<view class='cu-load load-modal' wx:if="{{loadModal}}">
+  <view class='cuIcon-emojifill text-orange'></view>
+  <view class='gray-text'>加载中...</view>
+</view>

File diff suppressed because it is too large
+ 18 - 0
pages/department/artical/index.wxss


+ 0 - 67
pages/exam/collection/index.js

@@ -1,67 +0,0 @@
-let app = getApp()
-Page({
-  data: {
-    preList:["A","B","C", "D", "E", "F"],
-    from:0,
-    size:10,
-    item: {},
-    next: false,
-    list: [],
-  },
-  onLoad: function(options) {
-    this.loadData(  true )
-  },
-  loadData( firstAnswer ){
-    let {size,from} = this.data
-    app.formPost('Exam.GetErrorAnswerList', {from,size}).then(res => {
-      if (res.code ==200) {
-        let list = res.data.list||[];
-        list.reverse()
-        if( firstAnswer){
-          let item = list.pop() ||{};
-          this.setData({list, item})
-        }else{
-          this.setData({list})
-        }
-      }
-    })
-  },
-  checkAnswer( e ){
-    let item = this.data.item;
-    if( !item.select ){
-      app.message("还未作答", 'error')
-      return;
-    }
-    let param = {answerId: item.answerId}
-    // 判断是否正确
-    if( item.type == 2){
-      item.correct = item.select.join("") == item.result;
-    }else{
-      item.correct = item.select == item.result;
-    }
-    param.correct = item.correct?1:0
-    // 打开下一题
-    app.formPost('Exam.EditErrorAnswer', param).then(res => {
-      this.setData({item, next:true})
-    }) 
-  },
-  radioChange( e ){
-    let item = this.data.item
-    item.select = +e.detail.value;
-    this.setData({item})
-  },
-  checkboxChange( e ){
-    let item = this.data.item
-    item.select = e.detail.value.sort()
-    this.setData( {item} );
-  },
-  nextAnswer( ){
-    let {list} = this.data;
-    let item = list.pop()||{};
-    delete( item.select )
-    this.setData({item, list, next:false})
-    if( list.length < 1){
-      this.loadData( )
-    }
-  }
-})

+ 0 - 17
pages/exam/collection/index.json

@@ -1,17 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-radio-group": "/component/iView/radio-group/index",
-    "i-radio": "/component/iView/radio/index",
-    "i-input": "/component/iView/input/index",
-    "i-action-sheet": "/component/iView/action-sheet/index",
-    "i-modal": "/component/iView/modal/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-rate": "/component/iView/rate/index"
-  },
-  "enablePullDownRefresh": false,
-  "navigationBarTitleText": "收藏题库"
-}

+ 0 - 94
pages/exam/collection/index.wxml

@@ -1,94 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-
-<view class="exam-page p10" wx:if="{{item&& item.answerId>0}}">
-	<view class="view-wrap-hidden"> </view>
-	<view class="exam-name-title">
-      <h1></h1>
-  </view>
-	<i-panel   i-class="exam-panel-title">   
-		<i-cell-group i-class="exam-cell" >
-			<!-- 单选题 -->
-			<i-cell wx:if="{{item.type==1}}">
-				<view>
-					<rich-text nodes="[单]{{item.title}}" />
-					<radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-						<label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex" 
-						wx:if="{{item['answer'+(index+1)]}}">
-							<view class="radio-answer">
-								<radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
-									{{answer}}. {{item['answer'+(index+1)]}}
-								</radio>
-							</view>
-						</label>
-					</radio-group>
-				</view>
-			</i-cell>
-			<!-- 多选题 -->
-			<i-cell wx:if="{{item.type==2}}">
-				<view>
-					<text> [多]{{item.title}} </text>
-					<checkbox-group class="checkbox-answer" style="margin-top:30rpx" bindchange="checkboxChange"  >
-						<label class="checkbox" wx:for="{{preList}}" wx:key="index" wx:for-item="answer" 
-							wx:if="{{item['answer'+(index+1)]}}">
-							<view class="checkbox-answer">
-								<checkbox color="#2d8cf0" value="{{index+1}}" checked="{{filter.isSelect( index+1, item.select)}}">
-									{{answer}}. {{item['answer'+(index+1)]}}
-								</checkbox>
-							</view>
-						</label>
-					</checkbox-group>
-				</view>
-			</i-cell>
-			<!-- 判断 -->
-			<i-cell wx:if="{{item.type==3}}">
-				<view>
-					<rich-text nodes="[判]{{item.title}}" />
-					<radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-						<label class="radio" wx:for="{{2}}" wx:for-item="answer">
-							<view class="radio-answer">
-								<radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
-									{{preList[index]}}. {{item['answer'+(index+1)]}}
-								</radio>
-							</view>
-						</label>
-					</radio-group>
-				</view>
-			</i-cell>
-		</i-cell-group>
-
-		<!-- 答案解答 -->
-		<view class="exam-clear mt20 " wx:if="{{next}}">
-			<view class="exam-extend-item" style="padding-left:0px">
-				结果:
-				<text class="question-answer-right question-answer-result" wx:if="{{item.correct}}">正确
-				</text>
-				<text class="question-answer-error question-answer-result" wx:else>错误</text>
-			</view>
-
-			<view class="exam-extend-item" style="padding-left:0px" wx:if="{{item.star}}">
-				难度:
-				<i-rate value="{{item.star}}" i-class="exam-item-rate" />
-			</view>
-
-			<view class="exam-extend-item" wx:if="{{item.content}}">
-				<rich-text nodes="解析: {{item.content}}" />
-			</view>
-
-			<view class="exam-extend-item">
-				<text wx:if="{{item.type==1}}"> 正确答案: {{preList[item.result-1]}}</text>
-				<text wx:elif="{{item.type==2}}"> 正确答案: {{filter.getMultResult(item.result)}}</text>
-				<text wx:else> 正确答案: {{item.result==1?'正确':'错误'}}</text>
-			</view>
-		</view>
-
-
-		<view class="mt50">
-			<button class="i-btn  i-btn-primary i-btn-square" bindtap='nextAnswer' wx:if="{{next}}">下一题</button>
-			<button class="i-btn  i-btn-primary i-btn-square" bindtap='checkAnswer' wx:else>提交</button>
-		</view>
-	</i-panel>
-</view>
-
-<view wx:else style="text-align:center;margin-top:40rpx">
-	<view class="padding">没有更多错题</view>
-</view>

+ 0 - 31
pages/exam/collection/index.wxss

@@ -1,31 +0,0 @@
-.exam-tab-view {
-  margin-top: 42px;
-}
-
-.xzs-load-more {
-  margin-top: 60px !important;
-}
-
-.exam-page {
-  background: white;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 20rpx;
-}
-.exam-extend-item {
-  padding: 4px;
-}

+ 0 - 160
pages/exam/do/index.js

@@ -1,160 +0,0 @@
-import {
-  formatSeconds
-} from '../../../utils/util.js'
-
-let app = getApp()
-Page({
-  data: {
-    list: [],
-    redo: false,
-    preList:["A","B","C", "D","E","F"],
-    info:{},
-    timer: null,
-    doTime: 0,
-    remainTime: 0,
-    remainTimeStr: '',
-    modalShow: false,
-    result: {},
-    startTime: "",
-    timeOutShow: false
-  },
-  onLoad: function(options) {
-    let groupId = +options.id||3
-    let redo = !!options.redo;
-    this.setData({redo})
-    let method =  redo?'Exam.examreStart':'Exam.examStart';
-    let _this = this
-    app.formPost(method, {groupId}).then(res => {
-      if (res.code ==200) {
-        let {startTime, info, list} = res.data;
-        let duration = list.length * 60;
-        list = list.map(item=>{
-          delete( item["select"])
-          return item
-        }).sort( (i,j) =>{
-          return i.type > j.type?1:-1;
-        })
-        wx.setNavigationBarTitle({
-          title: info.title+'-模拟考试'
-        })
-
-        _this.setData({
-          list: list,
-          info: info,
-          startTime: startTime,
-          remainTime: duration
-        });
-        _this.timeReduce()
-      }
-    })
-  },
-  timeReduce() {
-    let _this = this
-    let timer = setInterval(function() {
-      let remainTime = _this.data.remainTime
-      if (remainTime <= 0) {
-        _this.timeOut()
-      } else {
-        _this.setData({
-          remainTime: remainTime - 1,
-          remainTimeStr: formatSeconds(remainTime),
-          doTime: _this.data.doTime + 1
-        });
-      }
-    }, 1000)
-    _this.setData({
-      timer: timer
-    });
-  },
-  onUnload() {
-    clearInterval(this.data.timer)
-  },
-  returnRecord() {
-    if( this.data.redo){
-      wx.reLaunch({
-        url: '/pages/exam/error/index',
-      });
-    }else{
-      wx.reLaunch({
-        url: '/pages/exam/record/index',
-      });
-    }
-  },
-  timeOut() {
-    clearInterval(this.data.timer)
-    this.setData({
-      timeOutShow: true
-    });
-  },
-  radioChange( e ){
-    let index = e.currentTarget.dataset.index;
-    let list = this.data.list
-    list[index].select = +e.detail.value
-    console.log("select", index, list[index].select )
-    this.setData( {list} );
-  },
-  checkboxChange( e ){
-    let index = e.currentTarget.dataset.index;
-    let list = this.data.list
-    list[index].select = +e.detail.value.sort().join("")
-    console.log("select", index, list[index].select)
-    this.setData( {list} );
-  },
-  formSubmit: function(e) {
-    let _this = this
-    let force = this.data.remainTime < 3;
-    let isFinish = true;
-    wx.showLoading({
-      title: '提交中',
-      mask: true
-    })
-    let info = this.data.info;
-    let param ={};
-    param.groupId = info.groupId;
-    param.paperId = info.paperId;
-    param.answers = [];
-    param.result  = [];
-    param.correct = 0;
-
-    param.counter = this.data.list.length
-    param.groupName = info.title;
-    param.useTime =  this.data.doTime
-    param.duration = info.duration
-    param.startTime = this.data.startTime;
-    let errIds = [];
-    for( let i=0; i< this.data.list.length; i++){
-        let item = this.data.list[i];
-        param.answers.push( item.answerId );
-        param.result.push( item.select || 0);
-        if( item.select == item.result){
-          param.correct += 1
-        }else{
-          errIds.push( item.answerId)
-        }
-        if( !item.select ) isFinish = false
-    }
-    if( !isFinish && !force){
-      app.message("还未完成", 'error')
-      wx.hideLoading()
-      return 
-    }
-    param.result = param.result.join(",")
-    param.answers = param.answers.join(",")
-    param.errors = errIds.join(",")
-    param.isRedo = this.data.redo?1:0;
-    app.formPost('Exam.ExamSubmit', param).then(res => {
-      if (res.code === 200) {
-        _this.setData({
-          modalShow: true,
-          result:param,
-        });
-        if (this.data.timer) {
-          clearInterval(this.data.timer)
-        }
-      } else {
-        app.message(res.msg, 'error')
-      }
-      wx.hideLoading()
-    })
-  }
-})

+ 0 - 17
pages/exam/do/index.json

@@ -1,17 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-radio-group": "/component/iView/radio-group/index",
-    "i-radio": "/component/iView/radio/index",
-    "i-row": "/component/iView/row/index",
-    "i-col": "/component/iView/col/index",
-    "i-input": "/component/iView/input/index",
-    "i-action-sheet": "/component/iView/action-sheet/index",
-    "i-modal": "/component/iView/modal/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  },
-  "navigationBarTitleText": "在线模拟考试"
-}

+ 0 - 88
pages/exam/do/index.wxml

@@ -1,88 +0,0 @@
-<view class="exam-page">
-  <view class="view-wrap">
-    <view class="exam-count-down">{{remainTimeStr}}</view>
-  </view>
-  <view class="view-wrap-hidden">
-  </view>
-
-  <view>
-    <view class="exam-name-title">
-      <h1>{{info.title}}</h1>
-    </view>
-
-    <form bindsubmit='formSubmit'>  
-      <i-panel title="{{titleItem.title}}" 
-        wx:for="{{list}}" 
-          wx:for-item="item" 
-          wx:key="answerId" 
-          i-class="exam-panel-title"> 
-        
-          <i-cell-group i-class="exam-cell">
-          <!-- 单选题 -->
-          <i-cell wx:if="{{item.type==1}}"> 
-            <view>
-              <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
-              <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
-                <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex" wx:if="{{item['answer'+(index+1)]}}">
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-          </i-cell>
-          <!-- 多选题 -->
-          <i-cell wx:if="{{item.type==2}}"> 
-            <view >
-              <text> {{index+1}}. [多]{{item.title}} </text>
-              <checkbox-group class="checkbox-answer" style="margin-top:30rpx" bindchange="checkboxChange" data-index="{{index}}">
-                <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:if="{{item['answer'+(index+1)]}}">
-                  <view class="checkbox-answer">
-                    <checkbox color="#2d8cf0" value="{{index+1}}">
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </checkbox>
-                  </view>
-                </label>
-              </checkbox-group>
-            </view>
-          </i-cell>
-          <!-- 判断 -->
-          <i-cell wx:if="{{item.type==3}}"> 
-            <view>
-              <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
-              <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
-                <label class="radio" wx:for="{{2}}" wx:for-item="answer" >
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-          </i-cell>
-        </i-cell-group>
-      </i-panel>
-
-      <view>
-        <button class="i-btn  i-btn-primary i-btn-square" form-type='submit'>提交</button>
-      </view>
-
-      <i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
-        <view slot="header" style="padding: 16px">
-          <view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
-          <button class="i-btn  i-btn-primary i-btn-square" form-type='submit'>提交</button>
-        </view>
-      </i-action-sheet>
-    </form>
-
-    <i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
-      <view>我的战绩:{{result.correct}} / {{result.counter}}</view>
-    </i-modal>
-
-    <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-    <i-message id="message" />
-  </view>
-</view>

+ 0 - 76
pages/exam/do/index.wxss

@@ -1,76 +0,0 @@
-.exam-page {
-  background: white;
-}
-
-.exam-count-down {
-  font-size: 15px;
-  line-height: 35px;
-}
-
-.view-wrap {
-  position: fixed;
-  width: 100%;
-  background: #fff6f6;
-  text-align: center;
-  height: 35px;
-  z-index: 999;
-}
-
-.view-wrap-hidden {
-  height: 35px;
-}
-
-.exam-name-title {
-  text-align: center;
-  margin-top: 10px;
-  font-size: 17px;
-}
-
-.exam-panel-title {
-  margin-top: 30px;
-}
-
-.exam-radio-item-label {
-  float: left;
-  margin-left: 10px;
-  line-height: 35px;
-}
-
-.exam-item-left {
-  float: left;
-}
-
-.exam-input-contain {
-  margin: 10px 2px !important;
-  border-width: 1px;
-  border-color: #dddee1;
-  border-style: solid;
-  width: 95%;
-  height: 40px;
-}
-
-.exam-input-contain-label {
-  float: left;
-  padding: 0px 15px;
-  line-height: 40px;
-}
-
-.exam-input-contain-content {
-  float: left;
-  height: 40px;
-}
-
-.exam-textarea-contain {
-  margin: 10px 2px !important;
-  border-width: 1px;
-  border-color: #dddee1;
-  border-style: solid;
-  width: 100%;
-}
-
-.exam-timeout-title{
-  font-size: 16px;
-  color: red;
-  margin-top: 10px;
-  margin-bottom: 20px;
-}

+ 0 - 46
pages/exam/error/index.js

@@ -1,46 +0,0 @@
-let app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    loadMoreLoad: false,
-    loadMoreTip: '暂无数据',
-    from:0,
-    size:9,
-    tableData: []
-  },
-  onLoad: function(options) {
-    this.setData({
-      spinShow: true
-    });
-    this.search(true)
-  },
-  onPullDownRefresh() {
-    this.setData({ spinShow: true });
-    if (!this.loading) {
-      this.setData({ from:0,tableData:[]});
-      this.search(true)
-    }
-  },
-  onReachBottom() {
-    console.log( "onReachBottom", this.loading, this.data.from)
-    if (!this.loading && this.data.from > -1) {
-      this.search(false)
-    }
-  },
-  search: function(override) {
-    let _this = this
-    let param = {from: override?0:this.data.from, size:this.data.size}
-    app.formPost('Exam.RedoPaperList', param ).then(res => {
-      _this.setData({spinShow: false});
-      wx.stopPullDownRefresh()
-      if (res.code === 200) {
-        const re = res.data
-        console.log( re )
-        _this.setData({
-          from: re.from,
-          tableData: override ? re.list : this.data.tableData.concat(re.list)
-        });
-      }
-    })
-  }
-})

+ 0 - 14
pages/exam/error/index.json

@@ -1,14 +0,0 @@
-{
-  "usingComponents": {
-    "i-tabs": "/component/iView/tabs/index",
-    "i-tab": "/component/iView/tab/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-load-more": "/component/iView/load-more/index",
-    "i-button": "/component/iView/button/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  },
-  "enablePullDownRefresh": true,
-  "navigationBarTitleText": "错题重做"
-}

+ 0 - 21
pages/exam/error/index.wxml

@@ -1,21 +0,0 @@
-<view>
-  <view>
-    <i-cell-group>
-      <i-cell wx:for="{{tableData}}" 
-        data-item="item" 
-        wx:key="paperId" 
-        title="{{item.title}}" 
-        is-link 
-        url="/pages/exam/do/index?id={{item.paperId}}&redo=true" 
-        value="{{item.startTime}}" 
-        label="{{item.title}}  对错:{{item.correct}}/{{item.counter}}"
-      />
-    </i-cell-group>
-  </view>
-
-  <view wx:if="{{from==-1}}"  style="text-align:center;margin-top:40rpx">
-    <view class="padding">没有更多了</view>
-  </view>
-  <view class='cu-tabbar-height'></view>
-
-</view>

+ 0 - 1
pages/exam/error/index.wxss

@@ -1 +0,0 @@
-/* pages/exam/error/index.wxss */

+ 0 - 122
pages/exam/index/index.js

@@ -1,122 +0,0 @@
-//index.js
-
-const util = require("../../../utils/util")
-
-//获取应用实例
-const app = getApp()
-
-Page({
-  data: {
-    spinShow: false,
-    buyModel:false,
-    code_url:'',
-    info:{},
-    system: "",
-    groups: [],
-    pushPaper: [],
-    timeLimitPaper: [],
-    userInfo:{},
-    taskList: []
-  },
-  onLoad: function(){
-    let that = this
-    wx.getSystemInfo({
-      success: function(res) {
-        that.setData({system: res.system})
-      }
-    })
-  },
-  onShow: function(){
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      // 已经实名认证
-      if( userInfo.identify ){
-        this.indexLoad()
-      }
-    })
-  },
-  onPullDownRefresh() {
-    if (!this.loading) {
-      this.indexLoad( this.stopPullDownRefresh )
-    }
-  },
-  stopPullDownRefresh(){
-    wx.stopPullDownRefresh()
-  },
-  indexLoad: function( cb ) {
-    let _this = this
-    app.formPost('Exam.index', {}).then(res => {
-      if (res.code === 200) {
-        _this.setData({
-          groups: res.data.groups
-        });
-       cb&&cb() 
-      }
-    })
-  },
-  downloadFile: function(){
-    let url = this.data.info.code_url
-    util.downloadFile( url, res=>{
-      this.setData({buyModel:false, code_url:''})
-    } )
-  },
-  gotoHistory: function(){
-    wx.navigateTo({
-      url: '/pages/exam/record/index',
-    })
-  },
-  gotoExam:function( e ){
-    let groupId = e.currentTarget.dataset.id
-    wx.navigateTo({
-      url: `/pages/exam/do/index?id=${groupId}`
-    })
-  },
-  gotoCollection(){
-    wx.navigateTo({
-      url: '/pages/exam/collection/index',
-    })
-  },
-  doWxPay( data ){
-    let that = this
-    wx.requestPayment({
-      timeStamp: data.timeStamp,
-      nonceStr: data.nonceStr,
-      package: data.package, 
-      signType: data.signType,
-      paySign: data.paySign,
-      success: function (event) {
-        wx.showModal({
-          title: '支付成功',
-          showCancel: false,
-          content: '本次共支付费用¥'+(data.fee/100)+'元'+ `\n\n试卷更新可能延迟,请耐心等待`,
-          success(res) {
-            that.indexLoad()
-          }
-        })
-      }
-    })
-  },
-  startWxpay(e){
-    let groupId = +e.currentTarget.dataset.id
-    let system = this.data.system
-    app.formPost('User.PayExam', {groupId, system}).then(res => {
-      if (res.code === 200) {
-        if( res.data.payType=="free" ){
-          this.indexLoad()
-        }else if (res.data.payType=="qrcode"){
-          this.setData({info: res.data, buyModel:true})
-        }else{
-          this.doWxPay( res.data )
-        }
-      }
-    })
-  },
-  onShareAppMessage: function(){
-
-  },
-  gotoError: function(){
-    wx.navigateTo({
-      url: '/pages/exam/error/index',
-    })
-  }
-})

+ 0 - 15
pages/exam/index/index.json

@@ -1,15 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-collapse": "/component/iView/collapse/index",
-    "i-collapse-item": "/component/iView/collapse-item/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-icon": "/component/iView/icon/index",
-    "i-badge": "/component/iView/badge/index"
-  },
-  "enablePullDownRefresh": true,
-  "navigationBarTitleText": "鸿鹄在线练习系统"
-}

+ 0 - 71
pages/exam/index/index.wxml

@@ -1,71 +0,0 @@
-<wxs module="enumItem" src="../../../wxs/enumItem.wxs"></wxs>
-<view>
-  <view>
-    <swiper indicator-dots="false" autoplay="true" interval="5000" duration="1000">
-      <swiper-item>
-        <image src="/assets/carousel/1.png" class="slide-image" />
-      </swiper-item>
-      <swiper-item>
-        <image src="/assets/carousel/2.png" class="slide-image" />
-      </swiper-item>
-      <swiper-item>
-        <image src="/assets/carousel/3.png" class="slide-image" />
-      </swiper-item>
-    </swiper>
-  </view>
-
-  <view wx:if="{{!userInfo.identify}}" >
-    <view style="text-align:center;margin:50rpx"> 
-      <text> 您未开通在线练习业务 </text>
-    </view>
-    <view style="text-align:center;margin:50rpx"> 
-      <text> 实名认证后,可获得试卷 </text>
-    </view>
-  
-    <navigator class="mt50" url="/pages/user/identify/index" hover-class="navigator-hover" open-type="navigate" >
-      <button class="i-btn  i-btn-primary i-btn-square" > 实名认证 </button>
-    </navigator>
-  </view>
-
-  <view wx:else>
-    <view class="cate-section">
-      <button class="cate-item" bindtap="gotoCollection">
-        <i-icon type="collection" size="40" color="#e96900a0" />
-        <text>收藏题库</text>
-      </button>
-
-      <button class="cate-item" bindtap="gotoError">
-        <i-icon type="flag" size="40" color="#e96900a0" />
-        <text>错题重做</text>
-      </button>
-
-      <button class="cate-item" bindtap="gotoHistory">
-        <i-icon type="createtask" size="40" color="#e96900a0" />
-        <text>考试记录</text>
-      </button>
-    </view>
-
-    <i-panel>
-      <view class="cate-section">
-        <view wx:for="{{groups}}" wx:key="groupId" class="cate-item cate-item-3">
-          <button class="cate-item" wx:if="{{item.isBuy}}" bindtap="gotoExam" data-id="{{item.groupId}}">
-            <i-icon type="browse" size="40" color="#7595f1a0" />
-            <text>{{item.title}}</text>
-          </button>
-
-          <button class="cate-item" wx:else bindtap="startWxpay" data-id="{{item.groupId}}">
-            <i-icon type="lock" size="40" color="#e96900a0" />
-            <text>{{item.title}}</text>
-          </button>
-        </view>
-      </view>
-    </i-panel>
-  </view>
-
-  <modal title="iOS端暂不支持虚拟支付业务" confirm-text="保存图片" hidden="{{!buyModel}}" no-cancel="true" bindconfirm="downloadFile">
-    <image src="{{info.code_url}}" mode="widthFix" style="width:100%"></image>
-    <view style="color:red;text-align:center;">
-      <text> IOS端暂不支持虚拟支付业务</text>
-    </view>
-  </modal>
-</view>

+ 0 - 35
pages/exam/index/index.wxss

@@ -1,35 +0,0 @@
-/**index.wxss**/
-
-.caption-wrap {
-  background-color: white;
-  margin-top: 15px;
-}
-
-.caption-title {
-  background-color: #f7f7f7;
-  display: block;
-  margin-left: 5px;
-}
-
-.index-collapse {
-  font-size: 14px;
-  line-height: 24px;
-}
-
-.index-collapse-item {
-  padding: 8px 15px !important;
-  border: 0px !important;
-}
-
-.slide-image {
-  width: 100%;
-  height: 150px;
-}
-
-.index-cell {
-  padding: 5px 15px !important;
-}
-
-p{
-  display: none;
-}

+ 0 - 49
pages/exam/read/index.js

@@ -1,49 +0,0 @@
-import {getMultResult} from '../../../utils/util.js'
-
-let app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    paperId: null,
-    answers:[],
-    info: {},
-    paper: {},
-    answer: {},
-    preList:["A","B","C", "D","E","F"],
-    timer: null,
-    doTime: 0,
-    remainTime: 0,
-    remainTimeStr: '',
-    modalShow: false,
-    result: 0,
-    getMultResult,
-    timeOutShow: false
-  },
-  onLoad: function(options) {
-    let paperId = +options.id||5
-    let _this = this
-    app.formPost('Exam.PaperInfo',{paperId}).then(res => {
-        if (res.code === 200) {
-          _this.setData({
-            info: res.data.info,
-            answers: res.data.answers,
-            paperId: paperId,
-          });
-        }
-      })
-  },
-  onUnload() {
-    clearInterval(this.data.timer)
-  },
-  returnRecord() {
-    wx.reLaunch({
-      url: '/pages/record/index',
-    });
-  },
-  timeOut() {
-    clearInterval(this.data.timer)
-    this.setData({
-      timeOutShow: true
-    });
-  }
-})

+ 0 - 18
pages/exam/read/index.json

@@ -1,18 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-radio-group": "/component/iView/radio-group/index",
-    "i-radio": "/component/iView/radio/index",
-    "i-row": "/component/iView/row/index",
-    "i-col": "/component/iView/col/index",
-    "i-input": "/component/iView/input/index",
-    "i-action-sheet": "/component/iView/action-sheet/index",
-    "i-modal": "/component/iView/modal/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-rate": "/component/iView/rate/index"
-  },
-  "navigationBarTitleText": "试卷回顾"
-}

+ 0 - 95
pages/exam/read/index.wxml

@@ -1,95 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-<view class="exam-page">
-  <view class="view-wrap-hidden">
-  </view>
-  <view>
-    <view class="exam-name-title">
-      <h1>{{info.title}}</h1>
-    </view>
-
-    <view class="exam-result mt50">
-      <h1 class=""> 试卷结果: {{info.correct}}/{{info.counter}}</h1>
-      <h1 class="exam-result-detail">试卷耗时: {{info.useTime}}秒</h1>
-    </view>
-
-    <i-panel  wx:for="{{answers}}"  wx:for-item="item"   wx:key="answerId"  i-class="exam-panel-title">   
-      <i-cell-group i-class="exam-cell">
-          <!-- 单选题 -->
-          <i-cell wx:if="{{item.type==1}}"> 
-            <view>
-              <rich-text nodes="{{index+1}}.[单]{{item.title}}" />
-              <radio-group class="radio-answer" >
-                <label class="radio" wx:for="{{preList}}" wx:for-item="answer" 
-                  wx:key="anserIndex" wx:if="{{item['answer'+(index+1)]}}"  >
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled>
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-          </i-cell>
-          <!-- 多选题 -->
-          <i-cell wx:if="{{item.type==2}}"> 
-            <view >
-              <text> {{index+1}}. [多]{{item.title}} </text>
-              <checkbox-group class="checkbox-answer" style="margin-top:30rpx" >
-                <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:key="index"  wx:if="{{item['answer'+(index+1)]}}" >
-                  <view class="checkbox-answer">
-                    <checkbox color="#2d8cf0" value="{{index+1}}" checked="{{filter.isSelect(index,item.select)}}" disabled>
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </checkbox>
-                  </view>
-                </label>
-              </checkbox-group>
-            </view>
-          </i-cell>
-          <!-- 判断 -->
-          <i-cell wx:if="{{item.type==3}}"> 
-            <view>
-              <rich-text nodes="{{index+1}}.[判]{{item.title}}" />
-              <radio-group class="radio-answer"  >
-                <label class="radio" wx:for="{{2}}" wx:for-item="answer" wx:key="answerIndex" >
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled>
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-          </i-cell>
-
-          <view class="exam-clear">
-            <view class="exam-extend-item" style="padding-left:0px">
-              结果:
-              <text class="question-answer-right question-answer-result" 
-                wx:if="{{item.select==item.result}}">正确
-              </text>
-              <text class="question-answer-error question-answer-result"
-               wx:else>错误</text>
-            </view>
-
-            <view class="exam-extend-item" style="padding-left:0px" wx:if="{{item.star}}">
-              难度:
-              <i-rate value="{{item.star}}" i-class="exam-item-rate" />
-            </view>
-
-            <view class="exam-extend-item" wx:if="{{item.content}}">
-              <rich-text nodes="解析: {{item.content}}" />
-            </view>
-
-            <view class="exam-extend-item">
-              <text wx:if="{{item.type==1}}"> 正确答案: {{preList[item.result-1]}}</text>
-              <text wx:elif="{{item.type==2}}"> 正确答案: {{filter.getMultResult(item.result)}}</text>
-              <text wx:else> 正确答案: {{item.result==1?'正确':'错误'}}</text>
-            </view>
-          </view>
-      </i-cell-group>
-    </i-panel>
-
-    <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-    <i-message id="message" />
-  </view>
-</view>

+ 0 - 136
pages/exam/read/index.wxss

@@ -1,136 +0,0 @@
-.exam-page {
-  background: white;
-}
-
-.view-wrap {
-  position: fixed;
-  width: 100%;
-  background: #fff6f6;
-  text-align: center;
-  height: 35px;
-  z-index: 999;
-}
-
-.view-wrap-hidden {
-  height: 15px;
-}
-
-.exam-name-title {
-  text-align: center;
-  margin-top: 5px;
-  font-size: 20px;
-}
-
-.exam-result {
-  text-align: center;
-  margin-top: 20rpx;
-  font-size: 15px;
-  padding-bottom: 20rpx;
-}
-
-.exam-result-detail {
-  margin-left: 25px;
-}
-
-.exam-panel-title {
-  margin-top: 20px;
-}
-
-.exam-radio-item-label {
-  float: left;
-  margin-left: 10px;
-  line-height: 35px;
-}
-
-.exam-item-left {
-  float: left;
-}
-
-.item-content-selected {
-  color: #409eff;
-}
-
-.exam-input-contain {
-  margin: 10px 2px !important;
-  border-width: 1px;
-  border-color: #dddee1;
-  border-style: solid;
-  width: 95%;
-  height: 40px;
-}
-
-.exam-input-contain-label {
-  float: left;
-  padding: 0px 15px;
-  line-height: 40px;
-}
-
-.exam-input-contain-content {
-  float: left;
-  height: 40px;
-}
-
-.exam-textarea-contain {
-  margin: 10px 2px !important;
-  border-width: 1px;
-  border-color: #dddee1;
-  border-style: solid;
-  width: 100%;
-}
-
-.exam-timeout-title {
-  font-size: 16px;
-  color: red;
-  margin-top: 10px;
-  margin-bottom: 20px;
-}
-
-.gapfilling-span {
-  color: red;
-  padding: 0px 30px;
-  margin: 0px 5px;
-  border-bottom: 3px double red;
-}
-
-.ueditor-p {
-  display: inline !important;
-}
-
-.question-answer-result {
-  text-align: center;
-  height: 28px;
-  width: 60px;
-  line-height: 26px;
-  display: inline-block;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}
-
-.question-answer-judge {
-  background-color: #fdf6ec;
-  border-color: #faecd8;
-  color: #e6a23c;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 30rpx;
-}
-
-.exam-extend-item {
-  padding: 4px;
-}
-
-.exam-item-rate {
-  line-height: 0px;
-}

+ 0 - 47
pages/exam/record/index.js

@@ -1,47 +0,0 @@
-// pages/exam/index/index.js
-let app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    loadMoreLoad: false,
-    loadMoreTip: '暂无数据',
-    from:0,
-    size:9,
-    tableData: []
-  },
-  onLoad: function(options) {
-    this.setData({
-      spinShow: true
-    });
-    this.search(true)
-  },
-  onPullDownRefresh() {
-    this.setData({ spinShow: true });
-    if (!this.loading) {
-      this.setData({ from:0,tableData:[]});
-      this.search(true)
-    }
-  },
-  onReachBottom() {
-    console.log( "onReachBottom", this.loading, this.data.from)
-    if (!this.loading && this.data.from > -1) {
-      this.search(false)
-    }
-  },
-  search: function(override) {
-    let _this = this
-    let param = {from: override?0:this.data.from, size:this.data.size}
-    app.formPost('Exam.paperList', param ).then(res => {
-      _this.setData({spinShow: false});
-      wx.stopPullDownRefresh()
-      if (res.code === 200) {
-        const re = res.data
-        console.log( re )
-        _this.setData({
-          from: re.from,
-          tableData: override ? re.list : this.data.tableData.concat(re.list)
-        });
-      }
-    })
-  }
-})

+ 0 - 14
pages/exam/record/index.json

@@ -1,14 +0,0 @@
-{
-  "usingComponents": {
-    "i-tabs": "/component/iView/tabs/index",
-    "i-tab": "/component/iView/tab/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-load-more": "/component/iView/load-more/index",
-    "i-button": "/component/iView/button/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  },
-  "enablePullDownRefresh": true,
-  "navigationBarTitleText": "最新考试记录"
-}

+ 0 - 21
pages/exam/record/index.wxml

@@ -1,21 +0,0 @@
-<view>
-  <view>
-    <i-cell-group>
-      <i-cell wx:for="{{tableData}}" 
-        data-item="item" 
-        wx:key="paperId" 
-        title="{{item.title}}" 
-        is-link 
-        url="/pages/exam/read/index?id={{item.paperId}}" 
-        value="{{item.startTime}}" 
-        label="对错:{{item.correct}}/{{item.counter}}"
-      />
-    </i-cell-group>
-  </view>
-
-  <view wx:if="{{from==-1}}"  style="text-align:center;margin-top:40rpx">
-    <view class="padding">没有更多了</view>
-  </view>
-  <view class='cu-tabbar-height'></view>
-
-</view>

+ 0 - 1
pages/exam/record/index.wxss

@@ -1 +0,0 @@
-/* pages/exam/index/index.wxss */

+ 5 - 48
pages/index/index.js

@@ -7,7 +7,6 @@ const app = getApp()
 
 Page({
   data: {
-    spinShow: false,
     buyModel:false,
     code_url:'',
     info:{},
@@ -30,62 +29,20 @@ Page({
       this.setData({departments})
     })
   },
-  onShow: function(){
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      // 已经实名认证
-      if( userInfo.identify ){
-        this.indexLoad()
-      }
-    })
-  },
   onPullDownRefresh() {
     if (!this.loading) {
       this.indexLoad( this.stopPullDownRefresh )
     }
   },
-  stopPullDownRefresh(){
-    wx.stopPullDownRefresh()
-  },
-  indexLoad: function( cb ) {
-    let _this = this
-    app.formPost('Exam.index', {}).then(res => {
-      if (res.code === 200) {
-        _this.setData({
-          groups: res.data.groups
-        });
-       cb&&cb() 
-      }
-    })
-  },
-  downloadFile: function(){
-    let url = this.data.info.code_url
-    util.downloadFile( url, res=>{
-      this.setData({buyModel:false, code_url:''})
-    } )
-  },
-  gotoHistory: function(){
+  gotoDepartment(e){
+    let id = e.currentTarget.dataset.id;
     wx.navigateTo({
-      url: '/pages/exam/record/index',
+      url: `/pages/department/artical/index?departmentId=${id}`,
     })
   },
-  gotoExam:function( e ){
-    let groupId = e.currentTarget.dataset.id
-    wx.navigateTo({
-      url: `/pages/exam/do/index?id=${groupId}`
-    })
-  },
-  gotoCollection(){
-    wx.navigateTo({
-      url: '/pages/exam/collection/index',
-    })
+  stopPullDownRefresh(){
+    wx.stopPullDownRefresh()
   },
   onShareAppMessage: function(){
-
-  },
-  gotoError: function(){
-    wx.navigateTo({
-      url: '/pages/exam/error/index',
-    })
   }
 })

+ 2 - 4
pages/index/index.wxml

@@ -1,4 +1,3 @@
-<wxs module="enumItem" src="../../wxs/enumItem.wxs"></wxs>
 <view>
   <view>
     <swiper indicator-dots="false" autoplay="true" interval="5000" duration="1000">
@@ -35,9 +34,8 @@
     <i-panel>
       <view class="cate-section">
         <view wx:for="{{departments}}" wx:key="departmentId" class="cate-item cate-item-3">
-          <button class="cate-item"  bindtap="gotoExam" data-id="{{item.groupId}}">
-            <!-- <i-icon type="{{item.icon}}" size="40" color="#7595f1a0" /> -->
-            <i-avatar  size="40">{{item.department[0] }}</i-avatar>
+          <button class="cate-item"  bindtap="gotoDepartment" data-id="{{item.departmentId}}">
+            <i-avatar src="/assets/icon/{{item.departmentId}}.jpg" size="50" shape="square"></i-avatar>
             <text>{{item.department}}</text>
           </button>
         </view>

+ 0 - 2
pages/my/collection/index.wxml

@@ -1,2 +0,0 @@
-<!--pages/my/collection/index.wxml-->
-<text>pages/my/collection/index.wxml</text>

+ 0 - 1
pages/my/collection/index.wxss

@@ -1 +0,0 @@
-/* pages/my/collection/index.wxss */

+ 0 - 58
pages/my/index/index.wxml

@@ -1,58 +0,0 @@
-
-
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-
-
-<view class='headImg'>
-  <button  wx:if="{{!userInfo.token}}"  type="primary"  bindtap="wxLogin" class="tc">
-    快捷登入
-  </button>
-
-  <view class="headImg-avatar" wx:else>
-    <image src="{{userInfo.headImg}}" mode="aspectFill"></image>
-  </view>
-</view>
-
-
-<view>
-  <i-cell-group i-class="my-group-margin">
-    <i-cell title="{{filter.phoneFormat(userInfo.phone)||'---'}}" is-link>
-      <i-icon type="mobilephone_fill" slot="icon" size="20" />
-    </i-cell>
-
-    <i-cell title="{{userInfo.nickname ||'---'}}" is-link>
-      <i-icon type="mine_fill" slot="icon" size="20" />
-    </i-cell>
-
-    <i-cell title="{{filter.cardIdFormat(userInfo.cardId) ||'---'}}" is-link>
-      <i-icon type="businesscard_fill" slot="icon" size="20" />
-    </i-cell>
-  </i-cell-group>
-</view>
-
-<view>
-  <i-cell-group i-class="my-group-margin">
-    <i-cell title="设置" >
-      <i-icon type="setup_fill" slot="icon" size="20" />
-    </i-cell>
-    <i-cell title="反馈" >
-      <i-icon type="praise_fill" slot="icon" size="20" />
-    </i-cell>
-    <i-cell title="关于" is-link url="/pages/dashboard/index">
-      <i-icon type="prompt_fill" slot="icon" size="20" />
-    </i-cell>
-  </i-cell-group>
-</view>
-
-<view>
-  <i-cell-group i-class="my-group-margin">
-    <i-cell title="退出登入" bind:click="logOut">
-      <i-icon type="flashlight_fill" slot="icon" size="20" />
-    </i-cell>
-  </i-cell-group>
-</view>
-
-<view class="copyright">宁德市建筑工程技术服务行业协会</view>
-
-<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-<i-message id="message" />

+ 0 - 32
pages/my/log/index.js

@@ -1,32 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    logList: null,
-    len: 0
-  },
-  onLoad: function(options) {
-    this.search();
-  },
-  search: function() {
-    let _this = this
-    _this.setData({
-      spinShow: true
-    });
-    app.formPost('/api/wx/student/user/log', null).then(res => {
-      _this.setData({
-        spinShow: false
-      });
-      if (res.code === 1) {
-        _this.setData({
-          logList: res.response,
-          len: res.response.length
-        });
-      }
-    }).catch(e => {
-      _this.setData({
-        spinShow: false
-      });
-      app.message(e, 'error')
-    })
-  }
-})

+ 0 - 9
pages/my/log/index.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "i-steps": "/component/iView/steps/index",
-    "i-step": "/component/iView/step/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-panel": "/component/iView/panel/index"
-  }
-}

+ 0 - 18
pages/my/log/index.wxml

@@ -1,18 +0,0 @@
-<view class="user-log-page">
-  <view wx:for="{{logList}}" data-item="item" wx:key="{{item.id}}" class="i-step-item i-step-process i-step-vertical" style="width : 100%;">
-    <view class="i-step-item-ico">
-      <view class="i-step-ico"></view>
-      <view class="i-step-line" wx:if="{{ index !== len - 1 }}"></view>
-    </view>
-    <view class="i-step-item-main">
-      <view class="i-step-item-title">
-        {{item.createTime}}
-      </view>
-      <view class="i-step-item-content">
-        {{item.content}}
-      </view>
-    </view>
-    <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-    <i-message id="message" />
-  </view>
-</view>

+ 0 - 24
pages/my/log/index.wxss

@@ -1,24 +0,0 @@
-/* pages/user/log/index.wxss */
-@import '/component/iView/steps/index.wxss';
-@import '/component/iView/step/index.wxss';
-
-.i-step-ico {
-  background: #fff !important;
-  box-sizing: border-box !important;
-}
-
-.i-step-item-title {
-  font-size: 12px;
-  font-weight: 400 !important;
-}
-
-.i-step-item-content {
-  font-size: 12px;
-  font-weight: 400 !important;
-}
-
-.user-log-page {
-  background: #fff;
-  padding: 5px;
-  padding-top: 10px;
-}

+ 0 - 79
pages/my/message/info/index.js

@@ -1,79 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    message: null
-  },
-
-  onLoad: function(options) {
-    let msgId = options.id;
-    let _this = this
-    _this.setData({
-      spinShow: true
-    });
-    app.formPost('/api/wx/student/user/message/detail/' + msgId, null).then(res => {
-      _this.setData({
-        spinShow: false
-      });
-      if (res.code === 1) {
-        _this.setData({
-          message: res.response,
-        });
-        app.formPost('/api/wx/student/user/message/read/' + msgId, null);
-      }
-    }).catch(e => {
-      _this.setData({
-        spinShow: false
-      });
-      app.message(e, 'error')
-    })
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload: function() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh: function() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage: function() {
-
-  }
-})

+ 0 - 7
pages/my/message/info/index.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  }
-}

+ 0 - 19
pages/my/message/info/index.wxml

@@ -1,19 +0,0 @@
-<view class="msg-page">
-  <view class="msg-title">
-    <h1>{{message.title}}</h1>
-  </view>
-  <view>
-    <view class="msg-content">
-      <h1>发送人:{{message.sendUserName}}</h1>
-    </view>
-    <view class="msg-content">
-      <h1>发送时间:{{message.createTime}}</h1>
-    </view>
-    <view class="msg-content">
-      <h1>发送内容:{{message.content}}</h1>
-    </view>
-
-    <i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-    <i-message id="message" />
-  </view>
-</view>

+ 0 - 16
pages/my/message/info/index.wxss

@@ -1,16 +0,0 @@
-.msg-page {
-  background: white;
-  width: 100%;
-  height: 100%;
-  padding: 10px 0px;
-}
-
-.msg-title {
-  text-align: center;
-  font-size: 14px;
-}
-
-.msg-content {
-  padding: 8px 15px;
-  font-size: 14px;
-}

+ 0 - 72
pages/my/message/list/index.js

@@ -1,72 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    loadMoreLoad: false,
-    loadMoreTip: '暂无数据',
-    queryParam: {
-      pageIndex: 1,
-      pageSize: app.globalData.pageSize
-    },
-    tableData: [],
-    total: 1
-  },
-  onLoad: function(options) {
-    this.setData({
-      spinShow: true
-    });
-    this.search(true);
-  },
-  onPullDownRefresh() {
-    this.setData({
-      spinShow: true
-    });
-    if (!this.loading) {
-      this.setData({
-        ['queryParam.pageIndex']: 1
-      });
-      this.search(true)
-    }
-  },
-  onReachBottom() {
-    if (!this.loading && this.data.queryParam.pageIndex < this.data.total) {
-      this.setData({
-        loadMoreLoad: true,
-        loadMoreTip: '正在加载'
-      });
-      this.setData({
-        ['queryParam.pageIndex']: this.data.queryParam.pageIndex + 1
-      });
-      this.search(false)
-    }
-  },
-  search: function(override) {
-    let _this = this
-    app.formPost('/api/wx/student/user/message/page', this.data.queryParam).then(res => {
-      _this.setData({
-        spinShow: false
-      });
-      wx.stopPullDownRefresh()
-      if (res.code === 1) {
-        const re = res.response
-        _this.setData({
-          ['queryParam.pageIndex']: re.pageNum,
-          tableData: override ? re.list : this.data.tableData.concat(re.list),
-          total: re.pages
-        });
-
-        if (re.pageNum >= re.pages) {
-          this.setData({
-            loadMoreLoad: false,
-            loadMoreTip: '暂无数据'
-          });
-        }
-      }
-    }).catch(e => {
-      _this.setData({
-        spinShow: false
-      });
-      app.message(e, 'error')
-    })
-  }
-})

+ 0 - 10
pages/my/message/list/index.json

@@ -1,10 +0,0 @@
-{
-  "usingComponents": {
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-load-more": "/component/iView/load-more/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  },
-  "enablePullDownRefresh": true
-}

+ 0 - 10
pages/my/message/list/index.wxml

@@ -1,10 +0,0 @@
-<wxs module="enumItem" src="../../../../wxs/enumItem.wxs"></wxs>
-<view>
-  <i-cell-group>
-    <i-cell wx:for="{{tableData}}" data-item="item" label="{{item.content}}" wx:key="{{item.id}}" url="/pages/my/message/info/index?id={{item.id}}" title="{{item.title}}" lable="{{item.content}}" is-link value="{{enumItem.format(enumItem.state.user.message.readText,item.readed)}}"></i-cell>
-  </i-cell-group>
-</view>
-
-<i-load-more tip="{{loadMoreTip}}" loading="{{loadMoreLoad}}" />
-<i-spin size="large" fix wx:if="{{ spinShow }}"></i-spin>
-<i-message id="message" />

+ 0 - 1
pages/my/message/list/index.wxss

@@ -1 +0,0 @@
-/* pages/user/message/index.wxss */

+ 1 - 1
pages/my/collection/index.js → pages/search/file/index.js

@@ -1,4 +1,4 @@
-// pages/my/collection/index.js
+// pages/search/file/index.js
 Page({
 
   /**

+ 3 - 0
pages/search/file/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
pages/search/file/index.wxml

@@ -0,0 +1,2 @@
+<!--pages/search/file/index.wxml-->
+<text>pages/search/file/index.wxml</text>

+ 1 - 0
pages/search/file/index.wxss

@@ -0,0 +1 @@
+/* pages/search/file/index.wxss */

+ 0 - 159
pages/study/course/index.js

@@ -1,159 +0,0 @@
-//index.js
-//获取应用实例
-const app = getApp()
-
-Page({
-  data: {
-    spinShow: false,
-    buyModel:false,
-    code_url:'',
-    system: "",
-    userInfo:{},
-    info:{},
-    onPlay: false,
-    item:{},
-    courseId:0,
-    mediaList: []
-  },
-  onLoad: function( options ){
-    let courseId = +options.courseId||35;
-    this.setData({courseId})
-    app.getSystemInfo( system=>{
-      this.setData({system})
-    })
-    // 
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      this.loadData( courseId )
-    })
-  },
-  loadData: function( courseId ) {
-    let param ={ courseId}
-    app.formPost('Study.GetWxCourseInfo', param).then(res => {
-      if( res.code == 200){
-        let {info, list} = res.data
-        wx.setNavigationBarTitle({
-          title: info.name
-        })
-        this.setData({info, mediaList: list})
-      }
-    })
-  },
-  onReady(res) {
-    this.videoContext = wx.createVideoContext('myVideo')
-  },
-  gotoExam(){
-    let courseId = this.data.courseId
-    wx.navigateTo({
-      url: `/pages/study/exam/index?courseId=${courseId}`,
-    })
-  },
-  // 拖动快进
-  timeUpdate( e ){
-    let that = this;
-    let item = this.data.item
-    var position = item.position
-    var currentTime = parseInt(e.detail.currentTime)
-    if( currentTime - position < 1 || item.isFinish ){
-      return
-    }
-    // 
-    if( currentTime - position > 5 ){
-      let videoContext = wx.createVideoContext('myVideo');
-      videoContext.seek( position )
-      wx.showToast({
-        title: '未完整看完该视频,不能快进',
-        icon: 'none',
-        duration: 2000,
-      })
-      return;
-    }else{
-      item.position= currentTime
-    }
-    if( item.position - item.prev_tick > 4 ){
-      item.prev_tick = item.position;
-      // 前一秒完成
-      if( item.prev_tick >= e.detail.duration ){
-        item.isFinish = 1
-      }
-      this.doTick( item )
-    }
-    that.setData({item})
-  },
-  doTick( item ){
-    let param = {
-      id: item.id,
-      isFinish: item.isFinish||0,
-      position: item.position,
-    }
-    let mediaList = this.data.mediaList;
-    app.formPost('study.tick', param).then( res => {
-      if( res.code == 200){
-        item.isFinish = res.data.isFinish
-        if( !res.data.skip ){
-          item.position = res.data.position;
-        }
-        mediaList[item.index] = item;
-        this.setData( {item, mediaList} );
-      }
-    })
-  },
-  playMedia( e ){
-    let index = e.currentTarget.dataset.index;
-    let mediaList =  this.data.mediaList
-    let item = mediaList[index];
-    item.index = index;
-    item.prev_tick = item.position
-    wx.pageScrollTo({
-      scrollTop: 0,
-      duration: 1000
-   })
-    if( item.url ){
-      this.setData({onPlay: true, item})
-      return;
-    }
-    app.formPost('study.GetMedia', {id:item.id}).then( res => {
-      if( res.code == 200){
-        if( !res.data ) return
-        item.url = res.data
-        mediaList[index] = item;
-        this.setData({onPlay: true, item, mediaList})
-      }
-    });
-  },
-  doWxPay( data ){
-    let that = this
-    wx.requestPayment({
-      timeStamp: data.timeStamp,
-      nonceStr: data.nonceStr,
-      package: data.package, 
-      signType: data.signType,
-      paySign: data.paySign,
-      success: function (event) {
-        wx.showModal({
-          title: '支付成功',
-          showCancel: false,
-          content: '本次共支付费用¥'+(data.fee/100)+'元'+ `\n\n试卷更新可能延迟,请耐心等待`,
-          success(res) {
-            that.indexLoad()
-          }
-        })
-      }
-    })
-  },
-  startWxpay(e){
-    let groupId = +e.currentTarget.dataset.id
-    let system = this.data.system
-    app.formPost('User.PayExam', {groupId, system}).then(res => {
-      if (res.code === 200) {
-        if( res.data.payType=="free" ){
-          this.indexLoad()
-        }else if (res.data.payType=="qrcode"){
-          this.setData({info: res.data, buyModel:true})
-        }else{
-          this.doWxPay( res.data )
-        }
-      }
-    })
-  }
-})

+ 0 - 55
pages/study/course/index.wxml

@@ -1,55 +0,0 @@
-<wxs module="util" src="../../../wxs/util-fun.wxs"></wxs>
-<view>
-  <view>
-    <video id="myVideo" src="{{item.url}}" autoplay initial-time="{{item.position}}" show-fullscreen-btn
-      bindtimeupdate="timeUpdate" show-play-btn="false" show-screen-lock-button="true" object-fit="cover"
-      wx:if="{{onPlay}}"></video>
-    <image src="{{info.tb}}" mode="widthFix" style="width:100%;" wx:else />
-  </view>
-
-  <!-- <view class="tc p20 fs30">
-    <text>学时: {{info.getXs/10}}/{{info.totalXs/10}}</text>
-    <text style="margin-left:10rpx">最高分: {{info.score}}</text>
-  </view> -->
-
-  <view class="cate-section">
-
-    <view class="cate-item">
-      <i-avatar  size="40" color="#e96900a0"> {{info.getXs/10}} </i-avatar>
-      <text class="pt20">获得学时</text>
-    </view>
-
-    <view class="cate-item">
-      <i-avatar size="40" color="#e96900a0"> {{info.totalXs/10}} </i-avatar>
-      <text class="pt20">总学时</text>
-    </view>
-
-    <view class="cate-item">
-      <i-avatar  size="40" color="#e96900a0"> {{info.score}} </i-avatar>
-      <text class="pt20">最高分</text>
-    </view>
-
-    <view class="cate-item" bindtap="gotoExam">
-      <i-avatar  size="40" color="#e96900a0"> {{info.score>60?'是':'否'}} </i-avatar>
-      <text class="pt20">进入考试</text>
-    </view>
-  </view>
-
-  <view wx:for="{{mediaList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="mt20">
-    <i-card title="{{item.name}}" bindtap="playMedia" data-index="{{index}}">
-      <view slot="content">视频学时: {{item.xs/10}}</view>
-      <view slot="footer">
-        学习进度:{{util.getPercent(item) }}%
-      </view>
-
-    </i-card>
-  </view>
-
-
-  <modal title="iOS端暂不支持虚拟支付业务" confirm-text="保存图片" hidden="{{!buyModel}}" no-cancel="true" bindconfirm="modalConfirm">
-    <image src="{{info.code_url}}" mode="widthFix" style="width:100%"></image>
-    <view style="color:red;text-align:center;">
-      <text> IOS端暂不支持虚拟支付业务</text>
-    </view>
-  </modal>
-</view>

+ 0 - 5
pages/study/course/index.wxss

@@ -1,5 +0,0 @@
-/**index.wxss**/
-
-#myVideo {
-  width: 100%;
-}

+ 0 - 141
pages/study/exam/index.js

@@ -1,141 +0,0 @@
-import {formatSeconds} from '../../../utils/util.js'
-let app = getApp()
-Page({
-  data: {
-    preList:["A","B","C", "D", "E", "F"],
-    userInfo: {},
-    modalShow: false,
-    timeOutShow: false,
-    remainTime: 0,
-    remainTimeStr: '',
-    index:0,
-    score:0,
-    useTime:0,
-    item: {index:0},
-    info: {},
-    list: [],
-  },
-  onLoad: function(options) {
-    let courseId = +options.courseId||36
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      this.loadData( courseId )
-    })
-  },
-  loadData( courseId ){
-    let info = wx.getStorageSync('@examinfo')||{};
-    if( info && info.courseId == courseId){      
-      let index = info.index||0;
-      this.setData({info})
-      this.loadQuestion( index )
-      this.timeReduce()
-      return;
-    }
-    app.formPost('Course.startExam', {courseId}).then(res => {
-      if (res.code ==200) {
-        this.setData({info:res.data })
-        this.loadQuestion( 0 )
-        this.timeReduce()
-      }
-    })
-  },
-  selectquestion( e ){
-    let index = e.currentTarget.dataset.index
-    this.loadQuestion( index )
-  },
-  checkAnswer( e ){
-    let item = this.data.item;
-    let examId = this.data.index.examId;
-    if( !item.select ){
-      util.message("还未作答", 'error')
-      return;
-    }
-    let select = item.select;
-    if( item.type == 3) select = +select.join("");
-    let param = {id: item.id, examId, select}
-    app.formPost('Course.SubmitAnswer', param).then(res => {
-      this.nextAnswer( )
-    })
-  },
-  radioChange( e ){
-    let item = this.data.item
-    item.select = +e.detail.value;
-    console.log( "radioChange", item)
-    this.setData({item})
-    this.checkAnswer()
-  },
-  loadQuestion( index ) {
-    let item = this.data.info.answers[index];
-    item.index = index;
-    if( !item.title ){
-      app.formPost("course.loadAnswer", {id:item.id} ).then(res => {
-        if( res.code != 200) return;
-        Object.assign( item, res.data)
-        this.saveItem( item ) 
-      })
-    }else{
-      this.saveItem( item ) 
-    }
-  },
-  saveItem( item ){
-    let info = this.data.info;
-    info.index = item.index;
-    info.answers[ item.index] = item;
-    wx.setStorageSync('@examinfo', info)
-    console.log("item", item)
-    this.setData({item, info})
-  },
-  checkboxChange( e ){
-    let item = this.data.item
-    item.select = parseInt(e.detail.value.sort().join(''))
-    console.log( "radioChange", item)
-    this.setData({item})
-  },
-  nextAnswer(  ){
-    console.log( "next")
-    this.loadQuestion( this.data.info.index+1)
-  },
-  returnRecord(){
-    wx.navigateBack({
-      delta: 1,
-    })
-  },
-  dosubmit(e){
-    let examId = this.data.info.examId
-    app.formPost("course.FinishExam", {examId}).then(res => {
-      if (res.code == 200) {
-        let { score, useTime } = res.data;
-        this.setData({score, useTime, modalShow:true})
-        wx.setStorageSync('@examinfo', {})
-        if( this.data.timer) clearInterval(this.data.timer)
-      }
-    });
-  },
-  timeOut() {
-    clearInterval(this.data.timer)
-    this.setData({
-      timeOutShow: true
-    });
-  },
-
-  timeReduce() {
-    let _this = this
-    let  remainTime = this.data.info.duration + this.data.info.startTime - parseInt(Date.now()/1000)
-    this.setData({remainTime})
-    let timer = setInterval(function() {
-      let remainTime = _this.data.remainTime
-      if (remainTime <= 0) {
-        _this.timeOut()
-      } else {
-        _this.setData({
-          remainTime: remainTime - 1,
-          remainTimeStr: formatSeconds(remainTime),
-          doTime: _this.data.doTime + 1
-        });
-      }
-    }, 1000)
-    _this.setData({
-      timer: timer
-    });
-  }
-})

+ 0 - 16
pages/study/exam/index.json

@@ -1,16 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-radio-group": "/component/iView/radio-group/index",
-    "i-radio": "/component/iView/radio/index",
-    "i-input": "/component/iView/input/index",
-    "i-action-sheet": "/component/iView/action-sheet/index",
-    "i-modal": "/component/iView/modal/index",
-    "i-col": "/component/iView/col/index",
-    "i-row": "/component/iView/row/index"
-  },
-  "enablePullDownRefresh": false,
-  "navigationBarTitleText": "考试"
-}

+ 0 - 89
pages/study/exam/index.wxml

@@ -1,89 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-
-<view class="exam-page p10">
-
-	<view class="view-wrap">
-    <view class="exam-count-down">{{remainTimeStr}}</view>
-	</view>
-	<view class="view-wrap-hidden">
-	</view>
-	
-
-	<i-panel i-class="exam-panel-title" >
-		<i-cell-group i-class="exam-cell">
-			<!-- 单选题 -->
-			<i-cell wx:if="{{item.type==2}}">
-				<view>
-					<rich-text nodes="[单]{{item.title}}" />
-					<radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-						<label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="anserIndex"
-							wx:if="{{item['answer'+(index+1)]}}">
-							<view class="radio-answer">
-								<radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
-									{{answer}}. {{item['answer'+(index+1)]}}
-								</radio>
-							</view>
-						</label>
-					</radio-group>
-				</view>
-			</i-cell>
-			<!-- 多选题 -->
-			<i-cell wx:if="{{item.type==3}}">
-				<view>
-					<text> [多]{{item.title}} </text>
-					<checkbox-group class="checkbox-answer" style="margin-top:10rpx" bindchange="checkboxChange">
-						<label class="checkbox" wx:for="{{preList}}" wx:key="index" wx:for-item="answer"
-							wx:if="{{item['answer'+(index+1)]}}">
-							<view class="checkbox-answer">
-								<checkbox color="#2d8cf0" value="{{index+1}}" checked="{{filter.isSelect( index+1, item.select)}}">
-									{{answer}}. {{item['answer'+(index+1)]}}
-								</checkbox>
-							</view>
-						</label>
-					</checkbox-group>
-				</view>
-			</i-cell>
-			<!-- 判断 -->
-			<i-cell wx:if="{{item.type==1}}">
-				<view>
-					<rich-text nodes="[判]{{item.title}}" />
-					<radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-						<label class="radio" wx:for="{{2}}" wx:for-item="answer">
-							<view class="radio-answer">
-								<radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
-									{{preList[index]}}. {{item['answer'+(index+1)]}}
-								</radio>
-							</view>
-						</label>
-					</radio-group>
-				</view>
-			</i-cell>
-		</i-cell-group>
-
-		<view class="tc">
-			<button  type="primary" size="mini" bindtap='nextAnswer'>下一题</button>
-			<button  type="primary" size="mini" bindtap='dosubmit' class="ml20">交卷</button>
-		</view>
-	</i-panel>
-</view>
-
-<view class="bg-white p20">
-	<i-row wx:for="{{10}}" wx:for-index="row">
-		<i-col  wx:for="{{5}}" wx:for-index="cell" style="float:left;width:20%;text-alignP:center">
-			<view class="item-select {{filter.isExamSelect( 5*row+cell, info)}} " 
-				bindtap="selectquestion" data-index="{{5*row+cell}}" > {{5*row+cell+1}} </view>
-		</i-col>
-	</i-row>
-</view>
-
-
-<i-modal title="考试结果" visible="{{modalShow}}" bind:ok="returnRecord" bind:cancel="returnRecord">
-	<view>我的战绩:{{score}} </view>
-</i-modal>
-
-<i-action-sheet visible="true" visible="{{timeOutShow}}" mask-closable="{{ false }}">
-	<view slot="header" style="padding: 16px">
-		<view class="exam-timeout-title">考试试卷结束,请提交试卷!</view>
-		<button class="i-btn  i-btn-primary i-btn-square"  bindtap='dosubmit'>提交</button>
-	</view>
-</i-action-sheet>

+ 0 - 88
pages/study/exam/index.wxss

@@ -1,88 +0,0 @@
-.exam-tab-view {
-  margin-top: 42px;
-}
-
-.view-wrap {
-  position: fixed;
-  width: 100%;
-  background: #fff6f6;
-  text-align: center;
-  height: 35px;
-  z-index: 999;
-}
-
-.exam-count-down {
-  font-size: 15px;
-  line-height: 35px;
-}
-
-.view-wrap-hidden {
-  height: 35px;
-}
-
-
-.xzs-load-more {
-  margin-top: 60px !important;
-}
-
-.exam-page {
-  background: white;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 20rpx;
-}
-.exam-extend-item {
-  padding: 4px;
-}
-
-.item-select{
-  padding: 10rpx !important;
-  margin: 20rpx;
-  margin-top: 10rpx;
-  text-align: center;
-  height: 50rpx;
-}
-
-.un-select{
-  width: 50rpx;
-  height: 50rpx;
-  
-  line-height: 50rpx;
-  border-radius: 100%;
-}
-
-.cur-select{
-  background: lightblue !important;
-  color:red;
-  width: 50rpx;
-  height: 50rpx;
-  font-size: 900;
-  line-height: 50rpx;
-  border-radius: 100%;
-}
-
-.is-select{
-  background: #dadada;
-  width: 50rpx;
-  height: 50rpx;
-  line-height: 50rpx;
-  border-radius: 100%;
-}
-
-.exam-cell{
-  min-height: 500rpx;
-}

+ 0 - 115
pages/study/index/index.js

@@ -1,115 +0,0 @@
-const app = getApp()
-Page({
-  data: {
-    spinShow: false,
-    buyModel:false,
-    code_url:'',
-    info:{},
-    system: "",
-    groups: [],
-    pushPaper: [],
-    timeLimitPaper: [],
-    userInfo:{},
-    from:0,
-    size: 10,
-    courseList: []
-  },
-  onLoad: function(){
-    let that = this
-    wx.getSystemInfo({
-      success: function(res) {
-        that.setData({system: res.system})
-      }
-    })
-  },
-  gotoCourse( e ){
-    let courseId = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: `/pages/study/course/index?courseId=${courseId}`,
-    })
-  },
-  onShow: function () {
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      this.indexLoad()
-    })
-  },
-  onPullDownRefresh() {
-    if (!this.loading) {
-      this.indexLoad( this.stopPullDownRefresh )
-    }
-  },
-  stopPullDownRefresh(){
-    wx.stopPullDownRefresh()
-  },
-  indexLoad: function( cb ) {
-    let param ={ 
-      from: this.data.from,
-      size: this.data.size,
-      type:'施工现场专业人员',
-    }
-    app.formPost('Study.GetWxCourseList', param).then(res => {
-      if (res.code === 200) {
-        this.setData({
-          from: res.data.from,
-          courseList: res.data.list,
-        });
-       cb&&cb() 
-      }
-    })
-  },
-  gotoExam:function( e ){
-    let groupId = e.currentTarget.dataset.id
-    wx.navigateTo({
-      url: `/pages/exam/do/index?id=${groupId}`
-    })
-  },
-  gotoCollection(){
-    wx.navigateTo({
-      url: '/pages/exam/collection/index',
-    })
-  },
-  doWxPay( data ){
-    let that = this
-    wx.requestPayment({
-      timeStamp: data.timeStamp,
-      nonceStr: data.nonceStr,
-      package: data.package, 
-      signType: data.signType,
-      paySign: data.paySign,
-      success: function (event) {
-        wx.showModal({
-          title: '支付成功',
-          showCancel: false,
-          content: '本次共支付费用¥'+(data.fee/100)+'元'+ `\n\n试卷更新可能延迟,请耐心等待`,
-          success(res) {
-            that.indexLoad()
-          }
-        })
-      }
-    })
-  },
-  startWxpay(e){
-    let groupId = +e.currentTarget.dataset.id
-    let system = this.data.system
-    app.formPost('User.PayExam', {groupId, system}).then(res => {
-      if (res.code === 200) {
-        if( res.data.payType=="free" ){
-          this.indexLoad()
-        }else if (res.data.payType=="qrcode"){
-          this.setData({info: res.data, buyModel:true})
-        }else{
-          this.doWxPay( res.data )
-        }
-      }
-    })
-  },
-  onShareAppMessage: function(){
-
-  },
-  gotoError: function(){
-    wx.navigateTo({
-      url: '/pages/exam/error/index',
-    })
-  }
-})

+ 0 - 16
pages/study/index/index.json

@@ -1,16 +0,0 @@
-{
-  "usingComponents": {
-    "i-panel": "/component/iView/panel/index",
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-collapse": "/component/iView/collapse/index",
-    "i-collapse-item": "/component/iView/collapse-item/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-icon": "/component/iView/icon/index",
-    "i-card": "/component/iView/card/index",
-    "i-badge": "/component/iView/badge/index"
-  },
-  "enablePullDownRefresh": true,
-  "navigationBarTitleText": "继续教育"
-}

+ 0 - 81
pages/study/index/index.wxml

@@ -1,81 +0,0 @@
-<wxs module="enumItem" src="../../../wxs/enumItem.wxs"></wxs>
-<view>
-  <view>
-    <swiper indicator-dots="false" autoplay="true" interval="5000" duration="1000">
-      <swiper-item>
-        <image src="/assets/carousel/1.png" class="slide-image" />
-      </swiper-item>
-      <swiper-item>
-        <image src="/assets/carousel/2.png" class="slide-image" />
-      </swiper-item>
-      <swiper-item>
-        <image src="/assets/carousel/3.png" class="slide-image" />
-      </swiper-item>
-      <swiper-item>
-        <image src="/assets/carousel/4.png" class="slide-image" />
-      </swiper-item>
-    </swiper>
-  </view>
-
-  <view wx:if="{{!userInfo.identify}}">
-    <view style="text-align:center;margin:50rpx">
-      <text> 您未开通在线练习业务 </text>
-    </view>
-    <view style="text-align:center;margin:50rpx">
-      <text> 实名认证后,可获得试卷 </text>
-    </view>
-
-    <navigator class="mt50" url="/pages/user/identify/index" hover-class="navigator-hover" open-type="navigate">
-      <button class="i-btn  i-btn-primary i-btn-square"> 实名认证 </button>
-    </navigator>
-  </view>
-
-  <view  wx:else>
-    <!-- 导航 -->
-    <view class="cate-section">
-
-      <navigator class="cate-item"  url="/pages/study/sign/index" >
-        <i-icon type="flag" size="40" color="#e96900a0" />
-        <text>学时证明</text>
-      </navigator>
-
-      <navigator class="cate-item"  url="/pages/study/market/index?type=施工现场专业人员" >
-        <i-icon type="shop_fill" size="40" color="#e96900a0" />
-        <text>所有课程</text>
-      </navigator>
-
-    </view>
-
-    <!-- 视频列表 -->
-    <view class="guess-section">
-      <block wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
-        <view class="guess-item">
-          <view class="image-wrapper item-img">
-            <image src="{{item.tb}}" mode="aspectFill"> </image>
-            <view class="circle" bindtap="gotoCourse" data-id="{{item.courseId}}">
-              <view class="circle_inner_play"></view>
-            </view>
-          </view>
-          <text class="title clamp">
-            【{{item.nd}}】 {{item.name}}
-          </text>
-          <view class="info">
-            <text class="price">
-              价格:{{"¥"+item.fee/100}}
-            </text>
-            <text class="xs">
-              学时:{{item.totalXs/10}}
-            </text>
-          </view>
-        </view>
-      </block>
-    </view>
-  </view>
-
-  <modal title="iOS端暂不支持虚拟支付业务" confirm-text="保存图片" hidden="{{!buyModel}}" no-cancel="true" bindconfirm="modalConfirm">
-    <image src="{{info.code_url}}" mode="widthFix" style="width:100%"></image>
-    <view style="color:red;text-align:center;">
-      <text> IOS端暂不支持虚拟支付业务</text>
-    </view>
-  </modal>
-</view>

+ 0 - 145
pages/study/index/index.wxss

@@ -1,145 +0,0 @@
-/**index.wxss**/
-
-.caption-wrap {
-  background-color: white;
-  margin-top: 15px;
-}
-
-.caption-title {
-  background-color: #f7f7f7;
-  display: block;
-  margin-left: 5px;
-}
-
-.index-collapse {
-  font-size: 14px;
-  line-height: 24px;
-}
-
-.index-collapse-item {
-  padding: 8px 15px !important;
-  border: 0px !important;
-}
-
-.slide-image {
-  width: 100%;
-  height: 150px;
-}
-
-.index-cell {
-  padding: 5px 15px !important;
-}
-
-/* 
-  列表展示 
-*/
-.guess-section {
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-flex-wrap: wrap;
-  -ms-flex-wrap: wrap;
-  flex-wrap: wrap;
-  padding: 20rpx; 
-  background: #fff;
-}
-
-.guess-section .guess-item {
-  margin-top: 40rpx;
-  display: -webkit-box;
-  display: -webkit-flex;
-  display: -ms-flexbox;
-  display: flex;
-  -webkit-box-orient: vertical;
-  -webkit-box-direction: normal;
-  -webkit-flex-direction: column;
-  -ms-flex-direction: column;
-  flex-direction: column;
-  width: 48%;
-  border-radius: 80rpx;
-  padding-bottom: 40rpx;
-}
-
-.guess-section .guess-item:nth-child(2n+1) {
-  margin-right: 4%;
-}
-
-.guess-section .image-wrapper {
-  width: 100%;
-  height: 210rpx;
-  border-radius: 3px;
-  overflow: hidden;
-}
-
-.guess-section .image-wrapper image {
-  width: 100%;
-  height: 100%;
-  opacity: 1;
-}
-
-.guess-section .title {
-  font-size: 26rpx;
-  color: #303133;
-  font-weight: 700;
-}
-
-.guess-section .info {
-  padding: 0rpx 20rpx;
-  float: left;
-  margin-left: 0rpx;
-}
-
-.guess-section .info .price {
-  font-size: 26rpx;
-  float: left;
-}
-
-.guess-section .info .xs {
-  font-size: 26rpx;
-  margin-left: 20rpx;
-  float: left;
-}
-
-
-.item-img{
-  height: 388rpx;
-  position: relative;
-}
-
-.circle {
-  border-radius: 50px;
-  height: 50px;
-  position: absolute;
-  width: 50px;
-  z-index: 9998;
-  color: #fff;
-  background: #000;
-  opacity: 0.6;
-  left: 50%;
-  margin-left: -50rpx;
-  text-align: center;
-  margin-top: -160rpx;
-}
-
-.circle_inner_play {
-  content: "";
-  display: block;
-  width: 0;
-  height: 0;
-  border-style: solid;
-  border-width: 10px 0 10px 20px;
-  border-color: transparent transparent transparent #fff;
-  position: absolute;
-  top: 50%;
-  left: 50%;
-  margin: -10px 0 0 -7px;
-}
-
-
-
-
-
-
-
-

+ 0 - 127
pages/study/market/index.js

@@ -1,127 +0,0 @@
-//index.js
-//获取应用实例
-const app = getApp()
-
-Page({
-  data: {
-    spinShow: false,
-    buyModel:false,
-    code_url:'',
-    info:{},
-    system: "",
-    userInfo:{},
-    from:0,
-    size: 10,
-    type: '',
-    courseList: []
-  },
-  onLoad: function( options ){
-    let type= options.type||''
-    this.setData({type})
-    let that = this
-    wx.getSystemInfo({
-      success: function(res) {
-        that.setData({system: res.system})
-      }
-    })
-    wx.setNavigationBarTitle({
-      title: type+'-课程购买'
-    })
-  },
-  gotoCourse( e ){
-    let courseId = e.currentTarget.dataset.id;
-    wx.navigateTo({
-      url: `/pages/study/course/index?courseId=${courseId}`,
-    })
-  },
-  onShow: function () {
-    app.getUserInfo( userInfo =>{
-      this.setData({userInfo})
-      this.indexLoad()
-    })
-  },
-  onPullDownRefresh() {
-    if (!this.loading) {
-      this.setData({from:0, courseList:[]})
-      this.indexLoad( this.stopPullDownRefresh )
-    }
-  },
-  onReachBottom() {
-    if (!this.loading && this.data.from > -1) {
-      this.indexLoad(  )
-    }
-  },
-  stopPullDownRefresh(){
-    wx.stopPullDownRefresh()
-  },
-  indexLoad: function( cb ) {
-    let param ={ 
-      from: this.data.from,
-      size: this.data.size,
-      type: this.data.type,
-    }
-    let courseList = this.data.courseList;
-    app.formPost('Study.getWxCourseMarket', param).then(res => {
-      if (res.code === 200) {
-        if( param.from == 0){
-          courseList = [];
-        }
-        this.setData({
-          from: res.data.from,
-          courseList: courseList.concat(res.data.list),
-        });
-       cb&&cb() 
-      }
-    })
-  },
-  downloadFile: function(){
-    let url = this.data.info.code_url
-    util.downloadFile( url, res=>{
-      this.setData({buyModel:false, code_url:''})
-    } )
-  },
-  doWxPay( data ){
-    let that = this
-    wx.requestPayment({
-      timeStamp: data.timeStamp,
-      nonceStr: data.nonceStr,
-      package: data.package, 
-      signType: data.signType,
-      paySign: data.paySign,
-      success: function (event) {
-        wx.showModal({
-          title: '支付成功',
-          showCancel: false,
-          content: '本次共支付费用¥'+(data.fee/100)+'元'+ `\n\n试卷更新可能延迟,请耐心等待`,
-          success(res) {
-            that.indexLoad()
-          }
-        })
-      }
-    })
-  },
-  startWxpay(e){
-    let courseId = +e.currentTarget.dataset.id
-    let system = this.data.system
-    app.formPost('User.PayCourse', {courseId, system}).then(res => {
-      if (res.code === 200) {
-        if( res.data.payType=="free" ){
-          this.indexLoad()
-        }else if (res.data.payType=="qrcode"){
-          this.setData({info: res.data, buyModel:true})
-        }else{
-          this.doWxPay( res.data )
-        }
-      }
-    })
-  },
-
-  onShareAppMessage: function(){
-
-  },
-  gotoError: function(){
-    wx.navigateTo({
-      url: '/pages/exam/error/index',
-    })
-  }
-})

Some files were not shown because too many files changed in this diff