Browse Source

迭代微信小程序主要更改首页和新增错题本还有分享海报图

sunzhilei 6 years ago
parent
commit
1f76c1a86a

+ 4 - 1
README.md

@@ -63,9 +63,12 @@ AppSecret: adece358e0d933e39d87b68fbf700651
 │   ├── mathematics      // 数学页面
 │   │
 │   ├── medal_rank        // 勋章排名页面
+|   |
+|   |──mistakes             //错题本
+|   |
 │   ├── quantity_rank     //  答题排名排名
 │   │
-│   ├── recommend       //  本周推荐
+│   ├── recommend       //  本周推荐改为了错题本暂时注释掉
 │   │
 │   ├── science     // 科学页面
 │   │

+ 2 - 1
app.json

@@ -17,7 +17,8 @@
     "pages/quantity_rank/quantity_rank",
     "pages/accuracy_rank/accuracy_rank",
     "pages/set_name/set_name",
-    "pages/particulars/particulars"
+    "pages/particulars/particulars",
+    "pages/mistakes/mistakes"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 2 - 2
compontents/chat/chat.wxml

@@ -20,8 +20,8 @@
                     <view wx:if="{{type == 1 && (item.currentReplyCount > 0)}}" class="message"></view>
                 </view>
                 <view class="picture" wx:if="{{type == 2}}">
-                    <block wx:for="{{item.imagesList}}" wx:for-item="items" wx:key="{{items.id}}">
-                        <image mode="aspectFill" src="{{items.path}}" catchtap="listenerButtonPreviewImage" data-img="{{items.path}}"></image>
+                    <block wx:for="{{item.imagesList}}" wx:for-item="items" wx:key="{{items}}">
+                        <image mode="aspectFill" src="{{items}}" catchtap="listenerButtonPreviewImage" data-img="{{items}}"></image>
                     </block>
                 </view>
                 <view class="icon" wx:if="{{type == 2}}">

+ 2 - 2
compontents/one/one.wxml

@@ -16,8 +16,8 @@
             </view>
         </view>
         <view class="picture" wx:if="{{type == 2}}">
-            <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items.id}}">
-                <image src="{{items.path}}" bindtap="listenerButtonPreviewImage" data-img="{{items.path}}"></image>
+            <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items}}">
+                <image src="{{items}}" bindtap="listenerButtonPreviewImage" data-img="{{items}}"></image>
             </block>
         </view>
         <view class="icon">

+ 82 - 0
compontents/set_grade/set_grade.js

@@ -0,0 +1,82 @@
+// compontents/share/share.js
+const util = require('../../utils/util.js');
+const APIClient = require('../../utils/APIClient.js');
+const login = require('../../utils/loginSchedule.js');
+Component({
+  /**
+   * 组件的属性列表
+   * grade年级
+   */
+  properties: {
+   "grade": {
+     type: String,
+     value: ''
+   }
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    flag: true,
+    gradeData: [
+      '一年级',
+      '二年级',
+      '三年级'
+    ]
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    //隐藏框
+    hidePopup: function () {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    //展示框
+    showPopup () {
+      this.setData({
+        flag: !this.data.flag
+      })
+    },
+    grade (e) {
+      const grade = e.currentTarget.dataset.grade + 1
+      this.setData({
+        grade:  util.gradeUpper(grade)
+      })
+      //调用更改年级接口
+      login.getOpenidSessionKey((res) => {
+        //console.log(res.data.data.uid);
+        APIClient.getSetNameSchedule({
+          uid: res.data.data.uid
+        }, {
+          grade: grade
+        }).success(res => {
+          console.log(res)
+          if(res.data.success) {  
+            wx.redirectTo({
+              url: '../index/index?ind=0'
+            })
+          }
+        })      
+      }, function() {
+        wx.showModal({
+          title: '提示',
+          content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
+          showCancel: false,
+          success: function (res) {
+            if (res.confirm) {
+              console.log('用户点击确定')
+            } else if (res.cancel) {
+              console.log('用户点击取消')
+            }
+          }
+        })
+      });
+    }
+  }
+
+})

+ 4 - 0
compontents/set_grade/set_grade.json

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

+ 11 - 0
compontents/set_grade/set_grade.wxml

@@ -0,0 +1,11 @@
+<!--compontents/share/share.wxml-->
+<view class="container" bindtap="hidePopup" hidden="{{flag}}">
+    <view class="share">
+        <view class="title">年级</view>
+        <view class="share-img"> 
+            <view class="download" wx:for="{{gradeData}}" wx:key="{{index}}">
+                <text class="{{item === grade ? 'color' : ''}}" catchtap="grade" data-grade="{{index}}">{{item}}</text>
+            </view>
+        </view>
+    </view>
+</view>

+ 60 - 0
compontents/set_grade/set_grade.wxss

@@ -0,0 +1,60 @@
+/* compontents/share/share.wxss */
+.container {
+    position:fixed;
+    left: 0;
+    bottom: 0;   
+    width: 100%;
+    height: 100%;
+    z-index: 98;
+}
+
+.container:after {
+    content:'';
+    position:absolute;
+    left: 0;
+    bottom: 0;   
+    width: 100%;
+    height: 100%;
+    background: rgba(255,255,255,.8);
+    filter: blur(15px);
+    z-index: 99;
+}
+
+.share {
+    position:fixed;
+    left: 15rpx;
+    bottom: 0;
+    width: calc(100% - 30rpx);
+    border-radius:25rpx;
+    padding:32rpx 24rpx;
+    box-sizing:border-box;
+    background:#fff;
+    z-index: 100;
+}
+
+.share .title {
+    font-size: 32rpx;
+    font-weight: bolder;
+    color: #3F3F3F;
+    text-align: center;
+    padding-bottom: 20rpx;
+    border-bottom: 2rpx solid #C8C8C8;
+    
+}
+
+.share-img {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+}
+
+.share-img text {
+    font-size: 32rpx;
+    color: #3F3F3F;
+    margin-top: 43rpx;
+}
+
+.share-img .color {
+    color: red;
+}

+ 2 - 2
compontents/tarbar/tarbar.js

@@ -13,7 +13,7 @@ Component({
    * 组件的初始数据
    */
   data: {
-    motto: ['我的','本周推荐','语文','数学','中文','英语','科学','艺术'],
+    motto: ['我的','错题本','语文','数学','中文','英语','科学','艺术'],
     navBtnSelectIdx: 0,
     left: 0
   },
@@ -42,7 +42,7 @@ Component({
       }
       if(index == 1) {
         wx.redirectTo({
-          url: '../recommend/recommend?ind=1'
+          url: '../mistakes/mistakes?ind=1'
         })
       }
       if(index == 2) {

+ 54 - 2
pages/art/art.js

@@ -33,7 +33,8 @@ Page({
     previewHeight: '',
     productionMore: '',
     questionsMore: '',
-    wxObjectives: []
+    wxObjectives: [],
+    shareImgSrc: ''
   },
 
   /* 区分答疑和分享 */
@@ -44,7 +45,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)
@@ -205,7 +206,58 @@ Page({
   },
 
   onShow: function () {
+    //2. canvas绘制文字和图片
+    const ctx = wx.createCanvasContext('myCanvas');
+    var imgPath = '../image/bg_1.png'
+    ctx.setFillStyle('red')
+    ctx.fillRect(10, 10, 150, 75)
 
+    ctx.drawImage(imgPath, 30, 10, 60, 60);
+
+    ctx.setFontSize(12)
+    ctx.setFillStyle('#6F6F6F')
+    ctx.fillText('妖妖灵', 10, 10)
+    ctx.draw();
+  },
+  keep: function () {
+    wx.canvasToTempFilePath({
+      x: 0,
+      y: 0,
+      width: 600,
+      height: 800,
+      destWidth: 600,
+      destHeight:800,
+      canvasId: 'myCanvas',
+      success: (res) => {
+          console.log('canvas'+res.tempFilePath);
+          this.setData({
+              shareImgSrc : res.tempFilePath
+          })
+
+      },
+      fail:function (res) {
+          console.log(res)
+      }
+    })
+
+    wx.saveImageToPhotosAlbum({
+      filePath:this.data.shareImgSrc,
+      success(res) {
+          wx.showModal({
+              title: '存图成功',
+              content: '图片成功保存到相册了,去发朋友圈',
+              showCancel:false,
+              confirmText:'好哒',
+              confirmColor:'#72B9C3',
+              success: function(res) {
+                  if (res.confirm) {
+                      console.log('用户点击确定');
+                  }
+                  //that.hideShareImg()
+              }
+          })
+      }
+    })
   },
   /* 转发*/
   onShareAppMessage: function (ops) {

+ 5 - 0
pages/art/art.wxml

@@ -45,6 +45,11 @@
             <view class="upload-one" data-id="upload" bindtap="location">
                 <image src="../image/works.png" ></image>
             </view>  
+
+            <view class="canvas-box">
+                <canvas canvas-id="myCanvas" style="width:100%;"></canvas>
+            </view>
+            <view bindtap="keep">保存</view>
           </view>
       </scroll-view>
   </view>

+ 1 - 1
pages/chinese/chinese.js

@@ -27,7 +27,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)

+ 1 - 1
pages/english/english.js

@@ -27,7 +27,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)

+ 77 - 2
pages/index/index.js

@@ -18,7 +18,10 @@ Page({
     rankData: {},
     share: false,
     studyLog: [],
-    height: ''
+    height: '',
+    productionData: {},
+    num2: 0,
+    productionMore: ''
   },
   
   lower: function (e) {
@@ -36,7 +39,15 @@ Page({
     // }
   },
 
+  setgrade: function (e) {
+    //console.log(this.setGrade)
+    this.setGrade.showPopup()
+  },
+
   onLoad: function (options) {
+    //获取更改年级组件
+    this.setGrade = this.selectComponent("#set-grade");
+    console.log(this.setGrade)
     //获取分享过来的值跳转页面
     const ind  = options.ind;
     const postsId = options.postId || '';
@@ -53,6 +64,23 @@ Page({
         this.setData({left: 200 });
       }  
     }
+    /* 分享 */
+    const columnId = util.column('6').columnId;
+    this.distinction(2, columnId, 1, 2, res => {
+      if(res.data.success) {
+        console.log(res.data.data)
+        this.setData({
+          productionData: res.data.data
+        })
+        if(res.data.data) {
+          if(res.data.data.totalSize > 2) {
+            this.setData({
+              productionMore: true
+            })
+          }
+        }
+      }
+    });
   },
   onShow: function () {
     //登录页信息
@@ -101,5 +129,52 @@ Page({
       })
     });  
   },
-
+  /* 区分答疑和分享 */
+  distinction: function(type, columnId, pageNo, pageSize, success) {
+    login.getOpenidSessionKey(function(res) {
+      //console.log(res.data.data.uid);
+      APIClient.getProductionSchedule({
+        uid: res.data.data.uid
+      }, {
+        "type": type,
+        "category": columnId,
+        "pageNo": pageNo,
+        "pageSize": pageSize
+      }).success(success)
+    }, function() {
+      wx.showModal({
+        title: '提示',
+        content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
+        showCancel: false,
+        success: function (res) {
+          if (res.confirm) {
+            console.log('用户点击确定')
+          } else if (res.cancel) {
+            console.log('用户点击取消')
+          }
+        }
+      })
+    });
+  },
+    /*点击加载更多*/
+    onMyEvent: function(e){
+      const columnId = util.column('6').columnId;
+      this.data.num2++
+      this.setData({
+        num: this.data.num2
+      })
+      this.distinction(2, columnId, 1, 5*this.data.num2, res => {
+        if(res.data.success) {
+          console.log(res.data.data)
+          this.setData({
+            productionData: res.data.data,
+          }) 
+          if(5*this.data.num2 > res.data.data.totalSize) {
+            this.setData({
+              productionMore: ''
+            })
+          }
+        }
+      });
+    },
 })

+ 2 - 2
pages/index/index.json

@@ -3,7 +3,7 @@
     "usingComponents": {
      "tarbar": "/compontents/tarbar/tarbar",
      "curriculum": "/compontents/curriculum/curriculum",
-     "recommend": "../recommend/recommend",
-     "art": "../art/art"
+     "chat": "/compontents/chat/chat",
+     "setGrade": "/compontents/set_grade/set_grade"
     }
   }

+ 25 - 6
pages/index/index.wxml

@@ -13,17 +13,22 @@
                 <view class='head'>
                   <image class="userinfo-avatar" src="{{data.users.headImgUrl}}" background-size="cover"></image>
                   <view class='left'>
-                    <view class="name">
-                      {{data.users.wechatName}}
-                    </view>
                     <view class="student">
                       学号:<text>{{data.users.eid}}</text>
                     </view>
-                    <view class='LV'>{{grade}}</view>
+                    <view class="name">
+                      {{data.users.wechatName}}
+                      <text class='LV'>LV {{data.users.level}}</text>
+                    </view>
                   </view>
                 </view>
-                <view class='grade'>
-                  <navigator style='font-size:28rpx;' url="../set_name/set_name" >更改昵称</navigator>
+                <view>
+                  <view class='grade' bindtap="setgrade">
+                    {{grade}}
+                  </view>
+                  <view class='set-name'>
+                    <navigator style='font-size:28rpx;' url="../set_name/set_name" >更改昵称</navigator>
+                  </view>
                 </view>
               </view>
               <view class='personal'>
@@ -47,6 +52,7 @@
             </view>
             <!-- 答题 -->
             <view class="ranking">
+              <view class="dashed"></view>
               <view class="title">
                 <text>好友比一比</text>
               </view>
@@ -99,6 +105,19 @@
               studyLog="{{ studyLog }}"
               height="{{height}}"/>
             </view>
+            <!-- 上传作品 -->
+            <chat id="upload"
+              productionData="{{productionData}}" 
+              title="我的作品"
+              query="上传作品"
+              type="2"
+              columnType="6"
+              bind:myevent="onMyEvent"
+              more="{{productionMore}}"/>
+            <!-- 更改年级 -->
+            <setGrade 
+             id="set-grade"
+             grade="{{grade}}"/>
           </view>
       </scroll-view>
   </view>

+ 22 - 6
pages/index/index.wxss

@@ -22,6 +22,10 @@
   background: #fff;
 }
 
+.message {
+  margin: 20rpx 0 0 0;
+}
+
 .user {
   display: flex;
   justify-content: space-between;
@@ -49,30 +53,29 @@
 .userinfo-avatar {
   width: 86rpx;
   height: 86rpx;
-  border-radius: 50%;
+  border-radius: 20%;
 }
 
 .name {
   height:44rpx;
   font-size: 36rpx;
   font-weight: 600;
+  margin-top: 10rpx;
 }
 
 .LV {
-  position: absolute;
-  right:40rpx;
-  top:110rpx;
   font-size: 28rpx;
+  font-weight: 600;
 }
 
 .student {
   height:34rpx;
   font-size: 28rpx;
   color: #878787;
-  margin-top: 10rpx;
 }
 
-.grade {
+.grade,
+.set-name {
   width: 146rpx;
   height: 46rpx;
   font-size: 28rpx;
@@ -84,6 +87,10 @@
   line-height: 48rpx; 
 }
 
+.set-name {
+  margin-top: 10rpx;
+}
+
 .personal {
   display: flex;
   margin-top: 34rpx;
@@ -98,9 +105,18 @@
 
 /*排名*/
 .ranking {
+  margin: 0 0 20rpx 0;
   position: relative;
 }
 
+.dashed {
+  position: absolute;
+  top: 0;
+  left: 5%;
+  width: 90%;
+  border-top:2rpx dashed #878787;
+}
+
 .ranking .title text{
   font-size: 36rpx;
   font-weight: 600;

+ 2 - 4
pages/input_content/input_content.js

@@ -71,7 +71,7 @@ Page({
               success: function (res) {  
                 uploadImgCount++;  
                 let data = JSON.parse(res.data);
-                that.data.imgId.push(data.data.id)
+                that.data.imgId.push(data.data)
                 that.setData({
                   imgId: that.data.imgId,
                 })
@@ -124,9 +124,7 @@ Page({
     let data = {
       "title": this.data.textValue,
       "type": type,
-      "columnId": columnId,
-      "columnType": columnType,
-      "columnNames": columnName,
+      "category": columnId
     }; 
     if(type == 2){
       data.imagesStrList = this.data.imgId

+ 1 - 1
pages/language/language.js

@@ -27,7 +27,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)

+ 1 - 1
pages/mathematics/mathematics.js

@@ -27,7 +27,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)

+ 93 - 0
pages/mistakes/mistakes.js

@@ -0,0 +1,93 @@
+// pages/mistakes/mistakes.js
+const util = require('../../utils/util.js');
+const APIClient = require('../../utils/APIClient.js');
+const login = require('../../utils/loginSchedule.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    login.getOpenidSessionKey(res => {
+      APIClient.getErrorsSchedule({
+        uid: res.data.data.uid
+      },{
+        pageNo: 1,
+        pageSize: 2,
+      }).success(res => {
+        console.log(res)
+        
+       
+      })
+    }, function() {
+      wx.showModal({
+        title: '提示',
+        content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
+        showCancel: false,
+        success: function (res) {
+          if (res.confirm) {
+            console.log('用户点击确定')
+          } else if (res.cancel) {
+            console.log('用户点击取消')
+          }
+        }
+      })
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+  
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+  
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+  
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+  
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+  
+  }
+})

+ 6 - 0
pages/mistakes/mistakes.json

@@ -0,0 +1,6 @@
+{
+    "component": true,
+    "usingComponents": {
+      "tarbar": "/compontents/tarbar/tarbar"
+    }
+  }

+ 36 - 0
pages/mistakes/mistakes.wxml

@@ -0,0 +1,36 @@
+<!--pages/mistakes/mistakes.wxml-->
+<view class="container">
+  <!-- 标题 -->
+  <tarbar id="tarbar" />
+  <!-- 内容 -->
+  <view class="content">
+      <scroll-view scroll-y="true"  scroll-with-animation="true" scroll-with-animation="true" enable-back-to-top="true">
+        <view class="recommend">
+           <view class="answer-number">
+            <view class="gross">
+                <text>答题总量</text>
+                <text>1000</text>
+            </view>
+            <view class="error">
+                <text>错误</text>
+                <text>1000</text>
+            </view>
+            <view class="correct">
+                <text>准确率</text>
+                <text>0%</text>
+            </view>
+           </view>
+           <view class="course">
+            <view class="course-head">
+                <view class="subject select">
+                    语文
+                </view>
+                <view class="subject">
+                    数学
+                </view>
+            </view>
+           </view>
+        </view> 
+      </scroll-view>
+  </view>
+</view>

+ 61 - 0
pages/mistakes/mistakes.wxss

@@ -0,0 +1,61 @@
+/* pages/mistakes/mistakes.wxss */
+.recommend {
+  width: 100%;
+  padding: 0 15rpx;
+  box-sizing: border-box;
+}
+
+.answer-number {
+  width: 100%;
+  margin: 20rpx 0;
+  border-radius: 25rpx;
+  padding: 32rpx 24rpx;
+  box-sizing: border-box;
+  background: #fff;
+  display: flex;
+  justify-content: space-around;
+}
+
+.answer-number view {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    font-size: 32rpx;
+    color: #444;
+}
+
+.gross text:nth-child(2) {
+    color: #10A1F0;
+    font-size: 36rpx;
+    font-weight: 600;
+}
+
+.error text:nth-child(2) {
+    color: #EA3433;
+    font-size: 36rpx;
+    font-weight: 600;
+}
+
+.correct text:nth-child(2) {
+    color: #444;
+    font-size: 36rpx;
+    font-weight: 600;
+}
+
+.course-head {
+    display: flex;
+    justify-content: center;   
+}
+
+.subject {
+    background: #A3E0F3;
+    padding: 20rpx 70rpx;
+    font-size: 36rpx;
+    font-weight: 600;
+    border-radius: 30rpx 30rpx 0 0;
+}
+
+.select {
+    background: #fff;
+}

+ 3 - 3
pages/particulars/particulars.wxml

@@ -14,8 +14,8 @@
                     </view>
                 </view>
                 <view class="picture" wx:if="{{type == 2}}">
-                    <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items.id}}">
-                        <image mode="aspectFill" src="{{items.path}}" bindtap="listenerButtonPreviewImage" data-img="{{items.path}}"></image>
+                    <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items}}">
+                        <image mode="aspectFill" src="{{items}}" bindtap="listenerButtonPreviewImage" data-img="{{items}}"></image>
                     </block>
                 </view>
                 <view class="icon" wx:if="{{type == 2}}">
@@ -46,7 +46,7 @@
 <view class="text">
     <image src="../../pages/image/input.png" class="input-img"></image>
     <view class="input-text">
-        <input placeholder="Enter You My Essage" value="{{text}}" bindinput="bindKeyInput" type="text" />
+        <input placeholder="请输入评论内容" value="{{text}}" bindinput="bindKeyInput" type="text" />
         <view bindtap="sendText" data-id="{{productionData.id}}"></view>
     </view>
 </view>

+ 1 - 1
pages/science/science.js

@@ -29,7 +29,7 @@ Page({
         uid: res.data.data.uid
       }, {
         "type": type,
-        "columnId": columnId,
+        "category": columnId,
         "pageNo": pageNo,
         "pageSize": pageSize
       }).success(success)

+ 2 - 2
pages/transmit/transmit.wxml

@@ -24,8 +24,8 @@
                         </view>
                     </view>
                     <view class="picture">
-                        <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items.id}}">
-                            <image src="{{items.path}}" catchtap="listenerButtonPreviewImage" data-img="{{items.path}}"></image>
+                        <block wx:for="{{productionData.imagesList}}" wx:for-item="items" wx:key="{{items}}">
+                            <image src="{{items}}" catchtap="listenerButtonPreviewImage" data-img="{{items}}"></image>
                         </block>
                     </view>
                     <view class="icon">

+ 1 - 1
project.config.json

@@ -29,7 +29,7 @@
 			"list": []
 		},
 		"miniprogram": {
-			"current": -1,
+			"current": 5,
 			"list": [
 				{
 					"id": 0,

+ 5 - 0
utils/APIClient.js

@@ -62,5 +62,10 @@ module.exports = {
 	cancelDian(header, data) {
 		let url = genAPIUrl('wx/posts/readCount');
 		return request.getInstance().url(url).header(header).data(data).method('GET').send();
+	},
+	//获取错题本
+	getErrorsSchedule(header, data) {
+		let url = genAPIUrl('wx/question/wrong');
+		return request.getInstance().url(url).header(header).data(data).method('GET').send();
 	}
 }

+ 2 - 2
utils/const.js

@@ -6,7 +6,7 @@ module.exports = {
 	// apiUrl: 'https://weixin.ai160.com/',
 	// host: 'wss://weixin.ai160.com/wx/websocket'
 	// ----测试环境-----
-  // apiUrl: 'https://weixin.efunbox.cn/',
-  apiUrl: 'https://schedule.api.ai160.com/'
+  apiUrl: 'https://weixin.efunbox.cn/',
+  // apiUrl: 'https://schedule.api.ai160.com/'
 
 }

+ 6 - 6
utils/util.js

@@ -131,27 +131,27 @@ function column(columnNum) {
   let column = {};
   switch(columnNum) {
     case '1':
-      column.columnId = '3564feb8-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '1'
       column.columnName = '语文'
     break;
     case '2':
-      column.columnId = '2b52f52e-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '2'
       column.columnName = '数学'
     break;
     case '3':
-      column.columnId = '3561f024-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '3'
       column.columnName = '中文'
     break;   
     case '4':
-      column.columnId = '2b5a24ca-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '4'
       column.columnName = '英语'
     break;
     case '5':
-      column.columnId = '23598e64-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '5'
       column.columnName = '科学'
     break;
     case '6':
-      column.columnId = '41209f14-05ba-11e8-9771-080027fcfc4b'
+      column.columnId = '6'
       column.columnName = '艺术'
     break; 
   }