|
@@ -1,211 +1,226 @@
|
|
|
//积分排行版
|
|
|
<style lang="less">
|
|
|
page {
|
|
|
- height: 100%;
|
|
|
- background-color: #f3f3f3;
|
|
|
+ height: 100%;
|
|
|
+ background-color: #ebf5fa;
|
|
|
}
|
|
|
.page-container {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- position: relative;
|
|
|
- font-family: PingFang SC;
|
|
|
- .rankHeadTitle {
|
|
|
- position: absolute;
|
|
|
- top: -72px;
|
|
|
- left: 0;
|
|
|
width: 100%;
|
|
|
- font-size: 40rpx;
|
|
|
- color: #000;
|
|
|
- height: 72px;
|
|
|
- text-align: center;
|
|
|
- line-height: 72px;
|
|
|
- }
|
|
|
- .energyHead {
|
|
|
- padding: 34rpx 44rpx 32rpx;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- .totalEnergy {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- // align-items: flex-end;
|
|
|
- //justify-content: flex-end;
|
|
|
- height: 80px;
|
|
|
- line-height: 1;
|
|
|
- .name {
|
|
|
- color: #4d5262;
|
|
|
- font-size: 25rpx;
|
|
|
- }
|
|
|
- .value {
|
|
|
- padding-top: 12px;
|
|
|
- color: #000;
|
|
|
- font-size: 87rpx;
|
|
|
- font-family: Montserrat;
|
|
|
- }
|
|
|
- }
|
|
|
- .rightCont {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- // align-items: flex-end;
|
|
|
- .rankTitle {
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ .rankHeadTitle {
|
|
|
+ position: absolute;
|
|
|
+ top: -72px;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
font-size: 40rpx;
|
|
|
color: #000;
|
|
|
- }
|
|
|
- .pointExplain {
|
|
|
- color: #4d5262;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content:flex-end;
|
|
|
- padding-top: 20rpx;
|
|
|
- .text {
|
|
|
- font-size: 24rpx;
|
|
|
- margin-right: 8rpx;
|
|
|
- }
|
|
|
- .icon {
|
|
|
- font-size: 30rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- .timeButton {
|
|
|
+ height: 72px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 72px;
|
|
|
+ }
|
|
|
+ .energyHead {
|
|
|
+ padding: 34rpx 44rpx 32rpx;
|
|
|
display: flex;
|
|
|
- padding-top: 30rpx;
|
|
|
- font-family: Montserrat;
|
|
|
- font-size: 13px;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 18px;
|
|
|
- color: #4d5262;
|
|
|
- .timeStr {
|
|
|
- margin-right: 6rpx;
|
|
|
+ justify-content: space-between;
|
|
|
+ .totalEnergy {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ // align-items: flex-end;
|
|
|
+ //justify-content: flex-end;
|
|
|
+ height: 80px;
|
|
|
+ line-height: 1;
|
|
|
+ .name {
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 44rpx;
|
|
|
+ color: #626c78;
|
|
|
+ }
|
|
|
+ .value {
|
|
|
+ font-family: Persagy2.0;
|
|
|
+ font-size: 64rpx;
|
|
|
+ font-weight: 600;
|
|
|
+ line-height: 80rpx;
|
|
|
+ color: #1b2129;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- .timeButton2 {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- background: rgba(196, 196, 196, 0.2);
|
|
|
- border-radius: 34rpx;
|
|
|
- color: #9fb7cd;
|
|
|
- font-size: 25rpx;
|
|
|
- margin-top: 30rpx;
|
|
|
- font-family: Montserrat;
|
|
|
- font-weight: 400;
|
|
|
- .timeItem {
|
|
|
- width: 140rpx;
|
|
|
- height: 72rpx;
|
|
|
- line-height: 72rpx;
|
|
|
- text-align: center;
|
|
|
- color: #576b95;
|
|
|
+ .rightCont {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ // align-items: flex-end;
|
|
|
+ .rankTitle {
|
|
|
+ font-size: 40rpx;
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ .pointExplain {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ .text {
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 44rpx;
|
|
|
+ color: #626C78;
|
|
|
+ margin-right: 8rpx;
|
|
|
+ }
|
|
|
+ .icon {
|
|
|
+ font-size: 30rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .timeButton {
|
|
|
+ display: flex;
|
|
|
+ padding-top: 30rpx;
|
|
|
+ font-family: Montserrat;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 36rpx;
|
|
|
+ color: #4d5262;
|
|
|
+ .timeStr {
|
|
|
+ margin-right: 6rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .timeButton2 {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 72rpx;
|
|
|
+ background: rgba(196, 196, 196, 0.2);
|
|
|
+ border-radius: 34rpx;
|
|
|
+ color: #9fb7cd;
|
|
|
+ font-size: 25rpx;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ font-family: Montserrat;
|
|
|
+ font-weight: 400;
|
|
|
+ .timeItem {
|
|
|
+ width: 140rpx;
|
|
|
+ height: 72rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 72rpx;
|
|
|
+ color: #626c78;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .weekItem {
|
|
|
+ width: 160rpx;
|
|
|
+ }
|
|
|
+ .sel {
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 34rpx;
|
|
|
+ color: #000000;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- .weekItem {
|
|
|
- width: 160rpx;
|
|
|
+ }
|
|
|
+ .rankList {
|
|
|
+ background: #fff;
|
|
|
+ padding-left: 44rpx;
|
|
|
+ position: relative;
|
|
|
+ .controlDiv {
|
|
|
+ width: 230rpx;
|
|
|
+ height: 70rpx;
|
|
|
+ background: #fff;
|
|
|
+ right: 2rpx;
|
|
|
+ top: -70rpx;
|
|
|
+ position: absolute;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ border: 1px solid #c3c3c3;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
- .sel {
|
|
|
- background: #fff;
|
|
|
- border-radius: 34rpx;
|
|
|
- color: #000000;
|
|
|
+ .eachItem {
|
|
|
+ display: flex;
|
|
|
+ // justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ height: 130rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ .leftCont {
|
|
|
+ color: #140050;
|
|
|
+ font-size: 32rpx;
|
|
|
+ width: 64rpx;
|
|
|
+ }
|
|
|
+ .centerCont {
|
|
|
+ height: 100%;
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ border-bottom: 1px solid #e6e6e6;
|
|
|
+ padding-right: 44rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow: hidden;
|
|
|
+ .leftHead {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .headImg {
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ border-radius: 80rpx;
|
|
|
+ margin-right: 40rpx;
|
|
|
+ }
|
|
|
+ .name {
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ color: #000000;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 48rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .point {
|
|
|
+ text-align: right;
|
|
|
+ width: 80rpx;
|
|
|
+ font-family: Persagy2.0;
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 42rpx;
|
|
|
+ color: #626C78;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
- .rankList {
|
|
|
- background: #fff;
|
|
|
- padding-left: 44rpx;
|
|
|
- position: relative;
|
|
|
- .controlDiv {
|
|
|
- width: 230rpx;
|
|
|
- height: 70rpx;
|
|
|
- background: #fff;
|
|
|
- right: 2rpx;
|
|
|
- top: -70rpx;
|
|
|
- position: absolute;
|
|
|
- border-radius: 10rpx;
|
|
|
- border: 1px solid #c3c3c3;
|
|
|
- box-sizing: border-box;
|
|
|
+ .bottomCont {
|
|
|
+ height: 80rpx;
|
|
|
}
|
|
|
- .eachItem {
|
|
|
- display: flex;
|
|
|
- // justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- height: 130rpx;
|
|
|
- box-sizing: border-box;
|
|
|
- .leftCont {
|
|
|
- color: #140050;
|
|
|
- font-size: 32rpx;
|
|
|
- width: 64rpx;
|
|
|
- }
|
|
|
- .centerCont {
|
|
|
- height: 100%;
|
|
|
- flex: 1;
|
|
|
+ .logo-text {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- border-bottom: 1px solid #e6e6e6;
|
|
|
- padding-right: 44rpx;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow: hidden;
|
|
|
- .leftHead {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .headImg {
|
|
|
- width: 80rpx;
|
|
|
- height: 80rpx;
|
|
|
- border-radius: 80rpx;
|
|
|
- margin-right: 40rpx;
|
|
|
- // background: red;
|
|
|
- }
|
|
|
- .name {
|
|
|
- color: #000000;
|
|
|
- font-size: 30rpx;
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
- }
|
|
|
+ justify-content: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 24rpx;
|
|
|
+ padding: 98rpx 0 80rpx;
|
|
|
+ margin-top: 80rpx;
|
|
|
+ }
|
|
|
+ .nodata {
|
|
|
+ text-align: center;
|
|
|
+ color: #c4c4c4;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ transform: translate(0px, -100px);
|
|
|
+ .nodataImg {
|
|
|
+ width: 100%;
|
|
|
+ image {
|
|
|
+ width: 96px;
|
|
|
+ height: 96px;
|
|
|
+ }
|
|
|
}
|
|
|
- .point {
|
|
|
- // flex-shrink: 0;
|
|
|
- text-align: right;
|
|
|
- width: 80rpx;
|
|
|
- color: #4d5262;
|
|
|
- font-size: 32rpx;
|
|
|
+ .firstTitle {
|
|
|
+ font-size: 34rpx;
|
|
|
+ }
|
|
|
+ .secondTitle {
|
|
|
+ margin-top: 6px;
|
|
|
+ font-size: 26rpx;
|
|
|
+ .showExplain {
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .bottomCont {
|
|
|
- height: 80rpx;
|
|
|
- }
|
|
|
- .logo-text {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- width: 100%;
|
|
|
- height: 24rpx;
|
|
|
- padding: 98rpx 0 80rpx;
|
|
|
- margin-top: 80rpx;
|
|
|
- }
|
|
|
- .nodata {
|
|
|
- text-align: center;
|
|
|
- color: #c4c4c4;
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- transform: translate(0px, -100px);
|
|
|
- .nodataImg {
|
|
|
- width: 100%;
|
|
|
- image {
|
|
|
- width: 96px;
|
|
|
- height: 96px;
|
|
|
- }
|
|
|
- }
|
|
|
- .firstTitle {
|
|
|
- font-size: 34rpx;
|
|
|
- }
|
|
|
- .secondTitle {
|
|
|
- margin-top: 6px;
|
|
|
- font-size: 26rpx;
|
|
|
- .showExplain {
|
|
|
- text-decoration: underline;
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
}
|
|
|
</style>
|
|
|
|
|
@@ -224,24 +239,24 @@ page {
|
|
|
@tap="showPointExplain"
|
|
|
>
|
|
|
<span class="text">积分说明</span>
|
|
|
- <van-icon
|
|
|
- class="icon"
|
|
|
- name="question-o"
|
|
|
+ <image
|
|
|
+ style="width:24rpx;height:24rpx"
|
|
|
+ src="{{h5StaticPath}}/page-portrait/icon-triangle-right.svg"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div
|
|
|
- class="timeButton2"
|
|
|
- >
|
|
|
- <!-- <span class="timeStr">{{nowDateStr}}</span>
|
|
|
+ <div class="timeButton2">
|
|
|
+ <!-- <span class="timeStr">{{nowDateStr}}</span>
|
|
|
<van-icon name="arrow-down" /> -->
|
|
|
- <div
|
|
|
- class="timeItem" @tap="showTimePopup('month')"
|
|
|
- :class="{'sel':timeType == 'month'}"
|
|
|
- >{{nowDateStr}}</div>
|
|
|
- <div
|
|
|
- class="timeItem weekItem" @tap="showTimePopup('week')"
|
|
|
- :class="{'sel':timeType == 'week'}"
|
|
|
- >{{nowWeekStr}}</div>
|
|
|
+ <div
|
|
|
+ class="timeItem"
|
|
|
+ @tap="showTimePopup('month')"
|
|
|
+ :class="{'sel':timeType == 'month'}"
|
|
|
+ >{{nowDateStr}}</div>
|
|
|
+ <div
|
|
|
+ class="timeItem weekItem"
|
|
|
+ @tap="showTimePopup('week')"
|
|
|
+ :class="{'sel':timeType == 'week'}"
|
|
|
+ >{{nowWeekStr}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -258,7 +273,7 @@ page {
|
|
|
<div class="leftHead">
|
|
|
<image
|
|
|
class="headImg"
|
|
|
- :src="item.headImgUrl"
|
|
|
+ :src="item.headImgUrl || defaultHead"
|
|
|
mode="widthFix"
|
|
|
/>
|
|
|
<div class="name">{{item.userName}}</div>
|
|
@@ -269,12 +284,12 @@ page {
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="totalGet">
|
|
|
+ <!-- <div v-show="totalGet">
|
|
|
<image
|
|
|
class="logo-text"
|
|
|
src="{{h5StaticPath}}/page-home/tenatslink.svg"
|
|
|
></image>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div
|
|
|
class="nodata"
|
|
|
v-if="noDataShow"
|
|
@@ -299,13 +314,19 @@ page {
|
|
|
@close="visible = false"
|
|
|
:show="visible"
|
|
|
>
|
|
|
- <div v-if="timeType=='week'" style="height: 320px;">
|
|
|
+ <div
|
|
|
+ v-if="timeType=='week'"
|
|
|
+ style="height: 320px;"
|
|
|
+ >
|
|
|
<weekcom
|
|
|
@checkTime="checkWeekTime"
|
|
|
:yearWeekText="nowWeekStr"
|
|
|
></weekcom>
|
|
|
</div>
|
|
|
- <div v-if="timeType=='month'" style="height: 320px;">
|
|
|
+ <div
|
|
|
+ v-if="timeType=='month'"
|
|
|
+ style="height: 320px;"
|
|
|
+ >
|
|
|
<monthcom
|
|
|
@checkTime="checkMonthTime"
|
|
|
:yearMonthText="nowDateStr"
|
|
@@ -321,8 +342,8 @@ import store from '@/store'
|
|
|
import config from '@/config'
|
|
|
import { mapState } from '@wepy/x'
|
|
|
import {
|
|
|
- queryIntegralRank,
|
|
|
- queryAllIntegral
|
|
|
+ queryIntegralRank,
|
|
|
+ queryAllIntegral
|
|
|
} from '@/packagesEnv/api/portrait'
|
|
|
import { getCompmayUsers } from '@/api/user'
|
|
|
import moment from 'moment'
|
|
@@ -342,6 +363,7 @@ wepy.page({
|
|
|
nowDateStr: '',
|
|
|
visible: false,
|
|
|
h5StaticPath: config.h5StaticPath,
|
|
|
+ defaultHead: `${config.h5StaticPath}/page-portrait/Avatar.svg`,
|
|
|
allUser: [],
|
|
|
noDataShow: false,
|
|
|
timeType: 'month',
|
|
@@ -360,7 +382,7 @@ wepy.page({
|
|
|
for (let key in udata) {
|
|
|
arr.push(...udata[key])
|
|
|
}
|
|
|
- // console.log("val33",arr);
|
|
|
+ // console.log("val33",arr);
|
|
|
return arr
|
|
|
}
|
|
|
})
|
|
@@ -370,31 +392,31 @@ wepy.page({
|
|
|
this.carbonCreditText = carbonCredit(this.projectId)
|
|
|
|
|
|
this.nowDate = moment()
|
|
|
- .subtract(1, 'month')
|
|
|
- .format('YYYYMM')
|
|
|
+ .subtract(1, 'month')
|
|
|
+ .format('YYYYMM')
|
|
|
this.nowDateStr = moment()
|
|
|
- .subtract(1, 'month')
|
|
|
- .format('YYYY.MM')
|
|
|
+ .subtract(1, 'month')
|
|
|
+ .format('YYYY.MM')
|
|
|
this.nowWeekStr = moment()
|
|
|
- .weekday(-6)
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- // this.queryCompmayUsers().then((res) => {
|
|
|
- // debugger;
|
|
|
- // var allUser = res;
|
|
|
- // this.rankList.forEach((ele, index) => {
|
|
|
- // var filterUser = allUser.filter(function (item) {
|
|
|
- // return item.id == ele.userId;
|
|
|
- // })
|
|
|
- // ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
|
|
|
- // });
|
|
|
+ .weekday(-6)
|
|
|
+ .format('YYYY.MM.DD')
|
|
|
+ // this.queryCompmayUsers().then((res) => {
|
|
|
+ // debugger;
|
|
|
+ // var allUser = res;
|
|
|
+ // this.rankList.forEach((ele, index) => {
|
|
|
+ // var filterUser = allUser.filter(function (item) {
|
|
|
+ // return item.id == ele.userId;
|
|
|
+ // })
|
|
|
+ // ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
|
|
|
+ // });
|
|
|
|
|
|
- // });
|
|
|
+ // });
|
|
|
|
|
|
this.queryAllIntegral()
|
|
|
this.queryRankingList()
|
|
|
let menuButtonBoundingClientRect = wx.getMenuButtonBoundingClientRect()
|
|
|
},
|
|
|
- onReady() {},
|
|
|
+ onReady() { },
|
|
|
onReachBottom() {
|
|
|
if (this.page == this.totalPage) return
|
|
|
this.page++
|
|
@@ -404,18 +426,18 @@ wepy.page({
|
|
|
this.queryRankingList()
|
|
|
},
|
|
|
methods: {
|
|
|
- // combineUser() {
|
|
|
- // //var allUser = val || [];
|
|
|
- // this.rankList.forEach((ele, index) => {
|
|
|
- // var filterUser = this.allUser2.filter(function (item) {
|
|
|
- // return item.id == ele.userId;
|
|
|
- // })
|
|
|
- // ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
|
|
|
- // });
|
|
|
- // },
|
|
|
+ // combineUser() {
|
|
|
+ // //var allUser = val || [];
|
|
|
+ // this.rankList.forEach((ele, index) => {
|
|
|
+ // var filterUser = this.allUser2.filter(function (item) {
|
|
|
+ // return item.id == ele.userId;
|
|
|
+ // })
|
|
|
+ // ele.headImgUrl = (filterUser[0] || {}).headImgUrl;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
queryCompmayUsers() {
|
|
|
return getCompmayUsers().then((res) => {
|
|
|
- // console.log('getCompmayUsers', res);
|
|
|
+ // console.log('getCompmayUsers', res);
|
|
|
var resdata = res.data || {}
|
|
|
var allUser = []
|
|
|
for (var i in resdata) {
|
|
@@ -426,11 +448,11 @@ wepy.page({
|
|
|
})
|
|
|
},
|
|
|
showTimePopup(type) {
|
|
|
- // if (this.timeType == 'week') {
|
|
|
- // this.timeType = 'month';
|
|
|
- // } else {
|
|
|
- // this.timeType = 'week';
|
|
|
- // }
|
|
|
+ // if (this.timeType == 'week') {
|
|
|
+ // this.timeType = 'month';
|
|
|
+ // } else {
|
|
|
+ // this.timeType = 'week';
|
|
|
+ // }
|
|
|
this.timeType = type
|
|
|
console.log('type', type)
|
|
|
this.visible = true
|
|
@@ -461,12 +483,12 @@ wepy.page({
|
|
|
this.queryRankingList()
|
|
|
},
|
|
|
queryAllIntegral() {
|
|
|
- // 获取上月的总积分
|
|
|
+ // 获取上月的总积分
|
|
|
var _this = this
|
|
|
- // var lastMonth = moment().subtract(1, 'month').format("YYYYMM");
|
|
|
+ // var lastMonth = moment().subtract(1, 'month').format("YYYYMM");
|
|
|
var param = {
|
|
|
criteria: {
|
|
|
- // date:lastMonth,
|
|
|
+ // date:lastMonth,
|
|
|
date: _this.nowDate,
|
|
|
type: _this.timeType == 'week' ? 3 : 1
|
|
|
}
|
|
@@ -478,7 +500,7 @@ wepy.page({
|
|
|
})
|
|
|
},
|
|
|
queryRankingList() {
|
|
|
- // 获取所有用户的排名
|
|
|
+ // 获取所有用户的排名
|
|
|
var _this = this
|
|
|
var param = {
|
|
|
criteria: {
|
|
@@ -503,26 +525,26 @@ wepy.page({
|
|
|
var allRes = res.content || []
|
|
|
_this.totalPage = Math.ceil((res.count || 0) / _this.pageCount)
|
|
|
_this.totalGet = _this.totalPage == _this.page
|
|
|
- // var intergralList=this.intergralList;
|
|
|
+ // var intergralList=this.intergralList;
|
|
|
var orderNum =
|
|
|
- (_this.rankList[_this.rankList.length - 1] || {}).orderNum || 0
|
|
|
- // debugger;
|
|
|
+ (_this.rankList[_this.rankList.length - 1] || {}).orderNum || 0
|
|
|
+ // debugger;
|
|
|
allRes.forEach((ele, index) => {
|
|
|
ele.orderNum = orderNum + index + 1
|
|
|
- // ele.userId='0fdfbe828aa94c659b33e9c605b5c9ea';
|
|
|
- var filterUser = (this.allUser2 || []).filter(function(item) {
|
|
|
+ // ele.userId='0fdfbe828aa94c659b33e9c605b5c9ea';
|
|
|
+ var filterUser = (this.allUser2 || []).filter(function (item) {
|
|
|
return item.id == ele.userId
|
|
|
})
|
|
|
ele.headImgUrl = (filterUser[0] || {}).headImgUrl
|
|
|
|
|
|
- if (ele.userId == this.userInfo.userId) {
|
|
|
- ele.headImgUrl =
|
|
|
- this.userInfo.avatarUrl || this.userInfo.headImgUrl
|
|
|
- }
|
|
|
+ // if (ele.userId == this.userInfo.userId) {
|
|
|
+ // ele.headImgUrl =
|
|
|
+ // this.userInfo.avatarUrl || this.userInfo.headImgUrl
|
|
|
+ // }
|
|
|
_this.rankList.push(ele)
|
|
|
})
|
|
|
_this.noDataShow = !(_this.rankList.length > 0)
|
|
|
- // console.log('_this.rankList', _this.rankList);
|
|
|
+ // console.log('_this.rankList', _this.rankList);
|
|
|
wx.hideLoading()
|
|
|
})
|
|
|
},
|
|
@@ -541,14 +563,13 @@ wepy.page({
|
|
|
|
|
|
<config>
|
|
|
{
|
|
|
- 'navigationBarBackgroundColor': '#f3f3f3',
|
|
|
+ 'navigationBarBackgroundColor': '#ebf5fa',
|
|
|
'navigationBarTextStyle':'black',
|
|
|
'backgroundColor': '#f3f3f3',
|
|
|
'navigationBarTitleText': '排行榜',
|
|
|
usingComponents: {
|
|
|
"monthcom":"./components/monthcom",
|
|
|
"weekcom":"./components/weekcom",
|
|
|
- "van-icon": "module:@vant/weapp/dist/icon",
|
|
|
"van-popup": "module:@vant/weapp/dist/popup",
|
|
|
}
|
|
|
|