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
6808e8d1
Commit
6808e8d1
authored
Jun 04, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 积分兑换
parent
04adec83
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
9 deletions
+22
-9
exchange-coupon-modal.js
src/component/exchange-coupon-modal/exchange-coupon-modal.js
+14
-8
personCenter.js
src/component/personCenter/personCenter.js
+1
-0
couponDetail.js
src/pages/couponDetail/couponDetail.js
+1
-1
Http.js
src/utils/Http.js
+6
-0
No files found.
src/component/exchange-coupon-modal/exchange-coupon-modal.js
View file @
6808e8d1
...
@@ -75,20 +75,26 @@ Component({
...
@@ -75,20 +75,26 @@ Component({
const
params
=
{
const
params
=
{
activateId
:
this
.
data
.
exchangeId
activateId
:
this
.
data
.
exchangeId
}
}
wxService
.
post
(
`/coupon/pointsRedemptionCouponSetting/exchange`
,
this
.
data
.
exchangeId
).
then
(
res
=>
{
wxService
.
post
(
`/coupon/pointsRedemptionCouponSetting/exchange`
,
this
.
data
.
exchangeId
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
res
){
if
(
result
==
0
){
if
(
res
.
res
ult
==
0
){
wx
.
hideLoading
()
wx
.
hideLoading
()
wx
.
showToast
({
wx
.
showToast
({
title
:
'兑换成功'
,
title
:
'兑换成功'
,
icon
:
'success'
icon
:
'success'
})
},()
=>
{
}
else
{
this
.
setData
({
wx
.
showToast
({
isExchange
:
false
title
:
'兑换失败'
,
})
icon
:
'none'
})
})
}
}
}
else
{
this
.
setData
({
isExchange
:
false
})
}
}).
catch
(
err
=>
{
console
.
log
(
'ffff'
,
err
)
})
})
}
}
}
}
...
...
src/component/personCenter/personCenter.js
View file @
6808e8d1
...
@@ -39,6 +39,7 @@ Component({
...
@@ -39,6 +39,7 @@ Component({
methods
:
{
methods
:
{
// 查询积分信息
// 查询积分信息
getMemberPointInfo
(){
getMemberPointInfo
(){
console
.
log
(
'getMemberPointInfo'
)
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
...
...
src/pages/couponDetail/couponDetail.js
View file @
6808e8d1
...
@@ -25,7 +25,7 @@ wxService.page({
...
@@ -25,7 +25,7 @@ wxService.page({
})
})
this
.
getCouponDetail
(
cardno
)
this
.
getCouponDetail
(
cardno
)
// 条形码
// 条形码
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
60
0
,
150
);
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
55
0
,
150
);
},
},
// 查询单个优惠券
// 查询单个优惠券
...
...
src/utils/Http.js
View file @
6808e8d1
...
@@ -144,6 +144,12 @@ class Http {
...
@@ -144,6 +144,12 @@ class Http {
content
:
'请求数据超时'
content
:
'请求数据超时'
})
})
}
}
if
(
error
.
response
.
data
.
desc
){
wx
.
showToast
({
title
:
`
${
error
.
response
.
data
.
desc
}
`
,
icon
:
'none'
})
}
console
.
log
(
JSON
.
stringify
(
error
))
console
.
log
(
JSON
.
stringify
(
error
))
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
}
}
...
...
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