...
|
...
|
@@ -18,174 +18,340 @@ Page({ |
|
|
duration: 1000,
|
|
|
currentSwiper: 0,
|
|
|
//图文编辑大图片和小图片
|
|
|
edit_img:[
|
|
|
edit_img: [
|
|
|
'http://pi4orwnti.bkt.clouddn.com/editbig@2x.png',
|
|
|
'http://pi4orwnti.bkt.clouddn.com/editbig@2x.png',
|
|
|
'http://pi4orwnti.bkt.clouddn.com/editbig@2x.png',
|
|
|
],
|
|
|
status:1,
|
|
|
page:1,
|
|
|
num:5,
|
|
|
buildlist:[],
|
|
|
|
|
|
keyword:'',
|
|
|
archives_id:'',
|
|
|
//是否收藏
|
|
|
if_collect:'',
|
|
|
//是否点赞
|
|
|
if_touch:'',
|
|
|
isfirst:true,
|
|
|
hospital_address_id:'',
|
|
|
status: 1,
|
|
|
page: 1,
|
|
|
num: 5,
|
|
|
buildlist: [],
|
|
|
|
|
|
keyword: '',
|
|
|
archives_id: '',
|
|
|
//是否收藏
|
|
|
if_collect: '',
|
|
|
//是否点赞
|
|
|
if_touch: '',
|
|
|
isfirst: true,
|
|
|
hospital_address_id: '',
|
|
|
},
|
|
|
onLoad: function (options) {
|
|
|
console.log(options)
|
|
|
let that=this;
|
|
|
that.getbanner();
|
|
|
onLoad: function(options) {
|
|
|
console.log(options)
|
|
|
let that = this;
|
|
|
that.getbanner();
|
|
|
|
|
|
that.setData({
|
|
|
hospital_address_id: options.hospital_address_id
|
|
|
})
|
|
|
that.setData({
|
|
|
hospital_address_id: options.hospital_address_id
|
|
|
})
|
|
|
|
|
|
this.getlist()
|
|
|
|
|
|
// that.getlist(function(data){
|
|
|
// // console.log(data)
|
|
|
// // that.data.buildlist=data;
|
|
|
this.getlist()
|
|
|
|
|
|
// });
|
|
|
console.log(that.data.buildlist)
|
|
|
},
|
|
|
// that.getlist(function(data){
|
|
|
// // console.log(data)
|
|
|
// // that.data.buildlist=data;
|
|
|
|
|
|
// });
|
|
|
console.log(that.data.buildlist)
|
|
|
},
|
|
|
|
|
|
viewImg(e) {
|
|
|
let that=this;
|
|
|
let that = this;
|
|
|
console.log(e)
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
let archives_id = that.data.archives_id;
|
|
|
let paridx = e.currentTarget.dataset.paridx
|
|
|
console.log(paridx)
|
|
|
console.log(that.data.buildlist)
|
|
|
let img=[];
|
|
|
for (var i=0;i<that.data.buildlist.length;i++){
|
|
|
let img = [];
|
|
|
for (var i = 0; i < that.data.buildlist.length; i++) {
|
|
|
|
|
|
if (i==paridx){
|
|
|
if (i == paridx) {
|
|
|
console.log(9090)
|
|
|
img = that.data.buildlist[i].content_imgs;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
console.log(img)
|
|
|
wx.previewImage({
|
|
|
current: img[index],
|
|
|
urls: img,
|
|
|
success: function (res) { },
|
|
|
fail: function (res) { },
|
|
|
complete: function (res) { },
|
|
|
success: function(res) {},
|
|
|
fail: function(res) {},
|
|
|
complete: function(res) {},
|
|
|
})
|
|
|
},
|
|
|
|
|
|
enter(e){
|
|
|
let that=this;
|
|
|
let url=e.currentTarget.dataset.url;
|
|
|
enter(e) {
|
|
|
let that = this;
|
|
|
let url = e.currentTarget.dataset.url;
|
|
|
console.log(e.currentTarget.dataset.id);
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url: '../../sharepage/sharepage?url=' + url,
|
|
|
})
|
|
|
// if (e.currentTarget.dataset.id==0){
|
|
|
|
|
|
|
|
|
// that.enterurl()
|
|
|
// }else{
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
},
|
|
|
|
|
|
enterurl(){
|
|
|
wx.navigateTo({
|
|
|
url: '../../processQuery/processQuery',
|
|
|
})
|
|
|
enterurl() {
|
|
|
wx.navigateTo({
|
|
|
url: '../../processQuery/processQuery',
|
|
|
})
|
|
|
},
|
|
|
swiperChange: function (e) {
|
|
|
swiperChange: function(e) {
|
|
|
this.setData({
|
|
|
currentSwiper: e.detail.current
|
|
|
})
|
|
|
},
|
|
|
|
|
|
//获取banner图
|
|
|
getbanner:function(){
|
|
|
let that=this;
|
|
|
var url = '/api/portal/archives/getBanner';
|
|
|
var params = {
|
|
|
//获取banner图
|
|
|
getbanner: function() {
|
|
|
let that = this;
|
|
|
var url = '/api/portal/archives/getBanner';
|
|
|
var params = {
|
|
|
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res[0]);
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res[0]);
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
imgUrls: res[0].items
|
|
|
})
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//搜索
|
|
|
search: function(e) {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
keyword: e.detail.value
|
|
|
})
|
|
|
|
|
|
if (e.detail.value == "" || e.detail.value == null) {
|
|
|
that.searchlist()
|
|
|
}
|
|
|
},
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
imgUrls:res[0].items
|
|
|
})
|
|
|
searchlist: function() {
|
|
|
var that = this;
|
|
|
// that.getlist()
|
|
|
that.setData({
|
|
|
page: 1,
|
|
|
buildlist: []
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
page: that.data.page,
|
|
|
num: that.data.num,
|
|
|
status: that.data.status,
|
|
|
keyword: that.data.keyword,
|
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: []
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//搜索
|
|
|
search:function(e){
|
|
|
let that=this;
|
|
|
that.setData({
|
|
|
keyword:e.detail.value
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: res
|
|
|
|
|
|
|
|
|
})
|
|
|
}
|
|
|
|
|
|
|
|
|
let newbuildlist = that.data.buildlist;
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
|
|
|
newbuildlist[i].showword = true
|
|
|
|
|
|
if (newbuildlist[i].content_text.length > 80) {
|
|
|
console.log(1)
|
|
|
newbuildlist[i].openword = true
|
|
|
newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
} else {
|
|
|
console.log(2)
|
|
|
newbuildlist[i].openword = false
|
|
|
}
|
|
|
|
|
|
if (newbuildlist[i].content_imgs == null) {
|
|
|
console.log(3)
|
|
|
newbuildlist[i].content_imgs = []
|
|
|
} else {
|
|
|
newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
}
|
|
|
|
|
|
if(e.detail.value==""||e.detail.value==null){
|
|
|
that.searchlist()
|
|
|
}
|
|
|
},
|
|
|
searchlist:function(){
|
|
|
var that=this;
|
|
|
// that.getlist()
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
page:1,
|
|
|
buildlist:[]
|
|
|
buildlist: that.data.buildlist.concat(newbuildlist)
|
|
|
})
|
|
|
console.log(that.data.buildlist)
|
|
|
|
|
|
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
page: that.data.page,
|
|
|
num: that.data.num,
|
|
|
status: that.data.status,
|
|
|
keyword: that.data.keyword,
|
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
|
|
|
finish(e) {
|
|
|
var that = this;
|
|
|
// that.getlist()
|
|
|
that.setData({
|
|
|
page: 1,
|
|
|
buildlist: []
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
page: that.data.page,
|
|
|
num: that.data.num,
|
|
|
status: that.data.status,
|
|
|
keyword: that.data.keyword,
|
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: []
|
|
|
|
|
|
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: res
|
|
|
|
|
|
|
|
|
})
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: []
|
|
|
let newbuildlist = that.data.buildlist;
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
} else {
|
|
|
that.setData({
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
|
|
|
buildlist: res
|
|
|
newbuildlist[i].showword = true
|
|
|
|
|
|
if (newbuildlist[i].content_text.length > 80) {
|
|
|
console.log(1)
|
|
|
newbuildlist[i].openword = true
|
|
|
newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
} else {
|
|
|
console.log(2)
|
|
|
newbuildlist[i].openword = false
|
|
|
}
|
|
|
|
|
|
})
|
|
|
if (newbuildlist[i].content_imgs == null) {
|
|
|
console.log(3)
|
|
|
newbuildlist[i].content_imgs = []
|
|
|
} else {
|
|
|
newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
that.setData({
|
|
|
buildlist: that.data.buildlist.concat(newbuildlist)
|
|
|
})
|
|
|
console.log(that.data.buildlist)
|
|
|
|
|
|
|
|
|
|
|
|
let newbuildlist = that.data.buildlist;
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//最新 最热
|
|
|
new: function() {
|
|
|
this.setData({
|
|
|
page: 1,
|
|
|
status: 1,
|
|
|
buildlist: []
|
|
|
})
|
|
|
this.getlist()
|
|
|
},
|
|
|
hot: function() {
|
|
|
this.setData({
|
|
|
page: 1,
|
|
|
status: 2,
|
|
|
buildlist: []
|
|
|
})
|
|
|
this.getlist()
|
|
|
},
|
|
|
//获取列表
|
|
|
getlist() {
|
|
|
let that = this;
|
|
|
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
page: that.data.page,
|
|
|
num: that.data.num,
|
|
|
status: that.data.status,
|
|
|
keyword: that.data.keyword,
|
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if (res == "") {
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: that.data.buildlist
|
|
|
|
|
|
|
|
|
})
|
|
|
} else {
|
|
|
|
|
|
let newbuildlist = res;
|
|
|
console.log(newbuildlist)
|
|
|
|
|
|
for (var i = 0; i < newbuildlist.length; i++) {
|
|
|
|
|
|
newbuildlist[i].showword = true
|
...
|
...
|
@@ -209,222 +375,139 @@ Page({ |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
buildlist: that.data.buildlist.concat(newbuildlist)
|
|
|
})
|
|
|
console.log(that.data.buildlist)
|
|
|
|
|
|
|
|
|
console.log(that.data.buildlist)
|
|
|
}
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//最新 最热
|
|
|
new:function(){
|
|
|
this.setData({
|
|
|
page:1,
|
|
|
status: 1,
|
|
|
buildlist:[]
|
|
|
})
|
|
|
this.getlist()
|
|
|
},
|
|
|
hot:function(){
|
|
|
this.setData({
|
|
|
page: 1,
|
|
|
status: 2,
|
|
|
buildlist:[]
|
|
|
})
|
|
|
this.getlist()
|
|
|
},
|
|
|
//获取列表
|
|
|
getlist(){
|
|
|
let that=this;
|
|
|
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
page:that.data.page,
|
|
|
num:that.data.num,
|
|
|
status:that.data.status,
|
|
|
keyword:that.data.keyword,
|
|
|
hospital_address_id: that.data.hospital_address_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
console.log(that.data.buildlist)
|
|
|
if(res==""){
|
|
|
that.setData({
|
|
|
|
|
|
buildlist: that.data.buildlist
|
|
|
|
|
|
|
|
|
})
|
|
|
}else{
|
|
|
}).catch((err) => {
|
|
|
|
|
|
let newbuildlist = res;
|
|
|
console.log(newbuildlist)
|
|
|
})
|
|
|
|
|
|
for (var i = 0; i <newbuildlist.length; i++) {
|
|
|
|
|
|
newbuildlist[i].showword = true
|
|
|
|
|
|
if (newbuildlist[i].content_text.length > 80) {
|
|
|
console.log(1)
|
|
|
newbuildlist[i].openword = true
|
|
|
newbuildlist[i].content_text = newbuildlist[i].content_text.substring(0, 80);
|
|
|
}else{
|
|
|
console.log(2)
|
|
|
newbuildlist[i].openword = false
|
|
|
}
|
|
|
|
|
|
if (newbuildlist[i].content_imgs==null){
|
|
|
console.log(3)
|
|
|
newbuildlist[i].content_imgs = []
|
|
|
} else{
|
|
|
newbuildlist[i].content_imgs = newbuildlist[i].content_imgs.slice(0, 3);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
that.setData({
|
|
|
buildlist: that.data.buildlist.concat(newbuildlist)
|
|
|
})
|
|
|
|
|
|
console.log(that.data.buildlist)
|
|
|
}
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//收藏
|
|
|
collect: function(e) {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
var collect_id = that.data.archives_id;
|
|
|
|
|
|
var list = that.data.buildlist;
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
|
if (collect_id == list[i].archives_id) {
|
|
|
var collect = list[i].if_collect;
|
|
|
if (collect == 0) {
|
|
|
list[i].if_collect = 1;
|
|
|
} else if (collect == 1) {
|
|
|
list[i].if_collect = 0
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
that.setData({
|
|
|
buildlist: list
|
|
|
})
|
|
|
|
|
|
//调取收藏的接口
|
|
|
var url = '/api/portal/archives/doCollect';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
archives_id: that.data.archives_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res);
|
|
|
// getCurrentPages()[getCurrentPages().length - 1].onLoad()
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
}).catch((err) => {
|
|
|
})
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//点赞
|
|
|
touchstar: function(e) {
|
|
|
let that = this;
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
var collect_id = that.data.archives_id;
|
|
|
|
|
|
var list = that.data.buildlist;
|
|
|
for (var i = 0; i < list.length; i++) {
|
|
|
if (collect_id == list[i].archives_id) {
|
|
|
var touchstar = list[i].if_touch;
|
|
|
if (touchstar == 0) {
|
|
|
list[i].if_touch = 1;
|
|
|
list[i].touch_num = list[i].touch_num + 1
|
|
|
} else if (touchstar == 1) {
|
|
|
list[i].if_touch = 0;
|
|
|
list[i].touch_num = list[i].touch_num - 1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
that.setData({
|
|
|
buildlist: list
|
|
|
})
|
|
|
|
|
|
},
|
|
|
//调取点赞的接口
|
|
|
var url = '/api/portal/archives/doTouch';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
archives_id: that.data.archives_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res);
|
|
|
// getCurrentPages()[getCurrentPages().length - 1].onLoad()
|
|
|
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//收藏
|
|
|
collect:function(e){
|
|
|
let that=this;
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
var collect_id=that.data.archives_id;
|
|
|
|
|
|
var list=that.data.buildlist;
|
|
|
for(var i=0;i<list.length; i++){
|
|
|
if(collect_id==list[i].archives_id){
|
|
|
var collect=list[i].if_collect;
|
|
|
if(collect==0){
|
|
|
list[i].if_collect=1;
|
|
|
}else if(collect==1){
|
|
|
list[i].if_collect=0
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
that.setData({
|
|
|
buildlist:list
|
|
|
})
|
|
|
|
|
|
//调取收藏的接口
|
|
|
var url = '/api/portal/archives/doCollect';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
archives_id:that.data.archives_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res);
|
|
|
// getCurrentPages()[getCurrentPages().length - 1].onLoad()
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
//点赞
|
|
|
touchstar:function(e){
|
|
|
let that=this;
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
var collect_id=that.data.archives_id;
|
|
|
|
|
|
var list=that.data.buildlist;
|
|
|
for(var i=0;i<list.length; i++){
|
|
|
if(collect_id==list[i].archives_id){
|
|
|
var touchstar=list[i].if_touch;
|
|
|
if(touchstar==0){
|
|
|
list[i].if_touch=1;
|
|
|
list[i].touch_num = list[i].touch_num+1
|
|
|
}else if(touchstar==1){
|
|
|
list[i].if_touch=0;
|
|
|
list[i].touch_num = list[i].touch_num-1;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
that.setData({
|
|
|
buildlist:list
|
|
|
})
|
|
|
|
|
|
//调取点赞的接口
|
|
|
var url = '/api/portal/archives/doTouch';
|
|
|
var params = {
|
|
|
token: wx.getStorageSync('token'),
|
|
|
archives_id:that.data.archives_id
|
|
|
}
|
|
|
app.post(url, params).then((res) => {
|
|
|
console.log(res);
|
|
|
// getCurrentPages()[getCurrentPages().length - 1].onLoad()
|
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//展开收起
|
|
|
operaword(e){
|
|
|
let that = this;
|
|
|
operaword(e) {
|
|
|
let that = this;
|
|
|
|
|
|
let archives_id = e.currentTarget.dataset.archives_id;
|
|
|
console.log(archives_id)
|
|
|
let showword=e.currentTarget.dataset.showword;
|
|
|
let showword = e.currentTarget.dataset.showword;
|
|
|
console.log(showword)
|
|
|
if(showword==true){
|
|
|
if (showword == true) {
|
|
|
console.log(9090)
|
|
|
that.setData({
|
|
|
page:1,
|
|
|
num:50
|
|
|
page: 1,
|
|
|
num: 50
|
|
|
})
|
|
|
|
|
|
var url = '/api/portal/archives/archivesList';
|
...
|
...
|
@@ -445,8 +528,8 @@ Page({ |
|
|
|
|
|
for (var obj of newbuildlist) {
|
|
|
console.log(obj.archives_id);
|
|
|
obj.showword =true;
|
|
|
|
|
|
obj.showword = true;
|
|
|
|
|
|
if (obj.content_text.length > 80) {
|
|
|
obj.openword = true
|
|
|
} else {
|
...
|
...
|
@@ -454,7 +537,7 @@ Page({ |
|
|
}
|
|
|
|
|
|
console.log(obj);
|
|
|
|
|
|
|
|
|
console.log(archives_id)
|
|
|
if (obj.archives_id == archives_id) {
|
|
|
|
...
|
...
|
@@ -462,14 +545,14 @@ Page({ |
|
|
console.log(obj.showword)
|
|
|
obj.showword = false;
|
|
|
obj.ccontent_text = obj.ccontent_text;
|
|
|
if (obj.content_imgs==null){
|
|
|
obj.content_imgs=[]
|
|
|
} else if (obj.content_imgs.length>3){
|
|
|
if (obj.content_imgs == null) {
|
|
|
obj.content_imgs = []
|
|
|
} 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);
|
...
|
...
|
@@ -477,7 +560,7 @@ Page({ |
|
|
// }
|
|
|
|
|
|
|
|
|
}else{
|
|
|
} else {
|
|
|
obj.content_text = obj.content_text.substring(0, 80);
|
|
|
|
|
|
if (obj.content_imgs == null) {
|
...
|
...
|
@@ -510,8 +593,8 @@ Page({ |
|
|
}).catch((err) => {
|
|
|
|
|
|
})
|
|
|
}else{
|
|
|
|
|
|
} else {
|
|
|
|
|
|
let newbuildlist = that.data.buildlist;
|
|
|
console.log(newbuildlist)
|
|
|
|
...
|
...
|
@@ -545,26 +628,26 @@ Page({ |
|
|
|
|
|
}
|
|
|
// let newbuildlist=that.data.buildlist;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
|
|
onReady: function () {
|
|
|
onReady: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面显示
|
|
|
*/
|
|
|
onShow: function () {
|
|
|
onShow: function() {
|
|
|
// this.setData({
|
|
|
// buildlist:[],
|
|
|
// page:1
|
...
|
...
|
@@ -575,72 +658,72 @@ Page({ |
|
|
/**
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
*/
|
|
|
onHide: function () {
|
|
|
onHide: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
*/
|
|
|
onUnload: function () {
|
|
|
onUnload: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
|
onPullDownRefresh: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function () {
|
|
|
onReachBottom: function() {
|
|
|
console.log(6666)
|
|
|
let that=this;
|
|
|
that.data.page++;
|
|
|
that.getlist();
|
|
|
console.log(that.data.buildlist)
|
|
|
let that = this;
|
|
|
that.data.page++;
|
|
|
that.getlist();
|
|
|
console.log(that.data.buildlist)
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
onShareAppMessage: function () {
|
|
|
onShareAppMessage: function() {
|
|
|
|
|
|
},
|
|
|
//建档成功,我要分享
|
|
|
attentionpublic:function(){
|
|
|
wx.navigateTo({
|
|
|
url: '../meshare/meshare?hospital_address_id=' + this.data.hospital_address_id,
|
|
|
})
|
|
|
},
|
|
|
//建档笔记详情
|
|
|
buildtextdetail:function(e){
|
|
|
let that=this;
|
|
|
console.log(e)
|
|
|
var buildtetid=e.currentTarget.dataset.id;
|
|
|
wx.setStorageSync('buildtetid', buildtetid)
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
wx.navigateTo({
|
|
|
url: '../buildtextdetail/buildtextdetail?buildid=' + buildtetid,
|
|
|
})
|
|
|
},
|
|
|
//建档成功,我要分享
|
|
|
attentionpublic: function() {
|
|
|
wx.navigateTo({
|
|
|
url: '../meshare/meshare?hospital_address_id=' + this.data.hospital_address_id,
|
|
|
})
|
|
|
},
|
|
|
//建档笔记详情
|
|
|
buildtextdetail: function(e) {
|
|
|
let that = this;
|
|
|
console.log(e)
|
|
|
var buildtetid = e.currentTarget.dataset.id;
|
|
|
wx.setStorageSync('buildtetid', buildtetid)
|
|
|
that.setData({
|
|
|
archives_id: e.currentTarget.dataset.id
|
|
|
})
|
|
|
wx.navigateTo({
|
|
|
url: '../buildtextdetail/buildtextdetail?buildid=' + buildtetid,
|
|
|
})
|
|
|
},
|
|
|
|
|
|
//医院详情
|
|
|
enterhostail(e){
|
|
|
//医院详情
|
|
|
enterhostail(e) {
|
|
|
wx.setStorageSync('hospitalid', e.currentTarget.dataset.hosid);
|
|
|
wx.navigateTo({
|
|
|
url: '../hometail/hometail',
|
|
|
})
|
|
|
},
|
|
|
attention:function(){
|
|
|
wx.navigateTo({
|
|
|
url: '../attentionpublic/attentionpublic',
|
|
|
})
|
|
|
}
|
|
|
}) |
|
|
attention: function() {
|
|
|
wx.navigateTo({
|
|
|
url: '../attentionpublic/attentionpublic',
|
|
|
})
|
|
|
}
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|