Commit a9ac9f6f8748c71117c56d331dfeceb137796f0a

Authored by luoye
1 parent f8805346d0

新增游客字段

Showing 21 changed files with 290 additions and 39 deletions

littleApp_child/app.js View file @ a9ac9f6
... ... @@ -20,6 +20,10 @@
20 20 //调用API从本地缓存中获取数据
21 21 var userToken = wx.getStorageSync('userToken')
22 22 var userId = wx.getStorageSync('userId')
  23 + var tourist = wx.getStorageSync('tourist')
  24 + if (tourist || tourist == true ){
  25 + this.globalData.tourist = true
  26 + }
23 27 this.globalData.token = userToken
24 28 this.globalData.userId = userId
25 29 this.globalData.currentId = userId[0]
... ... @@ -325,7 +329,8 @@
325 329 openInfo: {},
326 330 artList:[],
327 331 days:0,
328   - currentId:''
  332 + currentId:'',
  333 + tourist:false
329 334 },
330 335  
331 336 })
littleApp_child/app.json View file @ a9ac9f6
1 1 {
2 2 "pages": [
  3 +
  4 +
3 5 "pages/home/home",
4 6 "pages/Setting/Setting",
5 7 "pages/PersonalInfo/PersonalInfo",
littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.js View file @ a9ac9f6
... ... @@ -11,16 +11,46 @@
11 11  
12 12 Page({
13 13 data: {
  14 + birth:'请选择出生日期',
  15 + chooseOne:1,
  16 + chooseTwo:0,
  17 + showErr:false
14 18 },
15 19 /*---------生命周期--------*/
16 20 onLoad: function (e) {
17 21 userId = e.userId
18 22 token = e.token
19 23 },
  24 + chooseCheckboxOne: function () {
  25 + this.setData({
  26 + chooseOne: 1,
  27 + chooseTwo: 0
  28 + })
  29 + },
  30 + chooseCheckboxTwo: function () {
  31 + this.setData({
  32 + chooseOne: 0,
  33 + chooseTwo: 1
  34 + })
  35 + },
  36 + chooseBirth(e){
  37 + console.log(e.detail.value)
  38 + this.setData({ birth: e.detail.value})
  39 + },
20 40 formSubmit: function (e) {
  41 + console.log(e)
  42 + if (this.data.birth == '请选择出生日期') {
  43 + this.setData({ showErr: true })
  44 + return
  45 + }
  46 + if (!e.detail.value.name || e.detail.value.name == ''){
  47 + this.setData({ showErr:true})
  48 + return
  49 + }
  50 + this.setData({ showErr: false })
21 51 networkUtil.showLoading()
22 52 getApp().globalData.token = token
23   - var param = { 'username': '李白', 'birth': '2017-02-15'}
  53 + var param = { 'username': e.detail.value.name, 'birth': this.data.birth}
24 54 networkUtil._put(api.kTourisInfo + userId, param, function (res) {
25 55 console.log(res)
26 56 getApp().globalData.token = ''
littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.json View file @ a9ac9f6
1 1 {
2 2 "navigationBarBackgroundColor": "#48C17B",
3   - "navigationBarTitleText": "我的收藏",
  3 + "navigationBarTitleText": "宝宝信息",
4 4 "navigationBarTextStyle": "white",
5 5 "backgroundColor": "#d8dbd4"
6 6 }
littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxml View file @ a9ac9f6
... ... @@ -2,15 +2,44 @@
2 2 <form catchsubmit="formSubmit">
3 3  
4 4 <view class="record-input-constainer whiteColor">
5   - <view class="record-input_bg whiteColor" style="border-color:{{inputFocus.nameInput ? '#48C17B' : '#e8eae5'}}">
6   - <label class="record-input_title">姓名</label>
  5 + <view class="record-input_bg whiteColor" style="border-color:{{inputFocus.nameInput ? '#48C17B' : '#e8eae5'}};margin-bottom:20px;">
  6 + <label class="record_input_title">姓名</label>
7 7 <input class="input" id="name" name="name" maxlength="12" placeholder="请输入建档姓名" value="" placeholder-class="input-placeholder" bindinput="blurNameInput"/>
8 8 </view>
9   - <view>生日</view>
10   - <view>性别</view>
  9 +
  10 + <view class="record-input_bg" style="border-color:{{inputFocus.nameInput ? '#48C17B' : '#e8eae5'}};margin-bottom:20px;">
  11 + <picker class="picker" mode="date" value="{{date}}" start="2016-01-01" end="{{today}}" bindchange="chooseBirth">
  12 + <view class="picker_view">
  13 + <label class="record_input_title">出生日期</label>
  14 + <view class="picker_view_text" data-id="{{item.id}}">{{birth}}</view>
  15 + </view>
  16 + </picker>
  17 + </view>
  18 +
  19 +
  20 +
  21 + <view class="record-input_bg whiteColor" style="border-color:{{inputFocus.nameInput ? '#48C17B' : '#e8eae5'}};margin-bottom:20px;">
  22 + <label class="record_input_title">性别</label>
  23 + <view class="checkbox">
  24 + <view class="type_choose1" bindtap="chooseCheckboxOne">
  25 + <image mode='aspectFit' class="img" src="../../source/{{chooseOne==1 ? 'checkBox_yes.png':'checkBox_no.png'}}"></image>
  26 + <text class="choose_text">男</text>
  27 + </view>
  28 + <view class="type_choose2" bindtap="chooseCheckboxTwo">
  29 + <image mode='aspectFit' class="img" src="../../source/{{chooseTwo==1 ? 'checkBox_yes.png':'checkBox_no.png'}}"></image>
  30 + <text class="choose_text">女</text>
  31 + </view>
  32 + </view>
  33 + </view>
  34 +
  35 +
11 36 </view>
  37 + <view class="bottom_hint" wx:if="{{showErr == true}}">
  38 + <image mode='aspectFit' src="../../source/exclamation_point.png"></image>
  39 + <label>宝宝信息不完整,请重新输入</label>
  40 + </view>
12 41  
13   - <button class="record-submit-btn" formType="submit">立即注册</button>
  42 + <button class="record-submit-btn" formType="submit">确认</button>
14 43 </form>
15 44 </view>
littleApp_child/pages/CompleteTouristInfo/CompleteTouristInfo.wxss View file @ a9ac9f6
1 1 @import "../home/css/login.wxss";
  2 +
  3 +
  4 +.picker_view {
  5 + height: 44px;
  6 + color: #BEBEBE;
  7 + display: flex;
  8 + align-items: center;
  9 + justify-content: space-between;
  10 + /* padding-left: 15px; */
  11 + /* padding-right: 15px; */
  12 + width: 100%;
  13 +
  14 +}
  15 +
  16 +.picker_view_text {
  17 + display: inline-block;
  18 + width: 200px;
  19 + overflow: hidden;
  20 + text-overflow: ellipsis;
  21 + display: -webkit-box;
  22 + -webkit-box-orient: vertical;
  23 + -webkit-line-clamp: 1 ;
  24 + font-size: 15px;
  25 + color: #999999;
  26 + margin-left: 10px;
  27 + /* margin-left: 15px; */
  28 +}
  29 +
  30 +.record_input_title {
  31 + width: 80px;
  32 + height: 20px;
  33 + text-align: left;
  34 + line-height: 20px;
  35 + font: medium;
  36 + padding-left: 15px;
  37 + border-right: solid #e8eae5 1px;
  38 + margin-right: 15px;
  39 + font-size: 15px;
  40 + color: #999999;
  41 +}
  42 +
  43 +.checkbox {
  44 + display: flex;
  45 + align-items: center;
  46 + justify-content: space-between;
  47 + font-size: 14px;
  48 + color: #333333;
  49 + width: 50%
  50 +}
  51 +
  52 +.img {
  53 + width: 22px;
  54 + height: 22px;
  55 + transform: translateY(5px);
  56 +}
  57 +
  58 +.type_choose1 {
  59 + width: 30%;
  60 +}
  61 +
  62 +.choose_text {
  63 + margin-left: 5px;
  64 +}
  65 +
  66 +.bottom_hint {
  67 + background: #FFFBD7;
  68 + height: 32px;
  69 + font-size: 14px;
  70 + color: #333333;
  71 + line-height: 32px;
  72 + padding-left: 15px;
  73 +}
  74 +
  75 +.bottom_hint image {
  76 + width: 14px;
  77 + height: 14px;
  78 + margin-right: 5px;
  79 + transform: translateY(2px);
  80 +}
littleApp_child/pages/SearchPage/SearchPage.wxml View file @ a9ac9f6
... ... @@ -8,10 +8,10 @@
8 8 <view class="searchBar_bar_cancle" bindtap="back">取消</view>
9 9 </view>
10 10 <!-- 建议标签 -->
11   - <view class="recommend_labels">
  11 + <!-- <view class="recommend_labels">
12 12 <view catchtap="clickLabel" data-categary="lable" class="recommend_label">什么东东</view>
13 13 <view class="recommend_label">什么东东啊</view>
14   - </view>
  14 + </view> -->
15 15 <!-- 搜索历史 -->
16 16 <view class="history_list" wx:if="{{getSearch.length > 0 && !searching}}">
17 17 <view class="history_list_content">
littleApp_child/pages/childcare_knowledge_detail/childcare_knowledge_detail.wxml View file @ a9ac9f6
1 1 <view class="main">
2 2 <view class="title_text">{{knowledge.title}}</view>
3   - <view class="art_labels">
  3 + <!-- <view class="art_labels">
4 4 <view class="article_label">啦啦</view>
5 5 <view class="article_label">啦啦</view>
6 6 <view class="article_label">啦啦</view>
7   - </view>
  7 + </view> -->
8 8 <view class="zar_box" style="margin-left:8px;" wx:if="{{knowledge}}">
9 9 <view class="zar_box" bindtap="articleLike">
10 10 <image class="zar_img" src="../../source/{{knowledge.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image>
littleApp_child/pages/home/css/login.wxss View file @ a9ac9f6
... ... @@ -46,8 +46,8 @@
46 46  
47 47 .input {
48 48 /*background-color: red;*/
49   - font-size: 13px;
50   - color: #999;
  49 + font-size: 15px;
  50 + color: #999999;
51 51 margin-left: 10px;
52 52 width: 110px;
53 53 margin-top: 3px;
littleApp_child/pages/home/home.js View file @ a9ac9f6
... ... @@ -35,7 +35,8 @@
35 35 userInfo:'',
36 36 inputFocus: { nameInput: false, phoneInput: false, codeInput: false },
37 37 currentBabyIndex:0,
38   - babys:[]
  38 + babys:[],
  39 + tourist:true
39 40 },
40 41 /*---------生命周期--------*/
41 42 onLoad: function () {
... ... @@ -196,7 +197,10 @@
196 197 networkUtil.showLoading()
197 198 var self = this
198 199 var param = { 'token': app.globalData.token }
199   - networkUtil._get(api.userInfo + app.globalData.currentId, {}, function (res) {
  200 + if (getApp().globalData.tourist == true) {
  201 + param.type = 1
  202 + }
  203 + networkUtil._get(api.userInfo + app.globalData.currentId, param, function (res) {
200 204 console.log('获取用户信息',res)
201 205 self.getArticleInfo(res.data.data.days)
202 206 self.setUserInfo(res.data.data)
... ... @@ -222,7 +226,8 @@
222 226 app.globalData.days = data.days
223 227 app.globalData.userInfo = data
224 228 self.setData({
225   - userData: data
  229 + userData: data,
  230 + tourist: getApp().globalData.tourist
226 231 })
227 232 },
228 233 // 设置UI 文章信息
... ... @@ -368,14 +373,23 @@
368 373 })
369 374 },
370 375 loginSuccess(data) {
371   - wx.setStorageSync('userToken', data.token)
372   - wx.setStorageSync('userId', data.patientIds)
373   - wx.setStorageSync('hxName', data.hxName)
374   - wx.setStorageSync('hxPassWord', data.hxPassWord)
375   - getApp().globalData.token = data.token
376   - getApp().globalData.userId = data.patientIds
377   - getApp().globalData.currentId = data.patientIds[0]
378   - this.homePage()
  376 + // 游客用户
  377 + if (data.patientIds && data.patientIds.length == 0){
  378 + data.patientIds = [data.id]
  379 + getApp().globalData.tourist = true
  380 + wx.setStorageSync('tourist', true)
  381 + } else {
  382 + getApp().globalData.tourist = false
  383 + wx.setStorageSync('tourist', false)
  384 + }
  385 + wx.setStorageSync('userToken', data.token)
  386 + wx.setStorageSync('userId', data.patientIds)
  387 + wx.setStorageSync('hxName', data.hxName)
  388 + wx.setStorageSync('hxPassWord', data.hxPassWord)
  389 + getApp().globalData.token = data.token
  390 + getApp().globalData.userId = data.patientIds
  391 + getApp().globalData.currentId = data.patientIds[0]
  392 + this.homePage()
379 393 }
380 394  
381 395 })
littleApp_child/pages/home/home.wxml View file @ a9ac9f6
... ... @@ -7,7 +7,7 @@
7 7 <view class="backgroundView" wx:if="{{pageType == 2}}">
8 8 <!-- <image class="TopBgImage" src=""></image> -->
9 9 <!--顶部红色有头像等信息的栏目-->
10   - <view class="TopBar">
  10 + <view class="TopBar" style='height:{{tourist == false ? 212 : 152}}px'>
11 11 <!--头像-->
12 12 <image class="avatar" bindtap="tapAvatar" src="{{userData.avatar.medium ? userData.avatar.medium : ''}}" background-size="cover"></image>
13 13 <!--用户名-->
14 14  
... ... @@ -19,8 +19,9 @@
19 19 <view class="top_name" wx:if="{{babys.length < 2}}">
20 20 <view class="userName" data-index="0">{{userData.username}}</view>
21 21 </view>
  22 + <view class="tourist_age">月龄:{{userData.monthage ? userData.monthage : '0'}}</view>
22 23 <!--下方黑色横条-->
23   - <view class="infoBar" wx:if="">
  24 + <view class="infoBar" wx:if="{{tourist == false}}">
24 25 <view class="infoView">
25 26 <text class="titleText">出生日期</text>
26 27 <text class="timeText">{{userData.birth}}</text>
... ... @@ -38,7 +39,7 @@
38 39 <!--下方黑色横条-->
39 40 </view>
40 41 <!--医院名称横条-->
41   - <view class="hospitalName" wx:if="{{userData.checkhospital}}">{{userData.checkhospital}}</view>
  42 + <view class="hospitalName" wx:if="{{userData.checkhospital && tourist == false}}">{{userData.checkhospital}}</view>
42 43 <!--功能模块-->
43 44 <view class="foundation_BG" style="{{item_big_height}}">
44 45 <navigator class="foundation_item_small" url="../CheckReport/CheckReport">
45 46  
46 47  
... ... @@ -86,13 +87,13 @@
86 87 <image class="article_content_bottomBar_likes_icon" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image>
87 88 <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label>
88 89 <!-- 文章收藏 -->
89   - <image class="article_content_bottomBar_likes_icon" src="../../source/{{item.isLike == 1 ? 'save_not.png' : 'save_not.png'}}"></image>
90   - <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label>
  90 + <!-- <image class="article_content_bottomBar_likes_icon" src="../../source/{{item.isLike == 1 ? 'save_not.png' : 'save_not.png'}}"></image> -->
  91 + <!-- <label class="article_content_bottomBar_likes_text">{{item.likeCount ? item.likeCount : 0}}</label> -->
91 92 </view>
92   - <view class="article_content_bottomBar_labels">
  93 + <!-- <view class="article_content_bottomBar_labels">
93 94 <view catchtap="clickLabel" data-categary="lable" style="float: right" class="article_label">什么东东</view>
94 95 <view class="article_label" style="float: right">什么东东啊</view>
95   - </view>
  96 + </view> -->
96 97 </view>
97 98 </navigator>
98 99 </block>
... ... @@ -135,6 +136,19 @@
135 136 <view class="we_title">育儿知识</view>
136 137 </view>
137 138 <view class="we_content">根据儿童生长发育情况,每周提供针对性婴幼儿日常护理、营养饮食、疾病护理等相关信息。</view>
  139 + </view>
  140 + <view>
  141 + <block wx:for="{{vipList}}">
  142 + <view class="vip_intr_bg">
  143 + <view class="vip_intr_titleBar">
  144 + <image class="vip_intr_titleBar_icon" src='../../source/{{item.icon}}.png'></image>
  145 + <view class="vip_intr_titleBar_text">{{item.title}}</view>
  146 + <view class="vip_intr_titleBar_nameplate">VIP</view>
  147 + </view>
  148 + <view class="vip_intr_content">{{item.content}}</view>
  149 + <view style='height:19px;'></view>
  150 + </view>
  151 + </block>
138 152 </view>
139 153  
140 154 <button class="we_button" bindtap="toLogin">身份验证</button>
littleApp_child/pages/home/home.wxss View file @ a9ac9f6
... ... @@ -5,7 +5,6 @@
5 5 /*顶部模块*/
6 6 .TopBar {
7 7 width:100%;
8   - height:212px;
9 8 background: #48C17B;
10 9 position: relative;
11 10 }
... ... @@ -47,6 +46,14 @@
47 46 /*居中*/
48 47 justify-content: center;
49 48 align-items: center;
  49 +}
  50 +
  51 +.tourist_age {
  52 + float: right;
  53 + text-align: right;
  54 + margin-right: 20px;
  55 + color: white;
  56 + font-size: 15px;
50 57 }
51 58  
52 59 .top_name_line {
littleApp_child/pages/vipService/vipService.js View file @ a9ac9f6
... ... @@ -6,8 +6,12 @@
6 6  
7 7 Page({
8 8 data: {
9   -
10   -
  9 + vipList: [{ title: '高危指导', icon: 'gaoweizhidao', content:'医生依据新生儿娩出情况、新生儿患病情况及新生儿先天性疾病筛查结果辨识、诊断高危儿。针对医生的高危诊断,结合高危儿的月龄、生理因素、高危状态、检查结果、需监测指标等提供精准医疗服务。向早产儿、低出生体重儿、发育迟缓等特殊婴幼儿家长提供育儿帮助。'},
  10 + { title: '精准医疗服务', icon: 'jingzunyiliao', content: '依据新生儿特有的生理情况,结合其每天都会快速生长发育的特点,对可能遇到的生理病理问题,提供精确到天的健康教育。新生儿期过后,结合婴幼儿体格生长发育特点,针对不同月龄,进行喂养方式、营养补充、辅食添加、动作发育、习惯培养等宣教指导。' },
  11 + { title: '检查预约提醒', icon: 'chakanyuyuetixing', content: '每次检查后,医生会结合当前检查实际情况为儿童预约下次检查时间,届时提前通知家长带孩子进行相关检查。' },
  12 + { title: '随访提醒', icon: 'suifangtixing', content: '依据新生儿特有的生理情况,结合其每天都会快速生长发育的特点,对可能遇到的生理病理问题,提供精确到天的健康教育。新生儿期过后,结合婴幼儿体格生长发育特点,针对不同月龄,进行喂养方式、营养补充、辅食添加、动作发育、习惯培养等宣教指导。' },
  13 + { title: '查看检查记录', icon: 'chakanjilv', content: '医生依据新生儿娩出情况、新生儿患病情况及新生儿先天性疾病筛查结果辨识、诊断高危儿。针对医生的高危诊断,结合高危儿的月龄、生理因素、高危状态、检查结果、需监测指标等提供精准医疗服务。向早产儿、低出生体重儿、发育迟缓等特殊婴幼儿家长提供育儿帮助。' },
  14 + { title: '高危指导', icon: 'gaoweizhidao', content: '随时随地可查看因幼儿问诊检查、儿科检查、一般检查、辅助检查的各项指标,以及相关指标存在的异常情况。' },]
11 15 },
12 16 onLoad: function (e) {
13 17  
littleApp_child/pages/vipService/vipService.wxml View file @ a9ac9f6
1 1 <!--hospitalList.wxml 医院列表 联系医院-->
2   -<view class="main">
  2 +<!-- <view class="main">
3 3  
4 4 <view class='TopBar'>
5   - <!--头像-->
  5 +
6 6 <image class="avatar" bindtap="tapAvatar" src="{{userData.avatar.medium ? userData.avatar.medium : ''}}" background-size="cover"></image>
7   - <!--用户名-->
  7 +
8 8 <view class="top_name">
9 9 <view class="userName">mingzi</view>
10 10  
... ... @@ -29,5 +29,19 @@
29 29 <view class='check_content'>反倒让飞啊飞微软服务器</view>
30 30 </view>
31 31  
  32 +</view> -->
  33 +
  34 +<view>
  35 + <block wx:for="{{vipList}}">
  36 + <view class="vip_intr_bg">
  37 + <view class="vip_intr_titleBar">
  38 + <image class="vip_intr_titleBar_icon" src='../../source/{{item.icon}}.png'></image>
  39 + <view class="vip_intr_titleBar_text">{{item.title}}</view>
  40 + <view class="vip_intr_titleBar_nameplate">VIP</view>
  41 + </view>
  42 + <view class="vip_intr_content">{{item.content}}</view>
  43 + <view style='height:19px;'></view>
  44 + </view>
  45 + </block>
32 46 </view>
littleApp_child/pages/vipService/vipService.wxss View file @ a9ac9f6
... ... @@ -107,4 +107,57 @@
107 107 color: #888;
108 108 margin-top: 10px;
109 109 }
  110 +
  111 +
  112 +
  113 +
  114 +
  115 +
  116 +
  117 +
  118 +
  119 +.vip_intr_bg {
  120 + background: white;
  121 + padding-left: 15px;
  122 + padding-right: 15px;
  123 + margin-bottom: 1px;
  124 +}
  125 +
  126 +.vip_intr_titleBar {
  127 + height: 50px;
  128 + width: 100%;
  129 + display: flex;
  130 + align-items: center;
  131 +}
  132 +
  133 +.vip_intr_titleBar_icon {
  134 + height: 30px;
  135 + width: 30px;
  136 +}
  137 +
  138 +.vip_intr_titleBar_text {
  139 + font-family: PingFang-SC-Medium;
  140 + font-size: 16px;
  141 + color: #222222;
  142 + margin-left: 6px;
  143 +}
  144 +
  145 +.vip_intr_titleBar_nameplate {
  146 + font-size: 13px;
  147 + color: #48C17B;
  148 + border: 1px solid #48C17B;
  149 + border-radius: 2px;
  150 + height: 16px;
  151 + width: 28px;
  152 + line-height: 16px;
  153 + margin-left: 6px;
  154 + text-align: center;
  155 +}
  156 +
  157 +.vip_intr_content {
  158 + font-size: 14px;
  159 + color: #888888;
  160 + letter-spacing: 0;
  161 + line-height: 21px;
  162 +}
littleApp_child/source/chakanjilv.png View file @ a9ac9f6

3.79 KB

littleApp_child/source/chakanyuyuetixing.png View file @ a9ac9f6

3.48 KB

littleApp_child/source/exclamation_point.png View file @ a9ac9f6

1.22 KB

littleApp_child/source/gaoweizhidao.png View file @ a9ac9f6

2.97 KB

littleApp_child/source/jingzunyiliao.png View file @ a9ac9f6

3.84 KB

littleApp_child/source/suifangtixing.png View file @ a9ac9f6

1.91 KB