| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <script>
- import tokenpocketBnb from "@/common/wallet/tokenpocket-wallet/tokenpocket-bnb";
- import {getTotalMoney} from "@/api/money";
- import {getTeamList} from "@/api/member";
- export default {
- name: "my-index",
- props:{
- address:{
- default:''
- }
- },
- components: {},
- watch:{
- 'address':function () {
- this.getIconNum()
- }
- },
- data() {
- return {
- coinNum:'',
- pledgeTotal:'',
- revenueTotal:'',
- list:[],
- page:1,
- };
- },
- mounted() {
- this.getIconNum()
- this.getTotalMoney()
- this.getTeamList()
- },
- methods: {
- getTeamList(){
- getTeamList({'page':this.page}).then(res=>{
- if(res.code===1){
- ++this.page
- this.list.push(res.data.items)
- }
- })
- },
- getTotalMoney(){
- getTotalMoney().then(res=>{
- if (res.code===1){
- this.pledgeTotal=res.data.pledgeTotal
- this.revenueTotal=res.data.revenueTotal
- }
- })
- },
- async getIconNum(){
- if(this.address===''){
- return
- }
- this.coinNum= await tokenpocketBnb.getTokenBalance(this.address,0)
- console.log(this.coinNum,"icon-num----------------------")
- },
- goUrl() {
- uni.navigateTo({
- url: 'pages/my/inner-page/all_profit'
- });
- }
- },
- }
- </script>
- <template>
- <div>
- <div class="align-items-center mb-32">
- <div class="h-80 b-rad-20 bg-one flex-1 flex-direction-column align-items-center flex-justify-center mr-20">
- <div class="fs-28 fc-f">余额</div>
- <div class="fs-30 fc-f fw-b">
- {{coinNum}}
- </div>
- </div>
- <div class="h-80 b-rad-20 bg-two flex-1 flex-direction-column align-items-center flex-justify-center mr-20">
- <div class="fs-28 fc-f">贡献</div>
- <div class="fs-30 fc-f fw-b">
- {{pledgeTotal}}
- </div>
- </div>
- <div @click="goUrl" class="h-80 b-rad-20 bg-one flex-1 flex-direction-column align-items-center flex-justify-center">
- <div class="fs-28 fc-f">总收益</div>
- <div class="fs-30 fc-f fw-b">
- {{revenueTotal}}
- </div>
- </div>
- </div>
- <div class="fs-34 fw-b mb-20">
- 我的团队
- </div>
- <div class="bgc-f p-10 box-sizing-border b-rad-20" v-for="item in list">
- <div class="pb-10 border-bottom-e5e5e5 fs-28 mb-20">
- {{item.address}}
- </div>
- <div class="align-items-start flex-justify-space pb-10">
- <div class="flex-1 left-box">
- <div class="fs-28 mb-4">注册时间: {{item.created_date}}</div>
- <div class="fs-28 mb-4">团队人数:{{item.clanNum}}</div>
- <div class="fs-28">直推人数:{{item.recomNum}}</div>
- </div>
- <!-- <div class="flex-1 pl-20 box-sizing-border">-->
- <!-- <div class="fs-28 mb-4">自身业绩:10000</div>-->
- <!-- <div class="fs-28">团队业绩:10000</div>-->
- <!-- </div>-->
- </div>
- </div>
- <div>
- </div>
- </div>
- </template>
- <style scoped lang="scss">
- .bg-one{
- background-image: linear-gradient(270deg, #2353db, #54c8ff);
- }
- .bg-two{
- background-image: linear-gradient(270deg, #ffc62c, #ffa954);
- }
- .h-80{
- height: 160rpx;
- }
- .left-box{
- border-right: 2rpx solid #ccc;
- }
- </style>
|