Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
e7481759
Commit
e7481759
authored
Aug 20, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 我的订单滚动
parent
9b7e1c95
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
36 deletions
+66
-36
base.wxss
src/base/base.wxss
+6
-0
order.js
src/pages/order/order.js
+26
-13
order.wxml
src/pages/order/order.wxml
+9
-7
order.wxss
src/pages/order/order.wxss
+25
-16
No files found.
src/base/base.wxss
View file @
e7481759
...
@@ -116,6 +116,12 @@ a {
...
@@ -116,6 +116,12 @@ a {
.clear:after {
.clear:after {
clear: both; }
clear: both; }
.clearfix::after {
content: '';
display: block;
clear: both; }
/*字体*/
/*字体*/
.fs-10 {
.fs-10 {
font-size: 10px; }
font-size: 10px; }
...
...
src/pages/order/order.js
View file @
e7481759
...
@@ -10,10 +10,10 @@ wxService.page({
...
@@ -10,10 +10,10 @@ wxService.page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
swiperItem
:[
swiperItem
:
[
{
{
type
:
'1'
,
type
:
'1'
,
name
:
'全部'
name
:
'全部'
},
},
{
{
type
:
'2'
,
type
:
'2'
,
...
@@ -32,12 +32,25 @@ wxService.page({
...
@@ -32,12 +32,25 @@ wxService.page({
name
:
'退款/售后'
name
:
'退款/售后'
}
}
],
],
currentIndex
:
1
,
currentIndex
:
1
,
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
5
,
pageSize
:
5
,
noMoreFlag
:
false
,
noMoreFlag
:
false
,
orderList
:
null
,
orderList
:
null
,
totalPages
:
0
totalPages
:
0
,
subImgs
:
[{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
},
{
listUrl
:
"https://hwimagecdn.ihotwind.cn//544/201906/1b41a9a3247d42c89e0c461e2faaf6c1_512_512.jpg"
}]
},
},
/**
/**
...
@@ -51,9 +64,9 @@ wxService.page({
...
@@ -51,9 +64,9 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
},
},
initOrderList
(
pageNo
,
pageSize
)
{
initOrderList
(
pageNo
,
pageSize
)
{
if
(
this
.
data
.
noMoreFlag
)
{
// 没有更多数据了,不调用接口
if
(
this
.
data
.
noMoreFlag
)
{
// 没有更多数据了,不调用接口
return
false
return
false
}
}
...
@@ -64,11 +77,11 @@ wxService.page({
...
@@ -64,11 +77,11 @@ wxService.page({
})
})
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/sale/order/list?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
setData
({
this
.
setData
({
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
orderList
,
...
data
.
content
],
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]
:
[...
this
.
data
.
orderList
,
...
data
.
content
],
totalPages
:
data
.
totalPages
totalPages
:
data
.
totalPages
})
})
}
}
...
@@ -76,7 +89,7 @@ wxService.page({
...
@@ -76,7 +89,7 @@ wxService.page({
})
})
},
},
//点击切换tab
//点击切换tab
switchTab
(
e
){
switchTab
(
e
)
{
this
.
setData
({
this
.
setData
({
currentIndex
:
e
.
currentTarget
.
dataset
.
type
currentIndex
:
e
.
currentTarget
.
dataset
.
type
})
})
...
@@ -97,8 +110,8 @@ wxService.page({
...
@@ -97,8 +110,8 @@ wxService.page({
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPages
)
{
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPages
)
{
this
.
setData
({
this
.
setData
({
pageNo
:
this
.
data
.
pageNo
+
1
,
pageNo
:
this
.
data
.
pageNo
+
1
,
},
()
=>
{
},
()
=>
{
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
})
})
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
...
...
src/pages/order/order.wxml
View file @
e7481759
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
{{item.name}}
{{item.name}}
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true">
<view class="order-content">
<view class="order-content">
<block
<block
wx:for="{{orderList}}"
wx:for="{{orderList}}"
...
@@ -28,11 +27,15 @@
...
@@ -28,11 +27,15 @@
<text class="order-status">待付款</text>
<text class="order-status">待付款</text>
</view>
</view>
<view class="pro-list">
<view class="pro-list">
<image class="pro-img" />
<scroll-view scroll-x="true">
<image class="pro-img" />
<view class="uploadWrap" scroll-x="true">
<image class="pro-img" />
<block wx:for='{{subImgs}}' wx:for-item="sub" wx:key="s" >
<image class="pro-img" />
<view class="upload_Item">
<text class="pro-img-dot">...</text>
<image class="upload_Item_img" src="{{sub.listUrl}}" bindtap='goProDetail' data-id='{{sub.goodsId}}'></image>
</view>
</block>
</view>
</scroll-view>
</view>
</view>
<view class="pro-number">
<view class="pro-number">
<text class="total-pro">共5件商品</text>
<text class="total-pro">共5件商品</text>
...
@@ -51,7 +54,6 @@
...
@@ -51,7 +54,6 @@
</view>
</view>
</block>
</block>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="no-bottom">
<view class="no-bottom">
<no-more wx:if="{{noMoreFlag}}"/>
<no-more wx:if="{{noMoreFlag}}"/>
...
...
src/pages/order/order.wxss
View file @
e7481759
...
@@ -13,6 +13,7 @@ scroll-view{
...
@@ -13,6 +13,7 @@ scroll-view{
background-color: #ffffff;
background-color: #ffffff;
color: #000000;
color: #000000;
position:fixed;
position:fixed;
top: 0;
z-index:1;
z-index:1;
justify-content: space-between;
justify-content: space-between;
padding: 24rpx 85rpx 0;
padding: 24rpx 85rpx 0;
...
@@ -56,19 +57,6 @@ scroll-view{
...
@@ -56,19 +57,6 @@ scroll-view{
}
}
.pro-list{
.pro-list{
margin-top: 16rpx;
margin-top: 16rpx;
display: flex;
justify-content: space-between;
}
.pro-img{
width: 140rpx;
height: 140rpx;
border:1px solid red;
vertical-align: middle;
}
.pro-img-dot{
display: inline-block;
vertical-align: middle;
line-height: 144rpx;
}
}
.pro-number{
.pro-number{
margin-top: 28rpx;
margin-top: 28rpx;
...
@@ -103,6 +91,27 @@ scroll-view{
...
@@ -103,6 +91,27 @@ scroll-view{
.no-bottom {
.no-bottom {
margin: 50rpx 0;
margin: 50rpx 0;
}
}
.sub-imgs{
margin: 25rpx 0;
padding-left: 24rpx;
}
.uploadWrap{
height: 140rpx;
width:100%;
display: flex;
display: -webkit-box;
flex-direction: column;
}
.upload_Item{
width: 140rpx;
height: 140rpx;
flex: 1;
padding: 0rpx 15rpx 15rpx 0;
}
.upload_Item:last-child{
padding-right: 20rpx;
}
.upload_Item_img{
width: 140rpx;
height: 140rpx;
}
Write
Preview
Markdown
is supported
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