@@ -24,9 +24,9 @@ Component({
type: String,
value: ''
},
- num: {
+ heigth: {
- type: Number,
+ type: String,
- value: 0
+ value: ''
}
@@ -18,7 +18,7 @@
</view>
</block>
- <view class="rank-list" animation="{{animationData}}">
+ <view class="rank-list" animation="{{animationData}}" style="height: {{heigth}}rpx">
<view class="rank-friend" wx:for="{{friendsData}}" wx:key="{{index}}">
<view class="rank-head">
<text class="rank-text">{{item.rank}}</text>
@@ -117,7 +117,6 @@
/* 勋章列表*/
.rank-list {
- height: 560rpx;
overflow: hidden;
margin-top: 20rpx;
@@ -12,7 +12,8 @@ Page({
data: {
friendsData: {},
friendsThreeData: {},
- myData: {}
+ myData: {},
+ height: ''
/**
@@ -46,6 +47,12 @@ Page({
friendsData: res.data.data.rankVoList.slice(3,),
myData: res.data.data
})
+ const length = this.data.friendsData.length;
+ if(length > 7){
+ this.setData({
+ height: 560
+ })
+ }
}, function() {
wx.showModal({
@@ -11,7 +11,8 @@
friendsThreeData="{{friendsThreeData}}"
myData="{{myData}}"
str="%"
- title="准确率"/>
+ title="准确率"
+ height="{{height}}"/>
</scroll-view>
@@ -14,7 +14,9 @@ Page({
num2: 0,
position: '',
questionsdian: '',
- list: ''
+ list: [],
+ lessonListHeight: '',
+ previewHeight: ''
/* 区分答疑和分享 */
@@ -135,6 +137,19 @@ Page({
}, {
"category": 6
}).success((res) => {
+ const lessonListLength = res.data.data.lessonPage.list.length;
+ const previewLength = util.preview(res.data.data.lessonPage.list).length;
+ console.log(res)
+ if(lessonListLength > 4) {
+ lessonListHeight: 280
+ if(previewLength > 4){
+ previewHeight: 280
this.setData({
courseData: res.data.data,
list: util.studyPageTime(res.data.data.lessonPage.list)
@@ -9,9 +9,13 @@
<view class="art">
<target wxObjectives="{{courseData.weekCourseConfig.wxObjectives}}"/>
- <lessonList lessonData="{{list}}"/>
+ <lessonList
+ lessonData="{{list}}"
+ height="{{lessonListHeight}}"/>
- <preview materialData="{{courseData.lessonPage.list}}"/>
+ <preview
+ materialData="{{courseData.lessonPage.list}}"
+ height="{{previewHeight}}"/>
<chat id="upload"
productionData="{{productionData}}"
@@ -12,7 +12,7 @@ Page({
num1: 0,
- list: '',
lessonListHeight: '',
previewHeight: ''
@@ -47,6 +48,12 @@ Page({
friendsData: res.data.data.friendsRankVoList.slice(3,),
@@ -12,7 +12,7 @@
str="位好友"
title="好友数排名"
- num="0"/>
@@ -12,7 +12,9 @@ Page({
@@ -104,6 +106,19 @@ Page({
"category": 4
//console.log('科目信息' + JSON.stringify(res));
<view class="english">
<chat id="questions"
productionData="{{questionsData}}"
friendsData: res.data.data.expRankVoList.slice(3,),
@@ -10,7 +10,8 @@
friendsData="{{friendsData}}"
- title="等级排名"/>
+ title="等级排名"
- list: []
@@ -100,7 +102,19 @@ Page({
"category": 1
console.log(res)
<view class="language">
@@ -103,6 +105,19 @@ Page({
"category": 2
<view class="mathematics">
friendsData: res.data.data.userMetalRankVoList.slice(3,),
str="个勋章"
- title="勋章数排名"/>
+ title="勋章数排名"
str="题"
- title="答题量排名"/>
+ title="答题量排名"
distinction: function(type, columnId, pageNo, pageSize, success) {
@@ -132,6 +134,19 @@ Page({
"category": 5
<view class="science">