Commit c55fa8f60bb3d141da6179198a4d1ae208d6d30b
1 parent
67b8168ddf
Exists in
master
and in
2 other branches
小程序要去掉儿童建档和儿童疾病建档,只保留登陆和儿童预约建档,登陆界面没有返回功能,增加一个返回功能
Showing 5 changed files with 67 additions and 20 deletions
littleApp_child/packageA/pages/preDocumented/preDocumented.js
View file @
c55fa8f
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | const numberUtil = require("../../../utils/numberUtil.js"); |
| 6 | 6 | import { AreaPicker } from "../../../utils/areaSelector/selector.js" |
| 7 | 7 | let liveType = ""; |
| 8 | +let hospitalId; | |
| 8 | 9 | Page(Object.assign({}, AreaPicker,{ |
| 9 | 10 | data: { |
| 10 | 11 | postObj: {}, |
| ... | ... | @@ -114,6 +115,7 @@ |
| 114 | 115 | submiting:false |
| 115 | 116 | }, |
| 116 | 117 | onLoad: function (options) { |
| 118 | + hospitalId = options.hospitalId; | |
| 117 | 119 | var that = this; |
| 118 | 120 | networkUtil.showLoading() |
| 119 | 121 | networkUtil._get(api.getConfigHospitals,{}, function(res) { |
| ... | ... | @@ -123,6 +125,12 @@ |
| 123 | 125 | selectHospital: {}, //{'hospitalId':216,'hospitalName':'秦皇岛市妇幼保健院'}, |
| 124 | 126 | 'queryData.hospital': {} //{'hospitalId':216,'hospitalName':'秦皇岛市妇幼保健院'} |
| 125 | 127 | }) |
| 128 | + if (hospitalId!==null&&hospitalId!==undefined&&hospitalId!==""&&hospitalId===2100001605) { | |
| 129 | + that.setData({ | |
| 130 | + selectHospital: {'hospitalId':2100001605,'hospitalName':'隆化县妇幼保健院'}, | |
| 131 | + 'queryData.hospital': {'hospitalId':2100001605,'hospitalName':'隆化县妇幼保健院'} | |
| 132 | + }) | |
| 133 | + } | |
| 126 | 134 | } |
| 127 | 135 | }, function(res) { |
| 128 | 136 | networkUtil.showErrorToast(res.errormsg) |
| ... | ... | @@ -450,19 +458,29 @@ |
| 450 | 458 | }) |
| 451 | 459 | console.log(postData) |
| 452 | 460 | networkUtil._post(api.addBuildArticle, postData , (res)=> { |
| 453 | - wx.showModal({ | |
| 454 | - title: '成功提交', | |
| 455 | - content: "您已成功预约建档", | |
| 456 | - showCancel: false, | |
| 457 | - submiting:false, | |
| 458 | - success: function (res){ | |
| 459 | - that.setData({ | |
| 460 | - babyInfo:postData, | |
| 461 | - 'babyInfo.hospitalName':that.data.queryData.hospital.hospitalName, | |
| 462 | - showViewType:2 | |
| 463 | - }) | |
| 464 | - } | |
| 465 | - }) | |
| 461 | + if (0===res.data.errorcode) { | |
| 462 | + wx.showModal({ | |
| 463 | + title: '成功提交', | |
| 464 | + content: "您已成功预约建档", | |
| 465 | + showCancel: false, | |
| 466 | + submiting:false, | |
| 467 | + success: function (res){ | |
| 468 | + that.setData({ | |
| 469 | + babyInfo:postData, | |
| 470 | + 'babyInfo.hospitalName':that.data.queryData.hospital.hospitalName, | |
| 471 | + showViewType:2 | |
| 472 | + }) | |
| 473 | + } | |
| 474 | + }) | |
| 475 | + } else { | |
| 476 | + wx.showModal({ | |
| 477 | + title: '提交失败', | |
| 478 | + content: '错误信息:'+res.data.errormsg, | |
| 479 | + showCancel: false, | |
| 480 | + success: function (res) { | |
| 481 | + } | |
| 482 | + }) | |
| 483 | + } | |
| 466 | 484 | }, function (res) { |
| 467 | 485 | wx.showModal({ |
| 468 | 486 | title: '提交失败', |
littleApp_child/pages/home/css/login.wxss
View file @
c55fa8f
| ... | ... | @@ -75,6 +75,20 @@ |
| 75 | 75 | margin-top: 200px; |
| 76 | 76 | text-align: center; |
| 77 | 77 | } |
| 78 | +.record-back-btn{ | |
| 79 | + font: medium; | |
| 80 | + font-size: 20px; | |
| 81 | + color: white; | |
| 82 | + margin-left: 10px; | |
| 83 | + margin-right: 10px; | |
| 84 | + height: 45px; | |
| 85 | + line-height: 45px; | |
| 86 | + border-radius: 22.5px; | |
| 87 | + background-color: #999999; | |
| 88 | + width: calc(100%-20px); | |
| 89 | + margin-top: 20px; | |
| 90 | + text-align: center; | |
| 91 | +} | |
| 78 | 92 | |
| 79 | 93 | .code-input_bg { |
| 80 | 94 | /*background: beige;*/ |
littleApp_child/pages/home/home.js
View file @
c55fa8f
| ... | ... | @@ -24,6 +24,7 @@ |
| 24 | 24 | var babyCache = [''] |
| 25 | 25 | // 文章的缓存 |
| 26 | 26 | var artCache = [''] |
| 27 | +var hospitalId; | |
| 27 | 28 | |
| 28 | 29 | Page({ |
| 29 | 30 | /*---------属性变量--------*/ |
| ... | ... | @@ -86,6 +87,7 @@ |
| 86 | 87 | }, |
| 87 | 88 | /*---------生命周期--------*/ |
| 88 | 89 | onLoad: function(options) { |
| 90 | + hospitalId = options.hospitalId; | |
| 89 | 91 | this.calculatePageSize() |
| 90 | 92 | |
| 91 | 93 | // 网络监听 |
| ... | ... | @@ -185,9 +187,16 @@ |
| 185 | 187 | |
| 186 | 188 | }, |
| 187 | 189 | toPreDoc () { |
| 188 | - wx.navigateTo({ | |
| 189 | - url: '/packageA/pages/preDocumented/preDocumented' | |
| 190 | - }) | |
| 190 | + if (hospitalId!==null&&hospitalId!==undefined&&hospitalId!==""&&hospitalId===2100001605) { | |
| 191 | + wx.navigateTo({ | |
| 192 | + url: '/packageA/pages/preDocumented/preDocumented?hospitalId=' + hospitalId | |
| 193 | + }) | |
| 194 | + } else { | |
| 195 | + wx.navigateTo({ | |
| 196 | + url: '/packageA/pages/preDocumented/preDocumented' | |
| 197 | + }) | |
| 198 | + } | |
| 199 | + | |
| 191 | 200 | }, |
| 192 | 201 | getNameFocus: function() { |
| 193 | 202 | var self = this |
| ... | ... | @@ -321,6 +330,11 @@ |
| 321 | 330 | |
| 322 | 331 | that.setData({ |
| 323 | 332 | pageType: 1 |
| 333 | + }) | |
| 334 | + }, | |
| 335 | + backHome () { | |
| 336 | + this.setData({ | |
| 337 | + pageType: 3 | |
| 324 | 338 | }) |
| 325 | 339 | }, |
| 326 | 340 | welcomePage() { |
littleApp_child/pages/home/home.wxml
View file @
c55fa8f
| ... | ... | @@ -208,10 +208,10 @@ |
| 208 | 208 | <button class="we_button login" bindtap="toLogin">登录</button> |
| 209 | 209 | <!-- <button class="we_button register" bindtap="toRegister">注册</button> |
| 210 | 210 | <button class="we_button archives" bindtap="toQuickMeasurement">快捷测量</button> --> |
| 211 | - <button class="we_button checkinput" bindtap="toQuickArchives">儿童建档</button> | |
| 212 | - <button class="we_button ilnessArchives" bindtap="toIllnessArchives">儿童疾病建档</button> | |
| 211 | + <!-- <button class="we_button checkinput" bindtap="toQuickArchives">儿童建档</button> | |
| 212 | + <button class="we_button ilnessArchives" bindtap="toIllnessArchives">儿童疾病建档</button>--> | |
| 213 | 213 | <!-- <button class="we_button checkinput" bindtap="toCheckInput">问诊录入</button> --> |
| 214 | - <button class="we_button ilnessArchives" style="margin-left: 5%;" bindtap="toPreDoc">儿童预约建档</button> | |
| 214 | + <button class="we_button archives" bindtap="toPreDoc">儿童预约建档</button> | |
| 215 | 215 | </view> |
| 216 | 216 | |
| 217 | 217 | <!-- <view style='height:108px;'></view> --> |
| ... | ... | @@ -241,6 +241,7 @@ |
| 241 | 241 | |
| 242 | 242 | </view> |
| 243 | 243 | <button class="record-submit-btn" formType="submit">登录</button> |
| 244 | + <button class="record-back-btn" bind:tap="backHome">返回</button> | |
| 244 | 245 | </form> |
| 245 | 246 | </view> |
littleApp_child/utils/network_util.js
View file @
c55fa8f