Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app
Project
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
姜雷
wx-school-app
Commits
c53ffc87
Commit
c53ffc87
authored
Mar 06, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加刷新条码逻辑
parent
5c6fedd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
customer.ts
src/api/customer.ts
+6
-1
BarCode.tsx
src/pages/BarCode/BarCode.tsx
+16
-4
No files found.
src/api/customer.ts
View file @
c53ffc87
import
{
customerFetch
}
from
'.'
;
import
{
customerFetch
,
ResponseDataEntity
}
from
'.'
;
export
class
LoginParams
{
export
class
LoginParams
{
/** 登陆标识 */
/** 登陆标识 */
...
@@ -78,3 +78,8 @@ export const fetchFeedback = (entity: CustomerParam) =>
...
@@ -78,3 +78,8 @@ export const fetchFeedback = (entity: CustomerParam) =>
method
:
'POST'
,
method
:
'POST'
,
data
:
entity
,
data
:
entity
,
});
});
export
const
refreshCodeBar
=
():
Promise
<
ResponseDataEntity
<
string
>>
=>
customerFetch
({
url
:
'/dcxy/wechat/applet/flush/idbar'
,
});
src/pages/BarCode/BarCode.tsx
View file @
c53ffc87
...
@@ -19,6 +19,7 @@ import {
...
@@ -19,6 +19,7 @@ import {
CustomerBeanAccountVo
,
CustomerBeanAccountVo
,
}
from
'../../api/baseClass'
;
}
from
'../../api/baseClass'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
Customer
}
from
'../../types/Customer/Customer'
;
import
{
refreshCodeBar
}
from
'../../api/customer'
;
type
PageStateProps
=
{
type
PageStateProps
=
{
userinfo
:
Customer
;
userinfo
:
Customer
;
...
@@ -187,10 +188,21 @@ class BarCode extends Component {
...
@@ -187,10 +188,21 @@ class BarCode extends Component {
}
}
refreshCodeBar
()
{
refreshCodeBar
()
{
const
{
updateUserInfo
}
=
this
.
props
;
const
{
updateUserInfo
}
=
this
.
props
;
updateUserInfo
({
refreshCodeBar
()
idBar
:
''
,
.
then
(
res
=>
{
});
console
.
log
(
res
);
this
.
drawBarCode
(
false
);
const
data
=
res
.
data
;
updateUserInfo
({
idBar
:
data
,
});
this
.
drawBarCode
(
false
);
})
.
catch
(
err
=>
{
Taro
.
showToast
({
title
:
err
.
msg
||
'获取失败'
,
icon
:
'none'
,
});
});
}
}
render
()
{
render
()
{
...
...
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