From 4db01a3a66229e74faf2c9ed82f629747ba7ee6d Mon Sep 17 00:00:00 2001 From: xiaowen <372193233@qq.com> Date: Fri, 15 Jul 2022 18:40:22 +0800 Subject: [PATCH] cxw-010203 --- app.json | 3 +- pages/brandCrisis/index.js | 78 +++++++++++++++++++-- pages/brandCrisis/index.json | 4 +- pages/brandCrisis/index.wxml | 41 +++++++++-- pages/brandCrisis/index.wxss | 56 +++++++++++++-- pages/detail/index.js | 30 ++++++++ pages/detail/index.json | 3 + pages/detail/index.wxml | 61 +++++++++++++++++ pages/detail/index.wxss | 128 +++++++++++++++++++++++++++++++++++ project.private.config.json | 7 ++ 10 files changed, 395 insertions(+), 16 deletions(-) create mode 100644 pages/detail/index.js create mode 100644 pages/detail/index.json create mode 100644 pages/detail/index.wxml create mode 100644 pages/detail/index.wxss diff --git a/app.json b/app.json index b6045a6..9a9a339 100644 --- a/app.json +++ b/app.json @@ -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", diff --git a/pages/brandCrisis/index.js b/pages/brandCrisis/index.js index 5a0a76d..b480c5d 100644 --- a/pages/brandCrisis/index.js +++ b/pages/brandCrisis/index.js @@ -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 + }) + }) + } }) \ No newline at end of file diff --git a/pages/brandCrisis/index.json b/pages/brandCrisis/index.json index 3928faa..3e17279 100644 --- a/pages/brandCrisis/index.json +++ b/pages/brandCrisis/index.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": { + "time-component": "../../components/timecomponent/index" + } } \ No newline at end of file diff --git a/pages/brandCrisis/index.wxml b/pages/brandCrisis/index.wxml index bc7652f..e415190 100644 --- a/pages/brandCrisis/index.wxml +++ b/pages/brandCrisis/index.wxml @@ -1,8 +1,41 @@ - - - 57.1 - 严重问题 + + + 健康指数 + {{healthIndex}} + {{healthIndexMsg}} + {{headlBrand}} + + 健康指数 + {{healthIndex}} + {{healthIndexMsg}} + {{headlBrand}} + + + 健康指数 + {{healthIndex}} + {{healthIndexMsg}} + {{headlBrand}} + + + 健康指数 + {{healthIndex}} + {{healthIndexMsg}} + {{headlBrand}} + + + 健康指数 + {{healthIndex}} + {{healthIndexMsg}} + {{headlBrand}} + + + + + + + + \ No newline at end of file diff --git a/pages/brandCrisis/index.wxss b/pages/brandCrisis/index.wxss index ad0e5ce..16222bb 100644 --- a/pages/brandCrisis/index.wxss +++ b/pages/brandCrisis/index.wxss @@ -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; } \ No newline at end of file diff --git a/pages/detail/index.js b/pages/detail/index.js new file mode 100644 index 0000000..d147b41 --- /dev/null +++ b/pages/detail/index.js @@ -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) + }) + } +}) \ No newline at end of file diff --git a/pages/detail/index.json b/pages/detail/index.json new file mode 100644 index 0000000..3928faa --- /dev/null +++ b/pages/detail/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml new file mode 100644 index 0000000..f8150d7 --- /dev/null +++ b/pages/detail/index.wxml @@ -0,0 +1,61 @@ + + + + + + 正面 + + + + 复制链接 + + + + 哈弗大狗追猎顶配版上市发布会即将耀目登场 + + + + + 发布时间 + 2022-06-10 01:00:49 + + + 来源 + 汽车之家 + + + 作者 + 小猪说车 + + + + + + + + 在沙漠中驾驶极易迷失方向,以下那种驾驶行为是正确的?A一直走直线;B手机有信号就随便开;C开启循迹导航功能。能做这道题的,是哈弗大狗追猎版。因为它新增了8种驾驶模式、循迹导航、人脸识别、遥控泊车、驾驶模式记忆、座椅记忆、外后视镜记忆、座舱清洁和等离子发生器等功能,而8种驾驶模式中的沙地模式+循迹导航,将能让这台车驰骋沙海。 +6月6日,哈弗大狗追猎版深入中国第七大沙漠——库布齐的茫茫沙海成功打卡,并宣布上市,哈弗大狗1.5T 马犬追猎版、哈弗大狗2.0T 中华田园犬追猎版和哈弗大狗2.0T 哮天犬追猎版三款车型分别售价:14.89万元、16.19万元和16.79万元。我觉得, 刻度座驾,一直是哈弗大狗的产品属性。而追猎版的到来,让这台车的属性更靠越野一些,可能来到了4/5,确实够劲。 + + + 相似信息 + 共计23条相似数据 + + + + + 2022-04-29 23:02:01 + + + 正面 + + + + 谁说国产没有高性能SUV这3款国产SUV + + + 来源:百度百家 + 作者:无心 + + + + \ No newline at end of file diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss new file mode 100644 index 0000000..75c4e84 --- /dev/null +++ b/pages/detail/index.wxss @@ -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; +} \ No newline at end of file diff --git a/project.private.config.json b/project.private.config.json index b60db76..3f95e94 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -21,6 +21,13 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "详情", + "pathName": "pages/detail/index", + "query": "id=10&mod=0", + "launchMode": "default", + "scene": null } ] }