作者 lihongjuan

1

@@ -2,7 +2,68 @@ App({ @@ -2,7 +2,68 @@ App({
2 onLaunch: function() { 2 onLaunch: function() {
3 // 展示本地存储能力 3 // 展示本地存储能力
4 var logs = wx.getStorageSync('logs') || [] 4 var logs = wx.getStorageSync('logs') || []
  5 + this.autoUpdate()
5 }, 6 },
  7 +
  8 + autoUpdate:function(){
  9 + console.log(new Date())
  10 + var self=this
  11 + // 获取小程序更新机制兼容
  12 + if (wx.canIUse('getUpdateManager')) {
  13 + const updateManager = wx.getUpdateManager()
  14 + //1. 检查小程序是否有新版本发布
  15 + updateManager.onCheckForUpdate(function (res) {
  16 + console.log('47454874',res)
  17 + // 请求完新版本信息的回调
  18 + if (res.hasUpdate) {
  19 + //2. 小程序有新版本,则静默下载新版本,做好更新准备
  20 + updateManager.onUpdateReady(function () {
  21 + wx.showModal({
  22 + title: '更新提示',
  23 + content: '新版本已经准备好,是否重启应用?',
  24 + success: function (res) {
  25 + if (res.confirm) {
  26 + //3. 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  27 + updateManager.applyUpdate()
  28 + } else if (res.cancel) {
  29 + //如果需要强制更新,则给出二次弹窗,如果不需要,则这里的代码都可以删掉了
  30 + wx.showModal({
  31 + title: '温馨提示~',
  32 + content: '本次版本更新涉及到新的功能添加,旧版本无法正常访问的哦~',
  33 + success: function (res) {
  34 + self.autoUpdate()
  35 +
  36 + //第二次提示后,强制更新
  37 + if (res.confirm) {
  38 + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
  39 + updateManager.applyUpdate()
  40 + } else if (res.cancel) {
  41 + //重新回到版本更新提示
  42 + self.autoUpdate()
  43 + }
  44 + }
  45 + })
  46 + }
  47 + }
  48 + })
  49 + })
  50 + updateManager.onUpdateFailed(function () {
  51 + // 新的版本下载失败
  52 + wx.showModal({
  53 + title: '已经有新版本了哟~',
  54 + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~',
  55 + })
  56 + })
  57 + }
  58 + })
  59 + } else {
  60 + // 如果希望用户在最新版本的客户端上体验您的小程序,可以这样子提示
  61 + wx.showModal({
  62 + title: '提示',
  63 + content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
  64 + })
  65 + }
  66 + },
6 post: function(url, data) { 67 post: function(url, data) {
7 /** 68 /**
8 * 自定义post函数,返回Promise 69 * 自定义post函数,返回Promise
@@ -36,6 +97,7 @@ App({ @@ -36,6 +97,7 @@ App({
36 'content-type': 'application/x-www-form-urlencoded' 97 'content-type': 'application/x-www-form-urlencoded'
37 }, 98 },
38 success: function(res) { //返回取得的数据 99 success: function(res) { //返回取得的数据
  100 + console.log('返回数据',res)
39 if (res.data.code == '1') { 101 if (res.data.code == '1') {
40 resolve(res.data.data); 102 resolve(res.data.data);
41 } else if (res.data.code == '20001') { //返回错误提示信息 103 } else if (res.data.code == '20001') { //返回错误提示信息
@@ -86,25 +148,37 @@ App({ @@ -86,25 +148,37 @@ App({
86 } else if (res.data.code == '0') { 148 } else if (res.data.code == '0') {
87 console.log(res) 149 console.log(res)
88 console.log(888) 150 console.log(888)
89 - if (res.data.msg =='缺少必要参数:TOKEN'){  
90 - wx.showToast({  
91 - title: '请重新登陆',  
92 - icon: 'none'  
93 - })  
94 - wx.setStorageSync("token", '')  
95 -  
96 - setTimeout(function(){  
97 - wx.navigateTo({  
98 - url: '/pages/index/index',  
99 - })  
100 - },1500)  
101 - } 151 + // if (res.data.msg =='缺少必要参数:TOKEN'){
  152 + // wx.showToast({
  153 + // title: '请重新登陆',
  154 + // icon: 'none'
  155 + // })
  156 + // wx.setStorageSync("token", '')
  157 +
  158 + // setTimeout(function(){
  159 + // wx.navigateTo({
  160 + // url: '/pages/index/index',
  161 + // })
  162 + // },1500)
  163 + // }
102 164
103 165
104 166
105 - reject(res) 167 + // reject(res)
106 168
107 169
  170 + }else if(res.data.code == '403'){
  171 +
  172 + wx.showToast({
  173 + title:'登录过期,请重新登录',
  174 + icon:'none'
  175 + })
  176 + wx.removeStorageSync('token');
  177 + setTimeout(function(){
  178 + wx.reLaunch({
  179 + url:"/pages/index/index"
  180 + })
  181 + },1500)
108 } else { 182 } else {
109 reject(res) 183 reject(res)
110 } 184 }
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/homepage/homepage", 3 "pages/homepage/homepage",
  4 + "pages/home/sellidel/sellidel",
  5 +
4 "pages/home/stageofpregnancy/stageofpregnancy", 6 "pages/home/stageofpregnancy/stageofpregnancy",
5 "pages/index/index", 7 "pages/index/index",
6 "pages/home/searchpage/searchpage", 8 "pages/home/searchpage/searchpage",
@@ -23,7 +25,7 @@ @@ -23,7 +25,7 @@
23 25
24 "pages/home/used/used", 26 "pages/home/used/used",
25 "pages/home/mypublish/mypublish", 27 "pages/home/mypublish/mypublish",
26 - "pages/home/sellidel/sellidel", 28 +
27 "pages/partneritem/afterchildbirthrecover/afterchildbirthrecover", 29 "pages/partneritem/afterchildbirthrecover/afterchildbirthrecover",
28 "pages/partneritem/afterchildbirth/afterchildbirth", 30 "pages/partneritem/afterchildbirth/afterchildbirth",
29 "pages/partneritem/sureorder/sureorder", 31 "pages/partneritem/sureorder/sureorder",
@@ -114,7 +114,8 @@ Page({ @@ -114,7 +114,8 @@ Page({
114 star4:'', 114 star4:'',
115 explain_pic:[], 115 explain_pic:[],
116 bigpic:'', 116 bigpic:'',
117 - showpic:false 117 + showpic:false,
  118 + scroll:true
118 119
119 120
120 121
@@ -170,7 +171,7 @@ Page({ @@ -170,7 +171,7 @@ Page({
170 */ 171 */
171 onLoad: function(options) { 172 onLoad: function(options) {
172 let that = this; 173 let that = this;
173 - console.log(options) 174 + console.log(options,'我是optionsoptions')
174 175
175 176
176 console.log(wx.getStorageSync('hospitalid')) 177 console.log(wx.getStorageSync('hospitalid'))
@@ -179,8 +180,15 @@ Page({ @@ -179,8 +180,15 @@ Page({
179 hospital_address_id: options.hospital_address_id, 180 hospital_address_id: options.hospital_address_id,
180 hostipalid:options.hospital_id 181 hostipalid:options.hospital_id
181 }) 182 })
  183 +
182 184
183 - 185 + let token=wx.getStorageSync('token');
  186 + console.log('我是token我是token',token)
  187 + if(token==''){
  188 + wx.navigateTo({
  189 + url: '/pages/index/index?hospital_id='+this.data.hostipalid+'&status='+7+'&hospital_address_id='+this.data.hospital_address_id,
  190 + })
  191 + }
184 192
185 wx.getLocation({ 193 wx.getLocation({
186 type: 'gcj02', 194 type: 'gcj02',
@@ -280,18 +288,11 @@ Page({ @@ -280,18 +288,11 @@ Page({
280 hospital_address_id: that.data.hospital_address_id 288 hospital_address_id: that.data.hospital_address_id
281 } 289 }
282 app.post(url, params).then((res) => { 290 app.post(url, params).then((res) => {
  291 + console.log(999999999)
283 292
284 console.log(res) 293 console.log(res)
285 console.log(that.data.buildlist) 294 console.log(that.data.buildlist)
286 - if (res == "") {  
287 - that.setData({  
288 -  
289 - buildlist: that.data.buildlist  
290 -  
291 -  
292 - })  
293 - } else {  
294 - 295 + if(res!=''){
295 let newbuildlist = res; 296 let newbuildlist = res;
296 console.log(newbuildlist) 297 console.log(newbuildlist)
297 298
@@ -325,6 +326,17 @@ Page({ @@ -325,6 +326,17 @@ Page({
325 326
326 console.log(that.data.buildlist) 327 console.log(that.data.buildlist)
327 } 328 }
  329 + // if (res == "") {
  330 + // that.setData({
  331 +
  332 + // buildlist: that.data.buildlist
  333 +
  334 +
  335 + // })
  336 + // } else {
  337 +
  338 +
  339 + // }
328 340
329 341
330 342
@@ -341,6 +353,9 @@ Page({ @@ -341,6 +353,9 @@ Page({
341 353
342 beioperaword(e) { 354 beioperaword(e) {
343 let that = this; 355 let that = this;
  356 + that.setData({
  357 + scroll:true
  358 + })
344 359
345 let archives_id = e.currentTarget.dataset.archives_id; 360 let archives_id = e.currentTarget.dataset.archives_id;
346 console.log(archives_id) 361 console.log(archives_id)
@@ -491,40 +506,12 @@ Page({ @@ -491,40 +506,12 @@ Page({
491 } 506 }
492 507
493 app.post(url, params).then((res) => { 508 app.post(url, params).then((res) => {
  509 +
494 console.log(res) 510 console.log(res)
495 that.setData({ 511 that.setData({
496 homebuildlist: res 512 homebuildlist: res
497 }) 513 })
498 -  
499 -  
500 let newbuildlist = res; 514 let newbuildlist = res;
501 - // for (var i = 0; i <=newbuildlist.length; i++) {  
502 - // newbuildlist[i].showword = true  
503 -  
504 - // if (newbuildlist[i].content_text.length > 80) {  
505 - // newbuildlist[i].openword = true  
506 - // newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);  
507 - // } else {  
508 - // newbuildlist[i].openword = false  
509 - // }  
510 -  
511 -  
512 -  
513 - // if (newbuildlist[i].content_imgs==null){  
514 -  
515 - // newbuildlist[i].content_imgs=[]  
516 -  
517 - // } else if (newbuildlist[i].content_imgs.length>3){  
518 - // newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);  
519 - // }  
520 -  
521 - // console.log(newbuildlist[i].content_imgs)  
522 -  
523 - // // newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);  
524 -  
525 -  
526 - // }  
527 -  
528 for (var i = 0; i < newbuildlist.length; i++) { 515 for (var i = 0; i < newbuildlist.length; i++) {
529 516
530 newbuildlist[i].showword = true 517 newbuildlist[i].showword = true
@@ -552,18 +539,10 @@ Page({ @@ -552,18 +539,10 @@ Page({
552 539
553 } 540 }
554 541
555 -  
556 -  
557 that.setData({ 542 that.setData({
558 homebuildlist: newbuildlist 543 homebuildlist: newbuildlist
559 }) 544 })
560 console.log(that.data.homebuildlist) 545 console.log(that.data.homebuildlist)
561 -  
562 -  
563 -  
564 -  
565 -  
566 -  
567 }).catch((err) => { 546 }).catch((err) => {
568 547
569 }) 548 })
@@ -732,18 +711,19 @@ Page({ @@ -732,18 +711,19 @@ Page({
732 hospital_address_id: that.data.hospital_address_id 711 hospital_address_id: that.data.hospital_address_id
733 } 712 }
734 app.post(url, params).then((res) => { 713 app.post(url, params).then((res) => {
  714 + console.log('8877665544332211',res)
  715 +
  716 + // if (res == "") {
  717 + // that.setData({
  718 + // childbuildlist: that.data.childbuildlist
  719 + // })
735 720
736 - if (res == "") {  
737 - that.setData({  
738 - childbuildlist: that.data.childbuildlist  
739 - })  
740 -  
741 - return false;  
742 - } else {  
743 - that.setData({  
744 - childbuildlist: that.data.childbuildlist.concat(res)  
745 - })  
746 - } 721 + // return false;
  722 + // } else {
  723 + // that.setData({
  724 + // childbuildlist: that.data.childbuildlist.concat(res)
  725 + // })
  726 + // }
747 727
748 // that.setData({ 728 // that.setData({
749 // buildlist:[] 729 // buildlist:[]
@@ -760,7 +740,7 @@ Page({ @@ -760,7 +740,7 @@ Page({
760 // } 740 // }
761 741
762 742
763 - let newbuildlist = that.data.childbuildlist; 743 + let newbuildlist =res;
764 744
765 // for (var i = 0; i < newbuildlist.length; i++) { 745 // for (var i = 0; i < newbuildlist.length; i++) {
766 // newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80); 746 // newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
@@ -808,10 +788,14 @@ Page({ @@ -808,10 +788,14 @@ Page({
808 788
809 789
810 } 790 }
811 -  
812 - that.setData({  
813 - childbuildlist: newbuildlist  
814 - }) 791 + if(res.length!=0){
  792 + that.setData({
  793 + childbuildlist: that.data.childbuildlist.concat(newbuildlist)
  794 + })
  795 + }
  796 + // that.setData({
  797 + // childbuildlist: newbuildlist
  798 + // })
815 799
816 800
817 801
@@ -824,7 +808,9 @@ Page({ @@ -824,7 +808,9 @@ Page({
824 //展开收起 808 //展开收起
825 fenoperaword(e) { 809 fenoperaword(e) {
826 let that = this; 810 let that = this;
827 - 811 + that.setData({
  812 + scroll:true
  813 + })
828 let childbirth_id = e.currentTarget.dataset.childbirth_id; 814 let childbirth_id = e.currentTarget.dataset.childbirth_id;
829 console.log(childbirth_id) 815 console.log(childbirth_id)
830 let showword = e.currentTarget.dataset.showword; 816 let showword = e.currentTarget.dataset.showword;
@@ -2176,46 +2162,13 @@ getremaindoctorlist(){ @@ -2176,46 +2162,13 @@ getremaindoctorlist(){
2176 num:2, 2162 num:2,
2177 } 2163 }
2178 app.post(url, params).then((res) => { 2164 app.post(url, params).then((res) => {
  2165 +
2179 console.log(res) 2166 console.log(res)
2180 that.setData({ 2167 that.setData({
2181 blendlist: res 2168 blendlist: res
2182 }) 2169 })
2183 -  
2184 - // that.setData({  
2185 - // buildlist:[]  
2186 - // })  
2187 - // console.log(res)  
2188 - // if (res == '') {  
2189 - // that.setData({  
2190 - // buildlist: that.data.buildlist  
2191 - // })  
2192 - // } else {  
2193 - // that.setData({  
2194 - // buildlist: that.data.buildlist.concat(res)  
2195 - // })  
2196 - // }  
2197 -  
2198 -  
2199 let newbuildlist = that.data.blendlist; 2170 let newbuildlist = that.data.blendlist;
2200 2171
2201 - // for (var i = 0; i < newbuildlist.length; i++) {  
2202 - // newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);  
2203 - // newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);  
2204 - // if (newbuildlist[i].production_type == 1) {  
2205 - // newbuildlist[i].production_type = '顺'  
2206 - // } else if (newbuildlist[i].production_type == 2) {  
2207 - // newbuildlist[i].production_type = '剖'  
2208 - // }  
2209 -  
2210 - // if (newbuildlist[i].sex == 1) {  
2211 - // newbuildlist[i].sex = '男宝'  
2212 - // } else if (newbuildlist[i].sex == 2) {  
2213 - // newbuildlist[i].sex = '女宝'  
2214 - // }  
2215 -  
2216 - // }  
2217 -  
2218 -  
2219 for (var i = 0; i < newbuildlist.length; i++) { 2172 for (var i = 0; i < newbuildlist.length; i++) {
2220 newbuildlist[i].showword = true 2173 newbuildlist[i].showword = true
2221 2174
@@ -2236,22 +2189,16 @@ getremaindoctorlist(){ @@ -2236,22 +2189,16 @@ getremaindoctorlist(){
2236 } else if (newbuildlist[i].production_type == 2) { 2189 } else if (newbuildlist[i].production_type == 2) {
2237 newbuildlist[i].production_type = '剖' 2190 newbuildlist[i].production_type = '剖'
2238 } 2191 }
2239 -  
2240 if (newbuildlist[i].sex == 1) { 2192 if (newbuildlist[i].sex == 1) {
2241 newbuildlist[i].sex = '男宝' 2193 newbuildlist[i].sex = '男宝'
2242 } else if (newbuildlist[i].sex == 2) { 2194 } else if (newbuildlist[i].sex == 2) {
2243 newbuildlist[i].sex = '女宝' 2195 newbuildlist[i].sex = '女宝'
2244 } 2196 }
2245 -  
2246 -  
2247 } 2197 }
2248 -  
2249 that.setData({ 2198 that.setData({
2250 blendlist: newbuildlist 2199 blendlist: newbuildlist
2251 }) 2200 })
2252 2201
2253 -  
2254 -  
2255 }).catch((err) => { 2202 }).catch((err) => {
2256 2203
2257 }) 2204 })
@@ -2412,49 +2359,13 @@ getremaindoctorlist(){ @@ -2412,49 +2359,13 @@ getremaindoctorlist(){
2412 token: wx.getStorageSync('token'), 2359 token: wx.getStorageSync('token'),
2413 hospital_id: that.data.hostipalid, 2360 hospital_id: that.data.hostipalid,
2414 page: that.data.koubeipage, 2361 page: that.data.koubeipage,
2415 - num: 8, 2362 + num: 20,
2416 status: that.data.hospitalstatus, 2363 status: that.data.hospitalstatus,
2417 } 2364 }
2418 app.post(url, params).then((res) => { 2365 app.post(url, params).then((res) => {
2419 - console.log(res)  
2420 - that.setData({  
2421 - hospitalist: that.data.hospitalist.concat(res)  
2422 - })  
2423 -  
2424 - // that.setData({  
2425 - // buildlist:[]  
2426 - // })  
2427 - // console.log(res)  
2428 - // if (res == '') {  
2429 - // that.setData({  
2430 - // buildlist: that.data.buildlist  
2431 - // })  
2432 - // } else {  
2433 - // that.setData({  
2434 - // buildlist: that.data.buildlist.concat(res)  
2435 - // })  
2436 - // }  
2437 -  
2438 -  
2439 - let newbuildlist = that.data.hospitalist;  
2440 -  
2441 - // for (var i = 0; i < newbuildlist.length; i++) {  
2442 - // newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);  
2443 - // newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);  
2444 - // if (newbuildlist[i].production_type == 1) {  
2445 - // newbuildlist[i].production_type = '顺'  
2446 - // } else if (newbuildlist[i].production_type == 2) {  
2447 - // newbuildlist[i].production_type = '剖'  
2448 - // }  
2449 -  
2450 - // if (newbuildlist[i].sex == 1) {  
2451 - // newbuildlist[i].sex = '男宝'  
2452 - // } else if (newbuildlist[i].sex == 2) {  
2453 - // newbuildlist[i].sex = '女宝'  
2454 - // }  
2455 -  
2456 - // } 2366 + console.log(res,'43834894389348943483483989')
2457 2367
  2368 + let newbuildlist = res;
2458 for (var i = 0; i < newbuildlist.length; i++) { 2369 for (var i = 0; i < newbuildlist.length; i++) {
2459 newbuildlist[i].showword = true 2370 newbuildlist[i].showword = true
2460 2371
@@ -2484,9 +2395,20 @@ getremaindoctorlist(){ @@ -2484,9 +2395,20 @@ getremaindoctorlist(){
2484 2395
2485 2396
2486 } 2397 }
2487 - that.setData({  
2488 - hospitalist: newbuildlist  
2489 - }) 2398 +
  2399 +
  2400 + if(res.length!=0){
  2401 + that.setData({
  2402 + hospitalist: that.data.hospitalist.concat(newbuildlist)
  2403 + })
  2404 + }
  2405 + console.log(99008877665544322115678900)
  2406 +
  2407 +
  2408 +
  2409 + // that.setData({
  2410 + // hospitalist: newbuildlist
  2411 + // })
2490 }).catch((err) => { 2412 }).catch((err) => {
2491 2413
2492 }) 2414 })
@@ -2496,6 +2418,9 @@ getremaindoctorlist(){ @@ -2496,6 +2418,9 @@ getremaindoctorlist(){
2496 //展开收起 2418 //展开收起
2497 kouoperaword(e) { 2419 kouoperaword(e) {
2498 let that = this; 2420 let that = this;
  2421 + that.setData({
  2422 + scroll:false
  2423 + })
2499 2424
2500 let customer_id = e.currentTarget.dataset.customer_id; 2425 let customer_id = e.currentTarget.dataset.customer_id;
2501 console.log(customer_id) 2426 console.log(customer_id)
@@ -2504,14 +2429,14 @@ getremaindoctorlist(){ @@ -2504,14 +2429,14 @@ getremaindoctorlist(){
2504 if (showword == true) { 2429 if (showword == true) {
2505 console.log(9090) 2430 console.log(9090)
2506 that.setData({ 2431 that.setData({
2507 - page: 1 2432 + page: 1,
2508 }) 2433 })
2509 2434
2510 var url = '/api/portal/hospital/getComment'; 2435 var url = '/api/portal/hospital/getComment';
2511 var params = { 2436 var params = {
2512 token: wx.getStorageSync('token'), 2437 token: wx.getStorageSync('token'),
2513 hospital_id: that.data.hostipalid, 2438 hospital_id: that.data.hostipalid,
2514 - page: that.data.homeblendpage, 2439 + page: that.data.koubeipage,
2515 num: 8, 2440 num: 8,
2516 status: that.data.hospitalstatus, 2441 status: that.data.hospitalstatus,
2517 } 2442 }
@@ -2549,9 +2474,6 @@ getremaindoctorlist(){ @@ -2549,9 +2474,6 @@ getremaindoctorlist(){
2549 2474
2550 2475
2551 if (obj.customer_id == customer_id) { 2476 if (obj.customer_id == customer_id) {
2552 -  
2553 - console.log(obj.archives_id)  
2554 - console.log(obj.showword)  
2555 obj.showword = false; 2477 obj.showword = false;
2556 obj.ccontent_text = obj.ccontent_text; 2478 obj.ccontent_text = obj.ccontent_text;
2557 2479
@@ -2560,15 +2482,6 @@ getremaindoctorlist(){ @@ -2560,15 +2482,6 @@ getremaindoctorlist(){
2560 } else if (obj.content_imgs.length>3){ 2482 } else if (obj.content_imgs.length>3){
2561 obj.content_imgs = obj.content_imgs.slice(0, 3); 2483 obj.content_imgs = obj.content_imgs.slice(0, 3);
2562 } 2484 }
2563 - // if (obj.showword == false) {  
2564 -  
2565 - // } else {  
2566 - // obj.showword = true  
2567 - // obj.content_text = obj.content_text.substring(0, 80);  
2568 - // obj.content_imgs = obj.content_imgs.slice(0, 3);  
2569 - // }  
2570 -  
2571 -  
2572 } else { 2485 } else {
2573 obj.content_text = obj.content_text.substring(0, 80); 2486 obj.content_text = obj.content_text.substring(0, 80);
2574 if (obj.content_imgs == null) { 2487 if (obj.content_imgs == null) {
@@ -2578,22 +2491,11 @@ getremaindoctorlist(){ @@ -2578,22 +2491,11 @@ getremaindoctorlist(){
2578 } 2491 }
2579 } 2492 }
2580 2493
2581 -  
2582 } 2494 }
2583 -  
2584 -  
2585 -  
2586 -  
2587 that.setData({ 2495 that.setData({
2588 hospitalist: newbuildlist 2496 hospitalist: newbuildlist
2589 }) 2497 })
2590 2498
2591 -  
2592 -  
2593 -  
2594 -  
2595 -  
2596 -  
2597 }).catch((err) => { 2499 }).catch((err) => {
2598 2500
2599 }) 2501 })
@@ -2634,11 +2536,6 @@ getremaindoctorlist(){ @@ -2634,11 +2536,6 @@ getremaindoctorlist(){
2634 2536
2635 } 2537 }
2636 // let newbuildlist=that.data.buildlist; 2538 // let newbuildlist=that.data.buildlist;
2637 -  
2638 -  
2639 -  
2640 -  
2641 -  
2642 }, 2539 },
2643 2540
2644 2541
@@ -3241,6 +3138,15 @@ getremaindoctorlist(){ @@ -3241,6 +3138,15 @@ getremaindoctorlist(){
3241 that.getbuildlist(); 3138 that.getbuildlist();
3242 3139
3243 }, 3140 },
  3141 + onPageScroll (e) {
  3142 + console.log(e)
  3143 + this.setData({
  3144 + scroll:true
  3145 + })
  3146 +
  3147 + console.log(this.data.scroll)
  3148 + },
  3149 +
3244 3150
3245 /** 3151 /**
3246 * 生命周期函数--监听页面隐藏 3152 * 生命周期函数--监听页面隐藏
@@ -3267,37 +3173,67 @@ getremaindoctorlist(){ @@ -3267,37 +3173,67 @@ getremaindoctorlist(){
3267 * 页面上拉触底事件的处理函数 3173 * 页面上拉触底事件的处理函数
3268 */ 3174 */
3269 onReachBottom: function() { 3175 onReachBottom: function() {
  3176 +
3270 let that = this; 3177 let that = this;
3271 - that.data.buildlistpage++;  
3272 - that.getbuildlist();  
3273 - that.data.childbirthpage++;  
3274 - that.getchildinfo();  
3275 -  
3276 - // that.data.hospitalpage++;  
3277 - that.data.homeblendpage++;  
3278 - that.gethospitallist();  
3279 - 3178 + if(that.data.scroll==true){
  3179 + that.data.buildlistpage++;
  3180 + that.getbuildlist();
  3181 + that.data.childbirthpage++;
  3182 + that.getchildinfo();
3280 3183
3281 -  
3282 -  
3283 - 3184 + // that.data.hospitalpage++;
  3185 + that.data.homeblendpage++;
  3186 + that.gethospitallist();
  3187 +
  3188 +
  3189 +
  3190 +
  3191 +
  3192 +
  3193 + let newdoctorpage = that.data.doctorpage;
  3194 + newdoctorpage = newdoctorpage+1
  3195 + that.setData({
  3196 + doctorpage: newdoctorpage
  3197 + })
  3198 + console.log(that.data.doctorpage)
  3199 + that.getremaindoctorlist()
  3200 + }
3284 3201
3285 - let newdoctorpage = that.data.doctorpage;  
3286 - newdoctorpage = newdoctorpage+1  
3287 - that.setData({  
3288 - doctorpage: newdoctorpage  
3289 - })  
3290 -  
3291 - console.log(that.data.doctorpage)  
3292 - that.getremaindoctorlist()  
3293 -  
3294 }, 3202 },
3295 3203
3296 /** 3204 /**
3297 * 用户点击右上角分享 3205 * 用户点击右上角分享
3298 */ 3206 */
3299 onShareAppMessage: function() { 3207 onShareAppMessage: function() {
3300 - 3208 + let that=this;
  3209 + return {
  3210 + title: that.data.hosname, // 转发后 所显示的title
  3211 + // path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
  3212 +
  3213 + path:'pages/home/hometail/hometail?hospital_id='+that.data.hostipalid+'&hospital_address_id='+that.data.hospital_address_id,//建档攻略分享1
  3214 + // path:'',
  3215 + success: (res)=>{ // 成功后要做的事情
  3216 + console.log(res)
  3217 + // console.log(res.shareTickets[0])
  3218 + // console.log
  3219 +
  3220 + // wx.getShareInfo({
  3221 + // shareTicket: res.shareTickets[0],
  3222 + // success: (res)=> {
  3223 + // that.setData({
  3224 + // isShow:true
  3225 + // })
  3226 + // console.log(that.setData.isShow)
  3227 + // },
  3228 + // fail: function (res) { console.log(res) },
  3229 + // complete: function (res) { console.log(res) }
  3230 + // })
  3231 + },
  3232 + fail: function (res) {
  3233 + // 分享失败
  3234 + console.log(res)
  3235 + }
  3236 + }
3301 }, 3237 },
3302 //口碑点评 3238 //口碑点评
3303 publicpraise: function(e) { 3239 publicpraise: function(e) {
@@ -10,7 +10,9 @@ Page({ @@ -10,7 +10,9 @@ Page({
10 doctorid: '', 10 doctorid: '',
11 hospid: '', 11 hospid: '',
12 activeid: '', 12 activeid: '',
13 - goodtail_id: '' 13 + goodtail_id: '',
  14 + hospital_id:'',
  15 + hospital_address_id:''
14 }, 16 },
15 17
16 18
@@ -30,7 +32,12 @@ Page({ @@ -30,7 +32,12 @@ Page({
30 buildid: options.buildid, 32 buildid: options.buildid,
31 }) 33 })
32 } 34 }
33 - 35 + if(options.hospital_id!=undefined){
  36 + this.setData({
  37 + hospital_id:options.hospital_id,
  38 + hospital_address_id:options.hospital_address_id
  39 + })
  40 + }
34 if (options.childrenid!=undefined){ 41 if (options.childrenid!=undefined){
35 this.setData({ 42 this.setData({
36 childrenid: options.childrenid, 43 childrenid: options.childrenid,
@@ -122,7 +129,11 @@ Page({ @@ -122,7 +129,11 @@ Page({
122 wx.navigateTo({ 129 wx.navigateTo({
123 url: "/pages/home/goodtail/goodtail_id?goodtail_id=" + goodtail_id, 130 url: "/pages/home/goodtail/goodtail_id?goodtail_id=" + goodtail_id,
124 }) 131 })
125 - }else{ 132 + }else if(that.data.status==7){
  133 + wx.navigateTo({
  134 + url: "/pages/home/hometail/hometail?hospital_id=" + that.data.hospital_id+'&hospital_address_id='+that.data.hospital_address_id,
  135 + })
  136 + } else{
126 wx.switchTab({ 137 wx.switchTab({
127 url: '/pages/homepage/homepage', 138 url: '/pages/homepage/homepage',
128 }) 139 })
@@ -39,6 +39,10 @@ @@ -39,6 +39,10 @@
39 "currentL": -1, 39 "currentL": -1,
40 "list": [] 40 "list": []
41 }, 41 },
  42 + "gamePlugin": {
  43 + "current": -1,
  44 + "list": []
  45 + },
42 "miniprogram": { 46 "miniprogram": {
43 "current": 5, 47 "current": 5,
44 "list": [ 48 "list": [
@@ -75,7 +79,28 @@ @@ -75,7 +79,28 @@
75 { 79 {
76 "id": -1, 80 "id": -1,
77 "name": "我的订单", 81 "name": "我的订单",
78 - "pathName": "pages/person/myOrder/myOrder" 82 + "pathName": "pages/person/myOrder/myOrder",
  83 + "query": ""
  84 + },
  85 + {
  86 + "id": -1,
  87 + "name": "pages/homepage/homepage",
  88 + "pathName": "pages/homepage/homepage",
  89 + "query": "",
  90 + "scene": null
  91 + },
  92 + {
  93 + "id": -1,
  94 + "name": "pages/homepage/homepage",
  95 + "pathName": "pages/homepage/homepage",
  96 + "query": "",
  97 + "scene": null
  98 + },
  99 + {
  100 + "id": -1,
  101 + "name": "pages/homepage/homepage",
  102 + "pathName": "pages/homepage/homepage",
  103 + "scene": null
79 } 104 }
80 ] 105 ]
81 } 106 }