Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-school-app-public
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-public
Commits
bddc418f
Commit
bddc418f
authored
Jul 25, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test'
parents
d0726083
8b9c2460
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
+11
-0
device.ts
src/api/device.ts
+3
-0
pay.tsx
src/pages/pay/pay.tsx
+6
-0
device.ts
src/store/rootReducers/device.ts
+1
-0
Device.ts
src/types/Device/Device.ts
+1
-0
No files found.
src/api/device.ts
View file @
bddc418f
...
@@ -30,6 +30,9 @@ type DeviceInfoResponse = {
...
@@ -30,6 +30,9 @@ type DeviceInfoResponse = {
positionId
:
string
;
positionId
:
string
;
// 位置id
// 位置id
rates
:
RateInfoResponse
[];
rates
:
RateInfoResponse
[];
//是否纯蓝牙设备 1:是,0:否
isOnlyBluetooth
:
number
;
};
};
type
RateInfoResponse
=
{
type
RateInfoResponse
=
{
mark
:
string
;
mark
:
string
;
...
...
src/pages/pay/pay.tsx
View file @
bddc418f
...
@@ -243,6 +243,10 @@ class Pay extends Component {
...
@@ -243,6 +243,10 @@ class Pay extends Component {
);
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
Taro
.
showModal
({
title
:
'温馨提示'
,
content
:
'为了更好的体验本次服务,请打开手机蓝牙!'
,
});
console
.
error
(
err
);
console
.
error
(
err
);
Taro
.
onBluetoothAdapterStateChange
(
res
=>
{
Taro
.
onBluetoothAdapterStateChange
(
res
=>
{
console
.
log
(
'adapterState changed, now is'
,
res
);
console
.
log
(
'adapterState changed, now is'
,
res
);
...
@@ -717,12 +721,14 @@ class Pay extends Component {
...
@@ -717,12 +721,14 @@ class Pay extends Component {
}
=
this
.
props
;
}
=
this
.
props
;
const
{
payId
,
deviceDone
,
sockedDone
}
=
this
.
state
;
const
{
payId
,
deviceDone
,
sockedDone
}
=
this
.
state
;
if
(
payId
)
{
if
(
payId
)
{
if
(
device
.
isOnlyBluetooth
&&
device
.
isOnlyBluetooth
===
1
)
{
if
(
this
.
checkIsShower
())
{
if
(
this
.
checkIsShower
())
{
console
.
log
(
deviceDone
,
sockedDone
);
console
.
log
(
deviceDone
,
sockedDone
);
if
(
!
deviceDone
||
!
sockedDone
)
{
if
(
!
deviceDone
||
!
sockedDone
)
{
return
this
.
showerPayHandle
();
return
this
.
showerPayHandle
();
}
}
}
}
}
getPayOrder
({
getPayOrder
({
equipmentNum
:
device
.
originCode
,
equipmentNum
:
device
.
originCode
,
equipmentPos
:
device
.
position
,
equipmentPos
:
device
.
position
,
...
...
src/store/rootReducers/device.ts
View file @
bddc418f
...
@@ -17,6 +17,7 @@ export const INITIAL_STATE = {
...
@@ -17,6 +17,7 @@ export const INITIAL_STATE = {
rates
:
[],
rates
:
[],
serviceId
:
0
,
serviceId
:
0
,
serviceName
:
''
,
serviceName
:
''
,
isOnlyBluetooth
:
0
,
};
};
export
const
updateDeviceData
=
(
entity
:
DeviceState
):
Action
=>
({
export
const
updateDeviceData
=
(
entity
:
DeviceState
):
Action
=>
({
...
...
src/types/Device/Device.ts
View file @
bddc418f
...
@@ -20,4 +20,5 @@ export type Device = {
...
@@ -20,4 +20,5 @@ export type Device = {
rates
:
Rate
[];
rates
:
Rate
[];
serviceId
:
number
;
serviceId
:
number
;
serviceName
:
string
;
serviceName
:
string
;
isOnlyBluetooth
:
number
;
};
};
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