Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7247f8c5
authored
2019-10-11 15:06:55 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
520483d3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
274 additions
and
12 deletions
src/app.json
src/component/product-detail-comp/product-detail-comp.wxml
src/pages/auction-list/auction-list.scss
src/pages/auction-list/auction-list.wxml
src/pages/seckill-list/seckill-list.js
src/pages/seckill-list/seckill-list.json
src/pages/seckill-list/seckill-list.scss
src/pages/seckill-list/seckill-list.wxml
src/app.json
View file @
7247f8c
...
...
@@ -12,7 +12,6 @@
"pages/seckill-mine/seckill-mine"
,
"pages/seckill-detail/seckill-detail"
,
"pages/user-center/user-center"
,
"pages/scan-result/scan-result"
,
"pages/gift-shop/gift-shop"
,
...
...
src/component/product-detail-comp/product-detail-comp.wxml
View file @
7247f8c
...
...
@@ -11,7 +11,7 @@
</swiper>
</view>
<scroll-view scroll-y="{{true}}" class="desc">
<
text class="t1">产品特点:</text
>
<
!-- <text class="t1">产品特点:</text> --
>
<text class="t2">
{{productInfo.productInfo}}
</text>
...
...
src/pages/auction-list/auction-list.scss
View file @
7247f8c
...
...
@@ -4,6 +4,8 @@
$contentWidth
:
690px
;
.page
{
padding-bottom
:
$pageBottom
;
.bgc
{
background-color
:
#f8f8f8
;
}
...
...
@@ -54,20 +56,32 @@ $contentWidth:690px;
}
}
.cont
{
position
:
relative
;
height
:
100%
;
flex
:
1
;
// padding-right: 8px;
@extend
.bb
;
align-self
:
flex-start
;
height
:
160px
;
.t1
{
align-self
:
center
;
.up
{}
.down
{
position
:
absolute
;
bottom
:
0
;
}
.tt
{
padding
:
4px
0
;
width
:
100%
;
}
.t1
{
@include
ellipsis
(
1
);
font-size
:
32px
;
}
.t2
{
margin-top
:
8px
;
// font-size: 24px;
...
...
src/pages/auction-list/auction-list.wxml
View file @
7247f8c
...
...
@@ -15,9 +15,13 @@
<image class="image" mode="aspectFill" src="{{item.auctionImage && item.auctionImage[0] || ''}}" />
</view>
<view class="cont">
<view class="t1">{{item.auctionName}}</view>
<view class="t1 t2 t3">活动区域:{{item.district}}</view>
<view class="t1 t3">{{item.dateStr}}</view>
<view class="up">
<view class="tt t1">{{item.auctionName}}</view>
</view>
<view class="down">
<view class="tt t2 t3">活动区域:{{item.district}}</view>
<view class="tt t3">{{item.dateStr}}</view>
</view>
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0">
未开始
...
...
src/pages/seckill-list/seckill-list.js
View file @
7247f8c
import
{
getBindtapData
}
from
'../../utils/util'
;
let
Date
=
require
(
'../../utils/date.js'
);
let
app
=
getApp
();
Page
({
data
:
{},
data
:
{
authorizeVisible
:
false
,
isInit
:
false
,
total
:
0
,
page
:
1
,
size
:
10
,
dataList
:
[],
},
onShareAppMessage
()
{},
showAuth
()
{
this
.
setData
({
authorizeVisible
:
true
})
},
onLoad
(
options
)
{},
onShow
()
{
},
onLoad
(
options
)
{
this
.
resetPage
();
this
.
initData
();
},
initData
()
{
this
.
querySeckillList
();
},
// 到达底部
onReachBottom
()
{
if
(
this
.
data
.
dataList
.
length
<
this
.
data
.
total
)
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
});
this
.
querySeckillList
();
}
},
// 重置页面列表 点击搜索条件时需要
resetPage
()
{
this
.
setData
({
page
:
1
,
dataList
:
[]
})
},
/**
* 显示我的拍卖页
*/
onShowSeckillMineHandler
()
{
app
.
router
.
push
({
path
:
"seckillMine"
})
},
/**
* 详情页面
*/
onDetailHandler
(
evt
)
{
let
curData
=
getBindtapData
(
evt
);
console
.
log
(
"curData:"
,
curData
);
if
(
curData
.
status
==
0
||
curData
.
status
==
1
)
{
if
(
curData
.
isCanDetail
==
1
)
{
app
.
router
.
push
({
path
:
"seckillDetail"
,
query
:
{
code
:
curData
.
seckillCode
,
}
})
}
else
{
wx
.
showModal
({
content
:
curData
.
reason
||
"您未达到进入条件"
,
showCancel
:
false
,
success
(
res
)
{}
})
}
}
},
// 秒杀列表
querySeckillList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
seckillList
,
data
:
{
page
:
this
.
data
.
page
,
size
:
this
.
data
.
size
,
}
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
.
forEach
(
element
=>
{
element
.
dateStr
=
new
Date
(
element
.
startTime
).
toString
(
"yyyy.MM.dd hh:mm"
)
+
" - "
+
new
Date
(
element
.
endTime
).
toString
(
"yyyy.MM.dd hh:mm"
);
});
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
this
.
setData
({
dataList
:
dataList
,
total
:
result
.
total
,
isInit
:
true
,
})
resolve
();
})
})
},
// 隐藏蒙层
hideMask
()
{
this
.
setData
({
...
...
src/pages/seckill-list/seckill-list.json
View file @
7247f8c
{
"navigationBarTitleText"
:
"
demo
"
"navigationBarTitleText"
:
"
秒杀活动
"
}
...
...
src/pages/seckill-list/seckill-list.scss
View file @
7247f8c
@import
'../../assets/scss/mixins'
;
@import
'../../assets/scss/utils'
;
$contentWidth
:
690px
;
.page
{
padding-bottom
:
$pageBottom
;
.bgc
{
background-color
:
#f8f8f8
;
}
.bg
{}
.main
{
.top-space
{
height
:
0px
;
}
.content
{
position
:
relative
;
// 我的按钮
.my-btn
{
display
:
flex
;
justify-content
:
flex-end
;
.btn
{
@include
cb2
(
180px
,
48px
,
28px
);
margin
:
24px
24px
0
0
;
}
}
// list
.list
{
width
:
$contentWidth
;
margin
:
24px
auto
0
;
&
-item
{
@extend
.bb
;
padding
:
30px
0
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
.prize
{
margin
:
0
20px
;
border
:
solid
1
PX
#F0F0F0
;
border-radius
:
8px
;
padding
:
12px
;
.image
{
width
:
120px
;
height
:
120px
;
}
}
.cont
{
position
:
relative
;
height
:
100%
;
flex
:
1
;
// padding-right: 8px;
@extend
.bb
;
align-self
:
flex-start
;
height
:
160px
;
.up
{}
.down
{
position
:
absolute
;
bottom
:
0
;
}
.tt
{
padding
:
4px
0
;
width
:
100%
;
}
.t1
{
@include
ellipsis
(
1
);
font-size
:
32px
;
}
.t2
{
margin-top
:
8px
;
// font-size: 24px;
// color: #999999;
}
.t3
{
font-size
:
20px
;
color
:
#999999
;
// color: #3680EB;
}
}
.btn
{
@include
cb
(
120px
,
48px
,
24px
);
margin
:
0
16px
0
0
;
align-self
:
flex-start
;
}
.btn0
{
background-color
:
#fe9b28
;
}
.btn1
{
background-color
:
#079815
;
}
.btn2
{
background-color
:
#999999
;
}
}
}
}
}
}
...
...
src/pages/seckill-list/seckill-list.wxml
View file @
7247f8c
...
...
@@ -4,7 +4,38 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content"></view>
<view class="content">
<!-- 我的拍卖按钮 -->
<view class="my-btn">
<view bindtap="onShowSeckillMineHandler" class="btn">我的秒杀</view>
</view>
<view class="list">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
<view class="prize">
<image class="image" mode="aspectFill" src="{{item.seckillImages && item.seckillImages[0] || ''}}" />
</view>
<view class="cont">
<view class="up">
<view class="tt t1">{{item.seckillName}}</view>
</view>
<view class="down">
<view class="tt t2 t3">活动区域:{{item.district}}</view>
<view class="tt t3">{{item.dateStr}}</view>
</view>
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 0}}" data-data="{{item}}" data-index="{{index}}" class="btn btn0">
未开始
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 1}}" data-data="{{item}}" data-index="{{index}}" class="btn btn1">
进行中
</view>
<view bindtap="onDetailHandler" wx:if="{{item.status == 2}}" data-data="{{item}}" data-index="{{index}}" class="btn btn2">
已结束
</view>
</view>
</view>
</view>
<empty-tips-light inner-text="当前未有拍卖活动,敬请期待" wx:if="{{dataList.length <= 0 && isInit}}"></empty-tips-light>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
...
...
Please
register
or
sign in
to post a comment