From d1da34a88b3391d13fd92d8c0e50429ff037f438 Mon Sep 17 00:00:00 2001
From: luoye <397379429@qq.com>
Date: Mon, 28 Aug 2017 17:12:27 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=A0=87=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
littleApp_child/pages/CheckReport/CheckReport.js | 12 ++++
littleApp_child/pages/CheckReport/CheckReport.wxml | 9 ++-
littleApp_child/pages/CheckReport/CheckReport.wxss | 7 ---
.../childcare_knowledge_detail.js | 2 +
.../childcare_knowledge_detail.wxml | 18 +++---
.../childcare_knowledge_detail.wxss | 14 +++--
littleApp_child/pages/home/home.wxml | 12 +++-
littleApp_child/pages/home/home.wxss | 52 +++++++++++-----
littleApp_child/pages/hospitalList/hospitalList.js | 72 +---------------------
littleApp_child/utils/numberUtil.js | 7 +++
littleApp_child/utils/util_UI.wxss | 13 +++-
11 files changed, 103 insertions(+), 115 deletions(-)
diff --git a/littleApp_child/pages/CheckReport/CheckReport.js b/littleApp_child/pages/CheckReport/CheckReport.js
index 0693019..47ad568 100644
--- a/littleApp_child/pages/CheckReport/CheckReport.js
+++ b/littleApp_child/pages/CheckReport/CheckReport.js
@@ -1,6 +1,7 @@
// 网络请求工具类
var networkUtil = require('../../utils/network_util.js')
+var numUtil = require('../../utils/numberUtil.js')
var api = require('../../utils/apiFile.js')
var util = require('../../utils/util.js')
var event = require('../../utils/event.js')
@@ -201,6 +202,17 @@ Page({
subscribe = true
subscribeDetail.checkhospital = res.data.data.checkhospital
subscribeDetail.nextcheck = res.data.data.nextcheck
+ // 距离下次检查日期间隔
+ subscribeDetail.nextInterval = '-'
+ var next = new Date(res.data.data.nextcheck)
+ var nextInterval = numUtil.calculateTimeInterval(new Date().getTime(), next.getTime())
+ if (nextInterval == 0){
+ subscribeDetail.nextInterval = '今天'
+ } else if (nextInterval < 0){
+ subscribeDetail.nextInterval = '已逾期'
+ } else {
+ subscribeDetail.nextInterval = '剩' + nextInterval + '天'
+ }
}
self.setData({
todayInfo: res.data.data,
diff --git a/littleApp_child/pages/CheckReport/CheckReport.wxml b/littleApp_child/pages/CheckReport/CheckReport.wxml
index 851cf13..198fd2c 100644
--- a/littleApp_child/pages/CheckReport/CheckReport.wxml
+++ b/littleApp_child/pages/CheckReport/CheckReport.wxml
@@ -76,7 +76,6 @@
-
@@ -129,10 +128,10 @@
-
+
+
+
+
diff --git a/littleApp_child/pages/CheckReport/CheckReport.wxss b/littleApp_child/pages/CheckReport/CheckReport.wxss
index 94111c7..8f0bb91 100644
--- a/littleApp_child/pages/CheckReport/CheckReport.wxss
+++ b/littleApp_child/pages/CheckReport/CheckReport.wxss
@@ -233,13 +233,6 @@ page {
color: #333;
}
-.docotr_type {
- font-family: PingFangSC-Regular;
- font-size: 14px;
- color: #888;
- margin-left: 3px;
-}
-
.check_result_time {
font-family: PingFangSC-Regular;
font-size: 14px;
diff --git a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js
index 0f8d86f..02589ab 100644
--- a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js
+++ b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.js
@@ -80,6 +80,8 @@ Page({
networkUtil._get(api.articles + '/' + id, {}, function (res) {
console.log('数据-----',res)
res.data.content = util.convertHtmlToText(res.data.content)
+ var date = new Date(res.data.created * 1000)
+ res.data.time = date.getFullYear() + '年' + (date.getMonth() + 1) + '月' + date.getDate() + '日 ' + date.getHours() + ':' + date.getMinutes()
self.setData({
knowledge: res.data,
swiperHeight: wx.getSystemInfoSync().windowWidth * 0.55
diff --git a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml
index e6cc08f..7a1a71f 100644
--- a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml
+++ b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml
@@ -1,13 +1,17 @@
{{knowledge.title}}
-
-
-
-
- {{knowledge.likeCount ? knowledge.likeCount : 0}}
-
- {{knowledge.time}}
+
+ 啦啦
+ 啦啦
+ 啦啦
+
+
+
+
+ {{knowledge.likeCount ? knowledge.likeCount : 0}}
+ {{knowledge.time}}
+
diff --git a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss
index 440452c..48f4b05 100644
--- a/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss
+++ b/littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxss
@@ -17,6 +17,11 @@ page {
margin-right: 10px;
}
+.art_labels {
+ display: flex;
+ margin-left: 10px;
+}
+
.home__list-item {
position: relative;
background: white;
@@ -42,13 +47,9 @@ page {
.content_time {
font-family: PingFangSC-Regular;
font-size: 10px;
- margin-top: 3px;
+ margin-top: 5px;
color: #c8c6c6;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- margin-left: 20px;
- overflow: hidden;
+ margin-left: 14px;
}
.content_content {
@@ -99,3 +100,4 @@ page {
left: 15px;
right: 15px;
}
+
diff --git a/littleApp_child/pages/home/home.wxml b/littleApp_child/pages/home/home.wxml
index 0bf5924..78d65ce 100644
--- a/littleApp_child/pages/home/home.wxml
+++ b/littleApp_child/pages/home/home.wxml
@@ -11,7 +11,11 @@
- {{userData.username}}
+
+ {{userData.username}}
+
+ {{userData.username}}
+
@@ -69,13 +73,15 @@
-
+
+ 什么东东
+ 什么东东啊
+
diff --git a/littleApp_child/pages/home/home.wxss b/littleApp_child/pages/home/home.wxss
index 9809864..0483b92 100644
--- a/littleApp_child/pages/home/home.wxss
+++ b/littleApp_child/pages/home/home.wxss
@@ -5,7 +5,7 @@
/*顶部模块*/
.TopBar {
width:100%;
- height:202px;
+ height:212px;
background: #48C17B;
position: relative;
}
@@ -37,15 +37,37 @@
box-shadow: 0 2px 4px 0 rgba(186,70,70,0.50);
}
-.userName {
- font-size: 14px;
- font-weight: bold;
- display: block;
+.top_name {
+ color: white;
+ font-size: 15px;
+ display: flex;
top: 100px;
+ width: 100%;
position: absolute;
/*居中*/
- left: 50%;
- transform: translateX(-50%);
+ justify-content: center;
+ align-items: center;
+}
+
+.top_name_line {
+ background: white;
+ height: 1px;
+ width: 28px;
+}
+
+.userName {
+ padding: 2.5px 5px 2.5px 5px;
+}
+
+.userName_selected {
+ background: white;
+ border-radius: 4px;
+ color: #48C17B;
+}
+
+.userName_normal {
+ background: #48C17B;
+ border-radius: 4px;
color: white;
}
@@ -192,7 +214,7 @@
}
/* 文章ne内容背景 */
.article_content {
- height: 115px;
+ height: 135px;
}
/* 内容标题 */
.article_content_title {
@@ -229,22 +251,24 @@
margin-right: 11px;
width: 74px;
height: 74px;
- transform: translateY(-74px);
+ transform: translateY(-74px);
}
/* 点赞 */
.article_content_bottomBar {
- height: 28px;
+ height: 38px;
+ width: 100%;
+ margin-top: 10px;
}
.article_content_bottomBar_labels {
- float: left;
+ float: right;
height: 100%;
- width: 50px;
+ transform: translateX(85px);
}
.article_content_bottomBar_likes {
- float: left;
- width: 50px;
+ float: left;
+ width: 100px;
margin-left: 10px;
}
diff --git a/littleApp_child/pages/hospitalList/hospitalList.js b/littleApp_child/pages/hospitalList/hospitalList.js
index b73d638..f68dbbe 100644
--- a/littleApp_child/pages/hospitalList/hospitalList.js
+++ b/littleApp_child/pages/hospitalList/hospitalList.js
@@ -20,75 +20,5 @@ Page({
onLoad: function () {
networkUtil.showLoading()
this.getUserLocation()
- },
-
- /*---------交互---------*/
- //事件处理函数
- bindViewTap: function() {
- wx.navigateTo({
- url: '../home/home'
- })
- },
- // 加载更多
- loadMore:function(e){
- if(!hasMore){
- return
- }
- page ++
- networkUtil.showLoading()
- this.requestData()
- },
- // 下拉刷新回调接口
- onPullDownRefresh: function() {
- page = 0;
- hasMore = true
- // 网络请求,重新请求一遍数据
- this.requestData();
- },
- /*---------自定义函数--------*/
- // 获取地理位置
- getUserLocation(){
- var self = this
- wx.getLocation({
- type: 'wgs84', // 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标
- success: function(res){
- // success
- console.log(res)
- latitude = res.latitude
- longitude = res.longitude
- self.requestData()
- },
- fail: function(res) {
- // fail
- console.log(res)
- self.requestData()
- },
- complete: function() {
- // complete
- }
- })
- },
- // 获取信息
- requestData(){
- var self = this
- var param = {page:page,limit:15,lat:latitude,lng:longitude}
-
- networkUtil._get(api.hospitalList,param,function(res){
- console.log(res)
- var arr = []
- if(page > 0) {// 加载更多模式
- arr = self.data.list
- }
- if(res.data.list.length < 15){
- hasMore = false
- }
- arr = arr.concat(res.data.list)
- self.setData({
- list:arr,
- hasMore : hasMore
- })
- },function(res){
- console.log(res)
- })
- },
+ }
})
diff --git a/littleApp_child/utils/numberUtil.js b/littleApp_child/utils/numberUtil.js
index c72bdff..b87f6db 100644
--- a/littleApp_child/utils/numberUtil.js
+++ b/littleApp_child/utils/numberUtil.js
@@ -423,14 +423,21 @@ function checkIdCard(str_idCard, sex) {
module.exports = {
+ // 判断是不是手机号
IsTelPhoneNumber : IsTelPhoneNumber,
+ // 计算孕周
calculateGestationalWeeks : calculateGestationalWeeks,
+ // 计算时间间隔
calculateTimeInterval : calculateTimeInterval,
+ // 高危等级
getRiskColorWithLevel : getRiskColorWithLevel,
+ // 计算孕周余天
calculateGestationalWeekDay : calculateGestationalWeekDay,
home_getRiskInfo : home_getRiskInfo,
+
healthRating_getRiskInfo : healthRating_getRiskInfo,
DateAdd : DateAdd,
+ // 保留一位小数
toDecimal: toDecimal,
getMonthAllDayWithDate: getMonthAllDayWithDate,
getLatestWeek: getLatestWeek,
diff --git a/littleApp_child/utils/util_UI.wxss b/littleApp_child/utils/util_UI.wxss
index 86adba1..09893f4 100644
--- a/littleApp_child/utils/util_UI.wxss
+++ b/littleApp_child/utils/util_UI.wxss
@@ -134,7 +134,7 @@
border-radius: 100px;
width: 160px;
height: 32px;
- margin-top: 80px;
+ margin-top: 60px;
text-align: center;
margin-left: calc(50% - 80px);
line-height: 32px;
@@ -169,4 +169,13 @@
margin-top: 35px;
margin-left: calc(50% - 80px);
}
-
\ No newline at end of file
+
+ /* 标签 */
+.article_label {
+ margin-right: 17px;
+ font-size: 12px;
+ color: #58A478;
+ padding: 5px;
+ background: #F2FDF7;
+ border-radius: 2px;
+}
\ No newline at end of file
--
1.8.3.1