|
@@ -27,7 +27,7 @@ Page({
|
|
*/
|
|
*/
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
|
|
|
|
- if (wx.getStorageSync('uid') == ""){
|
|
|
|
|
|
+ if (wx.getStorageSync('user')._id == ""){
|
|
wx.redirectTo({
|
|
wx.redirectTo({
|
|
url: '/pages/login/index'
|
|
url: '/pages/login/index'
|
|
})
|
|
})
|
|
@@ -38,40 +38,7 @@ Page({
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
- /**
|
|
|
|
- * 生命周期函数--监听页面初次渲染完成
|
|
|
|
- */
|
|
|
|
- onReady: function () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 生命周期函数--监听页面显示
|
|
|
|
- */
|
|
|
|
- onShow: function () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 生命周期函数--监听页面隐藏
|
|
|
|
- */
|
|
|
|
- onHide: function () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 生命周期函数--监听页面卸载
|
|
|
|
- */
|
|
|
|
- onUnload: function () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 用户点击右上角分享
|
|
|
|
- */
|
|
|
|
- onShareAppMessage: function () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
// 列表查询
|
|
// 列表查询
|
|
searchInfo: function (message) {
|
|
searchInfo: function (message) {
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
@@ -82,7 +49,7 @@ Page({
|
|
url: 'http://124.235.209.122:88/api/financial/viewnews/select', //真是接口
|
|
url: 'http://124.235.209.122:88/api/financial/viewnews/select', //真是接口
|
|
method: 'post',
|
|
method: 'post',
|
|
data: {
|
|
data: {
|
|
- qyid: '5e903455d72a944fd899c59c',//wx.getStorageSync('uid')
|
|
|
|
|
|
+ qyid: '5e903455d72a944fd899c59c',//wx.getStorageSync('user')._id
|
|
skip: that.data.skip,
|
|
skip: that.data.skip,
|
|
limit: that.data.limit
|
|
limit: that.data.limit
|
|
},
|
|
},
|
|
@@ -136,7 +103,6 @@ Page({
|
|
onReachBottom: function () {
|
|
onReachBottom: function () {
|
|
const pageNum = this.data.skip;
|
|
const pageNum = this.data.skip;
|
|
const _pagenum = Math.ceil(this.data.total / this.data.limit);
|
|
const _pagenum = Math.ceil(this.data.total / this.data.limit);
|
|
- console.log(pageNum + "哈哈哈哈" + _pagenum)
|
|
|
|
if (pageNum < _pagenum) {
|
|
if (pageNum < _pagenum) {
|
|
this.setData({
|
|
this.setData({
|
|
skip: pageNum + 1 //设置下一页
|
|
skip: pageNum + 1 //设置下一页
|