diff --git a/littleApp_child/packageA/pages/preDocumented/preDocumented.js b/littleApp_child/packageA/pages/preDocumented/preDocumented.js index 97698ce..b9f2245 100644 --- a/littleApp_child/packageA/pages/preDocumented/preDocumented.js +++ b/littleApp_child/packageA/pages/preDocumented/preDocumented.js @@ -5,6 +5,7 @@ const makePy = require("../../../utils/makepy.js"); const numberUtil = require("../../../utils/numberUtil.js"); import { AreaPicker } from "../../../utils/areaSelector/selector.js" let liveType = ""; +let hospitalId; Page(Object.assign({}, AreaPicker,{ data: { postObj: {}, @@ -114,6 +115,7 @@ Page(Object.assign({}, AreaPicker,{ submiting:false }, onLoad: function (options) { + hospitalId = options.hospitalId; var that = this; networkUtil.showLoading() networkUtil._get(api.getConfigHospitals,{}, function(res) { @@ -123,6 +125,12 @@ Page(Object.assign({}, AreaPicker,{ selectHospital: {}, //{'hospitalId':216,'hospitalName':'秦皇岛市妇幼保健院'}, 'queryData.hospital': {} //{'hospitalId':216,'hospitalName':'秦皇岛市妇幼保健院'} }) + if (hospitalId!==null&&hospitalId!==undefined&&hospitalId!==""&&hospitalId===2100001605) { + that.setData({ + selectHospital: {'hospitalId':2100001605,'hospitalName':'隆化县妇幼保健院'}, + 'queryData.hospital': {'hospitalId':2100001605,'hospitalName':'隆化县妇幼保健院'} + }) + } } }, function(res) { networkUtil.showErrorToast(res.errormsg) @@ -450,19 +458,29 @@ Page(Object.assign({}, AreaPicker,{ }) console.log(postData) networkUtil._post(api.addBuildArticle, postData , (res)=> { - wx.showModal({ - title: '成功提交', - content: "您已成功预约建档", - showCancel: false, - submiting:false, - success: function (res){ - that.setData({ - babyInfo:postData, - 'babyInfo.hospitalName':that.data.queryData.hospital.hospitalName, - showViewType:2 - }) - } - }) + if (0===res.data.errorcode) { + wx.showModal({ + title: '成功提交', + content: "您已成功预约建档", + showCancel: false, + submiting:false, + success: function (res){ + that.setData({ + babyInfo:postData, + 'babyInfo.hospitalName':that.data.queryData.hospital.hospitalName, + showViewType:2 + }) + } + }) + } else { + wx.showModal({ + title: '提交失败', + content: '错误信息:'+res.data.errormsg, + showCancel: false, + success: function (res) { + } + }) + } }, function (res) { wx.showModal({ title: '提交失败', diff --git a/littleApp_child/pages/home/css/login.wxss b/littleApp_child/pages/home/css/login.wxss index 8ec4048..58489f1 100644 --- a/littleApp_child/pages/home/css/login.wxss +++ b/littleApp_child/pages/home/css/login.wxss @@ -75,6 +75,20 @@ page { margin-top: 200px; text-align: center; } +.record-back-btn{ + font: medium; + font-size: 20px; + color: white; + margin-left: 10px; + margin-right: 10px; + height: 45px; + line-height: 45px; + border-radius: 22.5px; + background-color: #999999; + width: calc(100%-20px); + margin-top: 20px; + text-align: center; +} .code-input_bg { /*background: beige;*/ diff --git a/littleApp_child/pages/home/home.js b/littleApp_child/pages/home/home.js index a56d19e..c189c11 100644 --- a/littleApp_child/pages/home/home.js +++ b/littleApp_child/pages/home/home.js @@ -24,6 +24,7 @@ var days; var babyCache = [''] // 文章的缓存 var artCache = [''] +var hospitalId; Page({ /*---------属性变量--------*/ @@ -86,6 +87,7 @@ Page({ }, /*---------生命周期--------*/ onLoad: function(options) { + hospitalId = options.hospitalId; this.calculatePageSize() // 网络监听 @@ -185,9 +187,16 @@ Page({ }, toPreDoc () { - wx.navigateTo({ - url: '/packageA/pages/preDocumented/preDocumented' - }) + if (hospitalId!==null&&hospitalId!==undefined&&hospitalId!==""&&hospitalId===2100001605) { + wx.navigateTo({ + url: '/packageA/pages/preDocumented/preDocumented?hospitalId=' + hospitalId + }) + } else { + wx.navigateTo({ + url: '/packageA/pages/preDocumented/preDocumented' + }) + } + }, getNameFocus: function() { var self = this @@ -323,6 +332,11 @@ Page({ pageType: 1 }) }, + backHome () { + this.setData({ + pageType: 3 + }) + }, welcomePage() { var that = this that.setData({ diff --git a/littleApp_child/pages/home/home.wxml b/littleApp_child/pages/home/home.wxml index 8fc944e..bde3214 100644 --- a/littleApp_child/pages/home/home.wxml +++ b/littleApp_child/pages/home/home.wxml @@ -208,10 +208,10 @@ - - + - + @@ -241,5 +241,6 @@ + diff --git a/littleApp_child/utils/network_util.js b/littleApp_child/utils/network_util.js index 09047c9..1001b86 100644 --- a/littleApp_child/utils/network_util.js +++ b/littleApp_child/utils/network_util.js @@ -4,7 +4,7 @@ // 18382670036 多层次 // 18328537371 陈云 666666 // 0测试环境 1正式环境 2演示环境 3衡水 -var Builing_Release_AppStore = 0; +var Builing_Release_AppStore = 1; // 获取服务器地址 function kServerBaseUrl() { switch (Builing_Release_AppStore) {