增加页面,修改邀请页面名称以及相关跳转
This commit is contained in:
147
me/yaoqing/ymf-my-team.vue
Normal file
147
me/yaoqing/ymf-my-team.vue
Normal file
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<view class="page" style="">
|
||||
<view class="padding margin radius bg-white" style="">
|
||||
<view class="text-19">当前收益</view>
|
||||
<view class="flex justify-between margin-top">
|
||||
<view class="text-bold text-black">¥<text style="font-size: 34px;">{{yaoqingTongji}}</text></view>
|
||||
<view class="" style="position: relative;overflow: hidden;width: 90px;">
|
||||
<view style="position: absolute;bottom:0;">
|
||||
<!-- <view class="flex"> -->
|
||||
<button @tap="ymfgetOut" class="btn round">立即提现</button>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin padding bg-white radius">
|
||||
<view class="u-font-16 text-bold margin-bottom">邀请明细</view>
|
||||
<!-- <view class="flex justify-between" style="line-height: 30px;" v-for="(item,index) in userList" >
|
||||
<view class="flex" style="width: 300rpx;">
|
||||
<u-image :src="item.avatar" width="30px" mode="widthFix"></u-image>
|
||||
<view class="margin-left-sm infobox">{{item.userName}}</view>
|
||||
</view>
|
||||
<view style="width: 120rpx;">邀请好友</view>
|
||||
<view style="width: 120rpx;">
|
||||
<text class="margin-left text-red">赚{{item.money}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="flex justify-between align-center" style="margin-bottom: 40rpx;"
|
||||
v-for="(item,index) in userList">
|
||||
<view class="flex align-center">
|
||||
<image :src="item.avatar?item.avatar:'../../static/images/logo.png'"
|
||||
style="width: 80rpx;height:80rpx;border-radius: 50rpx;"></image>
|
||||
<view class="margin-left-sm">
|
||||
<view class="infobox">{{item.userName}}</view>
|
||||
<view class="text-cut u-font-24" v-if="item.userType && item.userType === 2">二级好友
|
||||
</view>
|
||||
<view class="text-cut u-font-24" v-else>一级好友
|
||||
</view>
|
||||
<!-- <u-image :src="item.avatar" width="30px" mode="widthFix"></u-image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="margin-left flex-sub text-right">
|
||||
<text class="margin-left text-red">赚{{item.money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<empty v-if="userList.length === 0" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import empty from '../../components/empty.vue'
|
||||
export default {
|
||||
components: {
|
||||
empty
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
page: 1,
|
||||
limit: 50,
|
||||
userList: [],
|
||||
yaoqingTongji: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.ymfgetData()
|
||||
this.ymfgetInviter()
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.page = this.page + 1;
|
||||
this.ymfgetInviter();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.page = 1;
|
||||
this.ymfgetData();
|
||||
this.ymfgetInviter();
|
||||
},
|
||||
methods: {
|
||||
ymfgetData() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit
|
||||
}
|
||||
this.$u.api.queryInviter(data).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.yaoqingTongji = res.data.inviteMoney.money
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
ymfgetInviter() {
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
userType:1
|
||||
}
|
||||
this.$u.api.inviter(data).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (this.page === 1) {
|
||||
this.userList = res.data.list
|
||||
} else {
|
||||
this.userList = [...this.userList, ...res.data.list]
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
duration: 1000,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
ymfgetOut() {
|
||||
uni.navigateTo({
|
||||
url: '/me/yaoqing/cashDetail'
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
background: rgba(255, 117, 129, 0.2);
|
||||
color: #ff7581;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
.page{
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
.infobox {
|
||||
width: 280rpx;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user