Bladeren bron

第一模式

y595705120 2 jaren geleden
bovenliggende
commit
4f496c47f6
99 gewijzigde bestanden met toevoegingen van 161 en 2226 verwijderingen
  1. 2 11
      app.json
  2. BIN
      assets/carousel/1.png
  3. BIN
      assets/carousel/2.png
  4. BIN
      assets/carousel/3.png
  5. BIN
      assets/carousel/4.png
  6. BIN
      assets/nav/1.png
  7. BIN
      assets/nav/2.png
  8. BIN
      assets/nav/3.png
  9. BIN
      assets/nav/4.png
  10. BIN
      assets/nav/n1.png
  11. BIN
      assets/nav/n2.png
  12. BIN
      assets/nav/n3.png
  13. 0 29
      component/iView/badge/index.js
  14. 0 3
      component/iView/badge/index.json
  15. 0 5
      component/iView/badge/index.wxml
  16. 0 1
      component/iView/badge/index.wxss
  17. 0 46
      component/iView/collapse-item/index.js
  18. 0 7
      component/iView/collapse-item/index.json
  19. 0 9
      component/iView/collapse-item/index.wxml
  20. 0 1
      component/iView/collapse-item/index.wxss
  21. 0 31
      component/iView/collapse/index.js
  22. 0 3
      component/iView/collapse/index.json
  23. 0 4
      component/iView/collapse/index.wxml
  24. 0 0
      component/iView/collapse/index.wxss
  25. 0 38
      component/iView/radio-group/index.js
  26. 0 7
      component/iView/radio-group/index.json
  27. 0 3
      component/iView/radio-group/index.wxml
  28. 0 0
      component/iView/radio-group/index.wxss
  29. 0 56
      component/iView/radio/index.js
  30. 0 7
      component/iView/radio/index.json
  31. 0 8
      component/iView/radio/index.wxml
  32. 0 69
      component/iView/rate/index.js
  33. 0 6
      component/iView/rate/index.json
  34. 0 23
      component/iView/rate/index.wxml
  35. 0 1
      component/iView/rate/index.wxss
  36. 0 50
      component/iView/tab/index.js
  37. 0 7
      component/iView/tab/index.json
  38. 0 9
      component/iView/tab/index.wxml
  39. 0 1
      component/iView/tab/index.wxss
  40. 0 56
      component/iView/tabs/index.js
  41. 0 3
      component/iView/tabs/index.json
  42. 0 2
      component/iView/tabs/index.wxml
  43. 0 1
      component/iView/tabs/index.wxss
  44. 0 104
      pages/exam/answer/answer.js
  45. 0 17
      pages/exam/answer/answer.json
  46. 0 116
      pages/exam/answer/answer.wxml
  47. 0 97
      pages/exam/answer/answer.wxss
  48. 0 21
      pages/exam/answerIndex/index.wxml
  49. 0 3
      pages/exam/answerIndex/index.wxss
  50. 11 2
      pages/exam/collection/index.js
  51. 1 4
      pages/exam/collection/index.json
  52. 19 11
      pages/exam/collection/index.wxml
  53. 0 171
      pages/exam/do/index.js
  54. 0 17
      pages/exam/do/index.json
  55. 0 139
      pages/exam/do/index.wxml
  56. 0 97
      pages/exam/do/index.wxss
  57. 0 46
      pages/exam/error/index.js
  58. 0 14
      pages/exam/error/index.json
  59. 0 21
      pages/exam/error/index.wxml
  60. 0 1
      pages/exam/error/index.wxss
  61. 0 27
      pages/exam/group/group.js
  62. 0 9
      pages/exam/group/group.json
  63. 0 30
      pages/exam/group/group.wxml
  64. 0 1
      pages/exam/group/group.wxss
  65. 8 2
      pages/exam/home/index.js
  66. 2 5
      pages/exam/home/index.json
  67. 53 0
      pages/exam/home/index.wxml
  68. 14 0
      pages/exam/home/index.wxss
  69. 1 4
      pages/exam/index/index.json
  70. 0 77
      pages/exam/paper/paper.js
  71. 0 18
      pages/exam/paper/paper.json
  72. 0 113
      pages/exam/paper/paper.wxml
  73. 0 97
      pages/exam/paper/paper.wxss
  74. 0 52
      pages/exam/read/index.js
  75. 0 18
      pages/exam/read/index.json
  76. 0 95
      pages/exam/read/index.wxml
  77. 0 136
      pages/exam/read/index.wxss
  78. 0 47
      pages/exam/record/index.js
  79. 0 14
      pages/exam/record/index.json
  80. 0 21
      pages/exam/record/index.wxml
  81. 0 1
      pages/exam/record/index.wxss
  82. 1 4
      pages/index/index.json
  83. 1 4
      pages/newExam/home/index.json
  84. 1 1
      pages/newExam/home/index.wxml
  85. 3 3
      pages/newExam/mockExam/index.js
  86. 0 2
      pages/newExam/mockExam/index.json
  87. 2 2
      pages/newExam/orderTest/index.js
  88. 1 4
      pages/newExam/orderTest/index.json
  89. 1 4
      pages/study/course/index.json
  90. 0 2
      pages/study/exam/index.json
  91. 1 4
      pages/study/index/index.json
  92. 1 4
      pages/study/market/index.json
  93. 1 4
      pages/train/index/index.json
  94. 1 4
      pages/train/limit/index.json
  95. 0 2
      pages/train/limitDo/index.json
  96. 1 4
      pages/train/limitHome/index.json
  97. 21 16
      pages/train/orderTest/answer.js
  98. 2 5
      pages/train/orderTest/answer.json
  99. 12 12
      pages/train/orderTest/answer.wxml

+ 2 - 11
app.json

@@ -5,17 +5,10 @@
     
     "pages/newExam/mockExam/index",
     "pages/exam/collection/index",
-    
     "pages/newExam/home/index",
     "pages/my/index/index",
     "pages/exam/index/index",
-    "pages/exam/answerIndex/index",
-    "pages/exam/answer/answer",
-    "pages/exam/group/group",
-    "pages/exam/paper/paper",
-    "pages/exam/do/index",
     "pages/exam/home/index",
-    "pages/exam/orderTest/answer",
     "pages/study/exam/index",
     "pages/user/identify/index",
     "pages/study/course/index",
@@ -26,15 +19,11 @@
     "pages/user/register/index",
     "pages/my/message/info/index",
     "pages/my/message/list/index",
-    "pages/exam/read/index",
-    "pages/exam/error/index",
-    "pages/exam/record/index",
     "pages/post/post",
     "pages/train/index/index",
     "pages/train/limitHome/index",
     "pages/train/limitDo/index",
     "pages/train/limit/index",
-    
     "pages/newExam/orderTest/index"
     
   ],
@@ -82,5 +71,7 @@
     "navigationBarTextStyle": "black",
     "backgroundTextStyle": "dark"
   },
+  
+  "lazyCodeLoading": "requiredComponents",
   "sitemapLocation": "sitemap.json"
 }

BIN
assets/carousel/1.png


BIN
assets/carousel/2.png


BIN
assets/carousel/3.png


BIN
assets/carousel/4.png


BIN
assets/nav/1.png


BIN
assets/nav/2.png


BIN
assets/nav/3.png


BIN
assets/nav/4.png


BIN
assets/nav/n1.png


BIN
assets/nav/n2.png


BIN
assets/nav/n3.png


+ 0 - 29
component/iView/badge/index.js

@@ -1,29 +0,0 @@
-Component({
-    externalClasses: ['i-class', 'i-class-alone'],
-
-    properties: {
-        count: {
-            type: Number,
-            value: 0,
-            observer: 'finalCount'
-        },
-        overflowCount: {
-            type: Number,
-            value: 99
-        },
-        dot: {
-            type: Boolean,
-            value: false
-        },
-    },
-    data: {
-        finalCount: 0
-    },
-    methods: {
-        finalCount() {
-            this.setData({
-                finalCount: parseInt(this.data.count) >= parseInt(this.data.overflowCount) ? `${this.data.overflowCount}+` : this.data.count
-            });
-        },
-    }
-});

+ 0 - 3
component/iView/badge/index.json

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

+ 0 - 5
component/iView/badge/index.wxml

@@ -1,5 +0,0 @@
-<view class="i-class i-badge">
-    <slot></slot>
-    <view class="i-badge-dot" wx:if="{{ dot }}"></view>
-    <view class="i-badge-count i-class-alone" wx:elif="{{ count !== 0 }}">{{ finalCount }}</view>
-</view>

+ 0 - 1
component/iView/badge/index.wxss

@@ -1 +0,0 @@
-.i-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.i-badge-count{position:absolute;transform:translateX(50%);top:-6px;right:0;height:18px;border-radius:9px;min-width:18px;background:#ed3f14;border:1px solid transparent;color:#fff;line-height:18px;text-align:center;padding:0 5px;font-size:12px;white-space:nowrap;transform-origin:-10% center;z-index:10;box-shadow:0 0 0 1px #fff;box-sizing:border-box;text-rendering:optimizeLegibility}.i-badge-count-alone{top:auto;display:block;position:relative;transform:translateX(0)}.i-badge-dot{position:absolute;transform:translateX(-50%);transform-origin:0 center;top:-4px;right:-8px;height:8px;width:8px;border-radius:100%;background:#ed3f14;z-index:10;box-shadow:0 0 0 1px #fff}

+ 0 - 46
component/iView/collapse-item/index.js

@@ -1,46 +0,0 @@
-Component({
-    externalClasses: ['i-class-content', 'i-class-title', 'i-class'],
-
-    relations: {
-        '../collapse/index': {
-            type: 'parent',
-            linked: function (target) {
-                const options = {
-                    accordion: target.data.accordion
-                }
-                if (target.data.name === this.data.name) {
-                    options.showContent = 'i-collapse-item-show-content';
-                }
-                this.setData(options);
-            }
-        }
-    },
-
-    properties: {
-        title: String,
-        name: String
-    },
-
-    data: {
-        showContent: '',
-        accordion: false
-    },
-
-    options: {
-        multipleSlots: true
-    },
-
-    methods: {
-        trigger(e) {
-            const data = this.data;
-            if (data.accordion) {
-                this.triggerEvent('collapse', {name: data.name}, {composed: true, bubbles: true});
-            } else {
-                this.setData({
-                    showContent: data.showContent ? '' : 'i-collapse-item-show-content'
-                });
-            }
-        },
-    }
-});
-

+ 0 - 7
component/iView/collapse-item/index.json

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

+ 0 - 9
component/iView/collapse-item/index.wxml

@@ -1,9 +0,0 @@
-<view id="{{name}}" class="i-class i-collapse-item ">
-    <view class="i-collapse-item-title-wrap" bindtap="trigger">
-        <i-icon size="16" type="enter" i-class="{{ showContent ? 'i-collapse-item-arrow-show' : 'i-collapse-item-arrow' }}"/>
-        <text class="i-collapse-item-title i-class-title">{{title}}</text>
-    </view>
-    <view class="i-collapse-item-content {{showContent}}  i-class-content">
-        <slot name="content"></slot>
-    </view>
-</view>

+ 0 - 1
component/iView/collapse-item/index.wxss

@@ -1 +0,0 @@
-.i-collapse-item{padding:2px 8px;border-top:1px solid #dddee1}.i-collapse-item-title{vertical-align:middle}.i-collapse-item-title-wrap{padding:2px 0 0}.i-collapse-item-content{padding:6px;display:none}.i-collapse-item-show-content{display:block}.i-collapse-item-arrow{transition:transform .2s ease-in-out}.i-collapse-item-arrow-show{transition:transform .2s ease-in-out;transform:rotate(90deg)}

+ 0 - 31
component/iView/collapse/index.js

@@ -1,31 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../collapse-item/index': {
-            type: 'child'
-        }
-    },
-    properties: {
-        name: String,
-        accordion: Boolean
-    },
-    methods: {
-        clickfn(e) {
-            const params = e.detail;
-            const allList = this.getRelationNodes('../collapse-item/index');
-            allList.forEach((item) => {
-                if (params.name === item.data.name) {
-                    item.setData({
-                        showContent: 'i-collapse-item-show-content'
-                    });
-                } else {
-                    item.setData({
-                        showContent: ''
-                    });
-                }
-            });
-        },
-    }
-});
-

+ 0 - 3
component/iView/collapse/index.json

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

+ 0 - 4
component/iView/collapse/index.wxml

@@ -1,4 +0,0 @@
-<view class="i-class i-collapse" bindcollapse="clickfn">
-  <slot></slot>
-</view>
-

+ 0 - 0
component/iView/collapse/index.wxss


+ 0 - 38
component/iView/radio-group/index.js

@@ -1,38 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    relations: {
-        '../radio/index': {
-            type: 'child',
-            linked() {
-                this.changeCurrent();
-            },
-            linkChanged() {
-                this.changeCurrent();
-            },
-            unlinked() {
-                this.changeCurrent();
-            }
-        }
-    },
-    properties: {
-        current: {
-            type: String,
-            value: '',
-            observer: 'changeCurrent'
-        },
-    },
-    methods: {
-        changeCurrent(val = this.data.current) {
-            let items = this.getRelationNodes('../radio/index');
-            const len = items.length;
-            if (len > 0) {
-                items.forEach(item => {
-                    item.changeCurrent(val === item.data.value);
-                });
-            }
-        },
-        emitEvent(current) {
-            this.triggerEvent('change', current);
-        }
-    }
-});

+ 0 - 7
component/iView/radio-group/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-cell-group": "../cell-group/index"
-    }
-}

+ 0 - 3
component/iView/radio-group/index.wxml

@@ -1,3 +0,0 @@
-<i-cell-group class="i-class">
-    <slot></slot>
-</i-cell-group>

+ 0 - 0
component/iView/radio-group/index.wxss


+ 0 - 56
component/iView/radio/index.js

@@ -1,56 +0,0 @@
-const prefixCls = 'i-radio';
-
-Component({
-    externalClasses: ['i-class'],
-    relations: {
-        '../radio-group/index': {
-            type: 'parent'
-        }
-    },
-    properties: {
-        value: {
-            type: String,
-            value: ''
-        },
-        checked: {
-            type: Boolean,
-            value: false
-        },
-        disabled: {
-            type: Boolean,
-            value: false
-        },
-        color: {
-            type: String,
-            value: '#2d8cf0'
-        },
-        position: {
-            type: String,
-            value: 'left', //left right
-            observer: 'setPosition'
-        }
-    },
-    data: {
-        checked: true,
-        positionCls: `${prefixCls}-radio-left`,
-    },
-    attached() {
-        this.setPosition();
-    },
-    methods: {
-        changeCurrent(current) {
-            this.setData({ checked: current });
-        },
-        radioChange() {
-            if (this.data.disabled) return;
-            const item = { current: !this.data.checked, value: this.data.value };
-            const parent = this.getRelationNodes('../radio-group/index')[0];
-            parent ? parent.emitEvent(item) : this.triggerEvent('change', item);
-        },
-        setPosition() {
-            this.setData({
-                positionCls: this.data.position.indexOf('left') !== -1 ? `${prefixCls}-radio-left` : `${prefixCls}-radio-right`,
-            });
-        }
-    }
-});

+ 0 - 7
component/iView/radio/index.json

@@ -1,7 +0,0 @@
-{
-    "component": true,
-    "usingComponents":
-    {
-        "i-cell": "../cell/index"
-    }
-}

+ 0 - 8
component/iView/radio/index.wxml

@@ -1,8 +0,0 @@
-<view class="i-class i-radio" catchtap="radioChange">
-    <i-cell i-class="i-radio-cell">
-        <label>
-            <radio value="{{value}}" checked="{{checked}}" color="{{checked?color:''}}" disabled="{{disabled}}" class="i-radio-radio {{positionCls}}" />
-            <view class="i-radio-title">{{value}}</view>
-        </label>
-    </i-cell>
-</view>

+ 0 - 69
component/iView/rate/index.js

@@ -1,69 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-    properties : {
-        count : {
-            type : Number,
-            value : 5
-        },
-        value : {
-            type : Number,
-            value : 0
-        },
-        disabled : {
-            type : Boolean,
-            value : false
-        },
-        size : {
-            type : Number,
-            value : 20
-        },
-        name : {
-            type : String,
-            value : ''
-        }
-    },
-    data : {
-        touchesStart : {
-            pageX : 0
-        }
-    },
-    methods : {
-        handleClick(e){
-            const data = this.data;
-            if( data.disabled ){
-                return;
-            }
-            const index = e.currentTarget.dataset.index;
-            this.triggerEvent('change',{
-                index : index + 1
-            })
-        },
-        handleTouchMove(e){
-            const data = this.data;
-            if( data.disabled ){
-                return;
-            }
-            if( !e.changedTouches[0] ){
-                return;
-            }
-            const movePageX =  e.changedTouches[0].pageX;
-            const space = movePageX - data.touchesStart.pageX;
-
-            if( space <= 0 ){
-                return;
-            }
-            let setIndex = Math.ceil( space/data.size );
-            setIndex = setIndex  > data.count ? data.count : setIndex ;
-            this.triggerEvent('change',{
-                index : setIndex 
-            })
-        }
-    },
-    ready(){
-       const className = '.i-rate';
-        var query = wx.createSelectorQuery().in(this)
-        query.select( className ).boundingClientRect((res)=>{
-            this.data.touchesStart.pageX = res.left || 0;
-        }).exec()
-    }
-});

+ 0 - 6
component/iView/rate/index.json

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

+ 0 - 23
component/iView/rate/index.wxml

@@ -1,23 +0,0 @@
-<view class="i-class i-rate" 
-    bindtouchmove="handleTouchMove">
-    <input type="text" :name="name" wx:value="{{value}}" class="i-rate-hide-input" />
-    <view
-        wx:for="{{count}}"
-        wx:key="item" 
-        class="i-rate-star {{ parse.getCurrent( value,index ) }}" 
-        data-index="{{index}}" 
-        bindtap="handleClick">
-        <i-icon type="collection_fill" size="{{size}}"></i-icon>
-    </view>
-    <view class="i-rate-text" wx:if="{{ value !== 0 }}"><slot></slot></view>
-</view>
-<wxs module="parse">
-var prefixCls = 'i-rate';
-module.exports = {
-    getCurrent : function( value,index ){
-        if( index < value  ){
-            return prefixCls + '-current'
-        }
-    }
-}
-</wxs>

+ 0 - 1
component/iView/rate/index.wxss

@@ -1 +0,0 @@
-.i-rate{margin:0;padding:0;font-size:20px;display:inline-block;vertical-align:middle;font-weight:400;font-style:normal}.i-rate-hide-input{display:none}.i-rate-star{display:inline-block;color:#e9e9e9}.i-rate-current{color:#f5a623}.i-rate-text{display:inline-block;vertical-align:middle;margin-left:6px;font-size:14px}

+ 0 - 50
component/iView/tab/index.js

@@ -1,50 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../tabs/index': {
-            type: 'parent'
-        }
-    },
-
-    properties: {
-        key: {
-            type: String,
-            value: ''
-        },
-        title: {
-            type: String,
-            value: ''
-        },
-        dot: {
-            type: Boolean,
-            value: false
-        },
-        count: {
-            type: Number,
-            value: 0
-        }
-    },
-
-    data: {
-        current: false,
-        currentColor: '',
-        scroll: false
-    },
-
-    methods: {
-        changeCurrent (current) {
-            this.setData({ current });
-        },
-        changeCurrentColor (currentColor) {
-            this.setData({ currentColor });
-        },
-        changeScroll (scroll) {
-            this.setData({ scroll });
-        },
-        handleClickItem () {
-            const parent = this.getRelationNodes('../tabs/index')[0];
-            parent.emitEvent(this.data.key);
-        }
-    }
-});

+ 0 - 7
component/iView/tab/index.json

@@ -1,7 +0,0 @@
-{
-  "component": true,
-  "usingComponents":
-  {
-    "i-badge": "../badge/index"
-  }
-}

+ 0 - 9
component/iView/tab/index.wxml

@@ -1,9 +0,0 @@
-<view class="i-class i-tabs-tab {{ scroll ? 'i-tabs-tab-scroll' : '' }} {{ current ? 'i-tabs-tab-current' : '' }}">
-    <i-badge dot="{{ dot }}" count="{{ dot ? 0 : count }}">
-        <view bindtap="handleClickItem">
-            <view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:if="{{ current && currentColor }}" style="color: {{ currentColor }}">{{ title }}</view>
-            <view class="i-tabs-tab-title {{ current ? 'i-tabs-tab-title-current' : '' }}" wx:else>{{ title }}</view>
-        </view>
-    </i-badge>
-    <view class="i-tabs-tab-bar" wx:if="{{ current }}" style="background: {{ currentColor }}"></view>
-</view>

+ 0 - 1
component/iView/tab/index.wxss

@@ -1 +0,0 @@
-.i-tabs-tab{flex:1;display:flex;width:100%;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;text-align:center;position:relative}.i-tabs-tab-bar{display:block;width:100%;height:2px;background:0 0;position:absolute;bottom:0;left:0;background:#2d8cf0}.i-tabs-tab-title{font-size:14px;text-align:center;box-sizing:border-box;color:#80848f}.i-tabs-tab-title-current{color:#2d8cf0}.i-tabs-tab-scroll{display:inline-block;width:60px}

+ 0 - 56
component/iView/tabs/index.js

@@ -1,56 +0,0 @@
-Component({
-    externalClasses: ['i-class'],
-
-    relations: {
-        '../tab/index': {
-            type: 'child',
-            linked () {
-                this.changeCurrent();
-            },
-            linkChanged () {
-                this.changeCurrent();
-            },
-            unlinked () {
-                this.changeCurrent();
-            }
-        }
-    },
-
-    properties: {
-        current: {
-            type: String,
-            value: '',
-            observer: 'changeCurrent'
-        },
-        color: {
-            type: String,
-            value: ''
-        },
-        scroll: {
-            type: Boolean,
-            value: false
-        },
-        fixed: {
-            type: Boolean,
-            value: false
-        }
-    },
-
-    methods: {
-        changeCurrent (val = this.data.current) {
-            let items = this.getRelationNodes('../tab/index');
-            const len = items.length;
-
-            if (len > 0) {
-                items.forEach(item => {
-                    item.changeScroll(this.data.scroll);
-                    item.changeCurrent(item.data.key === val);
-                    item.changeCurrentColor(this.data.color);
-                });
-            }
-        },
-        emitEvent (key) {
-            this.triggerEvent('change', { key });
-        }
-    }
-});

+ 0 - 3
component/iView/tabs/index.json

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

+ 0 - 2
component/iView/tabs/index.wxml

@@ -1,2 +0,0 @@
-<scroll-view wx:if="{{ scroll }}" scroll-x="true" class="i-class i-tabs i-tabs-scroll {{ fixed ? 'i-tabs-fixed' : '' }}"><slot></slot></scroll-view>
-<view wx:else class="i-class i-tabs {{ fixed ? 'i-tabs-fixed' : '' }}"><slot></slot></view>

+ 0 - 1
component/iView/tabs/index.wxss

@@ -1 +0,0 @@
-.i-tabs{display:flex;width:100%;height:42px;line-height:42px;box-sizing:border-box;position:relative;justify-content:space-around;align-items:center;-webkit-box-align:center;background:#fff}.i-tabs::after{content:'';position:absolute;top:0;left:0;width:200%;height:200%;transform:scale(.5);transform-origin:0 0;pointer-events:none;box-sizing:border-box;border:0 solid #e9eaec;border-bottom-width:1px}.i-tabs-scroll{display:block;overflow-x:auto;white-space:nowrap}.i-tabs-fixed{position:fixed;top:0;z-index:2}

+ 0 - 104
pages/exam/answer/answer.js

@@ -1,104 +0,0 @@
-let app = getApp()
-Page({
-  data: {
-    preList:["A","B","C", "D", "E", "F"],
-    info:{},
-    total:0,
-    unfinish:0,
-    answerId:0,
-    type:1,
-    types:{
-      1:'判断题',
-      2:'单选题',
-      3:'多选题',
-      4:'案例题'
-    },
-    groupId:0
-  },
-  onLoad: function(options) {
-    let groupId = +options.groupId||1;
-    let type = +options.type||1;
-    let total = +options.count ||0;
-    this.setData({ groupId, type, total });
-  },
-
-  onShow: function(){
-    app.checkLogin( userInfo =>{
-      this.setData({userInfo, from:0})
-      this.loadAnswer()
-    })
-  },
-  loadAnswer(  ){
-    let {groupId, type} = this.data
-    app.formPost('Exam.LoadAnswer', {groupId, type}).then(res => {
-      if (res.code ==200) {
-        let {unfinish, info} = res.data
-        let answerId = info&&info.answerId||0;
-        this.setData({unfinish, info, answerId})
-      }
-    })
-  },
-  checkAnswer( e ){
-    let item = this.data.item;
-    if( !item.select ){
-      app.message("还未作答", 'error')
-      return;
-    }
-    let param = {answerId: item.answerId}
-    // 多选
-    if( item.type == mulSelect ){
-      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 info = this.data.info
-    info.select = +e.detail.value
-    this.setData( {info} );
-  },
-  checkboxChange( e ){
-    let info = this.data.info
-    info.select = +e.detail.value.sort().join("")
-    let result = ""+info.result
-    if (info.select == result ){
-      info._select = true
-    }else{
-      for( let i in e.detail.value){
-        if(result.indexOf( e.detail.value[i] )==-1 ){
-          info._select = true
-        }
-      }
-    }
-    this.setData( {info} );
-  },
-  restartAnswer(){
-    let {groupId,  type, total} = this.data
-    let answerId=0
-    let unfinish = total
-    app.formPost('Exam.finishAnswer', {groupId, answerId, type}).then(res => {
-      if (res.code ==200) {
-        let info = res.data
-        let answerId = info.answerId
-        this.setData({info, answerId, unfinish})
-      }
-    })
-  },
-  finishAnswer( ){
-    let {groupId, answerId, unfinish, type} = this.data
-    let correct = this.data.info.select == this.data.info.result?1:0;
-    app.formPost('Exam.finishAnswer', {groupId, answerId, type, correct}).then(res => {
-      if (res.code ==200) {
-        let info = res.data
-        let answerId = info.answerId
-        unfinish = unfinish-1
-        this.setData({info, answerId, unfinish})
-      }
-    })
-  }
-})

+ 0 - 17
pages/exam/answer/answer.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 - 116
pages/exam/answer/answer.wxml

@@ -1,116 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-
-
-
-<view class="exam-page p10" wx:if="{{answerId>0}}">
-
-  <view class="view-wrap">
-    <view class="exam-count-down" >
-     {{types[type]}} ({{unfinish}}/{{total}})
-    </view>
-  </view>
-
-  <i-panel i-class="exam-panel-title">
-    <i-cell-group i-class="exam-cell">
-      <!-- 单选题 -->
-      <i-cell wx:if="{{info.type ==2}}">
-        <view class="single">
-          <rich-text nodes="[单]{{info.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="{{info['answer'+(index+1)]}}">
-              <view class="radio-answer">
-                <radio color="#2d8cf0" value="{{index+1}}" checked="{{info.select==index+1}}"
-                  disabled="{{info.select>0?true:false}}">
-                  {{preList[index]}}. {{info['answer'+(index+1)]}}
-                </radio>
-              </view>
-            </label>
-          </radio-group>
-
-          <view class="exam-clear mt20" wx:if="{{info.select>0}}">
-            <view class="exam-extend-item">
-              答题结果:
-              <text class="question-answer-right question-answer-result" wx:if="{{info.select==info.result}}">正确
-              </text>
-              <text class="question-answer-error question-answer-result" wx:else>错误</text>
-            </view>
-
-            <view class="exam-extend-item">
-              正确答案:
-              <text wx:if="{{info.type==2}}"> {{preList[info.result-1]}}</text>
-            </view>
-          </view>
-        </view>
-      </i-cell>
-      <!-- 多选题 -->
-      <i-cell wx:if="{{info.type==3}}">
-        <view>
-          <rich-text nodes="[多]{{info.title}}" />
-          <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:key=""
-              wx:if="{{info['answer'+(index+1)]}}">
-              <view class="checkbox-answer">
-                <checkbox color="#2d8cf0" value="{{index+1}}" disabled="{{!!info._select}}"
-                  checked="{{filter.isSelect(index+1,info.select)}}">
-                  {{answer}}. {{info['answer'+(index+1)]}}
-                </checkbox>
-              </view>
-            </label>
-          </checkbox-group>
-        </view>
-
-        <view class="exam-clear mt20" wx:if="{{isFinish || info._select}}">
-          <view class="exam-extend-item">
-            答题结果:
-            <text class="question-answer-right question-answer-result" wx:if="{{info.select==info.result}}">正确
-            </text>
-            <text class="question-answer-error question-answer-result" wx:else>错误</text>
-          </view>
-          <view class="exam-extend-item">
-            正确答案:
-            <text> {{filter.getMultResult(info.result)}}</text>
-          </view>
-        </view>
-
-      </i-cell>
-      <!-- 判断 -->
-      <i-cell wx:if="{{info.type==1}}">
-        <view>
-          <rich-text nodes="[判]{{info.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="{{info.select==index+1}}"
-                  disabled="{{info.select>0?true:false}}">
-                  {{preList[index]}}. {{info['answer'+(index+1)]}}
-                </radio>
-              </view>
-            </label>
-          </radio-group>
-        </view>
-        <view class="exam-clear mt20" wx:if="{{ info.select>0}}">
-          <view class="exam-extend-item">
-            答题结果:
-            <text class="question-answer-right question-answer-result" wx:if="{{info.select==info.result}}">正确
-            </text>
-            <text class="question-answer-error question-answer-result" wx:else>错误</text>
-          </view>
-          <view class="exam-extend-item">
-            正确答案:
-            <text> {{info.result==1?'正确':'错误'}}</text>
-          </view>
-        </view>
-      </i-cell>
-    </i-cell-group>
-  </i-panel>
-
-  <view class="mt50">
-    <button class="i-btn  i-btn-primary i-btn-square" bindtap='finishAnswer'>下一题</button>
-  </view>
-</view>
-
-<view wx:else style="text-align:center;margin-top:40rpx">
-  <button class="i-btn  i-btn-primary i-btn-square" bindtap='restartAnswer'>重新再刷一遍</button>
-</view>

+ 0 - 97
pages/exam/answer/answer.wxss

@@ -1,97 +0,0 @@
-/* pages/exam/paper/paper.wxss */.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;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 20rpx;
-}
-
-.exam-extend-item {
-  padding: 4px;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}

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

@@ -1,21 +0,0 @@
-<view wx:for="{{tableData}}" wx:key="item">
-  <i-button wx:if="{{item.type==1}}"
-    bindtap="gotoAnswer" data-item="{{item}}" type="info" open-type="navigate" class="m20">
-    <text type="primary">判断题 【{{item.count}}】</text>
-  </i-button>
-  <i-button wx:if="{{item.type==2}}"
-    bindtap="gotoAnswer" data-item="{{item}}" 
-    type="primary" open-type="navigate" class="m20">
-    <text type="primary"> 单选题 【{{item.count}}】</text>
-  </i-button>
-  <i-button wx:if="{{item.type==3}}"
-    bindtap="gotoAnswer" data-item="{{item}}" 
-    type="warning" open-type="navigate" class="m20">
-    <text type="primary"> 多选题 【{{item.count}}】</text>
-  </i-button>
-  <i-button wx:if="{{item.type==4}}"
-    bindtap="gotoAnswer" data-item="{{item}}" 
-    type="error" open-type="navigate" class="m20">
-    <text type="primary"> 案例题 【{{item.count}}】小题</text>
-  </i-button>
-</view>

+ 0 - 3
pages/exam/answerIndex/index.wxss

@@ -1,3 +0,0 @@
-swiper image {
-  width: 100%;
-}

+ 11 - 2
pages/exam/collection/index.js

@@ -37,8 +37,7 @@ Page({
     let list = this.data.list
     list[index].select = +e.detail.value
     this.setData( {list} );
-    if( list[index].select== list[index].result  ) this.delAnswer(+list[index].id )
-
+    this.delAnswer( list[index].id )
   },
   checkboxChange( e ){
     let index = e.currentTarget.dataset.index;
@@ -67,6 +66,7 @@ Page({
   },
   onPullDownRefresh() {
     if (!this.loading) {
+      this.setData({list:[], from:0})
       this.loadData( this.stopPullDownRefresh )
     }
   },
@@ -79,6 +79,15 @@ Page({
     wx.stopPullDownRefresh()
   },
   delAnswer( id  ){
+    id = ''+id
+    let list = this.data.list
+    for( let i in list){
+      if( list[i].id == id ){
+        if(list[i].select != list[i].result){
+          return
+        }
+      }
+    }
     app.formPost('Exam.DelErrorAnswer', {id}).then(res => {
     }) 
   }

+ 1 - 4
pages/exam/collection/index.json

@@ -3,15 +3,12 @@
     "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-button": "/component/iView/button/index",
-    "i-rate": "/component/iView/rate/index"
+    "i-button": "/component/iView/button/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "我的错题"

+ 19 - 11
pages/exam/collection/index.wxml

@@ -10,7 +10,7 @@
 			<!-- 单选题 -->
 			<i-cell wx:if="{{item.type ==2}}">
 				<view class="single">
-					<rich-text nodes="{{index+1}}.[单]{{item.title}}" />
+					<rich-text nodes="{{index+1}}.[{{item.parentId>0?'案':'单'}}]{{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)]}}">
@@ -41,15 +41,15 @@
 			<!-- 多选题 -->
 			<i-cell wx:if="{{item.type==3}}">
 				<view>
-					<rich-text nodes="{{index+1}}.[多]{{item.title}}" />
+					<rich-text nodes="{{index+1}}.[{{item.parentId>0?'案':'多'}}]{{item.title}}" />
 					<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:key=""
-							wx:if="{{item['answer'+(index+1)]}}">
+						<label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:for-index="sindex"
+							wx:if="{{item['answer'+(sindex+1)]}}">
 							<view class="checkbox-answer">
-								<checkbox color="#2d8cf0" value="{{index+1}}" disabled="{{!!item._select}}"
-									checked="{{filter.isSelect(index+1,item.select)}}">
-									{{answer}}. {{item['answer'+(index+1)]}}
+								<checkbox color="#2d8cf0" value="{{sindex+1}}" disabled="{{!!item._select}}"
+									checked="{{filter.isSelect(sindex+1,item.select)}}">
+									{{answer}}. {{item['answer'+(sindex+1)]}}
 								</checkbox>
 							</view>
 						</label>
@@ -75,13 +75,21 @@
 			<!-- 判断 -->
 			<i-cell wx:if="{{item.type==1}}">
 				<view>
-					<rich-text nodes="{{index+1}}.[判]{{item.title}}" />
+					<rich-text nodes="{{index+1}}.[{{item.parentId>0?'案':'判'}}]{{item.title}}" />
 					<radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-						<label class="radio" wx:for="{{2}}" wx:for-item="answer">
+						<label class="radio">
 							<view class="radio-answer">
-								<radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}"
+								<radio color="#2d8cf0" value="1" checked="{{item.select==1}}"
 									disabled="{{item.select>0?true:false}}">
-									{{preList[index]}}. {{item['answer'+(index+1)]}}
+									{{item['answer1']}}
+								</radio>
+							</view>
+						</label>
+            <label class="radio">
+							<view class="radio-answer">
+								<radio color="#2d8cf0" value="2" checked="{{item.select==2}}"
+									disabled="{{item.select>0?true:false}}">
+									{{item["answer2"]}}
 								</radio>
 							</view>
 						</label>

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

@@ -1,171 +0,0 @@
-import {
-  formatSeconds
-} from '../../../utils/util.js'
-
-let app = getApp()
-let mulSelect = 3
-Page({
-  data: {
-    list: [],
-    redo: false,
-    preList:["A","B","C", "D","E","F"],
-    info:{},
-    id:0,
-    timer: null,
-    doTime: 0,
-    remainTime: 0,
-    remainTimeStr: '',
-    modalShow: false,
-    isFinish: 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
-    let oindex = [2,3,1]
-    app.formPost(method, {groupId}).then(res => {
-      if (res.code ==200) {
-        let {startTime, info, list} = res.data;
-        let duration = info.duration
-        list = list.map(item=>{
-          delete( item["select"])
-          return item
-        })
-        // .sort( (i,j) =>{
-        //   return oindex.indexOf(i.type) >  oindex.indexOf(j.type)?1:-1;
-        // })
-        console.log( list.map( item=>{ return item.type}) )
-        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() {
-    // let id = this.data.id;
-    this.setData({isFinish: true, modalShow:false})
-    // wx.navigateTo({
-    //   url: `/pages/exam/read/index?id=${id}`
-    // })
-  },
-  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("")
-    let result = ""+list[index].result
-    if (list[index].select == result ){
-      list[index]._select = true
-    }
-    for( let i in e.detail.value){
-      if(result.indexOf( e.detail.value[i] )==-1 ){
-        list[index]._select = true
-      }
-    }
-    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{
-          if( item.select ) 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({
-          id: res.data.id,
-          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 - 139
pages/exam/do/index.wxml

@@ -1,139 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-<view class="exam-page">
-  <view class="view-wrap">
-    <view class="exam-count-down" wx:if="{{isFinish}}">已经交卷</view>
-    <view class="exam-count-down" wx:else>{{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==2}}"> 
-            <view class="single">
-              <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}}"  disabled="{{item.select>0?true:false}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-
-              <view class="exam-clear mt20" wx:if="{{isFinish || item.select>0}}" >
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text wx:if="{{item.type==2}}"> {{preList[item.result-1]}}</text>
-                </view>
-              </view>
-            </view>
-          </i-cell>
-          <!-- 多选题 -->
-          <i-cell wx:if="{{item.type==3}}"> 
-            <view >
-              <rich-text nodes="{{index+1}}.[多]{{item.title}}" />
-              <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}}" disabled="{{!!item._select}}">
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </checkbox>
-                  </view>
-                </label>
-                
-              </checkbox-group>
-
-            </view>
-
-            <view class="exam-clear mt20"  wx:if="{{isFinish || item._select}}">
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text> {{filter.getMultResult(item.result)}}</text>
-                </view>
-              </view>
-
-          </i-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="{{2}}" wx:for-item="answer" >
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-            <view class="exam-clear mt20" wx:if="{{isFinish || item.select>0}}" >
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text> {{item.result==1?'正确':'错误'}}</text>
-                </view>
-              </view>
-          </i-cell>
-        </i-cell-group>
-
-      </i-panel>
-
-      <view>
-        <button class="i-btn  i-btn-primary i-btn-square" form-type='submit'  disabled="{{!!isFinish}}">提交</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 - 97
pages/exam/do/index.wxss

@@ -1,97 +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;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 20rpx;
-}
-
-.exam-extend-item {
-  padding: 4px;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}

+ 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 - 27
pages/exam/group/group.js

@@ -1,27 +0,0 @@
-let app = getApp()
-Page({
-  data: {
-    answerId:0,
-    groupId:0,
-    tableData: []
-  },
-  onLoad: function(options) {
-    let groupId = +options.groupId||1;
-    let answerId = +options.answerId||0;
-    this.setData({ groupId, answerId });
-  },
-  onShow: function () {
-    app.checkLogin( userInfo =>{
-      this.setData({userInfo, from:0})
-      this.indexLoad()
-    })
-  },
-  indexLoad: function() {
-    let param = {groupId: this.data.groupId}
-    app.formPost('Exam.GetWxGroupPaperList', param ).then(res => {
-      if( res.code == 200){
-        this.setData({tableData: res.data})
-      }
-    })
-  }
-})

+ 0 - 9
pages/exam/group/group.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "i-cell-group": "/component/iView/cell-group/index",
-    "i-cell": "/component/iView/cell/index",
-    "i-icon": "/component/iView/icon/index",
-    "i-message": "/component/iView/message/index",
-    "i-spin": "/component/iView/spin/index"
-  }
-}

+ 0 - 30
pages/exam/group/group.wxml

@@ -1,30 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-
-<view class="cate-section">
-  <navigator class="cate-item"  url="/pages/exam/answerIndex/index?groupId={{groupId}}" >
-    <i-icon type="other" size="40" color="#e96900a0" />
-    <text>顺序答题</text>
-  </navigator>
-
-  <navigator class="cate-item"  url="/pages/exam/collection/index?groupId={{groupId}}" >
-    <i-icon type="close" size="40" color="#e96900a0" />
-    <text>我的错题</text>
-  </navigator>
-
-  <navigator class="cate-item"  url="/pages/exam/do/index?id={{groupId}}" >
-    <i-icon type="shop_fill" size="40" color="#e96900a0" />
-    <text>模拟考试</text>
-  </navigator>
-</view>
-
-<view class="p20" >
-  <i-cell-group i-class="my-group-margin">
-    <i-cell title="{{item.title}}" wx:for="{{tableData}}" 
-      is-link 
-      url="/pages/exam/paper/paper?paperId={{item.paperId}}&title={{item.title}}" 
-      value="{{item.answerNumber}}" 
-      size="20">
-      <i-icon slot="icon" type="activity" size="28" color="#80848f" />
-    </i-cell>
-  </i-cell-group>
-</view>

+ 0 - 1
pages/exam/group/group.wxss

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

+ 8 - 2
pages/exam/answerIndex/index.js → pages/exam/home/index.js

@@ -3,6 +3,12 @@ Page({
   data: {
     groupId: 0,
     tableData: [],
+    types:{
+      1:'判断题',
+      2:'单选题',
+      3:'多选题',
+      4:'案例题'
+    }
   },
   onLoad: function(options) {
     let groupId = +options.groupId||1;
@@ -19,12 +25,12 @@ Page({
     let groupId = this.data.groupId
     console.log( item )
     wx.navigateTo({
-      url: `/pages/exam/answer/answer?groupId=${groupId}&type=${item.type}&count=${item.count}`
+      url: `/pages/exam/orderTest/answer?groupId=${groupId}&type=${item.type}&count=${item.count}`
     })
   },
   loadData: function(){
     let param= {groupId: this.data.groupId}
-    app.formPost('Exam.InitGroupAnswer', param ).then(res => {
+    app.formPost('Exam.InitGroupAnswerV1', param ).then(res => {
       if( res.code == 200){
         this.setData({tableData: res.data})
       }

+ 2 - 5
pages/exam/answerIndex/index.json → pages/exam/home/index.json

@@ -3,14 +3,11 @@
     "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-button": "/component/iView/button/index",
-    "i-badge": "/component/iView/badge/index"
+    "i-button": "/component/iView/button/index"
   },
   "enablePullDownRefresh": true,
-  "navigationBarTitleText": "顺序做题"
+  "navigationBarTitleText": "专项练习题库"
 }

+ 53 - 0
pages/exam/home/index.wxml

@@ -0,0 +1,53 @@
+
+  <view class="mb20">
+    <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>
+<navigator class="card-wrapper" wx:for="{{tableData}}" wx:key="index" wx:if="{{item.count>0}}"
+  url="/pages/train/orderTest/answer?groupId={{groupId}}&type={{item.type}}&count={{item.count}}">
+  <view class="i-class i-card i-card-radus p10" >
+    <view class="i-class i-card-header  ">
+      <view class="i-card-header-title" style="font-size:42rpx">
+        {{types[item.type]}} 
+      </view>
+      <view class="i-card-header-extra" style="font-size:36rpx" >
+        共计【{{item.count}}】题
+      </view>
+    </view>
+  </view>
+</navigator>
+
+<navigator url="/pages/exam/collection/index?groupId={{groupId}}" class="card-wrapper">
+  <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}" >
+    <view class="i-class i-card-header mt10">
+      <view class="i-card-header-title tc" style="font-size:42rpx">
+        我的错题
+      </view>
+      <view class="i-card-header-extra" style="font-size:36rpx" >
+        进入
+      </view>
+    </view>
+  </view>
+</navigator>
+
+  <navigator url="/pages/newExam/mockExam/index?id={{groupId}}" class="card-wrapper">
+    <view class="i-class i-card i-card-radus" data-id="{{item.id}}" data-out="{{item.isOut}}"  >
+    <view class="i-class i-card-header mt10">
+      <view class="i-card-header-title tc" style="font-size:42rpx">
+        模拟考试
+      </view>
+      <view class="i-card-header-extra" style="font-size:36rpx" >
+        开始
+      </view>
+    </view>
+  </view>
+  </navigator>

+ 14 - 0
pages/exam/home/index.wxss

@@ -0,0 +1,14 @@
+@import '/component/iView/card/index.wxss';
+.i-card-radus{
+   border-radius: 10rpx;
+   margin-top: 10rpx;
+   background-color: #fff;
+}
+
+page{
+  background-color: #fafafa;
+}
+
+.card-wrapper{
+  margin-bottom: 24rpx;
+}

+ 1 - 4
pages/exam/index/index.json

@@ -3,12 +3,9 @@
     "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"
+    "i-icon": "/component/iView/icon/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿锵在线教育-在线练习"

+ 0 - 77
pages/exam/paper/paper.js

@@ -1,77 +0,0 @@
-let app = getApp()
-Page({
-  data: {
-    list: [],
-    paperId:0,
-    title:'',
-    preList:["A","B","C", "D","E","F"],
-    info:{},
-    id:0,
-    userInfo:{},
-    result: {}
-  },
-  onLoad: function(options) {
-    let paperId = +options.paperId||1
-    let title = options.title||'试卷'
-    this.setData({paperId, title})
-  },
-  onShow: function () {
-    app.checkLogin( userInfo =>{
-      this.setData({userInfo, from:0})
-      this.indexLoad()
-    })
-  },
-  indexLoad(){
-    let paperId = this.data.paperId;
-    app.formPost("exam.GetWxGroupPaperInfo", {paperId}).then(res => {
-      if (res.code ==200) {
-        let list = res.data.map( item =>{
-          if( item.select > 0)  item._select = true;
-          return item
-        })
-        this.setData({list });
-      }
-    })
-  },
-  radioChange( e ){
-    let index = e.currentTarget.dataset.index;
-    let list = this.data.list
-    list[index].select = +e.detail.value
-    this.submitAnswer(list[index], list[index].select== list[index].result?1:0 )
-    this.setData( {list} );
-  },
-  emptyAnswer(e){
-    let list = this.data.list.map( item =>{
-      item._select = false;
-      item.select = 0
-      return item
-    })
-    this.setData({list})
-  },
-  checkboxChange( e ){
-    let index = e.currentTarget.dataset.index;
-    let list = this.data.list
-    list[index].select = +e.detail.value.sort().join("")
-    let result = ""+list[index].result
-    if (list[index].select == result ){
-      list[index]._select = true
-      this.submitAnswer(list[index], 1 )
-    }else{
-      for( let i in e.detail.value){
-        if(result.indexOf( e.detail.value[i] )==-1 ){
-          list[index]._select = true
-          this.submitAnswer(list[index], 0 )
-        }
-      }
-    }
-    this.setData( {list} );
-  },
-  submitAnswer( answer, correct ){
-    let {paperId} = this.data
-    let {answerId, groupId, select} = answer
-    let param = {paperId, groupId, answerId, correct, select}
-    app.formPost('Exam.SubmitWxGroupPaperAnswer', param).then(res => {
-      console.log( res )
-    })
-  }
-})

+ 0 - 18
pages/exam/paper/paper.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-button": "/component/iView/button/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 - 113
pages/exam/paper/paper.wxml

@@ -1,113 +0,0 @@
-<wxs module="filter" src="../../../wxs/exam-fun.wxs"></wxs>
-  <view class="exam-page mt0">
-    <view >
-      <i-button  bindtap="emptyAnswer" type="primary" size="default">清空重做</i-button>
-    </view>
-
-    <form bindsubmit='formSubmit'>  
-      <i-panel 
-        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 ==2}}"> 
-            <view class="single">
-              <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}}"  disabled="{{item.select>0?true:false}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-
-              <view class="exam-clear mt20" wx:if="{{item.select>0}}" >
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text wx:if="{{item.type==2}}"> {{preList[item.result-1]}}</text>
-                </view>
-              </view>
-            </view>
-          </i-cell> 
-          <!-- 多选题 -->
-          <i-cell wx:if="{{item.type==3}}"> 
-            <view >
-              <rich-text nodes="{{index+1}}.[多]{{item.title}}" />
-              <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:key="" wx:if="{{item['answer'+(index+1)]}}">
-                  <view class="checkbox-answer">
-                    <checkbox color="#2d8cf0" value="{{index+1}}" disabled="{{!!item._select}}" checked="{{filter.isSelect(index+1,item.select)}}">
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </checkbox>
-                  </view>
-                </label>
-                
-              </checkbox-group>
-
-            </view>
-
-            <view class="exam-clear mt20"  wx:if="{{isFinish || item._select}}">
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text> {{filter.getMultResult(item.result)}}</text>
-                </view>
-              </view>
-
-          </i-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="{{2}}" wx:for-item="answer" >
-                  <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}" disabled="{{item.select>0?true:false}}" >
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
-                    </radio>
-                  </view>
-                </label>
-              </radio-group>
-            </view>
-            <view class="exam-clear mt20" wx:if="{{ item.select>0}}" >
-                <view class="exam-extend-item" >
-                  答题结果:
-                  <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">
-                  正确答案:
-                  <text> {{item.result==1?'正确':'错误'}}</text>
-                </view>
-              </view>
-          </i-cell>
-        </i-cell-group>
-
-      </i-panel>
-    </form>
-  </view>
-

+ 0 - 97
pages/exam/paper/paper.wxss

@@ -1,97 +0,0 @@
-/* pages/exam/paper/paper.wxss */.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;
-}
-
-.exam-clear {
-  clear: both;
-  margin-left: 20rpx;
-}
-
-.exam-extend-item {
-  padding: 4px;
-}
-
-.question-answer-error {
-  background-color: #fef0f0;
-  border-color: #fde2e2;
-  color: #f56c6c;
-}
-
-.question-answer-right {
-  background-color: #f0f9eb;
-  border-color: #e1f3d8;
-  color: #67c23a;
-}

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

@@ -1,52 +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)
-    wx.reLaunch({
-      url: "/pages/exam/index/index"
-    })
-  },
-  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==2}}"> 
-            <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==3}}"> 
-            <view >
-              <rich-text nodes="{{index+1}}.[多]{{item.title}}" />
-              <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+1,item.select)}}" disabled>
-                      {{answer}}. {{item['answer'+(index+1)]}}
-                    </checkbox>
-                  </view>
-                </label>
-              </checkbox-group>
-            </view>
-          </i-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="{{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==2}}"> 正确答案: {{preList[item.result-1]}}</text>
-              <text wx:elif="{{item.type==3}}"> 正确答案: {{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 */

+ 1 - 4
pages/index/index.json

@@ -3,12 +3,9 @@
     "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"
+    "i-icon": "/component/iView/icon/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿锵在线教育"

+ 1 - 4
pages/newExam/home/index.json

@@ -3,13 +3,10 @@
     "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-button": "/component/iView/button/index",
-    "i-badge": "/component/iView/badge/index"
+    "i-button": "/component/iView/button/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "练习题库"

+ 1 - 1
pages/newExam/home/index.wxml

@@ -13,7 +13,7 @@
     </swiper>
 </view>
 <navigator class="card-wrapper" wx:for="{{tableData}}" wx:key="index" 
-  url="/pages/newExam/orderTest/index?groupId={{groupId}}&type={{item.type}}&count={{item.count}}">
+  url="/pages/train/orderTest/index?groupId={{groupId}}&type={{item.type}}&count={{item.count}}">
   <view class="i-class i-card i-card-radus p10"  >
     <view class="i-class i-card-header">
       <view class="i-card-header-title fs42">

+ 3 - 3
pages/newExam/mockExam/index.js

@@ -39,7 +39,7 @@ Page({
         return;
       }
     }
-    app.formPost('Exam.StartMockExam', {groupId}).then(res => {
+    app.formPost('Exam.StartMockExamV1', {groupId}).then(res => {
       if (res.code ==200) {
         this.setData({info:res.data })
         this.loadQuestion( 0 )
@@ -90,7 +90,7 @@ Page({
       param.select = select
     }
     this.setData({ansewersMap});
-    app.formPost('Exam.SubmitMockAnswer', param).then(res => {
+    app.formPost('Exam.SubmitMockAnswerV1', param).then(res => {
       goNext && this.nextAnswer( )
     })
   },
@@ -112,7 +112,7 @@ Page({
     if( !item ) return;
     item.index = index;
     if( !item.title ){
-      app.formPost("Exam.loadMockAnswer", {id:item.id} ).then(res => {
+      app.formPost("Exam.loadMockAnswerV1", {id:item.id} ).then(res => {
         if( res.code != 200) return;
         Object.assign( item, res.data)
         this.saveItem( item ) 

+ 0 - 2
pages/newExam/mockExam/index.json

@@ -3,8 +3,6 @@
     "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",

+ 2 - 2
pages/newExam/orderTest/index.js

@@ -80,9 +80,9 @@ Page({
   },
   checkboxChange( e ){
     let info = this.data.info
-    info.select = +e.detail.value.sort().join("")
+    let select = +e.detail.value.sort().join("")
     let result = ""+info.result
-    if (info.select == result ){
+    if (select == result ){
       info._select = true
     }else{
       for( let i in e.detail.value){

+ 1 - 4
pages/newExam/orderTest/index.json

@@ -3,15 +3,12 @@
     "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-switch": "/component/iView/switch/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-rate": "/component/iView/rate/index"
+    "i-spin": "/component/iView/spin/index"
   },
   "enablePullDownRefresh": false,
   "navigationBarTitleText": "顺序答题"

+ 1 - 4
pages/study/course/index.json

@@ -3,14 +3,11 @@
     "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-avatar": "/component/iView/avatar/index",
-    "i-badge": "/component/iView/badge/index"
+    "i-avatar": "/component/iView/avatar/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿鹄在线练习系统"

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

@@ -3,8 +3,6 @@
     "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",

+ 1 - 4
pages/study/index/index.json

@@ -3,13 +3,10 @@
     "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"
+    "i-card": "/component/iView/card/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿锵在线教育-继续教育"

+ 1 - 4
pages/study/market/index.json

@@ -3,13 +3,10 @@
     "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"
+    "i-card": "/component/iView/card/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿鹄在线练习系统"

+ 1 - 4
pages/train/index/index.json

@@ -3,13 +3,10 @@
     "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"
+    "i-card": "/component/iView/card/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿锵在线教育-岗前培训"

+ 1 - 4
pages/train/limit/index.json

@@ -3,12 +3,9 @@
     "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"
+    "i-icon": "/component/iView/icon/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "鸿锵在线教育-高频题库"

+ 0 - 2
pages/train/limitDo/index.json

@@ -3,8 +3,6 @@
     "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",

+ 1 - 4
pages/train/limitHome/index.json

@@ -3,13 +3,10 @@
     "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-button": "/component/iView/button/index",
-    "i-badge": "/component/iView/badge/index"
+    "i-button": "/component/iView/button/index"
   },
   "enablePullDownRefresh": true,
   "navigationBarTitleText": "高频题库练习"

+ 21 - 16
pages/train/orderTest/answer.js

@@ -35,11 +35,7 @@ Page({
   },
   onChange(event){
     const showResult = event.detail.value;
-    let {info, index, maxIndex} = this.data;
-    if( index > maxIndex) {
-      util.showMsg("这题还未做过");
-      return;
-    }
+    let {info } = this.data;
     if( showResult ) {
       info.select = info.result;
     }else{
@@ -71,18 +67,19 @@ Page({
   radioChange( e ){
     let cid=e.currentTarget.dataset.cid;
     let info = this.data.info
-    info.select = +e.detail.value
     if( info.child ){
       info.child[cid].select = +e.detail.value
+    }else{
+      info.select = +e.detail.value
     }
     this.setData( {info} );
   },
   checkboxChange( e ){
     let cid=e.currentTarget.dataset.cid;
     let info = this.data.info
-    info.select = +e.detail.value.sort().join("")
     let result = ""+info.result
-    if (info.select == result ){
+    let select = +e.detail.value.sort().join("")
+    if (select == result ){
       info._select = true
     }else{
       for( let i in e.detail.value){
@@ -92,7 +89,9 @@ Page({
       }
     }
     if( info.child ){
-      info.child[cid].select = info.select
+      info.child[cid].select = select
+    }else{
+      info.select = select
     }
     this.setData( {info} );
   },
@@ -111,22 +110,28 @@ Page({
     this.loadAnswer()
   },
   nextAnswer( e ){
-    let {index, maxIndex, total,isConfirm}= this.data
+    let {index, total}= this.data
     if( index >= total-1 ) {
       util.showMsg("已经最后一题")
       return;
     }
-    if( index >= maxIndex && !isConfirm){
-      util.showMsg("还未作答");
-      return;
-    }
     index++;
     this.setData({index,isConfirm:false})
     this.loadAnswer()
   },
   confirmAnswer(){
-    let {id, groupId, type,answerId, index} = this.data
-    let param ={id, groupId, answerId, index, type};
+    let {id, groupId, type,answerId, index, info} = this.data
+    let correct = 1
+    if( !info.child ){
+      correct = info.select == info.result?1:0;
+    }else{
+      for( let i in info.child){
+        if( info.child[i].select != info.child[i].result ){
+          correct= 0
+        }
+      }
+    }
+    let param ={id, groupId, answerId, index, type, correct};
     app.formPost('Exam.finishAnswerLimitNew', param).then( res=>{
       if( res.code == 200){
         this.setData({isConfirm:true})

+ 2 - 5
pages/train/orderTest/answer.json

@@ -3,16 +3,13 @@
     "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-switch": "/component/iView/switch/index",
-    "i-spin": "/component/iView/spin/index",
-    "i-rate": "/component/iView/rate/index"
+    "i-spin": "/component/iView/spin/index"
   },
   "enablePullDownRefresh": false,
-  "navigationBarTitleText": "高频顺序答题"
+  "navigationBarTitleText": "顺序答题"
 }

+ 12 - 12
pages/train/orderTest/answer.wxml

@@ -4,7 +4,7 @@
   <view class="view-wrap">
     <view class="exam-count-down">
       {{types[type]}} ({{total-index}}/{{total}})
-      <text style="margin-left:10rpx;margin-right:10rpx" >{{showResult?'背模式':'答题模式'}}</text>
+      <text style="margin-left:10rpx;margin-right:10rpx" >{{showResult?'背模式':'答题模式'}}</text>
       <i-switch value="{{showResult}}" bind:change="onChange"></i-switch>
     </view>
   </view>
@@ -16,7 +16,7 @@
       <i-cell wx:if="{{info.type ==2}}">
         <view class="single">
           <rich-text nodes="[单]{{info.title}}" />
-          <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
+          <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}" >
             <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="answerId"
               wx:if="{{info['answer'+(index+1)]}}">
               <view class="radio-answer">
@@ -48,7 +48,7 @@
           <rich-text nodes="[多]{{info.title}}" />
           <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:key="answerId"
+            <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer"
               wx:if="{{info['answer'+(index+1)]}}">
               <view class="checkbox-answer">
                 <checkbox color="#2d8cf0" value="{{index+1}}" checked="{{filter.isSelect(index+1,info.select)}}">
@@ -78,7 +78,7 @@
         <view>
           <rich-text nodes="[判]{{info.title}}" />
           <radio-group class="radio-answer" bindchange="radioChange" data-index="{{index}}">
-            <label class="radio" wx:for="{{2}}" wx:for-item="answer">
+            <label class="radio" wx:for="{{2}}" wx:for-item="answer" wx:key="index">
               <view class="radio-answer">
                 <radio color="#2d8cf0" value="{{index+1}}" checked="{{info.select==index+1}}">
                   {{preList[index]}}. {{info['answer'+(index+1)]}}
@@ -111,11 +111,11 @@
             <view class="single">
               <rich-text nodes="[单]{{item.title}}" />
               <radio-group class="radio-answer" bindchange="radioChange"  data-index="{{index}}" data-cid="{{cid}}">
-                <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="answerId"
-                  wx:if="{{item['answer'+(index+1)]}}">
+                <label class="radio" wx:for="{{preList}}" wx:for-item="answer" wx:key="answerId" wx:for-index="pindex"
+                  wx:if="{{item['answer'+(pindex+1)]}}">
                   <view class="radio-answer">
-                    <radio color="#2d8cf0" value="{{index+1}}" checked="{{item.select==index+1}}">
-                      {{preList[index]}}. {{item['answer'+(index+1)]}}
+                    <radio color="#2d8cf0" value="{{pindex+1}}" checked="{{item.select==pindex+1}}">
+                      {{preList[pindex]}}. {{item['answer'+(pindex+1)]}}
                     </radio>
                   </view>
                 </label>
@@ -143,11 +143,11 @@
               <checkbox-group class="checkbox-answer" style="margin-top:30rpx" data-cid="{{cid}}" 
               bindchange="checkboxChange"
                 data-index="{{index}}">
-                <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:key="answerId"
-                  wx:if="{{item['answer'+(index+1)]}}">
+                <label class="checkbox" wx:for="{{preList}}" wx:for-item="answer" wx:key="answerId" wx:for-index="pindex"
+                  wx:if="{{item['answer'+(pindex+1)]}}">
                   <view class="checkbox-answer">
-                    <checkbox color="#2d8cf0" value="{{index+1}}"  checked="{{filter.isSelect(index+1,info.select)}}">
-                      {{answer}}. {{item['answer'+(index+1)]}}
+                    <checkbox color="#2d8cf0" value="{{pindex+1}}"  checked="{{filter.isSelect(pindex+1,item.select)}}">
+                      {{answer}}. {{item['answer'+(pindex+1)]}}
                     </checkbox>
                   </view>
                 </label>