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

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

parent fd59ea61
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="content"> <view class="content">
<view class="content-title" <view class="content-title"
>{{ $lang.lang.integral.headerTitle >{{ $lang.lang.integral.headerTitle
}}{{ levelInfo.levelName }}</view }}{{ formattedLevelData(levelInfo.level) }}</view
> >
<view class="content-text"> <view class="content-text">
<view class="text" <view class="text"
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<view class="divider"> <view class="divider">
<view class="divider-active" :style="{ width: `${score}%` }"></view> <view class="divider-active" :style="{ width: `${score}%` }"></view>
<view class="divider-unm">{{ levelInfo.totalScore }}</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> </view>
<view class="classification"> <view class="classification">
...@@ -84,6 +84,7 @@ export default { ...@@ -84,6 +84,7 @@ export default {
// 会员图标 // 会员图标
levelIcon: "", levelIcon: "",
userInfo: {}, userInfo: {},
levelData:[]
}; };
}, },
computed: { computed: {
...@@ -101,8 +102,20 @@ export default { ...@@ -101,8 +102,20 @@ export default {
}, },
created() { created() {
this.getUserInfo(); this.getUserInfo();
this.getLevels();
}, },
methods: { 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) { toLog(val) {
let url = ""; let url = "";
switch (val) { switch (val) {
......
...@@ -20,9 +20,13 @@ page { ...@@ -20,9 +20,13 @@ page {
height: inherit; height: inherit;
flex-direction: column; flex-direction: column;
box-sizing: border-box; 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-left-radius: 12upx;
border-top-right-radius: 12upx; border-top-right-radius: 12upx;
border-bottom-right-radius: 12upx;
border-bottom-left-radius: 12upx;
} }
.header { .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