api
This commit is contained in:
@@ -3,37 +3,50 @@
|
||||
<view class="integral-top">
|
||||
<view>
|
||||
<view class="title">总积分</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.member_points }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">经验值</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.member_exppoints }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">预计进度</view>
|
||||
<view class="value">999</view>
|
||||
<view class="value">{{ memberInfo.next_grade_exppoints_diff }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="integral-botom">
|
||||
<scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }">
|
||||
<rich-text :nodes="nodes"></rich-text>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import common from '@/static/js/common.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nodes: '<h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1><h1>2</h1>',
|
||||
integralHeight: 0
|
||||
memberInfo: {},
|
||||
integralHeight: 0,
|
||||
nodes: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.setIntegralHeight();
|
||||
this.getMemberPointsStat();
|
||||
},
|
||||
methods: {
|
||||
setIntegralHeight() {
|
||||
// this.integralHeight =
|
||||
}
|
||||
const res = uni.getSystemInfoSync();
|
||||
// console.log(res.windowHeight);
|
||||
this.integralHeight = res.windowHeight - 251 / 2 + 'px';
|
||||
},
|
||||
getMemberPointsStat() {
|
||||
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||
if (res.errCode == 0) {
|
||||
this.memberInfo = res.data;
|
||||
this.nodes = common.unescapeHTML(this.memberInfo.points_rule);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -65,9 +78,11 @@ export default {
|
||||
}
|
||||
}
|
||||
.integral-botom {
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx;
|
||||
position: absolute;
|
||||
width: 750rpx;
|
||||
height: calc(100vh - 251rpx);
|
||||
width: 100%;
|
||||
// height: calc(100vh - 251rpx);
|
||||
background: rgba(255,255,255,1);
|
||||
border-radius: 20rpx 20rpx 0rpx 0rpx;
|
||||
top: 251rpx;
|
||||
|
||||
Reference in New Issue
Block a user