116 lines
1.9 KiB
Vue
116 lines
1.9 KiB
Vue
|
|
<template>
|
||
|
|
<view>
|
||
|
|
<view class="box">
|
||
|
|
<view class="form lanBox">
|
||
|
|
<view class="lan border-bottom" v-for="(item,index) in ranklist">
|
||
|
|
<view class="left">
|
||
|
|
<view class="view">
|
||
|
|
<view class="t-icon" :class="'t-icon-'+item.key_name" v-if="item.key_name!='score'"></view>
|
||
|
|
<view class="score" v-else>A</view>
|
||
|
|
</view>
|
||
|
|
{{item.name}}
|
||
|
|
</view>
|
||
|
|
<view class="right">{{item.value?item.value:"0"}}{{item.unit}}</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import {
|
||
|
|
mapState
|
||
|
|
} from "vuex";
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
id: "",
|
||
|
|
type: "",
|
||
|
|
ranklist: []
|
||
|
|
};
|
||
|
|
},
|
||
|
|
computed: {
|
||
|
|
...mapState([])
|
||
|
|
},
|
||
|
|
onLoad(options) {
|
||
|
|
// 导航栏颜色
|
||
|
|
let that = this
|
||
|
|
that.id = options.id
|
||
|
|
that.type = options.type
|
||
|
|
that.getList()
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
getList() {
|
||
|
|
let that = this
|
||
|
|
that.$model.gethistorydetail({
|
||
|
|
id: that.id,
|
||
|
|
type: that.type,
|
||
|
|
}).then((res) => {
|
||
|
|
console.log("历史记录详情", res)
|
||
|
|
this.ranklist = res.data
|
||
|
|
})
|
||
|
|
},
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
};
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style scoped="scoped" lang="scss">
|
||
|
|
.box {
|
||
|
|
min-height: 100vh;
|
||
|
|
background-color: #fff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.lanBox {
|
||
|
|
padding: 0px 15px 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.lan {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
font-size: 32rpx;
|
||
|
|
height: 50px;
|
||
|
|
line-height: 50px;
|
||
|
|
justify-content: space-between;
|
||
|
|
border-bottom: 1px solid #f7f7f7;
|
||
|
|
|
||
|
|
.left {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
text-align: left;
|
||
|
|
font-size: 32rpx;
|
||
|
|
padding-left: 30px;
|
||
|
|
|
||
|
|
.view {
|
||
|
|
width: 18px;
|
||
|
|
height: 18px;
|
||
|
|
position: absolute;
|
||
|
|
left: 15px;
|
||
|
|
padding: 2px;
|
||
|
|
background-color: #c7c7c7;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.t-icon,
|
||
|
|
image {
|
||
|
|
width: 16px;
|
||
|
|
height: 16px;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
.right {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: flex-end;
|
||
|
|
width: 50%;
|
||
|
|
min-height: 38px;
|
||
|
|
box-sizing: border-box;
|
||
|
|
line-height: 36px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</style>
|