Commit 43219b024608ac4c9ce4f4b86ee89887d2e398fe
1 parent
f47706549b
Exists in
master
and in
2 other branches
no message
Showing 4 changed files with 450 additions and 390 deletions
littleApp_child/pages/home/css/login.wxss
View file @
43219b0
| 1 | - | |
| 2 | 1 | .input-placeholder { |
| 3 | - font-size: 13px; | |
| 4 | - color: #979797; | |
| 2 | + font-size: 13px; | |
| 3 | + color: #999; | |
| 5 | 4 | } |
| 6 | 5 | |
| 7 | 6 | page { |
| 8 | - background-color: white; | |
| 7 | + background-color: white; | |
| 9 | 8 | } |
| 10 | 9 | |
| 11 | 10 | .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; | |
| 11 | + width: 100%; | |
| 12 | + height: 45px; | |
| 13 | + background: #ffd5dd; | |
| 14 | + font-size: 12px; | |
| 15 | + color: #ee7289; | |
| 16 | + text-align: center; | |
| 17 | + line-height: 45px; | |
| 19 | 18 | } |
| 20 | 19 | |
| 21 | 20 | .record-input-constainer { |
| 22 | - margin: 40px 25px 0 25px; | |
| 21 | + margin: 40px 10px 0 10px; | |
| 23 | 22 | } |
| 24 | 23 | |
| 25 | 24 | .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; | |
| 25 | + /*background: beige;*/ | |
| 26 | + display: flex; | |
| 27 | + align-items: center; | |
| 28 | + justify-content: flex-start; | |
| 29 | + height: 42px; | |
| 30 | + border: solid 1px; | |
| 31 | + border-radius: 5px; | |
| 33 | 32 | } |
| 34 | 33 | |
| 35 | 34 | .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; | |
| 35 | + /*background-color: green;*/ | |
| 36 | + width: 50px; | |
| 37 | + height: 20px; | |
| 38 | + text-align: left; | |
| 39 | + line-height: 20px; | |
| 40 | + font: medium; | |
| 41 | + font-size: 14px; | |
| 42 | + color: #000; | |
| 43 | + padding-left: 15px; | |
| 44 | + border-right: solid #e8eae5 1px; | |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | .input { |
| 48 | - /*background-color: red;*/ | |
| 49 | - font-size: 13px; | |
| 50 | - color: #5e5e5e; | |
| 51 | - margin-left: 20px; | |
| 52 | - width: 180px; | |
| 53 | - margin-top: 3px; | |
| 48 | + /*background-color: red;*/ | |
| 49 | + font-size: 13px; | |
| 50 | + color: #999; | |
| 51 | + margin-left: 10px; | |
| 52 | + width: 110px; | |
| 53 | + margin-top: 3px; | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 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; | |
| 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 | 70 | } |
| 71 | 71 | |
| 72 | +.code-input_bg { | |
| 73 | + /*background: beige;*/ | |
| 74 | + display: flex; | |
| 75 | + align-items: center; | |
| 76 | + justify-content: flex-start; | |
| 77 | + height: 42px; | |
| 78 | + border: solid 1px; | |
| 79 | + border-radius: 5px; | |
| 80 | + width: 60%; | |
| 81 | +} | |
| 82 | + | |
| 72 | 83 | .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);*/ | |
| 84 | + font: lighter; | |
| 85 | + margin-left: 10px; | |
| 86 | + width: 80px; | |
| 87 | + text-align: center; | |
| 88 | + font-size: 15px; | |
| 89 | + color: #666; | |
| 90 | + height: 30px; | |
| 91 | + line-height: 30px; | |
| 92 | + margin-top: 20px; | |
| 93 | + background: #f5f5f5; | |
| 94 | + border: 1px solid #d3d3d3; | |
| 95 | + border-radius: 4px; | |
| 96 | + /*background-color: rgba(1, 1, 1, 1);*/ | |
| 97 | +} | |
| 98 | + | |
| 99 | +.code_view { | |
| 100 | + display: flex; | |
| 81 | 101 | } |
littleApp_child/pages/home/home.js
View file @
43219b0
| ... | ... | @@ -12,151 +12,260 @@ |
| 12 | 12 | var event = require('../../utils/event.js') |
| 13 | 13 | // 获取应用实例 |
| 14 | 14 | var app = getApp() |
| 15 | + | |
| 16 | +var timeCount = 60; | |
| 17 | +var timer; | |
| 18 | +var phone; | |
| 19 | +var name; | |
| 15 | 20 | Page({ |
| 16 | - /*---------属性变量--------*/ | |
| 17 | - data: { | |
| 18 | - isLogin: '', | |
| 19 | - item_big_height:0, | |
| 20 | - item_small: 0, | |
| 21 | - // 首页类型 1登录 2用户首页 3欢迎页 | |
| 22 | - pageType:0 | |
| 23 | - }, | |
| 24 | - /*---------生命周期--------*/ | |
| 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 | - | |
| 21 | + /*---------属性变量--------*/ | |
| 22 | + data: { | |
| 23 | + isLogin: '', | |
| 24 | + item_big_height: 0, | |
| 25 | + item_small: 0, | |
| 26 | + // 首页类型 1登录 2用户首页 3欢迎页 | |
| 27 | + pageType: 0, | |
| 28 | + time: '0s', | |
| 29 | + }, | |
| 30 | + /*---------生命周期--------*/ | |
| 31 | + onLoad: function () { | |
| 32 | + var isFirst = wx.getStorageSync('isFirst') | |
| 33 | + if (!isFirst) { | |
| 34 | + this.setData({ | |
| 35 | + pageType: 3 | |
| 36 | + }) | |
| 37 | + console.log('我是空的') | |
| 38 | + } else { | |
| 39 | + console.log('我是空的') | |
| 40 | + } | |
| 36 | 41 | |
| 37 | - // var that = this | |
| 38 | - this.networkStatusChange() | |
| 39 | - // this.networkstatus() | |
| 40 | - if (app.globalData.token == null || app.globalData.token == '') { | |
| 41 | - this.loginPage() | |
| 42 | - } else { | |
| 43 | - networkUtil.showLoading() | |
| 44 | - this.getUserInfo() | |
| 45 | - this.homePage() | |
| 46 | - // 监听事件 | |
| 47 | - event.on('likeChanged', this, function (data) { | |
| 48 | - if (data.categoryIndex == -1) { | |
| 49 | - var artList = this.data.crisisCategorie | |
| 50 | - artList[data.articleIdIndex].likeCount++ | |
| 51 | - this.setData({ | |
| 52 | - crisisCategorie: artList | |
| 53 | - }); | |
| 42 | + | |
| 43 | + // var that = this | |
| 44 | + this.networkStatusChange() | |
| 45 | + // this.networkstatus() | |
| 46 | + if (app.globalData.token == null || app.globalData.token == '') { | |
| 47 | + this.loginPage() | |
| 54 | 48 | } else { |
| 55 | - var artList = this.data.articleList | |
| 56 | - artList[data.categoryIndex].article[data.articleIdIndex].likeCount++ | |
| 57 | - this.setData({ | |
| 58 | - articleList: artList | |
| 59 | - }); | |
| 49 | + networkUtil.showLoading() | |
| 50 | + this.getUserInfo() | |
| 51 | + this.homePage() | |
| 52 | + // 监听事件 | |
| 53 | + event.on('likeChanged', this, function (data) { | |
| 54 | + if (data.categoryIndex == -1) { | |
| 55 | + var artList = this.data.crisisCategorie | |
| 56 | + artList[data.articleIdIndex].likeCount++ | |
| 57 | + this.setData({ | |
| 58 | + crisisCategorie: artList | |
| 59 | + }); | |
| 60 | + } else { | |
| 61 | + var artList = this.data.articleList | |
| 62 | + artList[data.categoryIndex].article[data.articleIdIndex].likeCount++ | |
| 63 | + this.setData({ | |
| 64 | + articleList: artList | |
| 65 | + }); | |
| 66 | + } | |
| 67 | + }) | |
| 60 | 68 | } |
| 61 | - }) | |
| 62 | - } | |
| 63 | - | |
| 64 | - }, | |
| 65 | - onShow: function () { | |
| 66 | - // 生命周期函数--监听页面显示 | |
| 67 | - if (app.globalData.token.length > 0 && this.data.isLogin == true) { | |
| 68 | - this.getUserInfo() | |
| 69 | - this.homePage() | |
| 70 | - } | |
| 71 | 69 | |
| 72 | - if (wx.getStorageSync("access_token") != null && !wx.getStorageSync("isHxOpend")){ | |
| 73 | - | |
| 74 | - } | |
| 75 | - }, | |
| 76 | - onUnload: function () { | |
| 77 | - // 移除监听 | |
| 78 | - event.remove('likeChanged', this); | |
| 79 | - }, | |
| 80 | - /*---------交互--------*/ | |
| 81 | - // 下拉刷新回调接口 | |
| 82 | - onPullDownRefresh: function () { | |
| 83 | - if (app.globalData.token == null || app.globalData.token == '') { | |
| 84 | - wx.stopPullDownRefresh() | |
| 85 | - return | |
| 86 | - } | |
| 87 | - // 网络请求,重新请求一遍数据 | |
| 88 | - this.getUserInfo() | |
| 89 | - this.homePage() | |
| 90 | - }, | |
| 91 | - // 点击头像 | |
| 92 | - tapAvatar: function () { | |
| 93 | - var that = this | |
| 94 | - wx.showActionSheet({ | |
| 95 | - itemList: ['退出当前用户'], | |
| 96 | - success: function (res) { | |
| 97 | - if (res.tapIndex == 0) { | |
| 98 | - wx.setStorageSync('userToken', '') | |
| 99 | - getApp().globalData.token = '' | |
| 100 | - that.loginPage() | |
| 101 | - WebIM.conn.close(); | |
| 70 | + }, | |
| 71 | + onShow: function () { | |
| 72 | + // 生命周期函数--监听页面显示 | |
| 73 | + if (app.globalData.token.length > 0 && this.data.isLogin == true) { | |
| 74 | + this.getUserInfo() | |
| 75 | + this.homePage() | |
| 102 | 76 | } |
| 103 | - }, | |
| 104 | - fail: function (res) { | |
| 105 | - console.log(res.errMsg) | |
| 106 | - } | |
| 107 | - }) | |
| 108 | - }, | |
| 109 | - /*---------自定义函数--------*/ | |
| 110 | - homePage() { | |
| 111 | - this.getAccessToken() | |
| 112 | - var that = this | |
| 113 | - that.setData({ | |
| 114 | - isLogin: false | |
| 115 | - }) | |
| 116 | - }, | |
| 117 | - loginPage() { | |
| 118 | - var that = this | |
| 119 | - that.setData({ | |
| 120 | - isLogin: true | |
| 121 | - }) | |
| 122 | - }, | |
| 123 | - // 监听网络状态 | |
| 124 | - networkStatusChange() { | |
| 125 | - var that = this | |
| 126 | - wx.onNetworkStatusChange(function (res) { | |
| 127 | - if (res.isConnected == true) { | |
| 128 | - that.connectWebIM() | |
| 129 | - } | |
| 130 | - }) | |
| 131 | - }, | |
| 132 | - // 获取用户信息 | |
| 133 | - getUserInfo() { | |
| 134 | 77 | |
| 135 | - var self = this | |
| 136 | - var param = { 'token': app.globalData.token } | |
| 137 | - networkUtil._get(api.getUserInfo, param, function (res) { | |
| 138 | - | |
| 139 | - }, function (res) { | |
| 140 | - networkUtil.showErrorToast(res.errormsg) | |
| 141 | - }) | |
| 142 | - }, | |
| 143 | - getArticleInfo(days) { | |
| 144 | - var self = this | |
| 145 | - // 文章列表 | |
| 146 | - networkUtil._get(api.homeArtList, { page: 0, limit: 100, days: days }, function (res) { | |
| 147 | - }, function (res) { | |
| 148 | - wx.stopPullDownRefresh() | |
| 149 | - }) | |
| 150 | - }, | |
| 151 | - // 设置UI数据 | |
| 152 | - setUserInfo(data) { | |
| 153 | - | |
| 154 | - }, | |
| 155 | - /*---------------欢迎介绍页面---------------*/ | |
| 156 | - toLogin(){ | |
| 157 | - this.setData({ | |
| 158 | - pageType:1 | |
| 159 | - }) | |
| 160 | - } | |
| 78 | + if (wx.getStorageSync("access_token") != null && !wx.getStorageSync("isHxOpend")) { | |
| 79 | + | |
| 80 | + } | |
| 81 | + }, | |
| 82 | + onUnload: function () { | |
| 83 | + // 移除监听 | |
| 84 | + event.remove('likeChanged', this); | |
| 85 | + }, | |
| 86 | + /*---------交互--------*/ | |
| 87 | + // 下拉刷新回调接口 | |
| 88 | + onPullDownRefresh: function () { | |
| 89 | + if (app.globalData.token == null || app.globalData.token == '') { | |
| 90 | + wx.stopPullDownRefresh() | |
| 91 | + return | |
| 92 | + } | |
| 93 | + // 网络请求,重新请求一遍数据 | |
| 94 | + this.getUserInfo() | |
| 95 | + this.homePage() | |
| 96 | + }, | |
| 97 | + // 点击头像 | |
| 98 | + tapAvatar: function () { | |
| 99 | + var that = this | |
| 100 | + wx.showActionSheet({ | |
| 101 | + itemList: ['退出当前用户'], | |
| 102 | + success: function (res) { | |
| 103 | + if (res.tapIndex == 0) { | |
| 104 | + wx.setStorageSync('userToken', '') | |
| 105 | + getApp().globalData.token = '' | |
| 106 | + that.loginPage() | |
| 107 | + WebIM.conn.close(); | |
| 108 | + } | |
| 109 | + }, | |
| 110 | + fail: function (res) { | |
| 111 | + console.log(res.errMsg) | |
| 112 | + } | |
| 113 | + }) | |
| 114 | + }, | |
| 115 | + /*---------自定义函数--------*/ | |
| 116 | + homePage() { | |
| 117 | + this.getAccessToken() | |
| 118 | + var that = this | |
| 119 | + that.setData({ | |
| 120 | + isLogin: false | |
| 121 | + }) | |
| 122 | + }, | |
| 123 | + loginPage() { | |
| 124 | + var that = this | |
| 125 | + that.setData({ | |
| 126 | + isLogin: true | |
| 127 | + }) | |
| 128 | + }, | |
| 129 | + // 监听网络状态 | |
| 130 | + networkStatusChange() { | |
| 131 | + var that = this | |
| 132 | + wx.onNetworkStatusChange(function (res) { | |
| 133 | + if (res.isConnected == true) { | |
| 134 | + that.connectWebIM() | |
| 135 | + } | |
| 136 | + }) | |
| 137 | + }, | |
| 138 | + // 获取用户信息 | |
| 139 | + getUserInfo() { | |
| 140 | + | |
| 141 | + var self = this | |
| 142 | + var param = { 'token': app.globalData.token } | |
| 143 | + networkUtil._get(api.getUserInfo, param, function (res) { | |
| 144 | + | |
| 145 | + }, function (res) { | |
| 146 | + networkUtil.showErrorToast(res.errormsg) | |
| 147 | + }) | |
| 148 | + }, | |
| 149 | + getArticleInfo(days) { | |
| 150 | + var self = this | |
| 151 | + // 文章列表 | |
| 152 | + networkUtil._get(api.homeArtList, { page: 0, limit: 100, days: days }, function (res) { | |
| 153 | + }, function (res) { | |
| 154 | + wx.stopPullDownRefresh() | |
| 155 | + }) | |
| 156 | + }, | |
| 157 | + // 设置UI数据 | |
| 158 | + setUserInfo(data) { | |
| 159 | + | |
| 160 | + }, | |
| 161 | + /*---------------欢迎介绍页面---------------*/ | |
| 162 | + toLogin() { | |
| 163 | + this.setData({ | |
| 164 | + pageType: 1 | |
| 165 | + }) | |
| 166 | + }, | |
| 167 | + | |
| 168 | + // 获取验证码 | |
| 169 | + getVerifyCode: function (e) { | |
| 170 | + console.log("name:" + name) | |
| 171 | + console.log("phone:" + phone) | |
| 172 | + if (timeCount < 60) { | |
| 173 | + return | |
| 174 | + } | |
| 175 | + | |
| 176 | + var that = this | |
| 177 | + networkUtil._post(api.bindDoc, { username: name, phone: phone }, function (res) { | |
| 178 | + console.log("getVerifyCode:",res) | |
| 179 | + | |
| 180 | + }, function (res) { | |
| 181 | + timeCount = 60 | |
| 182 | + clearTimeout(timer); | |
| 183 | + that.setData({ | |
| 184 | + time: '0s' | |
| 185 | + }) | |
| 186 | + networkUtil.showErrorToast('获取验证码失败,请稍后再试') | |
| 187 | + }) | |
| 188 | + if (timeCount == 60) { | |
| 189 | + this.keepTime() | |
| 190 | + } | |
| 191 | + // if (numberUtil.IsTelPhoneNumber(phone)) { | |
| 192 | + | |
| 193 | + // } else { | |
| 194 | + // wx.showToast({ | |
| 195 | + // title: '请输入正确手机号码', | |
| 196 | + // }) | |
| 197 | + // return | |
| 198 | + // } | |
| 199 | + | |
| 200 | + | |
| 201 | + }, | |
| 202 | + // 计时器 | |
| 203 | + keepTime: function () { | |
| 204 | + var that = this | |
| 205 | + timeCount-- | |
| 206 | + that.setData({ | |
| 207 | + time: timeCount + 's' | |
| 208 | + }) | |
| 209 | + if (timeCount == 0) { | |
| 210 | + timeCount = 60 | |
| 211 | + clearTimeout(timer); | |
| 212 | + return | |
| 213 | + } | |
| 214 | + timer = setTimeout(function () { | |
| 215 | + that.keepTime() | |
| 216 | + }, 1000) | |
| 217 | + }, | |
| 218 | + blurInput: function (e) { | |
| 219 | + console.log(e) | |
| 220 | + phone = e.detail.value | |
| 221 | + }, | |
| 222 | + blurNameInput:function(e){ | |
| 223 | + console.log(e) | |
| 224 | + name = e.detail.value | |
| 225 | + }, | |
| 226 | + // 提交表单 | |
| 227 | + formSubmit: function (e) { | |
| 228 | + | |
| 229 | + // wx.navigateTo({ | |
| 230 | + // url: '../childcare_knowledge/childcare_knowledge' | |
| 231 | + // }) | |
| 232 | + var self = this | |
| 233 | + if (e.detail.value.code == "") { | |
| 234 | + wx.showModal({ | |
| 235 | + title: '提示', | |
| 236 | + content: '请输入验证码', | |
| 237 | + showCancel: false, | |
| 238 | + success: function (res) { | |
| 239 | + } | |
| 240 | + }) | |
| 241 | + return | |
| 242 | + } | |
| 243 | + networkUtil.showLoading() | |
| 244 | + var param = { code: e.detail.value.code, phone: phone } | |
| 245 | + if (getApp().globalData.openInfo.mpid) { | |
| 246 | + param.gzopenid = getApp().globalData.openInfo.mpid | |
| 247 | + console.log('绑定mpid', param) | |
| 248 | + } | |
| 249 | + if (getApp().globalData.openInfo.code) { | |
| 250 | + param.jscode = getApp().globalData.openInfo.code | |
| 251 | + console.log('绑定code', param) | |
| 252 | + } | |
| 253 | + networkUtil._get(api.verifyCode, param, function (res) { | |
| 254 | + console.log(res) | |
| 255 | + self.loginSuccess(res.data) | |
| 256 | + }, function (res) { | |
| 257 | + networkUtil.showErrorToast(res.errormsg) | |
| 258 | + }) | |
| 259 | + }, | |
| 260 | + loginSuccess(data) { | |
| 261 | + console.log(data) | |
| 262 | + wx.setStorageSync('userToken', data.token) | |
| 263 | + wx.setStorageSync('hxName', data.hxName) | |
| 264 | + wx.setStorageSync('hxPassWord', data.hxPassWord) | |
| 265 | + getApp().globalData.token = data.token | |
| 266 | + // wx.navigateTo({ | |
| 267 | + // url: '../HasDocumentedVerifySuccess/HasDocumentedVerifySuccess?name=' + name | |
| 268 | + // }) | |
| 269 | + } | |
| 161 | 270 | }) |
littleApp_child/pages/home/home.wxml
View file @
43219b0
| 1 | - | |
| 2 | 1 | <!--首页--> |
| 3 | 2 | <!--主机类型--> |
| 4 | 3 | <!-- <view class="promptText" wx:if="{{HOSTType != 1 && HOSTType != 3}}">--{{HOSTTypeText}}--</view> --> |
| 5 | 4 | |
| 6 | 5 | |
| 7 | 6 | |
| 8 | 7 | |
| ... | ... | @@ -6,77 +5,77 @@ |
| 6 | 5 | </view> |
| 7 | 6 | <!--首页模块--> |
| 8 | 7 | <view class="backgroundView" wx:if="{{pageType == 2}}"> |
| 9 | - <image class="TopBgImage" src=""></image> | |
| 10 | -<!--顶部红色有头像等信息的栏目--> | |
| 11 | - <view class="TopBar"> | |
| 12 | - <!--头像--> | |
| 13 | - <image class="avatar" bindtap="tapAvatar" src="{{avatar ? avatar : '../../source/test.png'}}" background-size="cover"></image> | |
| 14 | - <!--用户名--> | |
| 15 | - <text class="userName">{{username}}</text> | |
| 16 | - <!--下方黑色横条--> | |
| 17 | - <view class="infoBar"> | |
| 18 | - <view class="infoView"> | |
| 19 | - <text class="titleText">体检医院</text> | |
| 20 | - <text class="timeText">{{week}}青黄岛</text> | |
| 21 | - </view> | |
| 22 | - <view class="infoView"> | |
| 23 | - <text class="titleText">月龄</text> | |
| 24 | - <text class="timeText">{{nextCheckTime}}1岁半</text> | |
| 25 | - <view class="lineView"></view> | |
| 26 | - </view> | |
| 27 | - <view class="infoView"> | |
| 28 | - <text class="titleText">健康状况</text> | |
| 29 | - <text class="timeText">{{intervalDays}}未知</text> | |
| 30 | - </view> | |
| 31 | - </view> | |
| 32 | - <!--下方黑色横条--> | |
| 33 | - </view> | |
| 34 | - <!--医院名称横条--> | |
| 35 | - <view class="hospitalName" wx:if="{{hospitalName}}">{{hospitalName}}</view> | |
| 36 | - <!--功能模块--> | |
| 37 | - <view class="foundation_BG" style="{{item_big_height}}"> | |
| 38 | - <navigator class="foundation_item_small" url="../inspectionReport/inspectionReport"> | |
| 39 | - <image src="../../source/jianchajilu.png" class="foundation_item_small_image"></image> | |
| 40 | - <view class="foundation_item_small_text">儿保检查记录</view> | |
| 41 | - </navigator> | |
| 42 | - <navigator class="foundation_item_small" url="../childcare_knowledge/childcare_knowledge"> | |
| 43 | - <image src="../../source/except.png" class="foundation_item_small_image"></image> | |
| 44 | - <view class="foundation_item_small_text">育儿百科</view> | |
| 45 | - </navigator> | |
| 46 | - <navigator class="foundation_item_small" url="../childcare_knowledge/childcare_knowledge"> | |
| 47 | - <image src="../../source/yuerzhishi.png" class="foundation_item_small_image"></image> | |
| 48 | - <view class="foundation_item_small_text">育儿知识</view> | |
| 49 | - </navigator> | |
| 50 | - <navigator class="foundation_item_small" url="../system_notifacations/system_notifacations"> | |
| 51 | - <image src="../../source/xiaoxitongzhi.png" class="foundation_item_small_image"></image> | |
| 52 | - <view class="foundation_item_small_text">消息通知</view> | |
| 53 | - </navigator> | |
| 54 | - </view> | |
| 8 | + <image class="TopBgImage" src=""></image> | |
| 9 | + <!--顶部红色有头像等信息的栏目--> | |
| 10 | + <view class="TopBar"> | |
| 11 | + <!--头像--> | |
| 12 | + <image class="avatar" bindtap="tapAvatar" src="{{avatar ? avatar : '../../source/test.png'}}" background-size="cover"></image> | |
| 13 | + <!--用户名--> | |
| 14 | + <text class="userName">{{username}}</text> | |
| 15 | + <!--下方黑色横条--> | |
| 16 | + <view class="infoBar"> | |
| 17 | + <view class="infoView"> | |
| 18 | + <text class="titleText">体检医院</text> | |
| 19 | + <text class="timeText">{{week}}青黄岛</text> | |
| 20 | + </view> | |
| 21 | + <view class="infoView"> | |
| 22 | + <text class="titleText">月龄</text> | |
| 23 | + <text class="timeText">{{nextCheckTime}}1岁半</text> | |
| 24 | + <view class="lineView"></view> | |
| 25 | + </view> | |
| 26 | + <view class="infoView"> | |
| 27 | + <text class="titleText">健康状况</text> | |
| 28 | + <text class="timeText">{{intervalDays}}未知</text> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + <!--下方黑色横条--> | |
| 32 | + </view> | |
| 33 | + <!--医院名称横条--> | |
| 34 | + <view class="hospitalName" wx:if="{{hospitalName}}">{{hospitalName}}</view> | |
| 35 | + <!--功能模块--> | |
| 36 | + <view class="foundation_BG" style="{{item_big_height}}"> | |
| 37 | + <navigator class="foundation_item_small" url="../inspectionReport/inspectionReport"> | |
| 38 | + <image src="../../source/jianchajilu.png" class="foundation_item_small_image"></image> | |
| 39 | + <view class="foundation_item_small_text">儿保检查记录</view> | |
| 40 | + </navigator> | |
| 41 | + <navigator class="foundation_item_small" url="../childcare_knowledge/childcare_knowledge"> | |
| 42 | + <image src="../../source/except.png" class="foundation_item_small_image"></image> | |
| 43 | + <view class="foundation_item_small_text">育儿百科</view> | |
| 44 | + </navigator> | |
| 45 | + <navigator class="foundation_item_small" url="../childcare_knowledge/childcare_knowledge"> | |
| 46 | + <image src="../../source/yuerzhishi.png" class="foundation_item_small_image"></image> | |
| 47 | + <view class="foundation_item_small_text">育儿知识</view> | |
| 48 | + </navigator> | |
| 49 | + <navigator class="foundation_item_small" url="../system_notifacations/system_notifacations"> | |
| 50 | + <image src="../../source/xiaoxitongzhi.png" class="foundation_item_small_image"></image> | |
| 51 | + <view class="foundation_item_small_text">消息通知</view> | |
| 52 | + </navigator> | |
| 53 | + </view> | |
| 55 | 54 | |
| 56 | - <!--文章列表--> | |
| 57 | - <view class="article_list"> | |
| 58 | - <view class="article_bg"> | |
| 59 | - <navigator url="../childcare_knowledge/childcare_knowledge" class="navigator_class"> | |
| 60 | - <image class="article_title_image"></image> | |
| 61 | - <view class="article_title">日常护理</view> | |
| 62 | - <image class="article_title_indicator" src="../../source/gengduo.png"></image> | |
| 63 | - </navigator> | |
| 64 | - <navigator class="article_content" url="../childcare_knowledge_detail/childcare_knowledge_detail"> | |
| 65 | - <view style="height:6px;width:100%;"></view> | |
| 66 | - <view class="article_content_title">如何提防新生儿败血症</view> | |
| 67 | - <label class="article_content_text">败血症(septicemia)的意</label> | |
| 68 | - <image class="article_content_image" src="../../source/test.png"></image> | |
| 69 | - <view class="article_content_bottomBar"> | |
| 70 | - <!-- <view class="article_content_bottomBar_labels"> | |
| 55 | + <!--文章列表--> | |
| 56 | + <view class="article_list"> | |
| 57 | + <view class="article_bg"> | |
| 58 | + <navigator url="../childcare_knowledge/childcare_knowledge" class="navigator_class"> | |
| 59 | + <image class="article_title_image"></image> | |
| 60 | + <view class="article_title">日常护理</view> | |
| 61 | + <image class="article_title_indicator" src="../../source/gengduo.png"></image> | |
| 62 | + </navigator> | |
| 63 | + <navigator class="article_content" url="../childcare_knowledge_detail/childcare_knowledge_detail"> | |
| 64 | + <view style="height:6px;width:100%;"></view> | |
| 65 | + <view class="article_content_title">如何提防新生儿败血症</view> | |
| 66 | + <label class="article_content_text">败血症(septicemia)的意</label> | |
| 67 | + <image class="article_content_image" src="../../source/test.png"></image> | |
| 68 | + <view class="article_content_bottomBar"> | |
| 69 | + <!-- <view class="article_content_bottomBar_labels"> | |
| 71 | 70 | </view> --> |
| 72 | - <view class="article_content_bottomBar_likes"> | |
| 73 | - <image class="article_content_bottomBar_likes_icon" src="../../source/like.png"></image> | |
| 74 | - <label class="article_content_bottomBar_likes_text">111</label> | |
| 75 | - </view> | |
| 71 | + <view class="article_content_bottomBar_likes"> | |
| 72 | + <image class="article_content_bottomBar_likes_icon" src="../../source/like.png"></image> | |
| 73 | + <label class="article_content_bottomBar_likes_text">111</label> | |
| 74 | + </view> | |
| 75 | + </view> | |
| 76 | + </navigator> | |
| 76 | 77 | </view> |
| 77 | - </navigator> | |
| 78 | 78 | </view> |
| 79 | - </view> | |
| 80 | 79 | </view> |
| 81 | 80 | |
| 82 | 81 | |
| 83 | 82 | |
| 84 | 83 | |
| 85 | 84 | |
| 86 | 85 | |
| 87 | 86 | |
| 88 | 87 | |
| ... | ... | @@ -84,62 +83,66 @@ |
| 84 | 83 | <!-- 欢迎页 --> |
| 85 | 84 | |
| 86 | 85 | <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> | |
| 86 | + <image class="we_topImg" src="http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg"></image> | |
| 87 | + <view> | |
| 88 | + <view class="we_title_view"> | |
| 89 | + <image class="we_icon"></image> | |
| 90 | + <view class="we_title">幼儿保健</view> | |
| 91 | + </view> | |
| 92 | + <view class="we_content">妈咪baby之“幼儿保健”,主要针对0-6周岁婴幼儿提供院内保健检查信息、诊断指导意见以及相关医疗服务提醒等业务。</view> | |
| 92 | 93 | </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> | |
| 94 | + <view> | |
| 95 | + <view class="we_title_view"> | |
| 96 | + <image class="we_icon"></image> | |
| 97 | + <view class="we_title">儿保记录</view> | |
| 98 | + </view> | |
| 99 | + <view class="we_content">查看婴幼儿在院内检查的各项信息,以及对应的诊断、处理、指导意见。</view> | |
| 99 | 100 | </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> | |
| 101 | + <view> | |
| 102 | + <view class="we_title_view"> | |
| 103 | + <image class="we_icon"></image> | |
| 104 | + <view class="we_title">服务提醒</view> | |
| 105 | + </view> | |
| 106 | + <view class="we_content">可提供高危、复查、预约、精确指导等相关及时提醒服务。</view> | |
| 106 | 107 | </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> | |
| 108 | + <view> | |
| 109 | + <view class="we_title_view"> | |
| 110 | + <image class="we_icon"></image> | |
| 111 | + <view class="we_title">育儿知识</view> | |
| 112 | + </view> | |
| 113 | + <view class="we_content">根据儿童生长发育情况,每周提供针对性婴幼儿日常护理、营养饮食、疾病护理等相关信息。</view> | |
| 113 | 114 | </view> |
| 114 | - <view class="we_content">根据儿童生长发育情况,每周提供针对性婴幼儿日常护理、营养饮食、疾病护理等相关信息。</view> | |
| 115 | - </view> | |
| 116 | 115 | |
| 117 | - <button class="we_button" bindtap="toLogin">身份验证</button> | |
| 116 | + <button class="we_button" bindtap="toLogin">身份验证</button> | |
| 118 | 117 | </view> |
| 119 | 118 | |
| 120 | 119 | <!-- 登录 --> |
| 121 | 120 | |
| 122 | 121 | <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> | |
| 122 | + <form catchsubmit="formSubmit"> | |
| 123 | + | |
| 124 | + <view class="record-input-constainer"> | |
| 125 | + <view class="record-input_bg" style="border-color:{{inputFocus.nameInput ? '#f4879b' : '#e8eae5'}}"> | |
| 126 | + <label class="record-input_title">姓名</label> | |
| 127 | + <input class="input" id="name" name="name" maxlength="12" placeholder="请输入建档姓名" value="" placeholder-class="input-placeholder" bindfocus="getFocus" bindblur="blurNameInput"/> | |
| 128 | + </view> | |
| 129 | + <view class="record-input_bg" style="margin-top:15px;border-color:{{inputFocus.phoneInput ? '#f4879b' : '#e8eae5'}}"> | |
| 130 | + <label class="record-input_title">手机号</label> | |
| 131 | + <input class="input" id="phone" name="phone" type="number" placeholder="请输入建档手机号" maxlength="11" placeholder-class="input-placeholder" bindfocus="getFocus" value="" bindblur="blurInput" /> | |
| 132 | + </view> | |
| 133 | + | |
| 134 | + <view class="code_view"> | |
| 135 | + <view class="code-input_bg" style="margin-top:15px;border-color:{{inputFocus.codeInput ? '#f4879b' : '#e8eae5'}}"> | |
| 136 | + <label class="record-input_title" >验证码</label> | |
| 137 | + <input class="input" id="code" name="code" maxlength="12" placeholder="请输入验证码" value="" placeholder-class="input-placeholder" bindfocus="getFocus" /> | |
| 138 | + </view> | |
| 139 | + <label class="record-time-text" bindtap="getVerifyCode">{{time == '0s' ? '点击获取' : time}}</label> | |
| 140 | + | |
| 141 | + </view> | |
| 142 | + | |
| 143 | + </view> | |
| 144 | + | |
| 145 | + <button class="record-submit-btn" formType="submit">确认</button> | |
| 146 | + </form> | |
| 144 | 147 | </view> |
littleApp_child/utils/apiFile.js
View file @
43219b0
| 1 | 1 | module.exports = { |
| 2 | 2 | getOpenId:'wx/getOpenId', |
| 3 | 3 | /*------建档------*/ |
| 4 | - // 提交建档 | |
| 5 | - bookArchive:'vqhdfy/bookArchive', | |
| 4 | + | |
| 6 | 5 | // 校验验证码并且绑定建档 |
| 7 | - verifyCode : 'wx/vercode', | |
| 6 | + verifyCode: 'baby/vercode', | |
| 8 | 7 | // 获取验证码 |
| 9 | - bindDoc : 'wx/bind', | |
| 10 | - // 获取地区 | |
| 11 | - regions:'v1/regions', | |
| 12 | - /*------首页------*/ | |
| 13 | - // 获取用户信息 | |
| 14 | - getUserInfo : 'v1/users', | |
| 15 | - // 首页文章列表 | |
| 16 | - homeArtList : 'wx/pregnancy', | |
| 17 | - // 获取这个人所属的高危文章列表 | |
| 18 | - riskGuideList : 'v1/riskGuide', | |
| 19 | - // 文章列表 | |
| 20 | - articleList : 'wx/articles/precise', | |
| 21 | - // 文章详情/articles/:id | |
| 22 | - article : 'v1/articles', | |
| 23 | - // 文章点赞 | |
| 24 | - articleLike : 'v1/articleLike', | |
| 25 | - // 获取用户医院与医生信息 | |
| 26 | - getUserHosiptal : 'v1/documents', | |
| 27 | - // 孕期产检信息 | |
| 28 | - checkInfoOfPregnancy : 'v1/appointments/pregnancy', | |
| 29 | - // 孕期健康评级 | |
| 30 | - healthOfPregnancy : 'wx/health', | |
| 31 | - // 获取这个人所属的高危 | |
| 32 | - userRisk : 'wx/getselfrisk', | |
| 33 | - riskDetails : 'wx/getriskdetail', | |
| 34 | - /*------医院医生------*/ | |
| 35 | - // 医生介绍 | |
| 36 | - doctorInfo : 'wx/doctorDetail', | |
| 37 | - // 医生列表 | |
| 38 | - doctorList : 'wx/doctor/list', | |
| 39 | - // 获取孕期检查报告列表 详情使用:/reports/:id | |
| 40 | - pregnancyReports : 'v1/reports', | |
| 41 | - // 获取检验报告列表 详情使用:/reports/:id | |
| 42 | - inspectionReports: 'wx/getAreaReports', | |
| 43 | - // 获取检验报告详情使用:/reports/:id | |
| 44 | - inspectionReportDetail: 'wx/reports', | |
| 45 | - // reportDetails : 'wx/getriskdetail', | |
| 46 | - // 医院列表 | |
| 47 | - hospitalList : 'v1/hospitals/my', | |
| 48 | - // 医院详情 使用:/hospitals/:id | |
| 49 | - hospitalDetail : 'v1/hospitals/', | |
| 50 | - // 查询床位类型信息sickedTypes/:hospitalId | |
| 51 | - sickbedTypes : 'v1/sickbedTypes/', | |
| 52 | - // 查询我的床位预约、预约床位、取消预约床位 | |
| 53 | - sickbedOrders : 'v1/sickbedOrders/', | |
| 54 | - // 体重管理-获取体重记录 | |
| 55 | - getUserWeight: 'grWeContr/getGw', | |
| 56 | - // 体重管理-设置孕妇孕前体重 | |
| 57 | - setUserBeforeWeight: 'grWeContr/addGwBasic', | |
| 58 | - // 体重管理-记录孕妇当前体重 | |
| 59 | - setUserCurrentWeight: 'grWeContr/addGw', | |
| 60 | - // 体重管理-获取体重标准值 | |
| 61 | - getWeightReference: 'grWeContr/getGsw', | |
| 62 | - // 体重管理-获取推荐信息 | |
| 63 | - getweightSuggest: 'grWeContr/getweightSuggest', | |
| 64 | - // 体重管理-获取血压 | |
| 65 | - getBolldPressure: 'pbp/getBolldPressure', | |
| 66 | - // 体重管理-设置血压 | |
| 67 | - addBloodPre: 'pbp/addBloodPre', | |
| 68 | - // 医生环信用户名 | |
| 69 | - getDoctorHxName: 'wx/getDoctorHxName', | |
| 70 | - // 添加医生为好友 | |
| 71 | - doctorAddFriend: 'wx/doctorAddFriend', | |
| 72 | - // 获取环信登录token | |
| 73 | - getAccessToken: 'wx/getAccessToken', | |
| 74 | - // 既往史类型 | |
| 75 | - getjws:'getjws', | |
| 76 | - // 新增血糖记录 | |
| 77 | - addBloodSug: 'pbs/addBloodSug', | |
| 78 | - // 获取血糖记录 | |
| 79 | - getBolldSugar: 'pbs/getBolldSugar', | |
| 8 | + bindDoc : 'baby/bind', | |
| 9 | + // 用户基本信息 | |
| 80 | 10 | |
| 81 | - | |
| 82 | - | |
| 83 | - /*---------衡水-----------*/ | |
| 84 | - hengshui: 'WX_CS.asmx/Get_CSResult_Info' | |
| 11 | + userInfo: 'baby/user/info', | |
| 12 | + | |
| 85 | 13 | } |