新增部分功能
This commit is contained in:
parent
96b1394e8b
commit
31887c1ca8
|
|
@ -10,6 +10,9 @@
|
|||
.flx_ac{
|
||||
align-items: center;
|
||||
}
|
||||
.flx_ae{
|
||||
align-items: end;
|
||||
}
|
||||
.flx_jc{
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,12 +33,15 @@
|
|||
{{v.name}}
|
||||
</view>
|
||||
<view class=" zzt">
|
||||
<view class="xnz" v-if="v.data[v.data.length-1] != v.max" >
|
||||
|
||||
</view>
|
||||
<view class="flx fd_row">
|
||||
<view v-if="idx1 > 0" :class="'zzt-body color'+(idx1 - 1)" v-for="(vv,idx1) in v.data" :key="idx1" :style="'flex:'+ ((vv - v.data[idx1-1])/v.max)">
|
||||
<view v-if="v.data.length == 3||idx1 > 0" :class="'zzt-body color'+(v.data.length == 3?idx1:idx1 - 1)" v-for="(vv,idx1) in v.data" :key="idx1" :style="'flex:'+ (((vv > v.max?v.max:vv) - v.data[idx1-1])/v.max)">
|
||||
</view>
|
||||
</view>
|
||||
<view class="flx fd_row ">
|
||||
<view v-if="idx1 > 0" :class="'flx '+ (idx1 == 1?'jcsb': 'jc-end')" v-for="(vv,idx1) in v.data" :key="idx1" :style="'flex:'+ (((vv - v.data[idx1-1])/v.max) + v.adjustment[idx1-1])">
|
||||
<view v-if="idx1 > 0" :class="'flx '+ (idx1 == 1?'jcsb': 'jc-end')" v-for="(vv,idx1) in v.data" :key="idx1" :style="'flex:'+ ((((vv > v.max?v.max:vv) - v.data[idx1-1])/v.max) + v.adjustment[idx1-1])">
|
||||
<view class="font-small">
|
||||
{{ idx1 == 1?v.data[idx1-1]:''}}
|
||||
</view>
|
||||
|
|
@ -48,7 +51,6 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -121,8 +123,20 @@
|
|||
font-size: 24rpx;
|
||||
}
|
||||
.zzt{
|
||||
position: relative;
|
||||
padding: 20rpx 0;
|
||||
width: 60%;
|
||||
.xnz{
|
||||
width: 8rpx;
|
||||
height: 20rpx;
|
||||
background-color: #fff;
|
||||
border-left: 1rpx solid black;
|
||||
border-right: 1rpx solid black;
|
||||
position: absolute;
|
||||
right: 50rpx;
|
||||
top: 19rpx;
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
.zzt-body{
|
||||
height: 10rpx;
|
||||
margin: 2rpx;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="box-rds over">
|
||||
<view class="top_title">
|
||||
{{ overviewData.name }}
|
||||
</view>
|
||||
<view class="flx flx_sb tb_head" >
|
||||
<view class="tb_val" v-for="(v,i) in overviewData.tb_head" :key="i">
|
||||
{{v}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flx flx_sb flx_ac tb_content" v-for="(v,i) in overviewData.data" :key="i" style="margin-top: 40rpx;">
|
||||
<view class="tb_val" style="font-size: 24rpx;">
|
||||
{{v.name}}
|
||||
</view>
|
||||
<view class="tb_val" :style="'border-radius: 40rpx;padding: 4rpx;font-size:24rpx;color:'+v.color + ';background-color:'+v.bgColor">
|
||||
{{v.value}}
|
||||
</view>
|
||||
<view class="tb_val" :style="'font-size:24rpx;color:'+v.color">
|
||||
{{v.average}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"overview",
|
||||
props:{
|
||||
overviewData:Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.box-rds {
|
||||
background-color: #fff;
|
||||
border-radius: 40rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx;
|
||||
|
||||
}
|
||||
.over{
|
||||
.tb_head{
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
.tb_val:nth-child(1){
|
||||
width: 40%;
|
||||
}
|
||||
.tb_val:nth-child(2){
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
.tb_val:nth-child(3){
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<view>
|
||||
<view style=" height:600rpx;background-color: #fff;"><l-echart ref="chartRef" @finished="init"></l-echart></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
|
||||
|
||||
export default {
|
||||
name:"pie",
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
async init() {
|
||||
// this.chart = await this.$refs.chartRef.init(echarts);
|
||||
// let option = await this.getDataList();
|
||||
// this.chart.setOption(option)
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
|
@ -80,6 +80,7 @@ export default () => {
|
|||
}
|
||||
|
||||
if (data.code == 7777) {
|
||||
store.commit('api/setApiToken','')
|
||||
uni.showToast({
|
||||
mask: true,
|
||||
title: '请重新登录',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -15,11 +15,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item row" @click="toPage('/pages/index/detail?type=step')">
|
||||
<view class="content-item row" @click="toPage('/pages/index/echarts?type=step&calorie='+(dataListsNew.stepIndex.data_msg?dataListsNew.stepIndex.data_msg.calorie:0)+'&step='+(dataListsNew.stepIndex.data_msg?dataListsNew.stepIndex.data_msg.step:0)+'&distance='+ (dataListsNew.stepIndex.data_msg?(dataListsNew.stepIndex.data_msg.distance / 1000).toFixed(2):0))">
|
||||
<view class="item">
|
||||
<view class="title">卡路里</view>
|
||||
<view class="row-date">
|
||||
|
||||
<view>{{dataListsNew.stepIndex.data_msg ? dataListsNew.stepIndex.data_msg.calorie / 10 : '--'}}</view>
|
||||
<text>千卡</text>
|
||||
</view>
|
||||
|
|
@ -46,7 +45,7 @@
|
|||
<!-- <image src="../../static/icon/血糖.png" mode="widthFix"></image> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=bloodGlucose')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=bloodGlucose')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodGlucose')}}
|
||||
</view>
|
||||
|
|
@ -67,7 +66,7 @@
|
|||
<image src="../../static/icon/xuetang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=bloodOxygen')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=bloodOxygen')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodOxygen')}}
|
||||
</view>
|
||||
|
|
@ -90,7 +89,7 @@
|
|||
<image src="../../static/icon/xueyang.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=bloodPressure')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=bloodPressure')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodPressure')}}
|
||||
</view>
|
||||
|
|
@ -112,7 +111,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=bodyTemperature')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=bodyTemperature')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bodyTemperature')}}
|
||||
</view>
|
||||
|
|
@ -134,7 +133,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=pulseReat')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=pulseReat')">
|
||||
<view class="title">
|
||||
{{getNameByKey('pulseReat')}}
|
||||
</view>
|
||||
|
|
@ -176,7 +175,7 @@
|
|||
<image src="../../static/icon/xindiantu.png" style="width: 220rpx;" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item" style="height: 430rpx" @click="toPage('/pages/index/detail?type=bloodLiquid')">
|
||||
<view class="content-item" style="height: 430rpx" @click="toPage('/pages/index/echarts?type=bloodLiquidAll')">
|
||||
<view class="title">
|
||||
{{getNameByKey('bloodLiquid')}}
|
||||
</view>
|
||||
|
|
@ -245,7 +244,7 @@
|
|||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="content-item" @click="toPage('/pages/index/detail?type=bloodLiquid&desc=uricAcidVal')">
|
||||
<view class="content-item" @click="toPage('/pages/index/echarts?type=bloodLiquid&desc=uricAcidVal')">
|
||||
<view class="title">
|
||||
尿酸
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,14 @@
|
|||
isFocus: true // 是否聚焦
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let token = this.$store.getters['api/getApiToken']
|
||||
if(token){
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
components:{
|
||||
wInput,
|
||||
wButton,
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Loading…
Reference in New Issue