2025-06-06 03:08:19 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="minebg">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<uni-nav-bar title="" backgroundColor="rgba(0, 0, 0, 1);" :shadow="false" :border="false" height="50rpx"></uni-nav-bar>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="v2">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="width: 160rpx; float: left;" @click="onTokenJump('/pages/mine/info')">
|
|
|
|
|
<image style="width: 140rpx; height: 140rpx" :src="url" fit="cover"></image>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="login" @click="onPageJump('/pages/mine/login')" v-if="!islogin">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
{{$t('mine.text1')}}
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="login1" v-else>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="float: left;"><span @click="onTokenJump('/pages/mine/info')" class="s">{{user.username}}</span></view>
|
|
|
|
|
<button @click="onTokenJump('/pages/promotion/invite')" v-if="user.role_id > 1"
|
|
|
|
|
style="background-color: #1677FF; color: #fff; font-size: 30rpx; height: 70rpx; line-height: 70rpx;
|
|
|
|
|
width: 200rpx; float: right; margin-top: 20rpx;">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<uni-icons size="20" type="gift" style="color: #fff;"></uni-icons>{{$t('promotion.text1')}}</button>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<span style="font-size: 14px; font-weight: 400; float: left;">ID:{{user.id}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<image class="i" src="/static/images/copy.png" @click="copy(user.id)" mode="cover"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="clear: both;"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="v3">
|
|
|
|
|
<view style="padding: 0rpx 20rpx;">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="font-size: 16px; font-weight: 600; color: #3d3d3d;">{{$t('promotion.text2')}}</view>
|
|
|
|
|
<view style="font-weight: 500; padding: 10px 0px; font-size: 14px; color: #999; margin-top: 10px; text-align: center; background-color: #F8F8F8;">
|
|
|
|
|
<view class="cell_list" style="background-color: #F8F8F8; padding: 10rpx 15px;">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view class="cell_left txt">{{$t('promotion.text3')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="cell_right" style="font-size: 18px; font-weight: 500;">{{team.total_count}}</view>
|
|
|
|
|
</view>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view class="cell_list" style="background-color: #F8F8F8; padding: 10rpx 15px;;">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view class="cell_left txt">{{$t('promotion.text4')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="cell_right" style="font-size: 18px; font-weight: 500;">{{team.direct_total}}</view>
|
|
|
|
|
</view>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view class="cell_list" style="background-color: #F8F8F8; padding: 10rpx 15px;;">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view class="cell_left txt">{{$t('promotion.text5')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="cell_right" style="font-size: 18px; font-weight: 500;">{{parseFloat(team.resultsRegion).toFixed(4)}}</view>
|
|
|
|
|
</view>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view class="cell_list" style="background-color: #F8F8F8; padding: 10rpx 15px;;">
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view class="cell_left txt">{{$t('promotion.text6')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="cell_right" style="font-size: 18px; font-weight: 500;">{{parseFloat(team.resultsCell).toFixed(4)}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="width: 94%; margin: 0px auto;">
|
|
|
|
|
<view class="cell_list" style="padding: 15px 10px;">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="color: #3d3d3d; font-size: 16px; font-weight: 600;">{{$t('promotion.text7')}}</view>
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view class="cell_right arrow" style="color: #999;" @click="onPageJump('/pages/promotion/list')">{{$t('promotion.text8')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<uni-row :gutter="10" v-for="(item, index) in list" :key="index" :style="index==0 ? '' : 'margin-top: 30px;'">
|
|
|
|
|
<uni-col :span="6" style="text-align: center;">
|
|
|
|
|
<image style="width: 60px; height: 60px; margin: auto;" :src="url" fit="cover"></image>
|
|
|
|
|
</uni-col>
|
|
|
|
|
<uni-col :span="18">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="font-weight: 600; font-size: 16px; color: #3d3d3d;">{{item.username}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view style="font-size: 12px; font-weight: 400; color: #999; line-height: 40rpx;">
|
|
|
|
|
ID:{{item.id}}<br>
|
2025-06-07 23:12:35 +08:00
|
|
|
|
{{$t('promotion.text9')}}: {{item.created_at}}<br>
|
|
|
|
|
{{$t('promotion.text10')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;"> {{parseFloat(item.performance_large).toFixed(4)}}</span><br>
|
|
|
|
|
{{$t('promotion.text11')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;"> {{item.total_count}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
|
|
|
|
</uni-row>
|
|
|
|
|
|
|
|
|
|
<view style="text-align: center; padding-bottom: 80px;" v-if="list.length <= 0">
|
|
|
|
|
<image style="width: 360rpx; height: 180px; margin: 50rpx auto 0rpx auto;" src="/static/images/w5.png" fit="cover"></image>
|
2025-06-07 23:12:35 +08:00
|
|
|
|
<view style="color: #999; font-size: 14px; font-weight: 400;">{{$t('nodata')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import zNavigation from '@/components/module/navigation.vue';
|
|
|
|
|
import {
|
|
|
|
|
mapState,
|
|
|
|
|
mapMutations
|
|
|
|
|
} from 'vuex';
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
zNavigation
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
url:"/static/images/tx.png",
|
|
|
|
|
islogin: false,
|
|
|
|
|
user:{
|
|
|
|
|
avatar: '/static/images/tx.png',
|
|
|
|
|
username: '',
|
|
|
|
|
id: '',
|
|
|
|
|
role_id: 1,
|
|
|
|
|
},
|
|
|
|
|
team:{
|
|
|
|
|
total_count: 0,
|
|
|
|
|
direct_total: 0,
|
|
|
|
|
resultsRegion: 0.00,
|
|
|
|
|
resultsCell: 0.00
|
|
|
|
|
},
|
|
|
|
|
par:{
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
|
list: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState(['userInfo'])
|
|
|
|
|
},
|
|
|
|
|
//第一次加载
|
|
|
|
|
onShow(e) {
|
|
|
|
|
uni.showLoading({
|
2025-06-09 00:34:46 +08:00
|
|
|
|
title:this.$t('nodata')
|
2025-06-06 03:08:19 +08:00
|
|
|
|
})
|
|
|
|
|
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
|
|
|
|
|
this.islogin = false;
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}else{
|
|
|
|
|
this.islogin = true;
|
|
|
|
|
this.user.money = parseFloat(this.userInfo.money);
|
|
|
|
|
this.user.score = parseFloat(this.userInfo.score);
|
|
|
|
|
this.user.username = this.userInfo.username;
|
|
|
|
|
this.user.id = this.userInfo.id;
|
|
|
|
|
if(this.userInfo.avatar !== '' && this.userInfo.avatar != null){
|
|
|
|
|
this.user.avatar = this.userInfo.avatar;
|
|
|
|
|
}
|
2025-06-09 00:34:46 +08:00
|
|
|
|
this.$http.get('/api/role/detail?lang='+this.$i18n.locale).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
this.user.role_id = res.data.id;
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-06-06 03:08:19 +08:00
|
|
|
|
this.$http.get('/api/team/index?lang='+this.$i18n.locale).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
this.team.total_count = res.data.total_count;
|
|
|
|
|
this.team.direct_total = res.data.direct_total;
|
|
|
|
|
this.team.resultsRegion = res.data.performance_large;
|
|
|
|
|
this.team.resultsCell = res.data.performance_small;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let data = {
|
|
|
|
|
page: this.par.page,
|
|
|
|
|
limit: this.par.limit,
|
|
|
|
|
lang: this.$i18n.locale
|
|
|
|
|
};
|
|
|
|
|
this.$http.post('/api/team/list', data).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
this.list = res.data.data;
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onPageJump(url) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onTokenJump(url) {
|
|
|
|
|
this.judgeLogin(() => {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getTeamList(){
|
|
|
|
|
this.$http.get('/api/team/list?lang='+this.$i18n.locale).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
console.log(res.data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
copy(val = ''){
|
|
|
|
|
const textArea = document.createElement('textarea');
|
|
|
|
|
textArea.value = val;
|
|
|
|
|
document.body.appendChild(textArea);
|
|
|
|
|
textArea.select();
|
|
|
|
|
try {
|
|
|
|
|
document.execCommand('copy');
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: this.$t('copySuccess')
|
|
|
|
|
});
|
|
|
|
|
} catch (err) {
|
|
|
|
|
console.error('Could not copy text: ', err);
|
|
|
|
|
}
|
|
|
|
|
document.body.removeChild(textArea);
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.page{min-height: 100vh;position: relative; background-color: #fff;}
|
|
|
|
|
.minebg{
|
|
|
|
|
width: 100vw;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
background: url('/static/images/minebg.png') #fff;;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-repeat: repeat-x;
|
|
|
|
|
font-family: Poppins, Poppins;
|
|
|
|
|
}
|
2025-06-09 00:34:46 +08:00
|
|
|
|
.cell_list .cell_right.arrow::after{
|
|
|
|
|
height: 8px !important;
|
|
|
|
|
}
|
2025-06-06 03:08:19 +08:00
|
|
|
|
.minebg .v2 .login1{
|
2025-06-09 00:34:46 +08:00
|
|
|
|
width: 75%; float: left; font-size: 16pt; font-weight: 700; height:160rpx; line-height: 60upx; padding-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login1 .s{
|
|
|
|
|
white-space: nowrap; /* 禁止换行 */
|
|
|
|
|
overflow: hidden; /* 隐藏溢出内容 */
|
|
|
|
|
text-overflow: ellipsis; /* 显示省略号 */
|
|
|
|
|
width: 240rpx; /* 需设置固定宽度 */
|
|
|
|
|
display: block;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login1 .i{
|
|
|
|
|
width: 24rpx; height: 24rpx; float:left; margin-top: 16rpx; margin-left: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v1{
|
|
|
|
|
float: right; margin-top: 10upx; padding-right: 20upx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v2{
|
2025-06-07 23:12:35 +08:00
|
|
|
|
clear: both; width: 90vw; margin: auto; padding-top: 20rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login{
|
2025-06-09 00:34:46 +08:00
|
|
|
|
float: left; font-size: 16pt; font-weight: 700; height:160rpx; line-height: 160rpx;
|
|
|
|
|
white-space: nowrap; text-overflow: ellipsis; width: 75%;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v3{
|
|
|
|
|
width: 94vw; margin: auto; border-radius: 30upx;
|
|
|
|
|
}
|
|
|
|
|
.item{
|
|
|
|
|
margin: 30upx 20upx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|