|
@@ -23,6 +23,39 @@ Page({
|
|
infos: {},
|
|
infos: {},
|
|
photos: [],
|
|
photos: [],
|
|
scrollHeight: '',
|
|
scrollHeight: '',
|
|
|
|
+ scrollHeight1: '',
|
|
|
|
+ list: [
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ // {visitTime: "2020-02-16T11:22:07.697Z",oldInfo:'战三的'},
|
|
|
|
+ ], //探访的数据哈
|
|
},
|
|
},
|
|
onTabsItemTap: function (event) {
|
|
onTabsItemTap: function (event) {
|
|
let index = event.currentTarget.dataset.index;
|
|
let index = event.currentTarget.dataset.index;
|
|
@@ -150,6 +183,10 @@ Page({
|
|
|
|
|
|
oldInfo(p) {
|
|
oldInfo(p) {
|
|
console.log("老人锕");
|
|
console.log("老人锕");
|
|
|
|
+ wx.showLoading({
|
|
|
|
+ title: '加载中',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
wx.request({
|
|
wx.request({
|
|
url: app.globalData.publicUrl + '/wxinfo/listByOpenid',
|
|
url: app.globalData.publicUrl + '/wxinfo/listByOpenid',
|
|
method: "GET",
|
|
method: "GET",
|
|
@@ -159,16 +196,20 @@ Page({
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
console.log(res, "0000");
|
|
console.log(res, "0000");
|
|
- this.setData({
|
|
|
|
- listData: res.data.data
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ if (res.data.code == 0) {
|
|
|
|
+ wx.hideLoading();
|
|
|
|
+ this.setData({
|
|
|
|
+ listData: res.data.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
visitInfo() {
|
|
visitInfo() {
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ wx.showLoading({
|
|
|
|
+ title: '加载中',
|
|
|
|
+ mask: true
|
|
|
|
+ })
|
|
wx.request({
|
|
wx.request({
|
|
url: app.globalData.publicUrl + '/visit/list',
|
|
url: app.globalData.publicUrl + '/visit/list',
|
|
method: "GET",
|
|
method: "GET",
|
|
@@ -177,10 +218,12 @@ Page({
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
console.log(res, "0000");
|
|
console.log(res, "0000");
|
|
- this.setData({
|
|
|
|
- list: res.data.data
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ if (res.data.code == 0) {
|
|
|
|
+ wx.hideLoading();
|
|
|
|
+ this.setData({
|
|
|
|
+ list: res.data.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -193,22 +236,31 @@ Page({
|
|
let searchHeight = res[0].height
|
|
let searchHeight = res[0].height
|
|
let titleHeight = res[1].height
|
|
let titleHeight = res[1].height
|
|
let windowHeight = wx.getSystemInfoSync().windowHeight
|
|
let windowHeight = wx.getSystemInfoSync().windowHeight
|
|
- let scrollHeight = windowHeight - searchHeight - titleHeight - 30 - 5 - 50
|
|
|
|
-
|
|
|
|
- console.log(titleHeight, "高度0");
|
|
|
|
- console.log(searchHeight, "高度1");
|
|
|
|
- console.log(windowHeight, "高度222");
|
|
|
|
- console.log(scrollHeight, "最重高度");
|
|
|
|
|
|
+ let scrollHeight = windowHeight - searchHeight - titleHeight - 30 - 5 - 50 - 44
|
|
this.setData({
|
|
this.setData({
|
|
scrollHeight: scrollHeight
|
|
scrollHeight: scrollHeight
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ computeScrollViewHeight1() {
|
|
|
|
+ let that = this
|
|
|
|
+ let query = wx.createSelectorQuery().in(this)
|
|
|
|
+ query.select('.zizi').boundingClientRect()
|
|
|
|
+ query.exec(res => {
|
|
|
|
+ let searchHeight = res[0].height
|
|
|
|
+ let windowHeight = wx.getSystemInfoSync().windowHeight
|
|
|
|
+ let scrollHeight = windowHeight - searchHeight - 30 - 5 - 50
|
|
|
|
+ this.setData({
|
|
|
|
+ scrollHeight1: scrollHeight
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
onLoad() {
|
|
onLoad() {
|
|
this.oldInfo();
|
|
this.oldInfo();
|
|
this.visitInfo();
|
|
this.visitInfo();
|
|
this.computeScrollViewHeight();
|
|
this.computeScrollViewHeight();
|
|
|
|
+ this.computeScrollViewHeight1();
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
console.log(wx.getStorageSync('user'), "打印");
|
|
console.log(wx.getStorageSync('user'), "打印");
|