order 7.25

This commit is contained in:
ghusermoon 2020-07-25 17:51:01 +08:00
parent c931e87209
commit 185f5979b6
4 changed files with 40 additions and 11 deletions

View File

@ -49,7 +49,7 @@
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="left" @click="showGroupUser=true"> <view class="left" @click="showGroupUser=true" v-if="user_suc.length">
<view class="avatar"> <view class="avatar">
<image v-for="(user, i) in user_suc" :src="user[0].member_avatar" :key="i"></image> <image v-for="(user, i) in user_suc" :src="user[0].member_avatar" :key="i"></image>
</view> </view>

View File

@ -147,7 +147,7 @@ export default {
onLoad(option) { onLoad(option) {
this.orderType = this.$store.state.orderType; this.orderType = this.$store.state.orderType;
this.orderInfo = this.$store.state.orderInfo; this.orderInfo = this.$store.state.orderInfo;
console.log(this.orderType); // console.log(this.orderType);
console.log(this.orderInfo); console.log(this.orderInfo);
this.getGoodsClass(); this.getGoodsClass();
}, },

View File

@ -1,16 +1,16 @@
<template> <template>
<view class="progress"> <view class="progress" v-if="memberInfo">
<view class="header"> <view class="header">
<view class="line-progress"> <view class="line-progress">
<view class="rank-value">lv1</view> <view class="rank-value">lv{{ memberInfo.member_level }}</view>
<view class="line-box"> <view class="line-box">
<u-line-progress :percent="70" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30"></u-line-progress> <u-line-progress :percent="percent" :show-percent="false" inactive-color="#FFFFFF" active-color="#F1A36B" height="30" :striped="true" :striped-active="true"></u-line-progress>
<text>78/99</text> <text>{{ memberInfo.member_exppoints | percentExp(rank[memberInfo.member_level - 1])}}</text>
</view> </view>
<view class="rank-value">lv2</view> <view class="rank-value">lv{{ memberInfo.member_level + 1 }}</view>
</view> </view>
<view class="exp-value">经验值<span>78</span></view> <view class="exp-value">经验值<span>{{ memberInfo.member_exppoints }}</span></view>
<view class="distance">距离下一级还需要21经验值</view> <view class="distance">距离下一级还需要{{ memberInfo.member_exppoints | residualExp(rank[memberInfo.member_level - 1]) }}经验值</view>
</view> </view>
<view class="body"> <view class="body">
<view class="title"> <view class="title">
@ -66,8 +66,37 @@ export default {
min: 5000, min: 5000,
max: '--', max: '--',
} }
] ],
percent: 0,
memberInfo: {},
} }
},
filters: {
percentExp(value, rank) {
console.log(rank);
let result = '0/0';
if(rank) result = value + '/' + rank.max;
return result;
},
residualExp(value, rank) {
let result = 0;
if(rank) result = rank.max - value;
return result;
}
},
onShow() {
this.getMemberPointsStat();
},
methods: {
getMemberPointsStat() {
this.$u.api.getMemberPointsStat().then((res)=>{
if (res.errCode == 0) {
this.memberInfo = res.data;
this.percent = (this.memberInfo.member_exppoints / this.rank[this.memberInfo.member_level - 1].max) * 100;
console.log(this.percent);
}
})
},
} }
}; };
</script> </script>

View File

@ -8,7 +8,7 @@
<view class="user-nickname">{{ userInfo.member_nickname }}</view> <view class="user-nickname">{{ userInfo.member_nickname }}</view>
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')"> <view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
<img src="/static/image/mine/13.png" /> <img src="/static/image/mine/13.png" />
<view class="rank-title">勋章</view> <view class="rank-title">{{ userInfo.member_grade_name }}</view>
</view> </view>
</view> </view>
<view class="info-right"> <view class="info-right">