用户推荐帮

This commit is contained in:
2022-08-01 13:12:06 +08:00
parent 263c896ff9
commit 5618d4e2d7
7 changed files with 383 additions and 215 deletions

View File

@@ -32,8 +32,16 @@ const total = () => {
})
}
// 用户推荐榜
const totaluser = () => {
return request({
url: 'user/rank/totaluser'
})
}
export {
week_mul,
week,
total
total,
totaluser
}

View File

@@ -461,7 +461,7 @@
}, {
"path": "pages/rank/index",
"style": {
"navigationBarTitleText": "会员推荐",
"navigationBarTitleText": "排行榜",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#34CE98"
@@ -542,7 +542,7 @@
"iconPath": "static/tabBar/tabBar_05.png",
"selectedIconPath": "static/tabBar/tabBar_show_05.png",
"pagePath": "pages/rank/index",
"text": "排行榜"
"text": "排行榜"
},
{
"iconPath": "static/tabBar/tabBar_03.png",

View File

@@ -12,13 +12,18 @@
<image class="rank_top_right" src="../../static/rank/rank.png" mode="widthFix" />
</view>
<view class="rank_type">
<view :class="['rank_type_item',type === '1'?'rank_type_item_active':'']" @click="changeType('1')">上周加成榜</view>
<view :class="['rank_type_item',type === '2'?'rank_type_item_active':'']" @click="changeType('2')">本周推荐榜</view>
<view :class="['rank_type_item',type === '3'?'rank_type_item_active':'']" @click="changeType('3')">会员推荐榜</view>
</view>
<scroll-view class="rank_type" scroll-x="true">
<view :class="['rank_type_item',type === '1'?'rank_type_item_active':'']" @click="changeType('1')">上周加成榜
</view>
<view :class="['rank_type_item',type === '2'?'rank_type_item_active':'']" @click="changeType('2')">本周推荐榜
</view>
<view :class="['rank_type_item',type === '3'?'rank_type_item_active':'']" @click="changeType('3')">会员推荐榜
</view>
<view :class="['rank_type_item',type === '4'?'rank_type_item_active':'']" @click="changeType('4')">用户推荐榜
</view>
</scroll-view>
<view class="rank_update_time" v-if="lists.length > 0 && type !== '3'">
<view class="rank_update_time" v-if="lists.length > 0 && type !== '3'&& type !== '4'">
<view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时 : </view>
<u-count-down :time="end_timestamp" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
<view class="time">
@@ -43,7 +48,12 @@
<view class="list">
<block v-if="lists.length>0">
<view class="list_item" v-for="(item,index) in lists" :keys='index'>
<view class="no">
<view class="no" v-if="type === '3' || type === '4'">
<image v-if="index < 1" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'"
mode="widthFix" />
<view v-else class="txt"> {{index + 1}} </view>
</view>
<view class="no" v-if="type !== '3' && type !== '4'">
<image v-if="index < 3" class="image" :src="'/static/rank/rank-'+(index+1)+'.png'"
mode="widthFix" />
<view v-else class="txt"> {{index + 1}} </view>
@@ -56,7 +66,7 @@
</view>
<view class="tuijian">
<view class="num"> {{item.number}}</view>
<view class="title">推荐会员</view>
<view class="title">{{type === '4'?'推荐用户':'推荐会员'}}</view>
</view>
</view>
</view>
@@ -77,7 +87,8 @@
import {
week,
week_mul,
total
total,
totaluser
} from '@/apis/interfaces/rank.js'
export default {
data() {
@@ -117,7 +128,9 @@
urlRequest = week_mul
} else if (this.type === '2') {
urlRequest = week
}else{
} else if (this.type === '4') {
urlRequest = totaluser
} else {
urlRequest = total
}
urlRequest().then(res => {
@@ -184,16 +197,16 @@
}
.rank_type {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
background-color: #26b398;
white-space: nowrap;
width: 100%;
.rank_type_item {
flex: 1;
display: inline-block;
width: 18%;
text-align: center;
font-size: 36rpx;
text-align: center;
padding: 40rpx;
font-size: 32rpx;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long