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
dd9d6ed0
authored
2019-10-09 22:31:19 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
246f1a71
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
607 additions
and
62 deletions
src/app.json
src/app.scss
src/component/empty-tips-light/empty-tips-light.js
src/component/empty-tips-light/empty-tips-light.json
src/component/empty-tips-light/empty-tips-light.scss
src/component/empty-tips-light/empty-tips-light.wxml
src/pages/auction-bid-detail/auction-bid-detail.js
src/pages/auction-bid-detail/auction-bid-detail.json
src/pages/auction-bid-detail/auction-bid-detail.scss
src/pages/auction-bid-detail/auction-bid-detail.wxml
src/pages/auction-detail/auction-detail.js
src/pages/auction-detail/auction-detail.scss
src/pages/auction-detail/auction-detail.wxml
src/pages/auction-list/auction-list.js
src/pages/auction-list/auction-list.wxml
src/pages/auction-mine/auction-mine.json
src/pages/auction-mine/auction-mine.wxml
src/utils/wxTimer.js
src/app.json
View file @
dd9d6ed
...
...
@@ -75,6 +75,7 @@
"gift-sign-tips-comp"
:
"../../component/gift-sign-tips-comp/gift-sign-tips-comp"
,
"order-submit-success-tips-comp"
:
"../../component/order-submit-success-tips-comp/order-submit-success-tips-comp"
,
"empty-tips"
:
"../../component/empty-tips/empty-tips"
,
"empty-tips-light"
:
"../../component/empty-tips-light/empty-tips-light"
,
"van-popup"
:
"../../ui/vant-weapp/popup/index"
}
}
...
...
src/app.scss
View file @
dd9d6ed
...
...
@@ -94,7 +94,7 @@ $contentWidth:690px;
@font-face
{
font-family
:
"iconfont"
;
// src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAScAAsAA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fmPufaG81Drsa3dfAbcRm2ZBQT0Z/BVytfm/T0EB2v9GwQqxvhaxvNlBoLpmjPwJvbqLFrpGPe5LNfEewqHbRAhJlwXIui2hCm4LGn12oeq2B702Jc7uM4aGi9KDDV0AwrC9kAz6CdmwK6iCewSNSW+hGg4cenXCfsk+KyEnYmlUzqBKsqKOlEu0GspGhvAyc5C0SlVOR4UuVYRovdxDent4JSOJSIPoPkboq6U+DEORFK1VkwlgN6RSaUkdrVUgCeMhYxhdiKcnlXcjD4lWDYQjNKQcA6lEqlCHJCehpUHZtRlE6vM5EKkqKuXokrISqwhC05M3TvLmwasGKlGmqVV2Lq31qkn5YDAo3ItC01IjJUALotKDWiRdficFRILhQdbCrxPCE1Wi6so8xleor3Id9NLWqZEiR4kmanTpuVMuUe5/U28TiUqrR96mNKI8Ti8zkmnVyBipdUwdAA==') format('woff2'),
src
:
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAA
T4AAsAAAAAClgAAASsAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDdAqHBIYEATYCJAMgCxIABCAFhG0HZhv8CMgOJU2RwMBgYANAPDzt1+/cmXn+TXFL0ESrpU2IJ0LDo1hJlIqXQChfS9j//73sBlWmUDqts1JhDgrtTl9G0clkKX7SnP//fqWTxwcsrz0blBF8f6KaKgJoeIAGKGqzqch2QcpxH+AZLkzg3QR6e/SEXc8v1YCzQtgXiOdmY29wdhmVGEZoNXXImUV8g0qb3uNnAXzVvz62ITqcSapMOPL2s7w2yFxzfJVAjLCPcEc1w7vy7LidR8YpoBDfQp0fZDNyCqH/pBb3gBnxLxKsOT73fE4/r3m+7qXyKsFu97WiMnI14TZQKZJaU8s/L2qCcgLpT6INa44yomLNE1FYoxGJtRqFdKp1iGjYUBCZzQTxzCpb9YwZYJroiJcgqM/rypiRY0KSVCuurrtDPFzpFRcCvTy9RNY4f6Rf9bx1vm1zfCvnLKDR3MnqmvmLrVevaq5d0964ob9+vVGS6wzCWXT1as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oQRr4L/4OZXT5jQY8yA/NKsmUbsSms72BmCXIZYL5dM+EQuJJIphBq9WYCWHq5Aqu4woJlMVk3fvC6vbfkvexR8MCeUMCIQkUgkjsgk/hdYhuehSsdlWHN60Kk0TI8MQz+nuTtXMh5Pfr1gtffIVc73xy357XVRDcmv6FJv1NXTffLWydUV')
format
(
'woff2'
);
}
.iconfont
{
...
...
@@ -105,40 +105,46 @@ $contentWidth:690px;
-moz-osx-font-smoothing
:
grayscale
;
}
.iconrefresh
:before
{
content
:
"\e874"
;
}
.icon
empty
:before
{
content
:
"\e
6a6
"
;
.icon
backicon1
:before
{
content
:
"\e
937
"
;
}
.iconclose1
:before
{
content
:
"\e615"
;
}
.iconrefresh
:before
{
content
:
"\e874"
;
}
.iconhome
:before
{
content
:
"\e610"
;
}
.iconxinzeng
:before
{
content
:
"\e606"
;
}
.icon
backicon1
:before
{
content
:
"\e
937
"
;
.icon
empty
:before
{
content
:
"\e
6a6
"
;
}
.icon
plus
:before
{
content
:
"\e6
53
"
;
.icon
wuliu
:before
{
content
:
"\e6
dc
"
;
}
.icon
plus
:before
{
content
:
"\e6
53
"
;
.icon
baseline-close-px
:before
{
content
:
"\e6
00
"
;
}
.icon
xinzeng
:before
{
content
:
"\e6
06
"
;
.icon
light
:before
{
content
:
"\e6
69
"
;
}
.drop-down-item
:last-child
{
border-bottom
:
none
;
}
...
...
src/component/empty-tips-light/empty-tips-light.js
0 → 100755
View file @
dd9d6ed
Component
({
options
:
{
styleIsolation
:
'apply-shared'
// 接受外部样式
},
properties
:
{
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText
:
{
type
:
String
,
value
:
'这里空空如也~'
,
},
emptyVisible
:
{
type
:
Boolean
,
value
:
false
}
},
data
:
{
// 这里是一些组件内部数据
someData
:
{}
},
methods
:
{
// 这里是一个自定义方法
customMethod
()
{}
}
})
src/component/empty-tips-light/empty-tips-light.json
0 → 100755
View file @
dd9d6ed
{
"component"
:
true
}
src/component/empty-tips-light/empty-tips-light.scss
0 → 100755
View file @
dd9d6ed
//用的fixed 请确保 内容为空
.empty-tips
{
position
:
fixed
;
text-align
:
center
;
color
:
#666666
;
font-size
:
24px
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
justify-content
:
center
;
top
:
20%
;
.iconfont
{
font-size
:
240px
;
}
.tips
{
padding
:
20px
;
color
:
#8f8f8f
;
}
}
src/component/empty-tips-light/empty-tips-light.wxml
0 → 100755
View file @
dd9d6ed
<view class="empty-tips" >
<view class="tips">
<span class="iconfont iconlight"></span>
<view class="tips">{{innerText}}</view>
</view>
</view>
src/pages/auction-bid-detail/auction-bid-detail.js
View file @
dd9d6ed
import
{
getBindtapData
}
from
'../../utils/util'
;
let
Date
=
require
(
'../../utils/date.js'
);
let
app
=
getApp
();
Page
({
data
:
{},
data
:
{
authorizeVisible
:
false
,
userInfo
:
{},
total
:
0
,
page
:
1
,
size
:
20
,
dataList
:
[],
options
:
{},
},
onShareAppMessage
()
{},
showAuth
()
{
this
.
setData
({
authorizeVisible
:
true
})
},
onLoad
(
options
)
{},
onLoad
(
options
)
{
this
.
setData
({
options
})
console
.
log
(
"options:"
,
options
)
this
.
resetPage
();
this
.
initData
();
},
initData
()
{
this
.
queryAuctionRecordList
();
},
// 到达底部
onReachBottom
()
{
if
(
this
.
data
.
dataList
.
length
<
this
.
data
.
total
)
{
this
.
setData
({
page
:
this
.
data
.
page
+
1
});
this
.
queryAuctionRecordList
();
}
},
// 重置页面列表 点击搜索条件时需要
resetPage
()
{
this
.
setData
({
page
:
1
,
dataList
:
[]
})
},
queryAuctionRecordList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
code
=
this
.
data
.
options
.
code
;
if
(
!
code
)
return
;
app
.
post
({
url
:
app
.
api
.
auctionRecordList
,
data
:
{
auctionCode
:
code
,
page
:
this
.
data
.
page
,
size
:
this
.
data
.
size
,
}
}).
then
((
result
)
=>
{
let
dataList
=
result
.
list
;
dataList
.
forEach
(
element
=>
{
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd hh:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
dataList
=
this
.
data
.
dataList
.
concat
(
dataList
);
this
.
setData
({
dataList
:
dataList
,
total
:
result
.
total
})
resolve
();
})
})
},
// 隐藏蒙层
hideMask
()
{
this
.
setData
({
...
...
src/pages/auction-bid-detail/auction-bid-detail.json
View file @
dd9d6ed
{
"navigationBarTitleText"
:
"
拍卖活动列表
"
"navigationBarTitleText"
:
"
出价详情
"
}
...
...
src/pages/auction-bid-detail/auction-bid-detail.scss
View file @
dd9d6ed
@import
'../../assets/scss/mixins'
;
@import
'../../assets/scss/utils'
;
$contentWidth
:
690px
;
.page
{
.bgc
{}
padding-bottom
:
$pageBottom
;
.bgc
{
// background-color: #f8f8f8;
}
.bg
{}
...
...
@@ -13,6 +19,88 @@
.content
{
position
:
relative
;
// 拍卖详情
.auction
{
width
:
$contentWidth
;
margin
:
0
auto
0
;
font-size
:
24px
;
&
-table
{
@extend
.bb
;
padding
:
24px
0
24px
0
;
// background-color: #f8f8f8;
border-radius
:
8px
;
margin-top
:
0
;
font-size
:
22px
;
.tab
{
&
-header
{
background-color
:
#f2f2f2
;
margin-bottom
:
12px
;
}
&
-item
{
display
:
flex
;
justify-content
:
space-between
;
.item
{
text-align
:
center
;
height
:
32px
;
line-height
:
32px
;
margin
:
12px
0
;
// @extend .bb;
padding
:
0
6px
;
}
.item1
{
width
:
72px
;
@extend
.fcc
;
.block
{
width
:
72px
;
height
:
32px
;
line-height
:
32px
;
@extend
.linear
;
color
:
#ffffff
;
border-radius
:
4px
;
}
}
.item2
{
width
:
200px
;
}
.item3
{
flex
:
1
;
}
.item4
{
width
:
220px
;
}
}
&
-item2
{
color
:
#c9c9c9
;
.item1
{
.block
{
background
:
#c9c9c9
;
}
}
}
}
.tips
{
color
:
#3680EB
;
margin-top
:
32px
;
}
}
}
}
}
}
.disable
{
background
:
#c9c9c9
!
important
;
}
...
...
src/pages/auction-bid-detail/auction-bid-detail.wxml
View file @
dd9d6ed
...
...
@@ -4,7 +4,30 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content">auction-list</view>
<view class="content">
<view class="auction">
<view class="auction-table">
<view class="tab">
<!-- 表头 -->
<view class="tab-item tab-header">
<view class="item item1">状态</view>
<view class="item item2">竞拍者</view>
<view class="item item3">出价</view>
<view class="item item4">时间</view>
</view>
<!-- 表体 -->
<view wx:for="{{dataList}}" wx:key="index" class="tab-item {{index != 0 ? 'tab-item2':''}}">
<view class="item item1">
<view class="block">{{index == 0 ? "领先" : "淘汰"}}</view>
</view>
<view class="item item2">{{item.memberPhone}}</view>
<view class="item item3">¥{{item.priceStr}}</view>
<view class="item item4">{{item.recordTime}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
...
...
src/pages/auction-detail/auction-detail.js
View file @
dd9d6ed
import
{
getBindtapData
}
from
'../../utils/util'
;
let
Date
=
require
(
'../../utils/date.js'
);
var
timer
=
require
(
'../../utils/wxTimer.js'
);
var
wxTimer
;
let
app
=
getApp
();
Page
({
data
:
{
authorizeVisible
:
false
,
userInfo
:
{},
productInfo
:
{},
priceInfo
:
[],
priceTotal
:
0
,
maxPrice
:
0
,
navBackTimeout
:
0
,
socketStatus
:
'closed'
,
hasLogin
:
false
,
waitingResponse
:
false
,
loading
:
false
,
options
:
{},
wxTimerList
:
{},
lastTime
:
""
,
},
onShareAppMessage
()
{},
showAuth
()
{
...
...
@@ -15,15 +30,104 @@ Page({
authorizeVisible
:
true
})
},
onShow
()
{
if
(
wxTimer
)
{
wxTimer
.
calibration
()
}
},
onLoad
(
options
)
{
this
.
queryAuctionDetail
(
options
.
code
);
this
.
setData
({
options
})
this
.
queryAuctionDetail
().
then
((
result
)
=>
{
this
.
refreshTime
();
})
this
.
queryAuctionRecordLast
();
this
.
initData
();
},
onUnload
()
{
if
(
wxTimer
)
{
wxTimer
.
stop
()
}
clearInterval
(
this
.
data
.
stiIndex
);
this
.
closeSocket
()
},
initData
()
{
this
.
queryMember
().
then
((
result
)
=>
{
// this.openSocket();
});
},
// 开始倒计时
refreshTime
()
{
let
_this
=
this
;
if
(
wxTimer
)
{
wxTimer
.
stop
();
}
let
beginTime
=
_this
.
getTimeStr
();
console
.
log
(
"beginTime:"
,
beginTime
);
if
(
!
beginTime
)
return
;
wxTimer
=
new
timer
({
beginTime
:
beginTime
,
complete
()
{
// console.log("完成了")
},
interval
:
1
,
intervalFn
()
{
// console.log("过去了1秒");
let
lastTime
=
_this
.
getTimeStr
({
day
:
true
});
_this
.
setData
({
lastTime
})
// console.log("lastTime:", lastTime);
}
})
wxTimer
.
start
(
_this
);
},
getTimeStr
(
initObj
)
{
initObj
=
initObj
||
{};
let
productInfo
=
this
.
data
.
productInfo
;
if
(
!
productInfo
||
!
productInfo
.
endTime
)
return
;
let
t
=
productInfo
.
endTime
-
new
Date
().
getTime
();
if
(
t
<=
0
)
return
;
let
d
=
Math
.
floor
(
t
/
1000
/
60
/
60
/
24
);
let
h
=
Math
.
floor
(
t
/
1000
/
60
/
60
%
24
)
+
(
initObj
.
day
?
0
:
24
*
d
);
// 含日的话,就不用24*d了
let
m
=
Math
.
floor
(
t
/
1000
/
60
%
60
);
let
s
=
Math
.
floor
(
t
/
1000
%
60
);
if
(
h
<
10
)
h
=
"0"
+
h
;
if
(
m
<
10
)
m
=
"0"
+
m
;
if
(
s
<
10
)
s
=
"0"
+
s
;
let
lastTime
=
h
+
":"
+
m
+
":"
+
s
;
// 包含日
if
(
initObj
.
day
)
{
lastTime
=
d
+
"天 "
+
h
+
":"
+
m
+
":"
+
s
;
}
return
lastTime
;
},
/**
* 点击显示详情
*/
onShowAuctionBidDetailHandler
()
{
app
.
router
.
push
({
path
:
"auctionBidDetail"
,
query
:
{
code
:
this
.
data
.
options
.
code
}
})
},
onShow
()
{},
/**
* 秒杀详情
*/
queryAuctionDetail
(
code
)
{
queryAuctionDetail
()
{
let
code
=
this
.
data
.
options
.
code
;
// 45ebd46114904467824644b55654c27a
// cf8bc80aef3446b58d17abc6167ad536
let
_this
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
...
...
@@ -32,6 +136,7 @@ Page({
auctionCode
:
code
}
}).
then
((
result
)
=>
{
result
.
delayPeriod
=
(
result
.
delayPeriod
/
60
)
+
"分钟"
;
this
.
setData
({
productInfo
:
result
})
...
...
@@ -50,6 +155,129 @@ Page({
})
},
/**
* 获得最高价 和列表
*/
queryAuctionRecordLast
()
{
let
code
=
this
.
data
.
options
.
code
;
if
(
code
)
{
app
.
post
({
url
:
app
.
api
.
auctionRecordLast
,
data
:
{
auctionCode
:
code
}
}).
then
((
result
)
=>
{
let
priceInfo
=
result
.
list
||
[];
priceInfo
.
forEach
(
element
=>
{
element
.
recordTime
=
new
Date
(
element
.
recordTime
).
toString
(
"yyyy.MM.dd hh:mm:ss"
);
element
.
memberPhone
=
element
.
memberPhone
.
substr
(
0
,
3
)
+
'****'
+
element
.
memberPhone
.
substr
(
7
);
});
this
.
setData
({
priceInfo
:
priceInfo
,
maxPrice
:
result
.
maxPrice
||
0
,
priceTotal
:
result
.
total
||
0
})
});
}
},
/**
* 获取会员信息
*/
queryMember
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
member
,
data
:
{}
}).
then
((
result
)
=>
{
this
.
setData
({
userInfo
:
result
})
resolve
(
result
);
})
});
},
/**
* 打开websocket
*/
openSocket
()
{
let
memberCode
=
this
.
data
.
userInfo
.
memberCode
;
let
auctionCode
=
this
.
data
.
options
.
code
;
let
wsUrl
=
'wss://ow.go.qudone.com/zlzm/websocket/'
+
memberCode
+
auctionCode
;
// console.log("wsUrl:", wsUrl);
if
(
!
memberCode
||
!
auctionCode
)
{
wx
.
showModal
({
content
:
"信息丢失,无法同步实时数据"
,
showCancel
:
false
,
success
(
res
)
{}
})
return
;
}
wx
.
onSocketOpen
(()
=>
{
console
.
log
(
'WebSocket 已连接'
);
this
.
setData
({
socketStatus
:
'connected'
,
waitingResponse
:
false
})
})
wx
.
onSocketClose
(()
=>
{
console
.
log
(
'WebSocket 已断开'
)
this
.
setData
({
socketStatus
:
'closed'
})
this
.
openSocket
();
})
wx
.
onSocketError
(
error
=>
{
console
.
error
(
'socket error:'
,
error
)
this
.
setData
({
loading
:
false
})
})
// 监听服务器推送消息
wx
.
onSocketMessage
(
message
=>
{
console
.
log
(
'socket message:'
,
message
)
this
.
setData
({
loading
:
false
})
})
// 打开信道
wx
.
connectSocket
({
// url: 'wss://echo.websocket.org',
url
:
wsUrl
})
},
/**
* 关闭websocket
*/
closeSocket
()
{
if
(
this
.
data
.
socketStatus
===
'connected'
)
{
wx
.
closeSocket
({
success
:
()
=>
{
console
.
log
(
"Socket已断开"
);
this
.
setData
({
socketStatus
:
'closed'
})
}
})
}
},
sendMessage
(
msg
)
{
if
(
this
.
data
.
socketStatus
===
'connected'
)
{
wx
.
sendSocketMessage
({
data
:
msg
})
}
},
// 隐藏蒙层
hideMask
()
{
this
.
setData
({
...
...
src/pages/auction-detail/auction-detail.scss
View file @
dd9d6ed
...
...
@@ -65,7 +65,7 @@ $contentWidth:690px;
font-size
:
22px
;
@extend
.bb
;
.pri
z
e
{
.pri
c
e
{
color
:
#cb3939
;
font-size
:
52px
;
font-weight
:
bold
;
...
...
@@ -113,6 +113,10 @@ $contentWidth:690px;
padding
:
4px
0
;
}
.t2
{
font-size
:
24px
;
}
.date
{
// width: 100%;
font-size
:
22px
;
...
...
@@ -178,7 +182,7 @@ $contentWidth:690px;
&
-table
{
@extend
.bb
;
padding
:
24px
0
24px
40
px
;
padding
:
24px
0
24px
24
px
;
background-color
:
#f8f8f8
;
border-radius
:
8px
;
margin-top
:
24px
;
...
...
@@ -254,3 +258,7 @@ $contentWidth:690px;
}
}
}
.disable
{
background
:
#c9c9c9
!
important
;
}
...
...
src/pages/auction-detail/auction-detail.wxml
View file @
dd9d6ed
...
...
@@ -19,65 +19,53 @@
<view class="func">
<view class="arrow"></view>
<view class="func-ele func-left">
<text class="pri
ze">¥5
</text>
<text class="pri
ce">¥{{maxPrice}}
</text>
<text class="t1">当前价格</text>
</view>
<view class="func-ele func-right">
<text class="t1">拍卖进行中</text>
<text class="t1 date">时间时间</text>
<view class="func-ele func-right {{productInfo.status != 1 ? 'disable' : ''}}">
<text wx:if="{{productInfo.status == 0}}" class="t1 t2">拍卖未开始</text>
<text wx:if="{{productInfo.status == 1}}" class="t1">拍卖进行中</text>
<text wx:if="{{productInfo.status == 2}}" class="t1 t2">拍卖已结束</text>
<text wx:if="{{productInfo.status == 1}}" class="t1 date">{{lastTime}}</text>
</view>
</view>
<!-- 描述 -->
<view class="desc">
<view class="refresh-btn">刷新价格</view>
<view class="desc-tit">
标题
</view>
<view class="desc-t1">
描述
</view>
<view class="desc-t1">
活动区域
</view>
<view
bindtap="queryAuctionRecordLast"
class="refresh-btn">刷新价格</view>
<view class="desc-tit">
{{productInfo.auctionName}}
</view>
<view class="desc-t1">
{{productInfo.auctionDescription}}
</view>
<view class="desc-t1">
{{productInfo.district}}
</view>
</view>
<!-- 线 -->
<view class="line"></view>
<!-- 拍卖详情 -->
<view class="auction">
<view class="auction-desc">
<view class="t1">产品原价:
280
元</view>
<view class="t1">起拍价:
280
元</view>
<view class="t1">最小
价格幅度:280
元</view>
<view class="t1">延时周期:
5分钟
</view>
<view class="t1">产品原价:
{{productInfo.originalPrice}}
元</view>
<view class="t1">起拍价:
{{productInfo.startPrice}}
元</view>
<view class="t1">最小
加价幅度:{{productInfo.minScope}}
元</view>
<view class="t1">延时周期:
{{productInfo.delayPeriod}}
</view>
</view>
<view class="auction-table">
<view class="tab">
<!-- 表头 -->
<view class="tab-item">
<view class="item item1">状态</view>
<view class="item item2">竞拍者</view>
<view class="item item3">出价</view>
<view class="item item4">时间</view>
</view>
<view class="tab-item">
<view class="item item1">
<view class="block">领先</view>
</view>
<view class="item item2">xxx123</view>
<view class="item item3">¥150</view>
<view class="item item4">2019.10.02 10:36:12</view>
</view>
<view class="tab-item tab-item2">
<view class="item item1">
<view class="block">领先</view>
</view>
<view class="item item2">xxx123</view>
<view class="item item3">¥150</view>
<view class="item item4">2019.10.02 10:36:12</view>
</view>
<view class="tab-item tab-item2">
<!-- 表体 -->
<view wx:for="{{priceInfo}}" wx:key="index" class="tab-item {{index != 0 ? 'tab-item2':''}}">
<view class="item item1">
<view class="block">
领先
</view>
<view class="block">
{{index == 0 ? "领先" : "淘汰"}}
</view>
</view>
<view class="item item2">
xxx123
</view>
<view class="item item3">¥
150
</view>
<view class="item item4">
2019.10.02 10:36:12
</view>
<view class="item item2">
{{item.memberPhone}}
</view>
<view class="item item3">¥
{{item.priceStr}}
</view>
<view class="item item4">
{{item.recordTime}}
</view>
</view>
</view>
<view
class="tips">查看所有n
次出价></view>
<view
bindtap="onShowAuctionBidDetailHandler" class="tips">查看所有{{priceTotal}}
次出价></view>
</view>
</view>
</view>
...
...
src/pages/auction-list/auction-list.js
View file @
dd9d6ed
...
...
@@ -48,12 +48,22 @@ Page({
},
/**
* 显示我的拍卖页
*/
onShowAuctionMineHandler
()
{
app
.
router
.
push
({
path
:
"auctionMine"
})
},
/**
* 详情页面
*/
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
:
"auctionDetail"
,
query
:
{
...
...
@@ -61,6 +71,13 @@ Page({
title
:
curData
.
auctionName
}
})
}
else
{
wx
.
showModal
({
content
:
curData
.
reason
||
"您未达到进入条件"
,
showCancel
:
false
,
success
(
res
)
{}
})
}
}
},
...
...
src/pages/auction-list/auction-list.wxml
View file @
dd9d6ed
...
...
@@ -7,7 +7,7 @@
<view class="content">
<!-- 我的拍卖按钮 -->
<view class="my-btn">
<view class="btn">我的拍卖</view>
<view
bindtap="onShowAuctionMineHandler"
class="btn">我的拍卖</view>
</view>
<view class="list">
<view wx:for="{{dataList}}" wx:key="{{index}}" class="border list-item">
...
...
@@ -31,6 +31,7 @@
</view>
</view>
</view>
<empty-tips-light inner-text="当前未有拍卖活动,敬请期待" wx:if="{{dataList.length <= 0}}"></empty-tips-light>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
...
...
src/pages/auction-mine/auction-mine.json
View file @
dd9d6ed
{
"navigationBarTitleText"
:
"
拍卖活动列表
"
"navigationBarTitleText"
:
"
我的竞拍订单
"
}
...
...
src/pages/auction-mine/auction-mine.wxml
View file @
dd9d6ed
...
...
@@ -4,7 +4,7 @@
<!-- <view class="app__top-shadow"></view> -->
<view class="app__content main">
<view class="top-space"></view>
<view class="content">
auction-list
</view>
<view class="content">
我的竞拍订单
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
...
...
src/utils/wxTimer.js
0 → 100644
View file @
dd9d6ed
var
wxTimer
=
function
(
initObj
){
initObj
=
initObj
||
{};
this
.
beginTime
=
initObj
.
beginTime
||
"00:00:00"
;
//开始时间
this
.
interval
=
initObj
.
interval
||
0
;
//间隔时间
this
.
complete
=
initObj
.
complete
;
//结束任务
this
.
intervalFn
=
initObj
.
intervalFn
;
//间隔任务
this
.
name
=
initObj
.
name
;
//当前计时器在计时器数组对象中的名字
this
.
intervarID
;
//计时ID
this
.
endTime
;
//结束时间
this
.
endSystemTime
;
//结束的系统时间
}
wxTimer
.
prototype
=
{
//开始
start
:
function
(
self
){
this
.
endTime
=
new
Date
(
"1970/01/01 "
+
this
.
beginTime
).
getTime
();
//1970年1月1日的00:00:00的字符串日期
this
.
endSystemTime
=
new
Date
(
Date
.
now
()
+
this
.
endTime
);
var
that
=
this
;
//开始倒计时
var
count
=
0
;
//这个count在这里应该是表示s数,js中获得时间是ms,所以下面*1000都换成ms
function
begin
(){
var
tmpTime
=
new
Date
(
that
.
endTime
-
1000
*
count
++
);
//把2011年1月1日日 00:00:00换成数字型,这样就可以直接1s,1s的减,就变成了倒计时,为了看的更明确,又用new date把字符串换回来了
var
tmpTimeStr
=
tmpTime
.
toString
().
substr
(
16
,
8
);
//去掉前面的年月日就剩时分秒了
var
wxTimerSecond
=
(
tmpTime
.
getTime
()
-
new
Date
(
"1970/01/01 00:00:00"
).
getTime
())
/
1000
;
var
wxTimerList
=
self
.
data
.
wxTimerList
;
//更新计时器数组
wxTimerList
[
that
.
name
]
=
{
wxTimer
:
tmpTimeStr
,
wxTimerSecond
:
wxTimerSecond
,
}
self
.
setData
({
wxTimer
:
tmpTimeStr
,
wxTimerSecond
:
wxTimerSecond
,
wxTimerList
:
wxTimerList
});
//时间间隔执行函数
if
(
0
==
(
count
-
1
)
%
that
.
interval
&&
that
.
intervalFn
){
that
.
intervalFn
();
}
//结束执行函数
if
(
wxTimerSecond
<=
0
){
if
(
that
.
complete
){
that
.
complete
();
}
that
.
stop
();
}
}
begin
();
this
.
intervarID
=
setInterval
(
begin
,
1000
);
},
//结束
stop
:
function
(){
clearInterval
(
this
.
intervarID
);
},
//校准
calibration
:
function
(){
this
.
endTime
=
this
.
endSystemTime
-
Date
.
now
();
}
}
module
.
exports
=
wxTimer
;
Please
register
or
sign in
to post a comment