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
73bdaaf5
authored
2019-11-02 21:41:22 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
87fca6e1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
12 deletions
src/pages/auction-detail/auction-detail.js
src/pages/auction-detail/auction-detail.wxml
src/pages/seckill-detail/seckill-detail.js
src/pages/seckill-detail/seckill-detail.wxml
src/pages/auction-detail/auction-detail.js
View file @
73bdaaf
...
...
@@ -14,6 +14,9 @@ Page({
auctionBidVisible
:
false
,
auctionBidSuccessVisible
:
false
,
auctionBidFailVisible
:
false
,
commonTipsCompVisible
:
false
,
innerTitle
:
"提示"
,
innerText
:
""
,
userInfo
:
{},
productInfo
:
{},
priceInfo
:
[],
...
...
@@ -161,6 +164,7 @@ Page({
let
_this
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
toast
:
false
,
url
:
app
.
api
.
auctionDetail
,
data
:
{
auctionCode
:
code
...
...
@@ -174,12 +178,16 @@ Page({
// })
resolve
();
}).
catch
((
err
)
=>
{
clearTimeout
(
_this
.
data
.
navBackTimeout
);
_this
.
data
.
navBackTimeout
=
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
});
},
1000
);
// clearTimeout(_this.data.navBackTimeout);
// _this.data.navBackTimeout = setTimeout(() => {
// wx.navigateBack({
// delta: 1
// });
// }, 1000);
_this
.
setData
({
commonTipsCompVisible
:
true
,
innerText
:
err
.
errMsg
||
"您未达到进入条件"
})
});
})
},
...
...
@@ -192,6 +200,7 @@ Page({
let
code
=
this
.
data
.
options
.
code
;
if
(
code
)
{
app
.
post
({
toast
:
false
,
url
:
app
.
api
.
auctionRecordLast
,
data
:
{
auctionCode
:
code
...
...
@@ -433,6 +442,13 @@ Page({
this
.
onSubmitHandler
();
break
;
// 通用按钮
case
"_evt_common_comp_button"
:
wx
.
navigateBack
({
delta
:
1
});
break
;
default
:
break
;
}
...
...
src/pages/auction-detail/auction-detail.wxml
View file @
73bdaaf
...
...
@@ -96,3 +96,7 @@
<van-popup show="{{ auctionBidFailVisible }}">
<auction-bid-fail-comp inner-title="出价失败" bind:evtcomp="evtcomp"></auction-bid-fail-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
...
...
src/pages/seckill-detail/seckill-detail.js
View file @
73bdaaf
...
...
@@ -12,6 +12,9 @@ Page({
data
:
{
authorizeVisible
:
false
,
seckillOrderVisible
:
false
,
commonTipsCompVisible
:
false
,
innerTitle
:
"提示"
,
innerText
:
""
,
userInfo
:
{},
productInfo
:
{},
navBackTimeout
:
0
,
...
...
@@ -134,6 +137,7 @@ Page({
let
_this
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
toast
:
false
,
url
:
app
.
api
.
seckillDetail
,
data
:
{
seckillCode
:
code
...
...
@@ -145,12 +149,16 @@ Page({
console
.
log
(
"result:"
,
result
);
resolve
();
}).
catch
((
err
)
=>
{
clearTimeout
(
_this
.
data
.
navBackTimeout
);
_this
.
data
.
navBackTimeout
=
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
});
},
1000
);
// clearTimeout(_this.data.navBackTimeout);
// _this.data.navBackTimeout = setTimeout(() => {
// wx.navigateBack({
// delta: 1
// });
// }, 1000);
_this
.
setData
({
commonTipsCompVisible
:
true
,
innerText
:
err
.
errMsg
||
"您未达到进入条件"
})
});
})
},
...
...
@@ -260,6 +268,13 @@ Page({
this
.
querySeckillSubmit
(
data
);
break
;
// 通用按钮
case
"_evt_common_comp_button"
:
wx
.
navigateBack
({
delta
:
1
});
break
;
default
:
break
;
}
...
...
src/pages/seckill-detail/seckill-detail.wxml
View file @
73bdaaf
...
...
@@ -53,3 +53,7 @@
<van-popup show="{{ seckillOrderVisible }}">
<seckill-order-comp id="seckillOrderComp" product-info="{{productInfo}}" user-info="{{userInfo}}" order-status="{{orderStatus}}" is-sell-out="{{isSellOut}}" bind:evtcomp="evtcomp"></seckill-order-comp>
</van-popup>
<van-popup show="{{ commonTipsCompVisible }}">
<common-tips-comp bind:evtcomp="evtcomp" inner-title="{{innerTitle}}" inner-text="{{innerText}}"></common-tips-comp>
</van-popup>
...
...
Please
register
or
sign in
to post a comment