|
@@ -8,7 +8,7 @@
|
|
|
<li class="mui-table-view-cell mui-col-xs-4">
|
|
|
<div class="vongi-color-block block-yellow">
|
|
|
<span class="vongi-color-unit">mmHg</span>
|
|
|
- <div class="mui-h1" v-text="healthData.diastolic+'/'+healthData.systolic"></div>
|
|
|
+ <div class="mui-h1" v-text="tolic"></div>
|
|
|
<div class="mui-media-body">血压</div>
|
|
|
</div>
|
|
|
</li>
|
|
@@ -97,12 +97,19 @@
|
|
|
API_Health.getHeathData().then(response => {
|
|
|
this.isLoading = false;
|
|
|
|
|
|
- this.healthData = response;
|
|
|
- if (response.lbs) {
|
|
|
- let lbsArr = response.lbs.split(',');
|
|
|
- //获取定位地址
|
|
|
- this.getPositionByLonLats(lbsArr[0], lbsArr[1]);
|
|
|
+ if (response) {
|
|
|
+ this.healthData = response;
|
|
|
+ if (response.lbs) {
|
|
|
+ let lbsArr = response.lbs.split(',');
|
|
|
+ //获取定位地址
|
|
|
+ this.getPositionByLonLats(lbsArr[0], lbsArr[1]);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mui.alert('请先绑定智能手表设备,并保持佩戴几分钟以便我们获取最新的监测数据。', '暂无数据', function() {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
}).catch(error => {
|
|
|
this.isLoading = false;
|
|
|
mui.toast(error);
|
|
@@ -142,6 +149,20 @@
|
|
|
|
|
|
},
|
|
|
computed: {
|
|
|
+ tolic: {
|
|
|
+ // getter
|
|
|
+ get: function() {
|
|
|
+ if (healthData.diastolic) {
|
|
|
+ return healthData.diastolic + '/' + healthData.systolic;
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // setter
|
|
|
+ set: function(newValue) {
|
|
|
+ console.log(newValue)
|
|
|
+ }
|
|
|
+ },
|
|
|
...mapGetters({
|
|
|
openId: 'wx_openid',
|
|
|
token: 'token',
|