...
|
...
|
@@ -114,7 +114,8 @@ Page({ |
|
|
star4:'',
|
|
|
explain_pic:[],
|
|
|
bigpic:'',
|
|
|
showpic:false
|
|
|
showpic:false,
|
|
|
scroll:true
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -170,7 +171,7 @@ Page({ |
|
|
*/
|
|
|
onLoad: function(options) {
|
|
|
let that = this;
|
|
|
console.log(options)
|
|
|
console.log(options,'我是optionsoptions')
|
|
|
|
|
|
|
|
|
console.log(wx.getStorageSync('hospitalid'))
|
...
|
...
|
@@ -181,6 +182,13 @@ Page({ |
|
|
})
|
|
|
|
|
|
|
|
|
let token=wx.getStorageSync('token');
|
|
|
console.log('我是token我是token',token)
|
|
|
if(token==''){
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/index/index?hospital_id='+this.data.hostipalid+'&status='+7+'&hospital_address_id='+this.data.hospital_address_id,
|
|
|
})
|
|
|
}
|
|
|
|
|
|
wx.getLocation({
|
|
|
type: 'gcj02',
|
...
|
...
|
@@ -280,18 +288,11 @@ Page({ |
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(999999999)
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: that.data.buildlist
|
|
|
|
|
|
|
|
|
})
|
|
|
} else {
|
|
|
|
|
|
if(res!=''){
|
|
|
let newbuildlist = res;
|
|
|
console.log(newbuildlist)
|
|
|
|
...
|
...
|
@@ -325,6 +326,17 @@ Page({ |
|
|
|
|
|
console.log(that.data.buildlist)
|
|
|
}
|
|
|
// if (res == "") {
|
|
|
// that.setData({
|
|
|
|
|
|
// buildlist: that.data.buildlist
|
|
|
|
|
|
|
|
|
// })
|
|
|
// } else {
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -341,6 +353,9 @@ Page({ |
|
|
|
|
|
beioperaword(e) {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
scroll:true
|
|
|
})
|
|
|
|
|
|
let archives_id = e.currentTarget.dataset.archives_id;
|
|
|
console.log(archives_id)
|
...
|
...
|
@@ -491,40 +506,12 @@ Page({ |
|
|
}
|
|
|
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
homebuildlist: res
|
|
|
})
|
|
|
|
|
|
|
|
|
let newbuildlist = res;
|
|
|
// for (var i = 0; i <=newbuildlist.length; i++) {
|
|
|
// newbuildlist[i].showword = true
|
|
|
|
|
|
// if (newbuildlist[i].content_text.length > 80) {
|
|
|
// newbuildlist[i].openword = true
|
|
|
// newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
// } else {
|
|
|
// newbuildlist[i].openword = false
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// if (newbuildlist[i].content_imgs==null){
|
|
|
|
|
|
// newbuildlist[i].content_imgs=[]
|
|
|
|
|
|
// } else if (newbuildlist[i].content_imgs.length>3){
|
|
|
// newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
// }
|
|
|
|
|
|
// console.log(newbuildlist[i].content_imgs)
|
|
|
|
|
|
// // newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
|
|
|
newbuildlist[i].showword = true
|
...
|
...
|
@@ -552,18 +539,10 @@ Page({ |
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
homebuildlist: newbuildlist
|
|
|
})
|
|
|
console.log(that.data.homebuildlist)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
...
|
...
|
@@ -732,18 +711,19 @@ Page({ |
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log('8877665544332211',res)
|
|
|
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
childbuildlist: that.data.childbuildlist
|
|
|
})
|
|
|
// if (res == "") {
|
|
|
// that.setData({
|
|
|
// childbuildlist: that.data.childbuildlist
|
|
|
// })
|
|
|
|
|
|
return false;
|
|
|
} else {
|
|
|
that.setData({
|
|
|
childbuildlist: that.data.childbuildlist.concat(res)
|
|
|
})
|
|
|
}
|
|
|
// return false;
|
|
|
// } else {
|
|
|
// that.setData({
|
|
|
// childbuildlist: that.data.childbuildlist.concat(res)
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
// that.setData({
|
|
|
// buildlist:[]
|
...
|
...
|
@@ -760,7 +740,7 @@ Page({ |
|
|
// }
|
|
|
|
|
|
|
|
|
let newbuildlist = that.data.childbuildlist;
|
|
|
let newbuildlist =res;
|
|
|
|
|
|
// for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
// newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
...
|
...
|
@@ -808,10 +788,14 @@ Page({ |
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
if(res.length!=0){
|
|
|
that.setData({
|
|
|
childbuildlist: newbuildlist
|
|
|
childbuildlist: that.data.childbuildlist.concat(newbuildlist)
|
|
|
})
|
|
|
}
|
|
|
// that.setData({
|
|
|
// childbuildlist: newbuildlist
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -824,7 +808,9 @@ Page({ |
|
|
//展开收起
|
|
|
fenoperaword(e) {
|
|
|
let that = this;
|
|
|
|
|
|
that.setData({
|
|
|
scroll:true
|
|
|
})
|
|
|
let childbirth_id = e.currentTarget.dataset.childbirth_id;
|
|
|
console.log(childbirth_id)
|
|
|
let showword = e.currentTarget.dataset.showword;
|
...
|
...
|
@@ -2176,46 +2162,13 @@ getremaindoctorlist(){ |
|
|
num:2,
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
blendlist: res
|
|
|
})
|
|
|
|
|
|
// that.setData({
|
|
|
// buildlist:[]
|
|
|
// })
|
|
|
// console.log(res)
|
|
|
// if (res == '') {
|
|
|
// that.setData({
|
|
|
// buildlist: that.data.buildlist
|
|
|
// })
|
|
|
// } else {
|
|
|
// that.setData({
|
|
|
// buildlist: that.data.buildlist.concat(res)
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
|
|
|
let newbuildlist = that.data.blendlist;
|
|
|
|
|
|
// for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
// newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
// newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
// if (newbuildlist[i].production_type == 1) {
|
|
|
// newbuildlist[i].production_type = '顺'
|
|
|
// } else if (newbuildlist[i].production_type == 2) {
|
|
|
// newbuildlist[i].production_type = '剖'
|
|
|
// }
|
|
|
|
|
|
// if (newbuildlist[i].sex == 1) {
|
|
|
// newbuildlist[i].sex = '男宝'
|
|
|
// } else if (newbuildlist[i].sex == 2) {
|
|
|
// newbuildlist[i].sex = '女宝'
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
newbuildlist[i].showword = true
|
|
|
|
...
|
...
|
@@ -2236,22 +2189,16 @@ getremaindoctorlist(){ |
|
|
} else if (newbuildlist[i].production_type == 2) {
|
|
|
newbuildlist[i].production_type = '剖'
|
|
|
}
|
|
|
|
|
|
if (newbuildlist[i].sex == 1) {
|
|
|
newbuildlist[i].sex = '男宝'
|
|
|
} else if (newbuildlist[i].sex == 2) {
|
|
|
newbuildlist[i].sex = '女宝'
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
that.setData({
|
|
|
blendlist: newbuildlist
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
...
|
...
|
@@ -2412,49 +2359,13 @@ getremaindoctorlist(){ |
|
|
token: wx.getStorageSync('token'),
|
|
|
hospital_id: that.data.hostipalid,
|
|
|
page: that.data.koubeipage,
|
|
|
num: 8,
|
|
|
num: 20,
|
|
|
status: that.data.hospitalstatus,
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
hospitalist: that.data.hospitalist.concat(res)
|
|
|
})
|
|
|
|
|
|
// that.setData({
|
|
|
// buildlist:[]
|
|
|
// })
|
|
|
// console.log(res)
|
|
|
// if (res == '') {
|
|
|
// that.setData({
|
|
|
// buildlist: that.data.buildlist
|
|
|
// })
|
|
|
// } else {
|
|
|
// that.setData({
|
|
|
// buildlist: that.data.buildlist.concat(res)
|
|
|
// })
|
|
|
// }
|
|
|
|
|
|
|
|
|
let newbuildlist = that.data.hospitalist;
|
|
|
|
|
|
// for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
// newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
// newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
// if (newbuildlist[i].production_type == 1) {
|
|
|
// newbuildlist[i].production_type = '顺'
|
|
|
// } else if (newbuildlist[i].production_type == 2) {
|
|
|
// newbuildlist[i].production_type = '剖'
|
|
|
// }
|
|
|
|
|
|
// if (newbuildlist[i].sex == 1) {
|
|
|
// newbuildlist[i].sex = '男宝'
|
|
|
// } else if (newbuildlist[i].sex == 2) {
|
|
|
// newbuildlist[i].sex = '女宝'
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
console.log(res,'43834894389348943483483989')
|
|
|
|
|
|
let newbuildlist = res;
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
newbuildlist[i].showword = true
|
|
|
|
...
|
...
|
@@ -2484,9 +2395,20 @@ getremaindoctorlist(){ |
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
if(res.length!=0){
|
|
|
that.setData({
|
|
|
hospitalist: newbuildlist
|
|
|
hospitalist: that.data.hospitalist.concat(newbuildlist)
|
|
|
})
|
|
|
}
|
|
|
console.log(99008877665544322115678900)
|
|
|
|
|
|
|
|
|
|
|
|
// that.setData({
|
|
|
// hospitalist: newbuildlist
|
|
|
// })
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
...
|
...
|
@@ -2496,6 +2418,9 @@ getremaindoctorlist(){ |
|
|
//展开收起
|
|
|
kouoperaword(e) {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
scroll:false
|
|
|
})
|
|
|
|
|
|
let customer_id = e.currentTarget.dataset.customer_id;
|
|
|
console.log(customer_id)
|
...
|
...
|
@@ -2504,14 +2429,14 @@ getremaindoctorlist(){ |
|
|
if (showword == true) {
|
|
|
console.log(9090)
|
|
|
that.setData({
|
|
|
page: 1
|
|
|
page: 1,
|
|
|
})
|
|
|
|
|
|
var url = '/api/portal/hospital/getComment';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
hospital_id: that.data.hostipalid,
|
|
|
page: that.data.homeblendpage,
|
|
|
page: that.data.koubeipage,
|
|
|
num: 8,
|
|
|
status: that.data.hospitalstatus,
|
|
|
}
|
...
|
...
|
@@ -2549,9 +2474,6 @@ getremaindoctorlist(){ |
|
|
|
|
|
|
|
|
if (obj.customer_id == customer_id) {
|
|
|
|
|
|
console.log(obj.archives_id)
|
|
|
console.log(obj.showword)
|
|
|
obj.showword = false;
|
|
|
obj.ccontent_text = obj.ccontent_text;
|
|
|
|
...
|
...
|
@@ -2560,15 +2482,6 @@ getremaindoctorlist(){ |
|
|
} else if (obj.content_imgs.length>3){
|
|
|
obj.content_imgs = obj.content_imgs.slice(0, 3);
|
|
|
}
|
|
|
// if (obj.showword == false) {
|
|
|
|
|
|
// } else {
|
|
|
// obj.showword = true
|
|
|
// obj.content_text = obj.content_text.substring(0, 80);
|
|
|
// obj.content_imgs = obj.content_imgs.slice(0, 3);
|
|
|
// }
|
|
|
|
|
|
|
|
|
} else {
|
|
|
obj.content_text = obj.content_text.substring(0, 80);
|
|
|
if (obj.content_imgs == null) {
|
...
|
...
|
@@ -2578,22 +2491,11 @@ getremaindoctorlist(){ |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
hospitalist: newbuildlist
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
...
|
...
|
@@ -2634,11 +2536,6 @@ getremaindoctorlist(){ |
|
|
|
|
|
}
|
|
|
// let newbuildlist=that.data.buildlist;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
...
|
...
|
@@ -3241,6 +3138,15 @@ getremaindoctorlist(){ |
|
|
that.getbuildlist();
|
|
|
|
|
|
},
|
|
|
onPageScroll (e) {
|
|
|
console.log(e)
|
|
|
this.setData({
|
|
|
scroll:true
|
|
|
})
|
|
|
|
|
|
console.log(this.data.scroll)
|
|
|
},
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
...
|
...
|
@@ -3267,7 +3173,9 @@ getremaindoctorlist(){ |
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function() {
|
|
|
|
|
|
let that = this;
|
|
|
if(that.data.scroll==true){
|
|
|
that.data.buildlistpage++;
|
|
|
that.getbuildlist();
|
|
|
that.data.childbirthpage++;
|
...
|
...
|
@@ -3287,9 +3195,9 @@ getremaindoctorlist(){ |
|
|
that.setData({
|
|
|
doctorpage: newdoctorpage
|
|
|
})
|
|
|
|
|
|
console.log(that.data.doctorpage)
|
|
|
that.getremaindoctorlist()
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
...
|
...
|
@@ -3297,7 +3205,35 @@ getremaindoctorlist(){ |
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
onShareAppMessage: function() {
|
|
|
let that=this;
|
|
|
return {
|
|
|
title: that.data.hosname, // 转发后 所显示的title
|
|
|
// path: '/pages/home/buildtextdetail/buildtextdetail?buildid='+buildid+'&gettoken='+newtoken, // 相对的路径
|
|
|
|
|
|
path:'pages/home/hometail/hometail?hospital_id='+that.data.hostipalid+'&hospital_address_id='+that.data.hospital_address_id,//建档攻略分享1
|
|
|
// path:'',
|
|
|
success: (res)=>{ // 成功后要做的事情
|
|
|
console.log(res)
|
|
|
// console.log(res.shareTickets[0])
|
|
|
// console.log
|
|
|
|
|
|
// wx.getShareInfo({
|
|
|
// shareTicket: res.shareTickets[0],
|
|
|
// success: (res)=> {
|
|
|
// that.setData({
|
|
|
// isShow:true
|
|
|
// })
|
|
|
// console.log(that.setData.isShow)
|
|
|
// },
|
|
|
// fail: function (res) { console.log(res) },
|
|
|
// complete: function (res) { console.log(res) }
|
|
|
// })
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
// 分享失败
|
|
|
console.log(res)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
//口碑点评
|
|
|
publicpraise: function(e) {
|
...
|
...
|
|