Commit ec3226b8 authored by Smile's avatar Smile Committed by wux

app客户端会员等级背景图片添加

parent fd59ea61
......@@ -9,7 +9,7 @@
<view class="content">
<view class="content-title"
>{{ $lang.lang.integral.headerTitle
}}{{ levelInfo.levelName }}</view
}}{{ formattedLevelData(levelInfo.level) }}</view
>
<view class="content-text">
<view class="text"
......@@ -23,7 +23,7 @@
<view class="divider">
<view class="divider-active" :style="{ width: `${score}%` }"></view>
<view class="divider-unm">{{ levelInfo.totalScore }}</view>
<view class="divider-level">{{ levelInfo.levelName }}</view>
<view class="divider-level">{{ formattedLevelData(levelInfo.level) }}</view>
</view>
</view>
<view class="classification">
......@@ -84,6 +84,7 @@ export default {
// 会员图标
levelIcon: "",
userInfo: {},
levelData:[]
};
},
computed: {
......@@ -101,8 +102,20 @@ export default {
},
created() {
this.getUserInfo();
this.getLevels();
},
methods: {
formattedLevelData(value) {
const item=this.levelData.filter(item => value==item.value)[0]
return item[this.$lang.label];
},
getLevels () {
this.$request.getConfig('membership_levels').then(res => {
if(res.code==0&&res.data&&res.data.list&&res.data.list.length>0){
this.levelData = res.data.list
}
})
},
toLog(val) {
let url = "";
switch (val) {
......
......@@ -20,9 +20,13 @@ page {
height: inherit;
flex-direction: column;
box-sizing: border-box;
background-color: #C3C8D3;
background: url(@/static/img/backgroup.png) no-repeat;
background-size: cover;
background-position: center center;
border-top-left-radius: 12upx;
border-top-right-radius: 12upx;
border-bottom-right-radius: 12upx;
border-bottom-left-radius: 12upx;
}
.header {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment