Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
22d0345e
Commit
22d0345e
authored
May 10, 2019
by
Junling Bu
Browse files
fix[litemall-wx, renard-wx]: 小程序端的页面参数统一采用limit,而不是原来的size
parent
c5b8b3c5
Changes
17
Hide whitespace changes
Inline
Side-by-side
litemall-wx/pages/brand/brand.js
View file @
22d0345e
...
...
@@ -5,7 +5,7 @@ Page({
data
:
{
brandList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
totalPages
:
1
},
onLoad
:
function
(
options
)
{
...
...
@@ -19,7 +19,7 @@ Page({
let
that
=
this
;
util
.
request
(
api
.
BrandList
,
{
page
:
that
.
data
.
page
,
limit
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
...
...
litemall-wx/pages/brandDetail/brandDetail.js
View file @
22d0345e
...
...
@@ -10,7 +10,7 @@ Page({
brand
:
{},
goodsList
:
[],
page
:
1
,
size
:
10
0
limit
:
10
},
onLoad
:
function
(
options
)
{
// 页面初始化 options为页面跳转所带来的参数
...
...
@@ -40,7 +40,7 @@ Page({
util
.
request
(
api
.
GoodsList
,
{
brandId
:
that
.
data
.
id
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
})
.
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
...
...
litemall-wx/pages/comment/comment.js
View file @
22d0345e
...
...
@@ -105,7 +105,7 @@ Page({
console
.
log
(
'
onPullDownRefresh
'
);
if
(
this
.
data
.
showType
==
0
)
{
if
(
this
.
data
.
allCount
/
this
.
data
.
size
<
this
.
data
.
allPage
)
{
if
(
this
.
data
.
allCount
/
this
.
data
.
limit
<
this
.
data
.
allPage
)
{
return
false
;
}
...
...
@@ -113,7 +113,7 @@ Page({
'
allPage
'
:
this
.
data
.
allPage
+
1
});
}
else
{
if
(
this
.
data
.
hasPicCount
/
this
.
data
.
size
<
this
.
data
.
picPage
)
{
if
(
this
.
data
.
hasPicCount
/
this
.
data
.
limit
<
this
.
data
.
picPage
)
{
return
false
;
}
...
...
litemall-wx/pages/groupon/grouponList/grouponList.js
View file @
22d0345e
...
...
@@ -11,7 +11,7 @@ Page({
data
:
{
grouponList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
scrollTop
:
0
,
showPage
:
false
...
...
@@ -89,15 +89,15 @@ Page({
util
.
request
(
api
.
GroupOnList
,
{
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
scrollTop
:
0
,
grouponList
:
res
.
data
.
data
,
grouponList
:
res
.
data
.
list
,
showPage
:
true
,
count
:
res
.
data
.
count
count
:
res
.
data
.
total
});
}
wx
.
hideToast
();
...
...
@@ -106,7 +106,7 @@ Page({
},
nextPage
:
function
(
event
)
{
var
that
=
this
;
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
size
)
{
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
limit
)
{
return
true
;
}
...
...
litemall-wx/pages/groupon/grouponList/grouponList.wxml
View file @
22d0345e
...
...
@@ -2,20 +2,20 @@
<scroll-view class="groupon-list" scroll-y="true" scroll-top="{{scrollTop}}">
<view class="item" wx:for="{{grouponList}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<navigator url="/pages/goods/goods?id={{item.
goods.
id}}">
<image class="img" src="{{item.
goods.
picUrl}}" background-size="cover"></image>
<navigator url="/pages/goods/goods?id={{item.id}}">
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
<view class="right">
<view class="text">
<view class="header">
<text class="name">{{item.
goods.
name}}</text>
<text class="name">{{item.name}}</text>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="团
购
" rightText="{{item.groupon
_member
}}" />
<zan-capsule color="#a78845" leftText="
{{item.grouponMember}}人成
团" rightText="
立减
{{item.groupon
Discount
}}" />
</view>
</view>
<text class="desc">{{item.
goods.
brief}}</text>
<text class="desc">{{item.brief}}</text>
<view class="price">
<view class="counterPrice">
原
价:¥{{item.
goods.counter
Price}}</view>
<view class="retailPrice">
现
价:¥{{item.groupon
_p
rice}}</view>
<view class="counterPrice">
现
价:¥{{item.
retail
Price}}</view>
<view class="retailPrice">
团购
价:¥{{item.groupon
P
rice}}</view>
</view>
</view>
</view>
...
...
@@ -24,7 +24,7 @@
<view class="page" wx:if="{{showPage}}">
<view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
<view class="next {{ (count /
size
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
<view class="next {{ (count /
limit
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
litemall-wx/pages/groupon/myGroupon/myGroupon.js
View file @
22d0345e
...
...
@@ -24,7 +24,7 @@ Page({
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
orderList
:
res
.
data
.
data
orderList
:
res
.
data
.
list
});
}
});
...
...
litemall-wx/pages/help/help.js
View file @
22d0345e
...
...
@@ -10,7 +10,7 @@ Page({
data
:
{
issueList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
showPage
:
false
},
...
...
@@ -72,7 +72,7 @@ Page({
},
nextPage
:
function
(
event
)
{
var
that
=
this
;
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
size
)
{
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
limit
)
{
return
true
;
}
...
...
@@ -93,7 +93,7 @@ Page({
util
.
request
(
api
.
IssueList
,
{
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
...
...
litemall-wx/pages/help/help.wxml
View file @
22d0345e
...
...
@@ -14,7 +14,7 @@
<view class="page" wx:if="{{showPage}}">
<view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
<view class="next {{ (count /
size
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
<view class="next {{ (count /
limit
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
</view>
</view>
\ No newline at end of file
litemall-wx/pages/topicComment/topicComment.js
View file @
22d0345e
...
...
@@ -15,7 +15,7 @@ Page({
hasPicCount
:
0
,
allPage
:
1
,
picPage
:
1
,
size
:
20
limit
:
20
},
getCommentCount
:
function
()
{
let
that
=
this
;
...
...
@@ -37,7 +37,7 @@ Page({
util
.
request
(
api
.
CommentList
,
{
valueId
:
that
.
data
.
valueId
,
type
:
that
.
data
.
type
,
size
:
that
.
data
.
size
,
limit
:
that
.
data
.
limit
,
page
:
(
that
.
data
.
showType
==
0
?
that
.
data
.
allPage
:
that
.
data
.
picPage
),
showType
:
that
.
data
.
showType
}).
then
(
function
(
res
)
{
...
...
@@ -95,20 +95,20 @@ Page({
console
.
log
(
'
onPullDownRefresh
'
);
if
(
this
.
data
.
showType
==
0
)
{
if
(
this
.
data
.
allCount
/
this
.
data
.
size
<
this
.
data
.
allPage
)
{
if
(
this
.
data
.
allCount
/
this
.
data
.
limit
<
this
.
data
.
allPage
)
{
return
false
;
}
this
.
setData
({
'
allPage
'
:
this
.
data
.
allPage
+
1
allPage
:
this
.
data
.
allPage
+
1
});
}
else
{
if
(
this
.
data
.
hasPicCount
/
this
.
data
.
size
<
this
.
data
.
picPage
)
{
if
(
this
.
data
.
hasPicCount
/
this
.
data
.
limit
<
this
.
data
.
picPage
)
{
return
false
;
}
this
.
setData
({
'
picPage
'
:
this
.
data
.
picPage
+
1
picPage
:
this
.
data
.
picPage
+
1
});
}
...
...
litemall-wx/pages/topicDetail/topicDetail.js
View file @
22d0345e
...
...
@@ -49,7 +49,7 @@ Page({
type
:
1
,
showType
:
0
,
page
:
1
,
size
:
5
limit
:
5
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
...
...
litemall-wx/pages/ucenter/collect/collect.js
View file @
22d0345e
...
...
@@ -8,7 +8,7 @@ Page({
type
:
0
,
collectList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
totalPages
:
1
},
getCollectList
()
{
...
...
@@ -19,7 +19,7 @@ Page({
util
.
request
(
api
.
CollectList
,
{
type
:
that
.
data
.
type
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
...
...
litemall-wx/pages/ucenter/couponList/couponList.js
View file @
22d0345e
...
...
@@ -9,7 +9,7 @@ Page({
code
:
''
,
status
:
0
,
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
scrollTop
:
0
,
showPage
:
false
...
...
@@ -82,7 +82,7 @@ Page({
util
.
request
(
api
.
CouponMyList
,
{
status
:
that
.
data
.
status
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
...
...
@@ -131,7 +131,7 @@ Page({
},
nextPage
:
function
(
event
)
{
var
that
=
this
;
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
size
)
{
if
(
this
.
data
.
page
>
that
.
data
.
count
/
that
.
data
.
limit
)
{
return
true
;
}
...
...
@@ -159,7 +159,7 @@ Page({
couponList
:
[],
status
:
e
.
currentTarget
.
dataset
.
index
,
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
scrollTop
:
0
,
showPage
:
false
...
...
renard-wx/pages/brand/brand.js
View file @
22d0345e
...
...
@@ -5,7 +5,7 @@ Page({
data
:
{
brandList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
totalPages
:
1
},
onLoad
:
function
(
options
)
{
...
...
@@ -19,7 +19,7 @@ Page({
let
that
=
this
;
util
.
request
(
api
.
BrandList
,
{
page
:
that
.
data
.
page
,
limit
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
...
...
renard-wx/pages/brandDetail/brandDetail.js
View file @
22d0345e
...
...
@@ -9,7 +9,7 @@ Page({
brand
:
{},
goodsList
:
[],
page
:
1
,
size
:
10
0
limit
:
10
},
onLoad
:
function
(
options
)
{
// 页面初始化 options为页面跳转所带来的参数
...
...
@@ -39,7 +39,7 @@ Page({
util
.
request
(
api
.
GoodsList
,
{
brandId
:
that
.
data
.
id
,
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
})
.
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
...
...
renard-wx/pages/groupon/grouponList/grouponList.js
View file @
22d0345e
...
...
@@ -11,7 +11,7 @@ Page({
data
:
{
grouponList
:
[],
page
:
1
,
size
:
10
,
limit
:
10
,
count
:
0
,
scrollTop
:
0
,
showPage
:
false
...
...
@@ -89,15 +89,15 @@ Page({
util
.
request
(
api
.
GroupOnList
,
{
page
:
that
.
data
.
page
,
size
:
that
.
data
.
size
limit
:
that
.
data
.
limit
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
scrollTop
:
0
,
grouponList
:
res
.
data
.
data
,
grouponList
:
res
.
data
.
list
,
showPage
:
true
,
count
:
res
.
data
.
count
count
:
res
.
data
.
total
});
}
wx
.
hideToast
();
...
...
renard-wx/pages/groupon/grouponList/grouponList.wxml
View file @
22d0345e
...
...
@@ -2,20 +2,20 @@
<scroll-view class="groupon-list" scroll-y="true" scroll-top="{{scrollTop}}">
<view class="item" wx:for="{{grouponList}}" wx:for-index="index" wx:for-item="item" wx:key="id">
<navigator url="/pages/goods/goods?id={{item.
goods.
id}}">
<image class="img" src="{{item.
goods.
picUrl}}" background-size="cover"></image>
<navigator url="/pages/goods/goods?id={{item.id}}">
<image class="img" src="{{item.picUrl}}" background-size="cover"></image>
<view class="right">
<view class="text">
<view class="header">
<text class="name">{{item.
goods.
name}}</text>
<text class="name">{{item.name}}</text>
<view class="capsule-tag">
<zan-capsule color="#a78845" leftText="团
购
" rightText="{{item.groupon
_member
}}" />
<zan-capsule color="#a78845" leftText="
{{item.grouponMember}}人成
团" rightText="
立减
{{item.groupon
Discount
}}" />
</view>
</view>
<text class="desc">{{item.
goods.
brief}}</text>
<text class="desc">{{item.brief}}</text>
<view class="price">
<view class="counterPrice">
原
价:¥{{item.
goods.counter
Price}}</view>
<view class="retailPrice">
现
价:¥{{item.groupon
_p
rice}}</view>
<view class="counterPrice">
现
价:¥{{item.
retail
Price}}</view>
<view class="retailPrice">
团购
价:¥{{item.groupon
P
rice}}</view>
</view>
</view>
</view>
...
...
@@ -24,7 +24,7 @@
<view class="page" wx:if="{{showPage}}">
<view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
<view class="next {{ (count /
size
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
<view class="next {{ (count /
limit
) < page ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
renard-wx/pages/groupon/myGroupon/myGroupon.js
View file @
22d0345e
...
...
@@ -32,7 +32,7 @@ Page({
}).
then
(
function
(
res
)
{
if
(
res
.
errno
===
0
)
{
that
.
setData
({
orderList
:
res
.
data
.
data
orderList
:
res
.
data
.
list
});
wx
.
hideLoading
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment