Commit c648ca6512082c327585104498a8e96aad0c59e2
1 parent
62a60a4282
Exists in
master
and in
2 other branches
首页页面判定逻辑
Showing 15 changed files with 356 additions and 255 deletions
- littleApp_child/app.js
- littleApp_child/app.json
- littleApp_child/pages/SearchPage/SearchPage.js
- littleApp_child/pages/SearchPage/SearchPage.wxml
- littleApp_child/pages/SearchPage/SearchPage.wxss
- littleApp_child/pages/articleLists/articleLists.js
- littleApp_child/pages/articleLists/articleLists.wxml
- littleApp_child/pages/articleLists/articleLists.wxss
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
- littleApp_child/pages/home/css/AboutPage.wxss
- littleApp_child/pages/home/css/login.wxss
- littleApp_child/pages/home/home.js
- littleApp_child/pages/home/home.json
- littleApp_child/pages/home/home.wxml
- littleApp_child/pages/home/home.wxss
littleApp_child/app.js
View file @
c648ca6
... | ... | @@ -317,16 +317,8 @@ |
317 | 317 | }, |
318 | 318 | globalData: { |
319 | 319 | userInfo: null, |
320 | - chatMsg: [], | |
321 | 320 | token: '', |
322 | - bedDetail: '',//预约床位详情 | |
323 | 321 | openInfo: {}, |
324 | - hxName: '', | |
325 | - hxPassWord: '', | |
326 | - ids: '',// 预约建档类型ids | |
327 | - typesPicker: '',// 预约建档既往史所有数据 | |
328 | - allCheckedPastHistory:{},// 选择的既往史 | |
329 | - allCheckedPastHistoryIds: '' // 选择的既往史的id | |
330 | 322 | }, |
331 | 323 | |
332 | 324 | }) |
littleApp_child/app.json
View file @
c648ca6
1 | 1 | { |
2 | 2 | "pages": [ |
3 | + | |
3 | 4 | "pages/home/home", |
5 | + | |
6 | + "pages/articleLists/articleLists", | |
7 | + "pages/hospitalList/hospitalList", | |
8 | + "pages/articleDetail/articleDetail", | |
9 | + | |
10 | + | |
4 | 11 | "pages/SearchPage/SearchPage", |
5 | 12 | "pages/login/login", |
6 | 13 | "pages/inspectionReport/inspectionReport", |
7 | - "pages/articleLists/articleLists", | |
14 | + | |
8 | 15 | "pages/doctorList/doctorList", |
9 | 16 | "pages/doctor/doctor", |
10 | - "pages/hospitalList/hospitalList", | |
11 | - "pages/articleDetail/articleDetail", | |
17 | + | |
18 | + | |
12 | 19 | "pages/hospitalDetail/hospitalDetail", |
13 | 20 | "pages/chatroom/chatroom", |
14 | 21 | "pages/chat/chat", |
littleApp_child/pages/SearchPage/SearchPage.js
View file @
c648ca6
... | ... | @@ -3,11 +3,19 @@ |
3 | 3 | var app = getApp() |
4 | 4 | Page({ |
5 | 5 | data: { |
6 | + list: [ | |
7 | + { zar: 12, title: "title1", content: "content1content1content1content1content1content1content1content1content1content1content1ds到场定损", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } | |
8 | + , { zar: 12, title: "title2", content: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } | |
9 | + , { zar: 12, title: "title2", content: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } | |
10 | + , { zar: 12, title: "title1", content: "content1", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } | |
11 | + , { zar: 12, title: "title2", content: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } | |
12 | + , { zar: 12, title: "title2", content: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } | |
13 | + ], | |
6 | 14 | selectHide: false, |
7 | 15 | inputValue: '', |
8 | 16 | getSearch: [], |
9 | 17 | modalHidden: true, |
10 | - searching:false | |
18 | + searching:true | |
11 | 19 | }, |
12 | 20 | |
13 | 21 | onLoad: function () { |
littleApp_child/pages/SearchPage/SearchPage.wxml
View file @
c648ca6
... | ... | @@ -20,5 +20,23 @@ |
20 | 20 | </view> |
21 | 21 | <view class="history_list_clearAll" bindtap="clearAll">清除历史记录</view> |
22 | 22 | </view> |
23 | + <view class="search_detail" wx:if="{{searching}}"> | |
24 | + <navigator url="../childcare_knowledge_detail/childcare_knowledge_detail" hover-class="weui-cell_active" wx:for="{{list}}" wx:key="{{index}}"> | |
25 | + <view class="content_item"> | |
26 | + <view style="margin-left:15px;margin-right:75px;"> | |
27 | + <view class="content_title">{{item.title}}</view> | |
28 | + <view class="content_content">{{item.content}}</view> | |
29 | + <view class="zar_box"> | |
30 | + <image class="zar_img" src="../../source/zar.png"></image> | |
31 | + <view class="content_zar">{{item.zar}}</view> | |
32 | + </view> | |
33 | + | |
34 | + </view> | |
35 | + <image class="content_image" src="{{item.image}}"></image> | |
36 | + </view> | |
37 | + <view class="home__list-item__bottom"></view> | |
38 | + </navigator> | |
39 | + <view class="loadMoreView" wx:if="{{hasMore}}">加载更多...</view> | |
40 | + </view> | |
23 | 41 | </view> |
littleApp_child/pages/SearchPage/SearchPage.wxss
View file @
c648ca6
1 | -@import "../../utils/util_UI.wxss"; | |
1 | +@import "../childcare_knowledge/childcare_knowledge.wxss"; | |
2 | 2 | |
3 | 3 | .searchBar_bg { |
4 | 4 | background: #48C17B; |
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | height: 38px; |
7 | 7 | position: fixed; |
8 | 8 | top: 0; |
9 | + z-index: 1; | |
9 | 10 | } |
10 | 11 | .searchBar_bar { |
11 | 12 | background: white; |
... | ... | @@ -45,6 +46,7 @@ |
45 | 46 | transform: translateY(-26px); |
46 | 47 | } |
47 | 48 | |
49 | +/* 列表 */ | |
48 | 50 | .history_list { |
49 | 51 | background: white; |
50 | 52 | margin-top: 40px; |
... | ... | @@ -91,5 +93,10 @@ |
91 | 93 | text-align: center; |
92 | 94 | height: 40px; |
93 | 95 | line-height: 40px; |
96 | +} | |
97 | + | |
98 | +/* 结果列表 */ | |
99 | +.search_detail { | |
100 | + margin-top: 40px; | |
94 | 101 | } |
littleApp_child/pages/articleLists/articleLists.js
View file @
c648ca6
1 | -//articleLists.js 文章列表 | |
2 | -// 网络请求工具类 | |
3 | -var networkUtil = require('../../utils/network_util.js') | |
4 | -var api = require('../../utils/apiFile.js') | |
5 | -// 事件监听 | |
6 | -var event = require('../../utils/event.js') | |
7 | -var page | |
8 | -// 是否有更多 | |
9 | -var hasMore | |
10 | -var isRefresh | |
11 | -// 高危指导页面 | |
12 | -var isRisk | |
13 | 1 | |
2 | + | |
14 | 3 | Page({ |
15 | 4 | data: { |
16 | 5 | list:[], |
17 | - id:0, | |
18 | - category:'' | |
19 | 6 | }, |
20 | - onLoad: function (e) { | |
21 | - this.data.id = e.id | |
22 | - this.data.category = e.category | |
23 | - // 数据初始化 | |
24 | - page = 1 | |
25 | - hasMore = true | |
26 | - isRefresh = false | |
27 | - isRisk = false | |
28 | - | |
29 | - wx.setNavigationBarTitle({ | |
30 | - title: e.category, | |
31 | - success: function(res) { | |
32 | - } | |
33 | - }) | |
34 | - if(e.category == '高危精准指导'){ | |
35 | - isRisk = true | |
36 | - this.requestRisk() | |
37 | - } else { | |
38 | - isRisk = false | |
39 | - this.requestData() | |
40 | - } | |
41 | - // 监听事件 | |
42 | - event.on('listLikeChanged', this, function(data) { | |
43 | - var artList = this.data.list | |
44 | - artList[parseInt(data.articleIdIndex)].likeCount ++ | |
45 | - this.setData({ | |
46 | - list : artList | |
47 | - }); | |
48 | - }) | |
49 | - }, | |
50 | - onUnload: function() { | |
51 | - // 移除监听 | |
52 | - event.remove('listLikeChanged', this); | |
53 | - }, | |
54 | - /*---------事件处理函数--------*/ | |
55 | - bindViewTap: function() { | |
56 | - wx.navigateTo({ | |
57 | - url: '../home/home' | |
58 | - }) | |
59 | - }, | |
60 | - // 加载更多 | |
61 | - loadMore:function(e){ | |
62 | - if(!hasMore || isRefresh == true){ | |
63 | - return | |
64 | - } | |
65 | - page ++ | |
66 | - if(isRisk == true){ | |
67 | - this.requestRisk() | |
68 | - } else { | |
69 | - this.requestData() | |
70 | - } | |
71 | - }, | |
72 | - // 下拉刷新回调接口 | |
73 | - onPullDownRefresh: function() { | |
74 | - page = 1; | |
75 | - hasMore = true | |
76 | - // 网络请求,重新请求一遍数据 | |
77 | - this.requestData(); | |
78 | - }, | |
79 | - myScroll:function(e){ | |
80 | - if(e.detail.scrollTop >= e.detail.scrollHeight-wx.getSystemInfoSync().windowHeight - 3){ | |
81 | - this.loadMore() | |
82 | - } | |
83 | - }, | |
84 | - /*---------自定义函数--------*/ | |
85 | - requestData(id){ | |
86 | - var self = this | |
87 | - isRefresh = true | |
88 | - networkUtil.showLoading() | |
89 | - var param = {page:page,limit:15,type:getApp().globalData.userInfo.status,categoryId:self.data.id} | |
90 | - networkUtil._get(api.articleList,param,function(res){ | |
91 | - | |
92 | - isRefresh = false | |
93 | - var arr = [] | |
94 | - if(page > 0) {// 加载更多模式 | |
95 | - arr = self.data.list | |
96 | - } | |
97 | - if(res.data.data.length < 15){ | |
98 | - hasMore = false | |
99 | - } | |
100 | - arr = arr.concat(res.data.data) | |
101 | - var temp = self.data.category | |
102 | - self.setData({ | |
103 | - list:arr, | |
104 | - hasMore : hasMore, | |
105 | - category : temp | |
106 | - }) | |
107 | - },function(res){ | |
108 | - isRefresh = false | |
109 | - }) | |
110 | - }, | |
111 | - requestRisk(){ | |
112 | - var self = this | |
113 | - isRefresh = true | |
114 | - networkUtil.showLoading() | |
115 | - var param = {page:page,limit:15} | |
116 | - networkUtil._get(api.riskGuideList,param,function(res){ | |
117 | - console.log(res) | |
118 | - isRefresh = false | |
119 | - var arr = [] | |
120 | - if(page > 0) {// 加载更多模式 | |
121 | - arr = self.data.list | |
122 | - } | |
123 | - if(res.data.list.length < 15){ | |
124 | - hasMore = false | |
125 | - } | |
126 | - arr = arr.concat(res.data.list) | |
127 | - var temp = self.data.category | |
128 | - self.setData({ | |
129 | - list:arr, | |
130 | - hasMore : hasMore, | |
131 | - category : temp | |
132 | - }) | |
133 | - },function(res){ | |
134 | - isRefresh = false | |
135 | - }) | |
7 | + onLoad:function(){ | |
136 | 8 | |
137 | 9 | } |
10 | + | |
11 | + | |
138 | 12 | }) |
littleApp_child/pages/articleLists/articleLists.wxml
View file @
c648ca6
1 | -<!--articleLists.wxml 文章列表--> | |
2 | -<scroll-view scroll-y="true" style="height: 100%;" bindscroll="myScroll"> | |
3 | - <navigator url="../articleDetail/articleDetail?id={{item.id}}&category={{category}}&artIndex={{index}}" class="weui-media-box weui-media-box_appmsg home__list-item" hover-class="weui-cell_active" wx:for="{{list}}" wx:key="{{index}}"> | |
4 | - <view class="weui-media-box__hd weui-media-box__hd_in-appmsg"> | |
5 | - <image class="home__list__img" src="{{item.image.medium}}" mode="aspectFit"/> | |
6 | - </view> | |
7 | - <view class="weui-media-box__bd weui-media-box__bd_in-appmsg home__list-item-content"> | |
8 | - <view class="home__list-item__right"> | |
9 | - <view class="weui-media-box__title home__list-item__title">{{item.title}}</view> | |
10 | - <view class="home__list-item__like"> | |
11 | - <image class="home__list-item__title-like-icon" src="../../source/imageSource/page1_icon_dianzhan_n@3x.png"/> | |
12 | - <view class="home__list-item__title-like-count">{{item.likeCount ? item.likeCount : 0}}</view> | |
13 | - </view> | |
14 | - </view> | |
15 | - <view class="weui-media-box__desc" style="borth">{{item.introduction}}</view> | |
16 | - </view> | |
17 | - <view class="home__list-item__bottom"></view> | |
18 | - </navigator> | |
19 | - <view class="loadMoreView" wx:if="{{hasMore}}">加载更多...</view> | |
20 | -</scroll-view> | |
1 | +<!-- <view class="image"> | |
2 | + <view> --> | |
3 | + | |
4 | + <!-- </view> | |
5 | +</view> --> | |
6 | +<!-- <view> | |
7 | + <image class="icon"></image> | |
8 | + <view class="title">预约建档</view> | |
9 | + <view class="content">可通过小程序“孕检指导”,在线创建档案信息,前往医院后在档案科室完成信息核对即刻完成建档建立。</view> | |
10 | +</view> | |
11 | +<view> | |
12 | + <image class="icon"></image> | |
13 | + <view class="title">产检记录</view> | |
14 | + <view class="content">通过“孕期报告”、“检验报告”可查看相关检查记录,及时了解产前孕妇的身体健康的相关信息。</view> | |
15 | +</view> | |
16 | +<view> | |
17 | + <image class="icon"></image> | |
18 | + <view class="title">高危指导</view> | |
19 | + <view class="content">根据孕妇的相关健康指数,针对高危孕妇,可根据月龄提供精确指导。</view> | |
20 | +</view> --> | |
21 | + | |
22 | + | |
23 | + | |
24 | + | |
25 | + | |
26 | +<image class="topImg" src="http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg"></image> | |
27 | +<view> | |
28 | + <view class="title_view"> | |
29 | + <image class="icon"></image> | |
30 | + <view class="title">幼儿保健</view> | |
31 | + </view> | |
32 | + <view class="content">妈咪baby之“幼儿保健”,主要针对0-6周岁婴幼儿提供院内保健检查信息、诊断指导意见以及相关医疗服务提醒等业务。</view> | |
33 | +</view> | |
34 | +<view> | |
35 | + <view class="title_view"> | |
36 | + <image class="icon"></image> | |
37 | + <view class="title">儿保记录</view> | |
38 | + </view> | |
39 | + <view class="content">查看婴幼儿在院内检查的各项信息,以及对应的诊断、处理、指导意见。</view> | |
40 | +</view> | |
41 | +<view> | |
42 | + <view class="title_view"> | |
43 | + <image class="icon"></image> | |
44 | + <view class="title">服务提醒</view> | |
45 | + </view> | |
46 | + <view class="content">可提供高危、复查、预约、精确指导等相关及时提醒服务。</view> | |
47 | +</view> | |
48 | +<view> | |
49 | + <view class="title_view"> | |
50 | + <image class="icon"></image> | |
51 | + <view class="title">育儿知识</view> | |
52 | + </view> | |
53 | + <view class="content">根据儿童生长发育情况,每周提供针对性婴幼儿日常护理、营养饮食、疾病护理等相关信息。</view> | |
54 | +</view> |
littleApp_child/pages/articleLists/articleLists.wxss
View file @
c648ca6
1 | -/**articleLists.wxss 文章列表**/ | |
2 | 1 | |
3 | -.home__list-item{ | |
4 | 2 | |
5 | - position: relative; | |
6 | - background: white; | |
3 | +.topImg { | |
4 | + width: 100%; | |
5 | + height: 30%; | |
7 | 6 | } |
8 | 7 | |
9 | -/*首页列表文章 item 的文章图片*/ | |
10 | -.home__list__img{ | |
11 | - width: 80px; | |
12 | - height: 100%; | |
13 | - vertical-align: top; | |
14 | - /*垂直居中*/ | |
15 | - display: flex; | |
16 | - justify-content:center; | |
17 | - align-items:Center; | |
8 | +.icon { | |
9 | + width: 2px; | |
10 | + height: 14px; | |
11 | + margin-left: 15px; | |
12 | + transform: translateY(2px); | |
13 | + background: #48C17B; | |
18 | 14 | } |
19 | 15 | |
20 | -.home__list-item-content{ | |
21 | - margin-left: 15px | |
22 | -} | |
23 | - | |
24 | -/*首页列表文章 item 外层布局 右侧*/ | |
25 | -.home__list-item__right{ | |
26 | - width: 100%; | |
27 | - height: 32px; | |
28 | - /*background: darkcyan;*/ | |
29 | - position:relative; | |
30 | -} | |
31 | - | |
32 | -/*首页列表文章 item 内的title 布局*/ | |
33 | -.home__list-item__title{ | |
34 | - position:absolute; | |
35 | - top: 0px; | |
36 | - left: 0px; | |
37 | - right: 60px; | |
16 | +/* 栏目标题文字 */ | |
17 | +.title { | |
18 | + height: 17px; | |
19 | + display: inline-block; | |
20 | + line-height: 17px; | |
38 | 21 | font-size: 14px; |
39 | - color: #5e5e5e; | |
40 | - font:normal; | |
22 | + color: #000; | |
23 | + margin-left: 5px; | |
41 | 24 | } |
42 | 25 | |
43 | -/*首页列表文章 item 内的的点赞 布局*/ | |
44 | -.home__list-item__like{ | |
45 | - position: absolute; | |
46 | - top: 0px; | |
47 | - right: 0px; | |
48 | - /*垂直居中 | |
49 | - display: flex; | |
50 | - justify-content:center; | |
51 | - align-items:Center;*/ | |
26 | +/* 内容文字 */ | |
27 | +.content { | |
28 | + font-size: 12px; | |
29 | + color: #888888; | |
30 | + margin-left: 15px; | |
31 | + margin-right: 15px; | |
32 | + margin-top: 0px; | |
33 | + display: inline-block; | |
52 | 34 | } |
53 | 35 | |
54 | -/*首页列表文章 item 内的点赞手图标*/ | |
55 | -.home__list-item__title-like-icon{ | |
56 | - position: absolute; | |
57 | - width: 10px; | |
58 | - height: 10px; | |
59 | - right: 0px; | |
60 | - left: 0px; | |
61 | - top: 7px | |
62 | -} | |
63 | -/*首页列表文章 item 内的的点赞 数*/ | |
64 | -.home__list-item__title-like-count{ | |
65 | - /*这个宽度设置后可以变化点赞数整个布局的位置前移后移*/ | |
66 | - width: 30px; | |
67 | - | |
68 | - margin-left:15px; | |
69 | - font-size: 10px; | |
70 | - margin-top: 4px; | |
71 | - color: #c8c6c6; | |
72 | - overflow: hidden; | |
73 | - text-overflow: ellipsis; | |
74 | -} | |
75 | - | |
76 | -/*item 分割线*/ | |
77 | -.home__list-item__bottom{ | |
78 | - position: absolute; | |
79 | - height: 1rpx; | |
80 | - background: #d8dbd4; | |
81 | - top: 0px; | |
82 | - left: 15px; | |
83 | - right: 15px | |
36 | +.title_view { | |
37 | + margin-top: 25px; | |
84 | 38 | } |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
View file @
c648ca6
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | </block> |
20 | 20 | </swiper> |
21 | 21 | <view> |
22 | - <navigator url="../childcare_knowledge_detail/childcare_knowledge_detail" hover-class="weui-cell_active" wx:for="{{list}}" wx:key="{{index}}"> | |
22 | + <navigator url="../childcare_knowledge_detail/childcare_knowledge_detail" wx:for="{{list}}" wx:key="{{index}}"> | |
23 | 23 | <view class="content_item"> |
24 | 24 | <view style="margin-left:15px;margin-right:75px;"> |
25 | 25 | <view class="content_title">{{item.title}}</view> |
littleApp_child/pages/home/css/AboutPage.wxss
View file @
c648ca6
1 | +/* 欢迎页面 */ | |
2 | + | |
3 | +.we_topImg { | |
4 | + width: 100%; | |
5 | + height: 30%; | |
6 | +} | |
7 | + | |
8 | +.we_icon { | |
9 | + width: 2px; | |
10 | + height: 14px; | |
11 | + margin-left: 15px; | |
12 | + transform: translateY(2px); | |
13 | + background: #48C17B; | |
14 | +} | |
15 | + | |
16 | +/* 栏目标题文字 */ | |
17 | +.we_title { | |
18 | + height: 17px; | |
19 | + display: inline-block; | |
20 | + line-height: 17px; | |
21 | + font-size: 14px; | |
22 | + color: #000; | |
23 | + margin-left: 5px; | |
24 | +} | |
25 | + | |
26 | +/* 内容文字 */ | |
27 | +.we_content { | |
28 | + font-size: 12px; | |
29 | + color: #888888; | |
30 | + margin-left: 15px; | |
31 | + margin-right: 15px; | |
32 | + margin-top: 0px; | |
33 | + display: inline-block; | |
34 | +} | |
35 | + | |
36 | +.we_title_view { | |
37 | + margin-top: 15px; | |
38 | +} | |
39 | + | |
40 | +.we_button { | |
41 | + font: medium; | |
42 | + font-size: 16px; | |
43 | + color: white; | |
44 | + width: 60%; | |
45 | + height: 38px; | |
46 | + line-height: 38px; | |
47 | + border-radius: 19px; | |
48 | + background-color: #48C17B; | |
49 | + margin-left: 50%; | |
50 | + margin-top: 42px; | |
51 | + margin-bottom: 20px; | |
52 | + transform: translateX(-50%); | |
53 | + text-align: center; | |
54 | +} |
littleApp_child/pages/home/css/login.wxss
View file @
c648ca6
1 | + | |
2 | +.input-placeholder { | |
3 | + font-size: 13px; | |
4 | + color: #979797; | |
5 | +} | |
6 | + | |
7 | +page { | |
8 | + background-color: white; | |
9 | +} | |
10 | + | |
11 | +.record-topbar { | |
12 | + width: 100%; | |
13 | + height: 45px; | |
14 | + background: #ffd5dd; | |
15 | + font-size: 12px; | |
16 | + color: #ee7289; | |
17 | + text-align: center; | |
18 | + line-height: 45px; | |
19 | +} | |
20 | + | |
21 | +.record-input-constainer { | |
22 | + margin: 40px 25px 0 25px; | |
23 | +} | |
24 | + | |
25 | +.record-input_bg { | |
26 | + /*background: beige;*/ | |
27 | + display: flex; | |
28 | + align-items: center; | |
29 | + justify-content: flex-start; | |
30 | + height: 45px; | |
31 | + border: solid 1px; | |
32 | + border-radius: 5px; | |
33 | +} | |
34 | + | |
35 | +.record-input_title { | |
36 | + /*background-color: green;*/ | |
37 | + width: 100px; | |
38 | + height: 20px; | |
39 | + text-align: center; | |
40 | + line-height: 20px; | |
41 | + font: medium; | |
42 | + font-size: 14px; | |
43 | + color: #ee7289; | |
44 | + border-right: solid #e8eae5 1px; | |
45 | +} | |
46 | + | |
47 | +.input { | |
48 | + /*background-color: red;*/ | |
49 | + font-size: 13px; | |
50 | + color: #5e5e5e; | |
51 | + margin-left: 20px; | |
52 | + width: 180px; | |
53 | + margin-top: 3px; | |
54 | +} | |
55 | + | |
56 | +.record-submit-btn { | |
57 | + font: medium; | |
58 | + font-size: 20px; | |
59 | + color: white; | |
60 | + width: 200px; | |
61 | + height: 45px; | |
62 | + line-height: 45px; | |
63 | + border-radius: 22.5px; | |
64 | + background-color: #48C17B; | |
65 | + position: absolute; | |
66 | + bottom: 100px; | |
67 | + left: 50%; | |
68 | + transform: translateX(-50%); | |
69 | + text-align: center; | |
70 | +} | |
71 | + | |
72 | +.record-time-text { | |
73 | + margin-right: 20px; | |
74 | + font: lighter; | |
75 | + font-size: 13px; | |
76 | + color: #48C17B; | |
77 | + width: 110px; | |
78 | + text-align: right; | |
79 | + margin-top: 2px; | |
80 | + /*background-color: rgba(1, 1, 1, 1);*/ | |
81 | +} |
littleApp_child/pages/home/home.js
View file @
c648ca6
... | ... | @@ -18,13 +18,23 @@ |
18 | 18 | isLogin: '', |
19 | 19 | item_big_height:0, |
20 | 20 | item_small: 0, |
21 | + // 首页类型 1登录 2用户首页 3欢迎页 | |
22 | + pageType:0 | |
21 | 23 | }, |
22 | 24 | /*---------生命周期--------*/ |
23 | 25 | onLoad: function () { |
26 | + var isFirst = wx.getStorageSync('isFirst') | |
27 | + if(!isFirst){ | |
28 | + this.setData({ | |
29 | + pageType:3 | |
30 | + }) | |
31 | + console.log('我是空的') | |
32 | + } else { | |
33 | + console.log('我是空的') | |
34 | + } | |
35 | + | |
36 | + | |
24 | 37 | // var that = this |
25 | - // wx.showShareMenu( | |
26 | - // 计算功能模块的尺寸 | |
27 | - this.calculatePageSize() | |
28 | 38 | this.networkStatusChange() |
29 | 39 | // this.networkstatus() |
30 | 40 | if (app.globalData.token == null || app.globalData.token == '') { |
... | ... | @@ -114,7 +124,6 @@ |
114 | 124 | networkStatusChange() { |
115 | 125 | var that = this |
116 | 126 | wx.onNetworkStatusChange(function (res) { |
117 | - console.log('网络状态改变', res) | |
118 | 127 | if (res.isConnected == true) { |
119 | 128 | that.connectWebIM() |
120 | 129 | } |
121 | 130 | |
... | ... | @@ -143,12 +152,10 @@ |
143 | 152 | setUserInfo(data) { |
144 | 153 | |
145 | 154 | }, |
146 | - calculatePageSize(){ | |
147 | - var windowWidth = wx.getSystemInfoSync().windowWidth | |
148 | - var smallWidth = ((windowWidth - 10) / 2 - 10) | |
155 | + /*---------------欢迎介绍页面---------------*/ | |
156 | + toLogin(){ | |
149 | 157 | this.setData({ |
150 | - item_big_height: 'height:' + windowWidth / 4 + 'px', | |
151 | - item_small: 'width:' + smallWidth / 2 + 'px;height:' + smallWidth / 2 + 'px', | |
158 | + pageType:1 | |
152 | 159 | }) |
153 | 160 | } |
154 | 161 | }) |
littleApp_child/pages/home/home.json
View file @
c648ca6
littleApp_child/pages/home/home.wxml
View file @
c648ca6
1 | 1 | |
2 | 2 | <!--首页--> |
3 | - | |
4 | - | |
5 | 3 | <!--主机类型--> |
6 | -<view class="promptText" wx:if="{{HOSTType != 1 && HOSTType != 3}}">--{{HOSTTypeText}}--</view> | |
4 | +<!-- <view class="promptText" wx:if="{{HOSTType != 1 && HOSTType != 3}}">--{{HOSTTypeText}}--</view> --> | |
5 | +<view class="backgroundView" style="background: #48C17B" wx:if="{{pageType == 0}}"> | |
6 | +</view> | |
7 | 7 | <!--首页模块--> |
8 | -<view class="backgroundView" style="position:relative" wx:if="{{!isDocument}}"> | |
8 | +<view class="backgroundView" wx:if="{{pageType == 2}}"> | |
9 | 9 | <image class="TopBgImage" src=""></image> |
10 | 10 | <!--顶部红色有头像等信息的栏目--> |
11 | 11 | <view class="TopBar"> |
12 | 12 | |
... | ... | @@ -56,12 +56,12 @@ |
56 | 56 | <!--文章列表--> |
57 | 57 | <view class="article_list"> |
58 | 58 | <view class="article_bg"> |
59 | - <navigator url="url" class="navigator_class"> | |
59 | + <navigator url="../childcare_knowledge/childcare_knowledge" class="navigator_class"> | |
60 | 60 | <image class="article_title_image"></image> |
61 | 61 | <view class="article_title">日常护理</view> |
62 | 62 | <image class="article_title_indicator" src="../../source/gengduo.png"></image> |
63 | 63 | </navigator> |
64 | - <navigator class="article_content"> | |
64 | + <navigator class="article_content" url="../childcare_knowledge_detail/childcare_knowledge_detail"> | |
65 | 65 | <view style="height:6px;width:100%;"></view> |
66 | 66 | <view class="article_content_title">如何提防新生儿败血症</view> |
67 | 67 | <label class="article_content_text">败血症(septicemia)的意</label> |
... | ... | @@ -77,5 +77,69 @@ |
77 | 77 | </navigator> |
78 | 78 | </view> |
79 | 79 | </view> |
80 | +</view> | |
81 | + | |
82 | + | |
83 | + | |
84 | +<!-- 欢迎页 --> | |
85 | + | |
86 | +<view class="backgroundView" style="background: white" wx:if="{{pageType == 3}}"> | |
87 | + <image class="we_topImg" src="http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg"></image> | |
88 | + <view> | |
89 | + <view class="we_title_view"> | |
90 | + <image class="we_icon"></image> | |
91 | + <view class="we_title">幼儿保健</view> | |
92 | + </view> | |
93 | + <view class="we_content">妈咪baby之“幼儿保健”,主要针对0-6周岁婴幼儿提供院内保健检查信息、诊断指导意见以及相关医疗服务提醒等业务。</view> | |
94 | + </view> | |
95 | + <view> | |
96 | + <view class="we_title_view"> | |
97 | + <image class="we_icon"></image> | |
98 | + <view class="we_title">儿保记录</view> | |
99 | + </view> | |
100 | + <view class="we_content">查看婴幼儿在院内检查的各项信息,以及对应的诊断、处理、指导意见。</view> | |
101 | + </view> | |
102 | + <view> | |
103 | + <view class="we_title_view"> | |
104 | + <image class="we_icon"></image> | |
105 | + <view class="we_title">服务提醒</view> | |
106 | + </view> | |
107 | + <view class="we_content">可提供高危、复查、预约、精确指导等相关及时提醒服务。</view> | |
108 | + </view> | |
109 | + <view> | |
110 | + <view class="we_title_view"> | |
111 | + <image class="we_icon"></image> | |
112 | + <view class="we_title">育儿知识</view> | |
113 | + </view> | |
114 | + <view class="we_content">根据儿童生长发育情况,每周提供针对性婴幼儿日常护理、营养饮食、疾病护理等相关信息。</view> | |
115 | + </view> | |
116 | + | |
117 | + <button class="we_button" bindtap="toLogin">身份验证</button> | |
118 | +</view> | |
119 | + | |
120 | +<!-- 登录 --> | |
121 | + | |
122 | +<view class="backgroundView" style="background: white" wx:if="{{pageType == 1}}"> | |
123 | + <form catchsubmit="formSubmit"> | |
124 | + | |
125 | + <view class="record-input-constainer"> | |
126 | + <view class="record-input_bg" style="border-color:{{inputFocus.nameInput ? '#f4879b' : '#e8eae5'}}"> | |
127 | + <label class="record-input_title">姓名</label> | |
128 | + <input class="input" id = "name" name="name" maxlength="12" placeholder="请输入建档姓名" value="" placeholder-class="input-placeholder" bindfocus="getFocus" /> | |
129 | + </view> | |
130 | + <view class="record-input_bg" style="margin-top:15px;border-color:{{inputFocus.phoneInput ? '#f4879b' : '#e8eae5'}}"> | |
131 | + <label class="record-input_title">手机号</label> | |
132 | + <input class="input" id="phone" name="phone" type="number" placeholder="请输入建档手机号" maxlength="11" placeholder-class="input-placeholder" bindfocus="getFocus" value="" bindblur="blurInput"/> | |
133 | + </view> | |
134 | + | |
135 | + <view class="record-input_bg" style="margin-top:15px;border-color:{{inputFocus.codeInput ? '#f4879b' : '#e8eae5'}}"> | |
136 | + <label class="record-input_title" style="padding-left:20px;padding-right:20px;">验证码</label> | |
137 | + <input class="input" id = "code" name="code" maxlength="12" placeholder="请输入验证码" value="" placeholder-class="input-placeholder" bindfocus="getFocus" /> | |
138 | + <label class="record-time-text" bindtap="getVerifyCode">{{time == '0s' ? '点击获取' : time}}</label> | |
139 | + </view> | |
140 | + </view> | |
141 | + | |
142 | + <button class="record-submit-btn" formType="submit">下一步</button> | |
143 | + </form> | |
80 | 144 | </view> |