Commit ef0d3dcb96611afe150e292bb8665cef9be73d1e
1 parent
281cf283
卡项列表
Showing
2 changed files
with
6 additions
and
3 deletions
packageA/pages/cardList/cardList.js
@@ -24,6 +24,7 @@ Page({ | @@ -24,6 +24,7 @@ Page({ | ||
24 | */ | 24 | */ |
25 | onLoad: function (options) { | 25 | onLoad: function (options) { |
26 | self = this;//保存全局指针 | 26 | self = this;//保存全局指针 |
27 | + this.data.options = options; | ||
27 | app.isLogin().then(function(data) {//进入页面前已经授权登录成功 | 28 | app.isLogin().then(function(data) {//进入页面前已经授权登录成功 |
28 | self.setData({ | 29 | self.setData({ |
29 | userInfo: data, | 30 | userInfo: data, |
@@ -60,7 +61,9 @@ Page({ | @@ -60,7 +61,9 @@ Page({ | ||
60 | imghost: app.globalData.setting.imghost, | 61 | imghost: app.globalData.setting.imghost, |
61 | isLogin: true, | 62 | isLogin: true, |
62 | }); | 63 | }); |
63 | - | 64 | + if(this.data.options.cat_id) { |
65 | + currentQuery.cat_id = this.data.options.cat_id; | ||
66 | + }; | ||
64 | currentQuery.page=1; | 67 | currentQuery.page=1; |
65 | this.getData(true, url, currentQuery); | 68 | this.getData(true, url, currentQuery); |
66 | // app.request.promiseGet("/api/weshop/ad/page?pid=2&store_id=" + app.globalData.setting.stoid, { | 69 | // app.request.promiseGet("/api/weshop/ad/page?pid=2&store_id=" + app.globalData.setting.stoid, { |
packageA/pages/cardList/cardList.wxml
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | </block> | 52 | </block> |
53 | 53 | ||
54 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> | 54 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 && list.pageData}}"></nodata> |
55 | - <view wx:if="{{noMore}}" class="noMore">- 已经到底了 -</view> | 55 | + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view> |
56 | </view> | 56 | </view> |
57 | </block> | 57 | </block> |
58 | 58 | ||
@@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
85 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> | 85 | <nodata class="t-c" wx:if="{{list.pageData.length == 0 || list == null}}"></nodata> |
86 | </view> | 86 | </view> |
87 | 87 | ||
88 | - <view wx:if="{{noMore}}" class="noMore">- 已经到底了 -</view> | 88 | + <view class="noMore" hidden="{{!noMore}}" wx:if="{{list.pageData.length !== 0}}">- 已经到底了 -</view> |
89 | </scroll-view> | 89 | </scroll-view> |
90 | </view> | 90 | </view> |
91 | </block> | 91 | </block> |