Просмотр исходного кода

更改上传页面和错题本页面

Limengbo 6 лет назад
Родитель
Сommit
aa5b0fc707

+ 25 - 4
compontents/chat/chat.js

@@ -46,6 +46,8 @@ Component({
    */
   data: {
     animationData: {},
+    ratio: '',
+    canvasHeight: ''
   },
 
   /**
@@ -77,13 +79,19 @@ Component({
     },
     //分享
     shareImage: function(e){
-      console.log(e);
+      this.triggerEvent('getHeight');
       //分享查询单条的时候会用到这个值
       const postId = e.currentTarget.dataset.postsid;
+      //获取分享的图片
       const imgUrl = e.currentTarget.dataset.imgurl;
+      //获取分享的个人信息
+      const featureMap = e.currentTarget.dataset.featuremap;
+      //获取输入内容
+      const title = e.currentTarget.dataset.title;
+      //获取宽高比例
+      const ratio = this.data.ratio;
       //分享组件弹窗调用里边方法,在底下会获取
-      this.share.showPopup(postId, imgUrl);
-
+      this.share.showPopup(postId, imgUrl, featureMap, title, ratio);
     },
     //跳转详情页
     particulars: function (e) {
@@ -123,7 +131,20 @@ Component({
       var myEventDetail = {} // detail对象,提供给事件监听函数
       var myEventOption = {} // 触发事件的选项
       this.triggerEvent('myevent', myEventDetail, myEventOption)
-    }
+    },
+    //获取image宽高
+    imageLoad: function(e) {  
+      let height = e.detail.height;
+      let width = e.detail.width;
+      //获取屏幕宽度
+      const windowWidth = wx.getSystemInfoSync().windowWidth;
+      //获取图片高度
+      const imgHeight = windowWidth*(height/width);
+      this.setData({
+        ratio: height/width,
+        canvasHeight: imgHeight + 300
+      })
+    }  
   },
   ready: function(){
     //获取分享弹窗组件

+ 2 - 7
compontents/chat/chat.wxml

@@ -21,7 +21,7 @@
                 </view>
                 <view class="picture" wx:if="{{type == 2}}">
                     <block wx:for="{{item.imagesList}}" wx:for-item="items" wx:key="{{items}}">
-                        <image mode="aspectFill" src="{{items}}" catchtap="listenerButtonPreviewImage" data-img="{{items}}"></image>
+                        <image mode="aspectFill" src="{{items}}" catchtap="listenerButtonPreviewImage" data-img="{{items}}" bindload="imageLoad"></image>
                     </block>
                 </view>
                 <view class="icon" wx:if="{{type == 2}}">
@@ -40,14 +40,9 @@
                 </view>
             </view>
             <!--分享按钮 -->
-            <view class="share-up-box" wx:if="{{type == 2}}" bindtap="shareImage" data-postsId="{{item.id}}" data-imgUrl="{{item.imagesList}}">
+            <view class="share-up-box" wx:if="{{type == 2}}" bindtap="shareImage" data-postsId="{{item.id}}" data-imgUrl="{{item.imagesList}}" data-featureMap="{{item.featureMap}}" data-title="{{item.title}}">
                 <image class="share_up" src="../../pages/image/share_up.png"></image>
             </view>
-            <!--
-            <button class='transmit' open-type="share" id="transmit" data-userId="{{userId}}" data-postId="{{item.id}}"  wx:if="{{type == 2}}">
-                <image class="share_up" src="../../pages/image/share_up.png"></image>
-            </button> 
-             -->
         </view>
         <view class="more" wx:if="{{more}}" bindtap="examine">查看更多</view>
     </view>

+ 2 - 2
compontents/curriculum/curriculum.js

@@ -38,9 +38,9 @@ Component({
   methods: {
     onTap (e) {
       let flage = e.target.dataset.flag;
-      const height = this.properties.studyLog.length * 68;
+      const height = this.properties.studyLog.length * 54;
       if(flage){
-        this.util(flage, '700rpx');
+        this.util(flage, '680rpx');
         this.setData({
           'flag': false,
           'downUp': '展开',

+ 3 - 2
compontents/curriculum/curriculum.wxss

@@ -3,7 +3,7 @@
     width:100%;
     margin:20rpx 0;
     border-radius:25rpx;
-    padding: 28rpx 28rpx 81rpx 28rpx;
+    padding: 28rpx 28rpx 61rpx 28rpx;
     box-sizing:border-box;
     background:#fff;
     position: relative;
@@ -34,7 +34,8 @@
     display: flex;
     justify-content: space-between;
     align-items: center;
-    margin-top: 30rpx;
+    height:32rpx;
+    margin-top:24rpx;
 }
 
 .record_list text {

+ 1 - 0
compontents/lesson_list/lessonList.wxss

@@ -47,6 +47,7 @@
 
 .art-lesson {
      position: relative;
+     height:32rpx;
      margin-top: 24rpx;
  }
 

+ 10 - 10
compontents/rank-tarbar/rank-tarbar.js

@@ -14,7 +14,7 @@ Component({
    * navBtnSelectIdx点击改变的值
    */
   data: {
-    motto: ['好友数','勋章数','等级','答题量','准确率'],
+    motto: ['勋章数','等级','答题量','准确率'],
     navBtnSelectIdx: 0,
   },
 
@@ -28,29 +28,29 @@ Component({
       if (index != this.navBtnSelectIdx) {
         this.setData({ navBtnSelectIdx: index});
       }
+      // if(index == 0) {
+      //   wx.redirectTo({
+      //     url: '../competition/competition?ind=0'
+      //   })
+      // }
       if(index == 0) {
         wx.redirectTo({
-          url: '../competition/competition?ind=0'
+          url: '../medal_rank/medal_rank?ind=0'
         })
       }
       if(index == 1) {
         wx.redirectTo({
-          url: '../medal_rank/medal_rank?ind=1'
+          url: '../grade_rank/grade_rank?ind=1'
         })
       }
       if(index == 2) {
         wx.redirectTo({
-          url: '../grade_rank/grade_rank?ind=2'
+          url: '../quantity_rank/quantity_rank?ind=2'
         })
       }
       if(index == 3) {
         wx.redirectTo({
-          url: '../quantity_rank/quantity_rank?ind=3'
-        })
-      }
-      if(index == 4) {
-        wx.redirectTo({
-          url: '../accuracy_rank/accuracy_rank?ind=4'
+          url: '../accuracy_rank/accuracy_rank?ind=3'
         })
       }
     }

+ 83 - 46
compontents/share/share.js

@@ -14,7 +14,10 @@ Component({
   data: {
     flag: true,
     postId: '',
-    imgUrl: []
+    imgUrl: [],
+    featureMap: {},
+    title: '',
+    ratio: ''
   },
 
   /**
@@ -28,16 +31,26 @@ Component({
       })
     },
     //展示分享框
-    showPopup (postId, imgUrl) {
+    showPopup (postId, imgUrl, featureMap, title, ratio) {
       this.setData({
         flag: !this.data.flag,
         postId,
-        imgUrl
+        imgUrl,
+        featureMap,
+        title,
+        ratio
       })
     },
     //保存图片 
     saveImage (e) {
       const imgUrl = this.data.imgUrl;
+      const ratio = this.data.ratio;
+      const featureMap = this.data.featureMap;
+      const title = this.data.title;
+      //获取屏幕宽度
+      const windowWidth = wx.getSystemInfoSync().windowWidth;
+      //获取图片高度
+      const imgHeight = windowWidth*ratio;
       //先绘制图片
       for (let item of imgUrl) {
         // wx.downloadFile({
@@ -50,52 +63,76 @@ Component({
         const ctx = wx.createCanvasContext('myCanvas');
         var imgPath = item;
         ctx.setFillStyle('white')
-        //获取屏幕宽度
-        const windowWidth = wx.getSystemInfoSync().windowWidth;
-        ctx.fillRect(0, 0, windowWidth, 1.6 * windowWidth)
-
-        ctx.drawImage(imgPath, 30, 10, 300, 100);
-
+        ctx.fillRect(0, 0, windowWidth, imgHeight + 300)
+        //绘制用户上传的图片
+        ctx.drawImage(imgPath, 0, 0, windowWidth, imgHeight);
+        //绘制用户发表的内容和名字
+        ctx.setFontSize(16)
+        ctx.setFillStyle('black')
+        ctx.fillText(title, 135, imgHeight + 55)
         ctx.setFontSize(18)
+        ctx.fillText(featureMap.wechatName, 135, imgHeight + 35);
+        //横线
+        ctx.moveTo(20, imgHeight + 140)
+        ctx.lineTo(windowWidth - 40, imgHeight + 140)
+        ctx.stroke()
+        //绘制用户头像圆形切割-开始
+        ctx.save();
+        ctx.beginPath();
+        ctx.arc(70, imgHeight + 70, 50, 0, Math.PI * 2, false);
+        ctx.fill();
+        ctx.clip();
+        //圆形切割-结束
+        ctx.drawImage(featureMap.headImgUrl, 20, imgHeight + 20, 100, 100);
+        ctx.restore();
+        //二维码和文字
+        ctx.setFontSize(16)
         ctx.setFillStyle('black')
-        ctx.fillText('我画的图片', 50, 140)
-        ctx.draw();
+        ctx.fillText('长按二维码', 50, imgHeight + 180)
+        ctx.fillText('进入小程序查看更多', 50, imgHeight + 210)
+        ctx.draw()
       }
-      //canvas生成图片
-      wx.canvasToTempFilePath({
-        x: 0,
-        y: 0,
-        width: wx.getSystemInfoSync().windowWidth,
-        height: 0.6 * wx.getSystemInfoSync().windowWidth,
-        destWidth: wx.getSystemInfoSync().windowWidth,
-        destHeight:0.6 * wx.getSystemInfoSync().windowWidth,
-        canvasId: 'myCanvas',
-        success: (res) => {
-            console.log('canvas'+res.tempFilePath);
-            //保存图片到本地
-            wx.saveImageToPhotosAlbum({
-              filePath: res.tempFilePath,
-              success(res) {
-                  wx.showModal({
-                      title: '存图成功',
-                      content: '图片成功保存到相册了,去发朋友圈',
-                      showCancel:false,
-                      confirmText:'好哒',
-                      confirmColor:'#72B9C3',
-                      success: function(res) {
-                          if (res.confirm) {
-                              console.log('用户点击确定');
-                          }
-                          //that.hideShareImg()
-                      }
-                  })
-              }
-            })
-        },
-        fail:function (res) {
-            console.log(res)
-        }
-      })
+      setTimeout(() => {
+        this.canvasToImage()
+      }, 200)
+    },
+    canvasToImage () {
+        let that = this;
+        //canvas生成图片
+        wx.canvasToTempFilePath({
+          x: 0,
+          y: 0,
+          width: that.windowWidth,
+          height: that.imgHeight + 300,
+          destWidth: that.windowWidth,
+          destHeight: that.imgHeight + 300,
+          canvasId: 'myCanvas',
+          success: (res) => {
+              console.log(res.tempFilePath);
+              //保存图片到本地
+              wx.saveImageToPhotosAlbum({
+                filePath: res.tempFilePath,
+                success(res) {
+                    wx.showModal({
+                        title: '存图成功',
+                        content: '图片成功保存到相册了,去发朋友圈',
+                        showCancel:false,
+                        confirmText:'我知道了',
+                        confirmColor:'#72B9C3',
+                        success: function(res) {
+                            if (res.confirm) {
+                                console.log('用户点击确定');
+                            }
+                            //that.hideShareImg()
+                        }
+                    })
+                }
+              })
+          },
+          fail:function (res) {
+              console.log(res)
+          }
+        })
     }
   }
 

+ 11 - 80
pages/art/art.js

@@ -33,7 +33,8 @@ Page({
     previewHeight: '',
     productionMore: '',
     questionsMore: '',
-    wxObjectives: []
+    wxObjectives: [],
+    canvasHeight: ''
   },
 
   /* 区分答疑和分享 */
@@ -113,6 +114,14 @@ Page({
     }
   },
 
+  /*点击获取canvas高度*/
+  onGetHeight: function (e) {
+    const canvasHeight = this.selectComponent("#chat").data.canvasHeight;
+    this.setData({
+      canvasHeight,
+    })
+  },
+
   /*点击定位*/
   location: function (e) {
     const position = e.currentTarget.dataset.id;
@@ -125,6 +134,7 @@ Page({
 
 
   onLoad: function (options) {
+    //this.chat = this.selectComponent("#chat");
     const columnId = util.column('6').columnId;
     /* 分享 */
     this.distinction(2, columnId, 1, 2, res => {
@@ -230,84 +240,5 @@ Page({
         console.log("转发失败:" + JSON.stringify(res));
       }
     }
-  },
-  /*授权后执行的事件*/
-  impower: function (e) {
-    console.log(e)
-    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
-            })
-          }
-        }
-      }
-    });
-    /* 答疑 */
-    this.distinction(1, columnId, 1, 2, res => {
-      if(res.data.success) {
-        console.log(res.data.data)
-        this.setData({
-          questionsData: res.data.data
-        })
-        if(res.data.data) {
-          this.setData({
-            questionsdian: util.replyNo(res.data.data.list)
-          })  
-          if(res.data.data.totalSize > 2) {
-            this.setData({
-              questionsMore: true
-            })
-          }
-        }
-      }
-    });
-    /*科目信息*/
-    login.getOpenidSessionKey((res) => {
-      APIClient.getEachSchedule({
-        uid: res.data.data.uid
-      }, {
-        "category": 6
-      }).success((res) => {
-        const lessonListLength = res.data.data.lessonPage.list.length;
-        const previewLength = util.preview(res.data.data.lessonPage.list).length;
-        if(lessonListLength > 4) {
-          this.setData({
-            lessonListHeight: 280
-          })
-        }
-        if(previewLength > 4){
-          this.setData({
-            previewHeight: 280
-          })
-        } 
-        this.setData({
-          courseData: res.data.data,
-          list: util.studyPageTime(res.data.data.lessonPage.list),
-          wxObjectives: util.strategy(res.data.data.weekCourseConfig.wxObjectives)
-        })
-      })
-    }, function() {
-      wx.showModal({
-        title: '提示',
-        content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
-        showCancel: false,
-        success: function (res) {
-          if (res.confirm) {
-            console.log('用户点击确定')
-          } else if (res.cancel) {
-            console.log('用户点击取消')
-          }
-        }
-      })
-    });
   }
 })

+ 3 - 2
pages/art/art.wxml

@@ -18,12 +18,14 @@
             height="{{previewHeight}}"/>
 
             <chat id="upload"
+                id="chat"
                 productionData="{{productionData}}" 
                 title="作品展示"
                 query="上传作品"
                 type="2"
                 columnType="6"
                 bind:myevent="onMyEvent"
+                bind:getHeight="onGetHeight"
                 data-type="2"
                 more="{{productionMore}}"/>
 
@@ -46,9 +48,8 @@
                 <image src="../image/works.png" ></image>
             </view>  
             <view class="canvas-box">
-                <canvas canvas-id="myCanvas" style="width:100%;"></canvas>
+                <canvas canvas-id="myCanvas" style="width:100%; height: {{canvasHeight}}px;"></canvas>
             </view>
-            <button open-type="getUserInfo" bindgetuserinfo="impower">授权登录</button>
           </view>
       </scroll-view>
   </view>

BIN
pages/image/analysis_bottom.png


BIN
pages/image/analysis_top.png


BIN
pages/image/bg.png


BIN
pages/image/no_gain.png


+ 1 - 1
pages/index/index.js

@@ -100,7 +100,7 @@ Page({
 
         if(res.data.data.studyLog.length > 10) {
           this.setData({
-            height: '700'
+            height: '680'
           })
         }
       })

+ 7 - 9
pages/index/index.wxml

@@ -18,7 +18,7 @@
                     </view>
                     <view class="name">
                       {{data.users.wechatName}}
-                      <text class='LV'>LV {{data.users.level}}</text>
+                      <text class='LV'>LV {{data.level}}</text>
                     </view>
                   </view>
                 </view>
@@ -53,15 +53,8 @@
             <!-- 答题 -->
             <view class="ranking">
               <view class="dashed"></view>
-              <view class="title">
-                <text>好友比一比</text>
-              </view>
               <view class="ranking-con">
                 <view class="rank">
-                  <text>好友数: {{rankData.friendsRank.number}}位</text>
-                  <text>第{{rankData.friendsRank.rank}}名</text>
-                </view>
-                <view class="rank">
                   <text>勋章数量:{{rankData.metalsRank.number}}枚</text>
                   <text>第{{rankData.metalsRank.rank}}名</text>
                 </view>
@@ -79,7 +72,7 @@
                 </view>
               </view>
               <view class="particular">
-                <navigator url="../competition/competition" >查看详细排行</navigator>
+                <navigator url="../medal_rank/medal_rank" >查看详细排行</navigator>
               </view>
             </view>
             <!-- 勋章 -->
@@ -91,6 +84,11 @@
 
               <scroll-view scroll-x="true" >
                 <view class="img">
+                  <view wx:if="{{!data.isHave}}">
+                    <image src="../image/no_gain.png" class="no-gain"></image>
+                    <image src="{{data.currentMetals.unsoldImg}}"></image>
+                    <text>本周勋章</text>
+                  </view>
                   <view wx:for="{{data.metalsList}}" wx:key="{{item.id}}" >    
                     <image src="{{item.img}}"></image>
                     <text>{{item.name}}</text>

+ 11 - 2
pages/index/index.wxss

@@ -123,14 +123,14 @@
 }
 
 .ranking-con {
-  margin-bottom: 70rpx;
+  margin-bottom: 40rpx;
 }
 
 .rank {
   display: flex;
   justify-content: space-between;
   font-size: 28rpx;
-  margin-top: 30rpx;
+  margin-bottom: 30rpx;
 }
 
 .particular {
@@ -168,6 +168,7 @@
 }
 
 .img view {
+  position: relative;
   flex: 1;
   display: flex;
   flex-direction: column;
@@ -176,6 +177,14 @@
   margin-right: 15rpx;
 }
 
+.no-gain {
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 142rpx;
+  height: 142rpx;
+}
+
 .img image {
   width: 140rpx;
   height: 140rpx;

+ 61 - 5
pages/mistakes/mistakes.js

@@ -8,7 +8,46 @@ Page({
    * 页面的初始数据
    */
   data: {
-  
+    mistakesData: [],
+    animationData: {},
+    flag: [],
+    exponentData: []
+  },
+
+  particulars: function (e) {
+    let flage = e.currentTarget.dataset.flag;
+    let index = e.currentTarget.dataset.index;
+    if(flage){
+      this.util('60rpx');
+      this.data.flag[index] = false;
+      this.setData({
+        flag: this.data.flag,
+      })
+    } else {
+      this.data.flag[index] = true;
+      this.util('164rpx');
+      this.setData({
+        flag: this.data.flag,
+      })
+    }
+  },
+
+  /* 创建动画并执行 */
+  util (height) {
+    // 创建动画实例   
+    var animation = wx.createAnimation({  
+      duration: 200,  //动画时长  
+      timingFunction: "linear", //线性  
+      delay: 0  //0则不延迟  
+    });
+    
+    this.animation = animation;
+
+    animation.height(height).step();
+
+    this.setData({  
+      animationData: animation.export()  
+    })  
   },
 
   /**
@@ -20,11 +59,28 @@ Page({
         uid: res.data.data.uid
       },{
         pageNo: 1,
-        pageSize: 2,
+        pageSize: 1000,
+      }).success(res => {
+        console.log(res.data.data.list)
+        this.setData({
+          mistakesData: res.data.data.list
+        })
+
+        for(let item of  res.data.data.list) {
+          this.data.flag.push(false);
+        }
+        this.setData({
+          flag: this.data.flag
+        })
+      })
+      //用户答题指数
+      APIClient.getExponentSchedule({
+        uid: res.data.data.uid
       }).success(res => {
-        console.log(res)
-        
-       
+        console.log(res);
+        this.setData({
+          exponentData: res.data.data
+        })
       })
     }, function() {
       wx.showModal({

+ 18 - 3
pages/mistakes/mistakes.wxml

@@ -9,15 +9,15 @@
            <view class="answer-number">
             <view class="gross">
                 <text>答题总量</text>
-                <text>1000</text>
+                <text>{{exponentData.sumAnswer}}</text>
             </view>
             <view class="error">
                 <text>错误</text>
-                <text>1000</text>
+                <text>{{exponentData.sumWrongAnswer}}</text>
             </view>
             <view class="correct">
                 <text>准确率</text>
-                <text>0%</text>
+                <text>{{exponentData.accuracy}}</text>
             </view>
            </view>
            <view class="course">
@@ -29,6 +29,21 @@
                     数学
                 </view>
             </view>
+            <view class="course-content">
+                <view class="error answer-content" wx:for="{{mistakesData}}" wx:key="index">
+                    <image class="questions" src="{{item.questions.img}}"></image>
+                    <view class="answer {{flag[index] ? 'unfold' : ''}}" animation="{{flag[index]? animationData : ''}}">
+                        <view class="answer-txt">
+                            <text>你的答案:{{item.userQuestionResult.answer === "" ? '不知道' : userQuestionResult.answer}}</text>
+                            <text>{{item.questions.answer == item.userQuestionResult.answer ? "" : "(错误)"}}</text>
+                        </view>
+                        <view class="analysis" bindtap="particulars" data-flag="{{flag[index]}}" data-index="{{index}}">
+                            <image class="analysis-img" src="../image/analysis_bottom.png" wx:if="{{!(flag[index])}}"></image>
+                            <image class="analysis-img-top" src="../image/analysis_top.png" wx:else></image>
+                        </view>
+                    </view>
+                </view>
+            </view>
            </view>
         </view> 
       </scroll-view>

+ 41 - 0
pages/mistakes/mistakes.wxss

@@ -58,4 +58,45 @@
 
 .select {
     background: #fff;
+}
+
+.answer-content {
+    margin-bottom: 20rpx;
+}
+
+.answer-content .questions {
+    width: 100%;
+    height: 405rpx;
+    border-radius: 20rpx;
+}
+
+.answer {
+    position: relative;
+    display: flex;
+    justify-content: space-evenly;
+    margin:-8rpx 20rpx 0 20rpx;
+    border-radius: 10rpx;
+    
+}
+
+.unfold {
+    background: #fff;
+}
+
+.analysis {
+
+}
+
+.analysis .analysis-img {
+    width: 103rpx;
+    height: 60rpx;
+}
+
+.analysis .analysis-img-top {
+    position: absolute;
+    bottom: 0;
+    left: 50%;
+    transform: translate(-50%, 0);
+    width: 99rpx;
+    height: 22rpx;
 }

+ 12 - 1
pages/science/science.js

@@ -19,7 +19,8 @@ Page({
     previewHeight: '',
     productionMore: '',
     questionsMore: '',
-    wxObjectives: []
+    wxObjectives: [],
+    canvasHeight: ''
   },
   /* 区分答疑和分享 */
   distinction: function(type, columnId, pageNo, pageSize, success) {
@@ -48,6 +49,16 @@ Page({
       })
     });
   },
+
+  /*点击获取canvas高度*/
+  onGetHeight: function (e) {
+    const canvasHeight = this.selectComponent("#chat").data.canvasHeight;
+    console.log(canvasHeight)
+    this.setData({
+      canvasHeight,
+    })
+  },
+
   /*点击查看更多*/
   onMyEvent: function(e){
     let type = e.currentTarget.dataset.type;

+ 7 - 1
pages/science/science.wxml

@@ -18,11 +18,13 @@
             height="{{previewHeight}}"/>
 
             <chat id="upload"
+                id="chat"
                 productionData="{{productionData}}" 
                 title="作品展示"
                 query="上传作品"
                 type="2"
                 columnType="5"
+                bind:getHeight="onGetHeight"
                 bind:myevent="onMyEvent"
                 data-type="2"
                 more="{{productionMore}}"/>
@@ -45,7 +47,11 @@
 
             <view class="upload-one" data-id="upload" bindtap="location">
                 <image src="../image/works.png" ></image>
-            </view>  
+            </view>
+
+            <view class="canvas-box">
+                <canvas canvas-id="myCanvas" style="width:100%; height: {{canvasHeight}}px;"></canvas>
+            </view> 
           </view>
       </scroll-view>
   </view>

+ 8 - 0
pages/science/science.wxss

@@ -306,4 +306,12 @@
     background: #F73861;
     font-size: 24rpx;
     border-radius: 50%;
+}
+
+.canvas-box {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100%;
+    z-index: -2;
 }

+ 5 - 0
utils/APIClient.js

@@ -67,5 +67,10 @@ module.exports = {
 	getErrorsSchedule(header, data) {
 		let url = genAPIUrl('wx/question/wrong');
 		return request.getInstance().url(url).header(header).data(data).method('GET').send();
+	},
+	//获取用户答题指数
+	getExponentSchedule(header) {
+		let url = genAPIUrl('wx/question/exponent');
+		return request.getInstance().url(url).header(header).method('GET').send();
 	}
 }