dev
xiaowen 3 years ago
parent 641a27dc6d
commit 4db01a3a66

@ -23,7 +23,8 @@
"pages/mine/pages/myReport/index",
"pages/mine/pages/helpCenter/index",
"pages/varComm/pages/brandRatio/index",
"pages/brandCrisis/index"
"pages/brandCrisis/index",
"pages/detail/index"
],
"window": {
"backgroundTextStyle": "light",

@ -1,10 +1,76 @@
const app = getApp();
Page({
data: {
data: {
imageUrl: getApp().globalData.imageUrl,
healthCrisis:"background-image: url(" + getApp().globalData.imageUrl + "/health-crisis.png); background-color: #FF463C;height: 834rpx;"
},
onShow() {
}
healthCrisis: "background-image: url(" + getApp().globalData.imageUrl + "/health-crisis.png);margin-top: 0px; height: 750rpx;",
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;",
healthIndex: 100,
healthIndexMsg: '非常健康',
headlBrand: "",
topBg: '',
sBrand: '奥迪'
},
onShow() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getBrand().then((res) => {
let headlBrand = res;
this.setData({
headlBrand: headlBrand
})
this.getData(sTimeType, sStartTime, sEndTime);
}
)
},
getBrand() {
return new Promise((resolve, reject) => {
app.globalData.request({
action: 'getUserMainBrand',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM='
}).then(res => {
this.setData({
sBrand: res
})
resolve(res)
}).catch(() => {
reject(false)
})
})
},
getData(sTimeType, sStartTime, sEndTime) {
let obj = {
action: "getHealthIndex",
sType: "BrandOverview",
sTimeType: sTimeType,
sBrand: this.data.sBrand,
sStartTime: sStartTime,
sEndTime: sEndTime,
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
}
app.globalData.request(obj).then(res => {
let healthIndex = res.healthIndex;
let healthIndexMsg = res.healthIndexMsg;
let topBg = "";
if(healthIndex >= 90) {
topBg = '#0084FF'
} else if(80 <= healthIndex && healthIndex < 90) {
topBg = '#00CA2F'
} else if(70 <= healthIndex && healthIndex < 80) {
topBg = '#FFCC01'
} else if(60 <= healthIndex && healthIndex < 70) {
topBg = '#FFA419'
} else {
topBg = '#FF463C'
}
this.setData({
healthIndex: healthIndex,
topBg: topBg,
healthIndexMsg: healthIndexMsg
})
})
}
})

@ -1,3 +1,5 @@
{
"usingComponents": {}
"usingComponents": {
"time-component": "../../components/timecomponent/index"
}
}

@ -1,8 +1,41 @@
<view class="bc-container">
<view class="bc-top">
<view class="bc-top-inner" style="{{healthCrisis}}">
<view class="bc-top-fen" style="color: #FF3A30">57.1</view>
<view class="bc-top-btn1">严重问题</view>
<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: 100rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FF3A30">{{healthIndex}}</view>
<view class="bc-top-btn1">{{healthIndexMsg}}</view>
<view class="bc-brand">{{headlBrand}}</view>
</view>
<view class="bc-top-inner" style="{{healthGood}}" wx:if="{{healthIndex >= 90}}">
<view class="bc-c-j" style="margin-top: -60rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #0284FF">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #0084FF">{{healthIndexMsg}}</view>
<view class="bc-brand">{{headlBrand}}</view>
</view>
<view class="bc-top-inner" style="{{healthGenerally}}" wx:if="{{80 <= healthIndex && healthIndex < 90}}">
<view class="bc-c-j" style="margin-top: -40rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #00CA2F">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #00CA2F">{{healthIndexMsg}}</view>
<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: 0rpx;">健康指数</view>
<view class="bc-top-fen" style="color: #FFCC01">{{healthIndex}}</view>
<view class="bc-top-btn1" style="color: #FFCC01">{{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: 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>
</view>
<view class="bc-top-wj">
<image class="bc-tt" src="{{imageUrl}}/trumpet.png"></image>
</view>
<view class="bc-top-bt"></view>
</view>
<view class="bc-cont">
<time-component></time-component>
</view>
</view>

@ -1,24 +1,28 @@
.bc-container {
width: 100%;
background: #fff;
}
.bc-top {
position: relative;
width: 100%;
height: 834rpx;
background-color: red;
height: 900rpx;
border-top: 1px solid transparent;
}
.bc-top-inner {
width: 100%;
background-repeat: no-repeat;
background-size: contain;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 100rpx;
height: 660rpx;
}
.bc-top-fen {
font-size: 78rpx;
font-weight: bold;
margin-top: 68rpx;
margin-top: 0rpx;
}
.bc-top-btn1 {
font-size: 28rpx;
@ -26,4 +30,48 @@
background-color: #fff;
padding: 15rpx 30rpx;
border-radius: 40rpx;
}
.bc-brand {
position: absolute;
top: 13px;
font-size: 18px;
color: #fff;
}
.bc-c-j {
font-size: 14px;
color: #999999;
margin-top: 0rpx;
}
.bc-top-wj {
position: absolute;
width: 90%;
height: 40px;
background-color: #fff;
bottom: 30px;
left: 50%;
margin-left: -45%;
display: flex;
justify-content: flex-start;
align-items: center;
border-radius: 4px;
}
.bc-top-bt {
position: absolute;
width: 100%;
height: 16px;
bottom: 0px;
left: 0px;
background-color: #fff;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
.bc-cont {
background: #fff;
margin-top: -36rpx;
}
.bc-tt {
display: inline-block;
width: 50rpx;
height: 50rpx;
margin-left: 20rpx;
}

@ -0,0 +1,30 @@
const app = getApp();
Page({
data: {
imageUrl: getApp().globalData.imageUrl,
id: ''
},
onLoad() {
wx.setNavigationBarTitle({
title: '详情'
})
let pages = getCurrentPages();
let currentPage = pages[pages.length-1]
let options = currentPage.options
this.setData({
id: options.id
})
},
onShow() {
this.getData()
},
getData() {
app.globalData.request({
action: 'getSwsQyQuartz',
id: this.data.id,
token: wx.getStorageSync('token') || 't%2BrswgjvzGM='
}).then(res => {
console.log(res)
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,61 @@
<view class="d-page">
<view class="d-top">
<view class="d-top-cp">
<view class="d-top-cp-d1">
<view>
<view class="d-top-cp-d1-s1">正面</view>
</view>
<view class="dtcd1-dd2">
<image class="d-top-cp-d1-m1" src="{{imageUrl}}/copy.png"></image>
<text class="d-top-cp-d1-s2">复制链接</text>
</view>
</view>
<view class="d-top-cp-d2">
哈弗大狗追猎顶配版上市发布会即将耀目登场
</view>
<view class="d-top-cp-d3"></view>
<view class="d-top-cp-d4">
<view class="d-top-cp-d4-dd1">
<view style="font-size: 12px;color: #98CDFF;">发布时间</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">2022-06-10 01:00:49</view>
</view>
<view class="d-top-cp-d4-dd1" style="text-align: center;">
<view style="font-size: 12px;color: #98CDFF;">来源</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">汽车之家</view>
</view>
<view class="d-top-cp-d4-dd1" style="text-align: right;">
<view style="font-size: 12px;color: #98CDFF;">作者</view>
<view style="font-size: 10px;color: #fff;font-weight: 600;">小猪说车</view>
</view>
</view>
</view>
<view class="b-c-top-bm"></view>
</view>
<view class="bc-cont">
<view class="bc-c-d1">
在沙漠中驾驶极易迷失方向以下那种驾驶行为是正确的A一直走直线B手机有信号就随便开C开启循迹导航功能。能做这道题的是哈弗大狗追猎版。因为它新增了8种驾驶模式、循迹导航、人脸识别、遥控泊车、驾驶模式记忆、座椅记忆、外后视镜记忆、座舱清洁和等离子发生器等功能而8种驾驶模式中的沙地模式+循迹导航,将能让这台车驰骋沙海。
6月6日哈弗大狗追猎版深入中国第七大沙漠——库布齐的茫茫沙海成功打卡并宣布上市哈弗大狗1.5T 马犬追猎版、哈弗大狗2.0T 中华田园犬追猎版和哈弗大狗2.0T 哮天犬追猎版三款车型分别售价14.89万元、16.19万元和16.79万元。我觉得, 刻度座驾一直是哈弗大狗的产品属性。而追猎版的到来让这台车的属性更靠越野一些可能来到了4/5确实够劲。
</view>
<view class="bc-c-d2">
<view style="font-size: 14px; color: #333333;">相似信息</view>
<view style="font-size: 12px; color: #333333;margin-left: 8px;">共计23条相似数据</view>
</view>
<view class="bc-c-d3">
<view class="bc-c-d3-dd1">
<view style="color: #999999;font-size: 12px;">
2022-04-29 23:02:01
</view>
<view>
<view class="d-top-cp-d1-s1" style="background: #F0F8FF;color: #0084FF;">正面</view>
</view>
</view>
<view class="bc-c-d3-dd2">
谁说国产没有高性能SUV这3款国产SUV
</view>
<view class="bc-c-d3-dd3">
<view style="color: #999999;font-size: 12px;width: 50%">来源:百度百家</view>
<view style="color: #999999;font-size: 12px;">作者:无心</view>
</view>
</view>
</view>
</view>

@ -0,0 +1,128 @@
.d-page {
width: 100%;
}
.d-top {
position: relative;
display: flex;
justify-content: center;
height: 430rpx;
background: #006BFF;
border-top: 1px solid transparent;
}
.d-top-cp {
position: relative;
width: 83%;
padding: 10px 13px;
height: 300rpx;
background: rgba(255, 255, 255, 0.2000);
border-radius: 4px;
border: 1px solid;
margin-top: 10px;
border-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)) 1 1;
}
.d-top-cp-d1 {
display: flex;
justify-content: space-between;
}
.d-top-cp-d1-s1 {
padding: 3px 7px;
background-color: #fff;
border-radius: 4px;
font-size: 12px;
color: #0084FF;
font-weight: 600;
}
.dtcd1-dd2 {
display: flex;
justify-content: flex-start;
align-items: center;
}
.d-top-cp-d1-m1 {
width: 30rpx;
height: 30rpx;
}
.d-top-cp-d1-s2 {
display: inline-block;
font-size: 12px;
color: #98CDFF;
margin-left: 5px;
}
.d-top-cp-d2 {
color: #fff;
font-size: 16px;
font-weight: 600;
margin-top: 10px;
}
.d-top-cp-d3 {
position: absolute;
width: 100%;
height: 1px;
background: linear-gradient(117deg, rgba(245, 245, 245, 0) 0%, #EEEEEE 50%, rgba(232, 232, 232, 0) 100%);
left: 0px;
bottom: 53px;
}
.d-top-cp-d4 {
position: absolute;
display: flex;
justify-content: space-between;
width: 93%;
height: 50px;
bottom: 0px;
}
.d-top-cp-d4-dd1 {
margin-top: 8px;
}
.b-c-top-bm {
position: absolute;
width: 100%;
height: 15px;
background-color: #fff;
bottom: 0px;
left: 0px;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
.bc-cont {
padding: 0px 13px 10px 15px;
}
.bc-c-d1 {
background-color: #fff;
padding: 16px;
font-size: 12px;
color: #333333;
line-height: 1.6;
}
.bc-c-d2 {
display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 16px;
}
.bc-c-d3 {
position: relative;
background-color: #fff;
padding: 16px;
margin-top: 8px;
}
.bc-c-d3-dd1 {
display: flex;
justify-content: space-between;
}
.bc-c-d3-dd2 {
color: #333333;
margin-top: 12px;
}
.bc-c-d3-dd3 {
display: flex;
justify-content: flex-start;
margin-top: 12px;
}

@ -21,6 +21,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "详情",
"pathName": "pages/detail/index",
"query": "id=10&mod=0",
"launchMode": "default",
"scene": null
}
]
}

Loading…
Cancel
Save