mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 03:16:45 +08:00
个人主页
This commit is contained in:
@@ -50,11 +50,11 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="hear-info">
|
||||
<view class="info-name">
|
||||
{{userInfoObj.name}} <text>现代优秀独立女性</text>
|
||||
<view class="info-name index-one-line-ellipsis">
|
||||
{{userInfoObj.name}} <text>{{ userData.sign }}</text>
|
||||
</view>
|
||||
<view class="information">
|
||||
<text class="grade">LV.6</text>
|
||||
<text class="grade">{{ statData.level }}</text>
|
||||
<view class="Progress">
|
||||
<text>200/300</text>
|
||||
<u-line-progress :showText="false" :percentage="50" activeColor="#007DFF" height="4"></u-line-progress>
|
||||
@@ -73,18 +73,18 @@
|
||||
</view>
|
||||
<text class="asset-border"></text>
|
||||
<view>
|
||||
<text>5643.5<i style="color: #999999;font-size: 24upx;font-style:normal;padding-left:5upx">h</i></text>
|
||||
<text>{{ statData.totalStudyHour }}<i style="color: #999999;font-size: 24upx;font-style:normal;padding-left:5upx">h</i></text>
|
||||
学习时长
|
||||
|
||||
</view>
|
||||
<text class="asset-border"></text>
|
||||
<view>
|
||||
<text>113</text>
|
||||
<text>{{ concernme }}</text>
|
||||
关注我的
|
||||
</view>
|
||||
<text class="asset-border"></text>
|
||||
<view>
|
||||
<text>412</text>
|
||||
<text>{{ myconcern }}</text>
|
||||
我的关注
|
||||
</view>
|
||||
</view>
|
||||
@@ -302,8 +302,10 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import userApi from "@/api/system/user";
|
||||
import apiUser from "@/api/system/user";
|
||||
import {userAvatarText} from '@/utils/tools.js';
|
||||
import apiStart from '@/api/phase2/stat.js';
|
||||
import apiFollow from "@/api/phase2/userfollow.js";
|
||||
export default {
|
||||
computed: {
|
||||
...mapGetters(['userInfo']),
|
||||
@@ -313,6 +315,8 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
concernme:'',
|
||||
myconcern:'',
|
||||
userInfoObj:{
|
||||
// sex:null,
|
||||
account:{
|
||||
@@ -324,23 +328,74 @@
|
||||
zoom: true,
|
||||
//徽标
|
||||
type: "error",
|
||||
value: 11
|
||||
value: 11,
|
||||
userData:{
|
||||
aid: "",
|
||||
avatar: "",
|
||||
code: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
sex: '',
|
||||
sign: "",
|
||||
},
|
||||
statData:{
|
||||
evalue: 0,//经验值
|
||||
level: "LV1",//级别
|
||||
monthStudyHour:0,//当月学习时长
|
||||
totalStudyHour: 0, //累计学习时长
|
||||
monthStudyDays:0, //当月学习天数
|
||||
totalStudyDays:0, //累计学习天数
|
||||
uvalue:0 //U币数量
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfoObj=this.userInfo;
|
||||
//console.log(this.userInfoObj,"我拿到的数据")
|
||||
// console.log(this.userInfoObj,"我拿到的数据")
|
||||
},
|
||||
onload(){
|
||||
//this.load()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.loadUserStat();
|
||||
this.Followto();
|
||||
},
|
||||
methods: {
|
||||
|
||||
Followto(){
|
||||
apiFollow.counts(this.userInfoObj.aid).then(res => {
|
||||
console.log(res);
|
||||
this.concernme = res.result.passive;
|
||||
this.myconcern = res.result.initiative;
|
||||
})
|
||||
},
|
||||
navigateTo(u) {
|
||||
uni.navigateTo({
|
||||
url: u
|
||||
})
|
||||
},
|
||||
loadUserStat(){//获取经验值和等级
|
||||
apiUser.getByIds([this.userInfoObj.aid]).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.userData = res.result[0];
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
});
|
||||
apiStart.getUserStatTotalInfo(this.userInfoObj.aid).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.statData.evalue = res.result.evalue;
|
||||
this.statData.level = res.result.level;
|
||||
this.statData.monthStudyHour = res.result.monthStudyHour;
|
||||
this.statData.totalStudyHour = res.result.totalStudyHour;
|
||||
this.statData.monthStudyDays = res.result.monthStudyDays;
|
||||
this.statData.totalStudyDays = res.result.totalStudyDays;
|
||||
this.statData.uvalue = res.result.uvalue;
|
||||
this.medalList=res.result.medalList;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -349,6 +404,16 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.index-one-line-ellipsis{
|
||||
display: -webkit-box;
|
||||
// white-space:pre-wrap;
|
||||
word-wrap: break-word;
|
||||
word-break:break-all;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp:1;
|
||||
}
|
||||
.myhead{
|
||||
height: 510upx;
|
||||
background: url('../../static/images/centerbg.png');
|
||||
|
||||
Reference in New Issue
Block a user