dev
wylyl22 3 years ago
commit ddf9298d20

@ -4,11 +4,11 @@ const app = getApp();
Page({
data: {
imageUrl: getApp().globalData.imageUrl,
healthCrisis: "background-image: url(" + getApp().globalData.imageUrl + "/health-crisis.png);margin-top: 0px; height: 750rpx;",
healthCrisis: "background-image: url(" + getApp().globalData.imageUrl + "/health-crisis1.png);margin-top: 0px;",
healthGood: "background-image: url(" + getApp().globalData.imageUrl + "/health-good.png);",
healthGenerally: "background-image: url(" + getApp().globalData.imageUrl + "/health-generally.png);",
healthMedium: "background-image: url(" + getApp().globalData.imageUrl + "/health-medium.png);",
healthWarning: "background-image: url(" + getApp().globalData.imageUrl + "/health-warning.png);margin-top: 0px; height: 750rpx;",
healthWarning: "background-image: url(" + getApp().globalData.imageUrl + "/health-warning1.png);margin-top: 0px;",
healthIndex: 100,
healthIndexMsg: '非常健康',
headlBrand: "",
@ -110,7 +110,7 @@ Page({
let intermediateCrisis = Math.round((new Decimal(res.crisis[1].value).div(new Decimal(negativeNum))).toFixed(2) * 100);
let seniorCrisis = Math.round((new Decimal(res.crisis[2].value).div(new Decimal(negativeNum))).toFixed(2) * 100);
this.setData({
healthIndex: 100,
healthIndex: healthIndex,
topBg: topBg,
healthIndexMsg: healthIndexMsg,
negativeNum: negativeNum,

@ -1,7 +1,7 @@
<view class="bc-container">
<view class="bc-top" style="background-color: {{topBg}};">
<view class="bc-top-inner" style="{{healthCrisis}}" wx:if="{{healthIndex < 60}}">
<view class="bc-c-j" style="margin-top: 30rpx;">健康指数</view>
<view class="bc-c-j" style="margin-top: 60rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FF3A30">{{healthIndex}}</view>
<view class="bc-top-btn1">{{healthIndexMsg}}</view>
<view class="bc-brand">{{headlBrand}}</view>
@ -19,13 +19,13 @@
<view class="bc-brand">{{headlBrand}}</view>
</view>
<view class="bc-top-inner" style="{{healthMedium}}" wx:if="{{70 <= healthIndex && healthIndex < 80}}">
<view class="bc-c-j" style="margin-top: -60rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FFCC01">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #FFCC01">{{healthIndexMsg}}</view>
<view class="bc-c-j" style="margin-top: -60rpx;margin-left: 30rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FFCC01;margin-left: 30rpx;">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #FFCC01;margin-left: 30rpx;">{{healthIndexMsg}}</view>
<view class="bc-brand">{{headlBrand}}</view>
</view>
<view class="bc-top-inner" style="{{healthWarning}}" wx:if="{{60 <= healthIndex && healthIndex < 70}}">
<view class="bc-c-j" style="margin-top: 16rpx;">健康指数</view>
<view class="bc-c-j" style="margin-top: 90rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FF9500">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #FF9500 ">{{healthIndexMsg}}</view>
<view class="bc-brand">{{headlBrand}}</view>

@ -4,11 +4,11 @@
.bc-top {
position: relative;
width: 100%;
height: 840rpx;
height: 780rpx;
border-top: 1px solid transparent;
}
.bc-top-inner {
width: 90%;
width: 78%;
background-repeat: no-repeat;
background-size: cover;
display: flex;
@ -17,7 +17,7 @@
flex-direction: column;
margin: 0 auto;
margin-top: 100rpx;
height: 660rpx;
height: 600rpx;
}
.bc-top-fen {
font-size: 78rpx;
@ -25,10 +25,10 @@
margin-top: 0rpx;
}
.bc-top-btn1 {
font-size: 28rpx;
font-size: 26rpx;
color: #FF3A30;
background-color: #fff;
padding: 15rpx 30rpx;
padding: 13rpx 26rpx;
border-radius: 40rpx;
}
.bc-brand {
@ -36,6 +36,8 @@
top: 13px;
font-size: 18px;
color: #fff;
font-weight: 500;
letter-spacing: 1px;
}
.bc-c-j {
font-size: 14px;

Loading…
Cancel
Save