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
c2b7eba5
Commit
c2b7eba5
authored
Jun 11, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: canvas err
parent
e7d54d43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
couponCodeDetail.js
src/pages/couponCodeDetail/couponCodeDetail.js
+11
-2
couponCodeDetail.wxml
src/pages/couponCodeDetail/couponCodeDetail.wxml
+1
-1
No files found.
src/pages/couponCodeDetail/couponCodeDetail.js
View file @
c2b7eba5
...
@@ -24,7 +24,16 @@ wxService.page({
...
@@ -24,7 +24,16 @@ wxService.page({
})
})
this
.
getCouponDetail
(
cardno
)
this
.
getCouponDetail
(
cardno
)
},
},
onLoad
()
{
const
{
cardno
}
=
this
.
data
// 条形码
if
(
cardno
){
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
600
,
180
);
}
},
canvasIdErrorCallback
(
e
)
{
console
.
error
(
e
.
detail
.
errMsg
)
},
// 查询单个优惠券
// 查询单个优惠券
getCouponDetail
(
cardno
){
getCouponDetail
(
cardno
){
wx
.
showLoading
({
wx
.
showLoading
({
...
@@ -37,7 +46,7 @@ wxService.page({
...
@@ -37,7 +46,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
codeDetail
:
data
codeDetail
:
data
})
})
// 条形码
//
//
条形码
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
600
,
180
);
wxbarcode
.
barcode
(
'barcode'
,
cardno
,
600
,
180
);
}
else
{
}
else
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
src/pages/couponCodeDetail/couponCodeDetail.wxml
View file @
c2b7eba5
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<image src='/assets/imgs/line.png'></image>
<image src='/assets/imgs/line.png'></image>
</view>
</view>
<view class="barcode">
<view class="barcode">
<canvas canvas-id="barcode" />
<canvas canvas-id="barcode"
binderror="canvasIdErrorCallback"
/>
</view>
</view>
<view class='bottom-code'>{{cardno}}</view>
<view class='bottom-code'>{{cardno}}</view>
</view>
</view>
...
...
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