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
aa00529d
Commit
aa00529d
authored
Jul 11, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改条形码渲染时机
parent
939eebf8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
memberOfOwn.js
src/pages/memberOfOwn/memberOfOwn.js
+29
-4
project.config.json
src/project.config.json
+1
-1
No files found.
src/pages/memberOfOwn/memberOfOwn.js
View file @
aa00529d
...
...
@@ -4,12 +4,14 @@ const wxService = require('../../utils/wxService')
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
var
wxbarcode
=
require
(
'../../codeUtils/index.js'
);
var
count
=
0
;
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
date
:
''
,
focus
:
false
,
memberCardNo
:
''
,
...
...
@@ -43,12 +45,18 @@ wxService.page({
*/
onLoad
(
options
)
{
wx
.
hideShareMenu
();
console
.
log
(
'onload'
)
const
{
memberCardNo
,
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// if(memberCardNo){
// }
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
console
.
log
(
'onshow'
)
// 取会员卡号
const
{
memberCardNo
,
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
memberCardNo
&&
memberId
){
...
...
@@ -58,10 +66,8 @@ wxService.page({
},()
=>
{
// 获取会员信息
this
.
getMemberFind
()
// 条形码
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
memberCardNo
,
500
,
120
);
},
200
)
})
}
},
...
...
@@ -123,9 +129,28 @@ wxService.page({
index
:
data
.
member
.
sex
,
date
:
data
.
member
.
birthday
})
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
memberCardNo
,
500
,
120
);
setTimeout
(()
=>
{
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
memberCardNo
,
500
,
120
);
},
200
);
// this.setInternal();
}
})
},
//定时刷新 10s
setInternal
(){
var
timeOut
=
setInterval
(()
=>
{
if
(
count
<
10
){
count
++
;
wxbarcode
.
barcode
(
'barcode'
,
this
.
data
.
memberCardNo
,
500
,
120
);
}
else
{
clearInterval
(
timeOut
);
}
},
500
);
},
canvasIdErrorCallback
(
e
)
{
console
.
log
(
'code-me'
,
e
.
detail
.
errMsg
)
},
...
...
src/project.config.json
View file @
aa00529d
...
...
@@ -37,7 +37,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
13
,
"current"
:
-1
,
"list"
:
[
{
"id"
:
-1
,
...
...
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