2025-06-06 03:08:19 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="minebg">
|
2025-06-10 17:10:40 +08:00
|
|
|
|
<uni-nav-bar title="" backgroundColor="rgba(0, 0, 0, 1);" :shadow="false" :border="false" :fixed="true" height="100rpx"></uni-nav-bar>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<view class="v1">
|
|
|
|
|
<uni-badge :text="noticeCount" absolute="rightTop" size="small" class="item" type="error">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<uni-icons size="30" type="chat" @click="onTokenJump('/pages/mine/notice')"></uni-icons>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</uni-badge>
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<uni-icons size="30" type="gear" @click="onTokenJump('/pages/Setting/index')"></uni-icons>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="v2">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<view style="width: 180rpx; float: left;" @click="onTokenJump('/pages/mine/info')">
|
|
|
|
|
<image style="width: 160rpx; height: 160rpx" :src="user.avatar" mode="cover"></image>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="login" @click="onPageJump('/pages/mine/login')" v-if="!islogin">
|
|
|
|
|
{{$t('mine.text1')}}
|
|
|
|
|
</view>
|
|
|
|
|
<view class="login1" v-else>
|
|
|
|
|
<view><span @click="onTokenJump('/pages/mine/info')" class="s">{{user.username}}</span></view>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<span style="font-size: 28rpx; 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 class="dj">
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<view style="width: 100rpx; float: left;">
|
|
|
|
|
<image style="width: 66rpx; height: 50rpx; margin: 40rpx auto;" src="/static/images/image.png" mode="cover"></image>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="sj" v-if="user.role_id == 1">
|
|
|
|
|
<view class="sj1">{{$t('mine.text2')}} </view>
|
2025-06-08 02:12:24 +08:00
|
|
|
|
<view class="sj2">{{$t('mine.text3')}} 🚀 </view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="sj" v-else>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<view class="sj1" style="margin-top: 20rpx;">{{$t('mine.text4')}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="sj3">
|
2025-06-09 00:34:46 +08:00
|
|
|
|
<button type="primary" class="b" @click="onTokenJump('/pages/mine/upgrade')" style="margin-left: 13%;" v-if="user.role_id == 1">{{$t('buttonUpgrade')}}</button>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<button type="primary" class="b" @click="onTokenJump('/pages/mine/upgrade')" style="margin: auto;" v-else>{{$t('buttonDetails')}}</button>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="v4">
|
|
|
|
|
<uni-row :gutter="20">
|
|
|
|
|
<uni-col :span="12">
|
|
|
|
|
<view class="wallet" @click="onTokenJump('/pages/wallet/index')">
|
|
|
|
|
<view class="title">{{$t('mine.text5')}}</view>
|
|
|
|
|
<view class="num">{{user.money.toFixed(4)}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
|
|
|
|
<uni-col :span="12">
|
|
|
|
|
<view class="wallet" @click="onTokenJump('/pages/power/index')">
|
|
|
|
|
<view class="title">{{$t('mine.text6')}}</view>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<view class="num1">{{user.score.toFixed(2)}}</view>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
|
|
|
|
</uni-row>
|
|
|
|
|
<uni-row :gutter="20">
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<uni-col :span="24" style="margin-top: 20rpx;">
|
|
|
|
|
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump('/pages/address/index')">
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<image class="i" src="/static/images/5.png" mode="cover"></image>
|
2025-06-08 02:12:24 +08:00
|
|
|
|
<span class="s">{{$t('mine.text7')}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
|
|
|
|
|
<view style="clear: both;"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<uni-col :span="24" style="margin-top: 20rpx;">
|
|
|
|
|
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump1('/pages/im/index')">
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<image class="i" src="/static/images/m4.png" fit="cover"></image>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<span class="s">{{$t('mine.text8')}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
|
|
|
|
|
<view style="clear: both;"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<uni-col :span="24" style="margin-top: 20rpx;">
|
2025-06-15 22:12:30 +08:00
|
|
|
|
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump('/pages/about/help')">
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<image class="i" src="/static/images/m6.png" fit="cover"></image>
|
2025-06-08 02:12:24 +08:00
|
|
|
|
<span class="s">{{$t('mine.text9')}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
|
|
|
|
|
<view style="clear: both;"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<uni-col :span="24" style="margin-top: 20rpx;">
|
2025-06-15 22:12:30 +08:00
|
|
|
|
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump('/pages/about/index')">
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<image class="i" src="/static/images/m3.png" fit="cover"></image>
|
2025-06-08 02:12:24 +08:00
|
|
|
|
<span class="s">{{$t('mine.text10')}}</span>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
|
|
|
|
|
<view style="clear: both;"></view>
|
|
|
|
|
</view>
|
|
|
|
|
</uni-col>
|
|
|
|
|
</uni-row>
|
|
|
|
|
</view>
|
2025-06-10 00:51:49 +08:00
|
|
|
|
<zNavigation></zNavigation>
|
2025-06-06 03:08:19 +08:00
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import zNavigation from '@/components/module/navigation.vue';
|
|
|
|
|
import {
|
|
|
|
|
mapState,
|
|
|
|
|
mapMutations
|
|
|
|
|
} from 'vuex';
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
zNavigation
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
islogin: false,
|
|
|
|
|
noticeCount: 0,
|
|
|
|
|
identity: '',
|
|
|
|
|
user:{
|
|
|
|
|
noticeTotal: 0,
|
|
|
|
|
money: 0.0000,
|
|
|
|
|
score: 0.0000,
|
|
|
|
|
avatar: '/static/images/tx.png',
|
|
|
|
|
username: '',
|
|
|
|
|
id: '',
|
|
|
|
|
role_id: 1,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
...mapState(['userInfo'])
|
|
|
|
|
},
|
|
|
|
|
//第一次加载
|
|
|
|
|
onLoad(e) {
|
|
|
|
|
// if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
|
|
|
|
|
// this.islogin = false;
|
|
|
|
|
// }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;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// 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-10 03:35:04 +08:00
|
|
|
|
created() {
|
|
|
|
|
uni.hideTabBar()
|
|
|
|
|
},
|
2025-06-06 03:08:19 +08:00
|
|
|
|
onShow(){
|
|
|
|
|
uni.showLoading({
|
2025-06-08 02:12:24 +08:00
|
|
|
|
title: this.$t('loading')
|
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.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;
|
|
|
|
|
}
|
|
|
|
|
this.getnotice();
|
|
|
|
|
this.$http.get('/api/role/detail?lang='+this.$i18n.locale).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
this.user.role_id = res.data.id;
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getnotice(){
|
|
|
|
|
let data = {
|
|
|
|
|
category_id: 10,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
lang: this.$i18n.locale
|
|
|
|
|
}
|
|
|
|
|
this.$http.post('/api/article/list', data).then(res => {
|
|
|
|
|
if(res.code == 0){
|
|
|
|
|
let newList = res.data.data.filter(item => item.is_read == 0);
|
|
|
|
|
this.noticeCount = newList.length;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onPageJump(url) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onTokenJump(url) {
|
2025-06-10 17:10:40 +08:00
|
|
|
|
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: this.$t('gotoLogin.title'),
|
|
|
|
|
content: this.$t('gotoLogin.content'),
|
|
|
|
|
confirmText: this.$t('gotoLogin.login'),
|
|
|
|
|
cancelText: this.$t('gotoLogin.cancel'),
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "/pages/mine/login"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
2025-06-06 03:08:19 +08:00
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: url
|
|
|
|
|
});
|
2025-06-10 17:10:40 +08:00
|
|
|
|
}
|
2025-06-06 03:08:19 +08:00
|
|
|
|
},
|
|
|
|
|
onTokenJump1(url) {
|
2025-06-10 17:10:40 +08:00
|
|
|
|
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: this.$t('gotoLogin.title'),
|
|
|
|
|
content: this.$t('gotoLogin.content'),
|
|
|
|
|
confirmText: this.$t('gotoLogin.login'),
|
|
|
|
|
cancelText: this.$t('gotoLogin.cancel'),
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "/pages/mine/login"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
2025-06-06 03:08:19 +08:00
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: url
|
|
|
|
|
});
|
2025-06-10 17:10:40 +08:00
|
|
|
|
}
|
2025-06-06 03:08:19 +08:00
|
|
|
|
},
|
|
|
|
|
copy(val = ''){
|
2025-06-15 22:12:30 +08:00
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
uni.setClipboardData({
|
|
|
|
|
data: val, // e是你要保存的内容
|
|
|
|
|
success: function () {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title:this.$t('copySuccess'),
|
|
|
|
|
icon:'none'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// #endif
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
this.$copyText(val).then(res => {
|
|
|
|
|
uni.showToast({title: this.$t('copySuccess'), icon: 'none'});
|
|
|
|
|
});
|
|
|
|
|
// #endif
|
2025-06-06 03:08:19 +08:00
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.uni-page-body{background-color: #F8F8F8 !important;}
|
|
|
|
|
.page{min-height: 93vh;position: relative; background-color: #F8F8F8;}
|
|
|
|
|
.minebg{
|
|
|
|
|
width: 100vw;
|
|
|
|
|
min-height: 93vh;
|
|
|
|
|
background: url('/static/images/minebg.png') #F8F8F8;;
|
|
|
|
|
background-size: 100%;
|
|
|
|
|
background-repeat: repeat-x;
|
|
|
|
|
font-family: Poppins, Poppins;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v1{
|
|
|
|
|
float: right; padding-right: 20upx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v2{
|
|
|
|
|
clear: both; width: 90vw; margin: auto;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login{
|
2025-06-09 00:34:46 +08:00
|
|
|
|
width: 300upx; float: left; font-size: 16pt; font-weight: 700; height:160upx; line-height: 160upx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login1{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 65%; float: left; font-size: 16pt; font-weight: 700; height:160upx; line-height: 60upx; padding-top: 40rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v2 .login1 .s{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 440rpx; 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 .v3{
|
|
|
|
|
width: 94vw; height: 120upx; background-color:#333; margin: 20upx auto; border-radius: 30upx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v3 .dj{
|
|
|
|
|
background: url('/static/images/hybg.png'); background-size: 100%; height: 120upx; border-radius: 30upx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v3 .dj .sj{
|
2025-06-09 00:34:46 +08:00
|
|
|
|
width: 53%; float: left; padding-top: 25upx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v3 .dj .sj3{
|
2025-06-09 00:34:46 +08:00
|
|
|
|
width: 28%; float: left; padding-top: 35upx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .b{
|
|
|
|
|
width: 160rpx; height: 60rpx;
|
|
|
|
|
background: linear-gradient( 270deg, #F8E0D3 0%, #FFAF85 100%);
|
2025-06-10 00:51:49 +08:00
|
|
|
|
border-radius: 12rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
font-family: Poppins, Poppins;
|
|
|
|
|
font-weight: bold;
|
2025-06-10 00:51:49 +08:00
|
|
|
|
font-size: 26rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
color: #610855;
|
2025-06-10 00:51:49 +08:00
|
|
|
|
line-height: 60rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
text-transform: none;
|
2025-06-10 00:51:49 +08:00
|
|
|
|
padding: 0rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v3 .dj .sj1{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 100%; height: 42rpx; font-family: Poppins, Poppins; font-weight: 700; font-size: 26rpx; line-height: 40rpx; text-align: left; color: #F8E1D6;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v3 .dj .sj2{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 100%; height: 42rpx; font-family: Poppins, Poppins; font-weight: 400; font-size: 24rpx; line-height: 40rpx; text-align: left; color: #A7A8B4;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4{
|
|
|
|
|
width: 94vw;margin: 20upx auto; border-radius: 30upx;
|
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
background-color: #fff; border-radius: 20rpx; padding: 20rpx 30rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet .title{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
font-weight: 500; font-size: 28rpx; color: #999999; line-height: 36rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet .num{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 100%; line-height: 80rpx; margin-top: 10rpx; font-size: 36rpx; background: url('/static/images/109.png'); background-size: 35%; height: 80rpx; background-repeat: no-repeat;background-position:right bottom
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet .num1{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 100%; line-height: 80rpx; margin-top: 10rpx; font-size: 36rpx; background: url('/static/images/4.png'); background-size: 35%; height: 80rpx; background-repeat: no-repeat;background-position:right bottom
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet .s{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
font-weight: 500;font-size: 32rpx;color: #3D3D3D;line-height: 40rpx; float: left; margin-left: 20rpx;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.minebg .v4 .wallet .i{
|
2025-06-10 00:51:49 +08:00
|
|
|
|
width: 40rpx; height: 36rpx; float: left;
|
2025-06-06 03:08:19 +08:00
|
|
|
|
}
|
|
|
|
|
.item{
|
|
|
|
|
margin: 0upx 20upx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|