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
dde90b0f
Commit
dde90b0f
authored
Jul 29, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改预约提示文字
parent
e2bcb4f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
18 deletions
+35
-18
Home.tsx
src/pages/Home/Home.tsx
+1
-1
ShowerAppointment.tsx
src/pages/Shower/ShowerAppointment.tsx
+28
-17
AppointermentCard.scss
...hower/components/AppointermentCard/AppointermentCard.scss
+6
-0
No files found.
src/pages/Home/Home.tsx
View file @
dde90b0f
...
...
@@ -193,7 +193,7 @@ class Home extends Component {
}
goShower
=
()
=>
{
const
{
userinfo
}
=
this
.
props
;
const
{
userinfo
,
updateShowerControlConfig
}
=
this
.
props
;
getShowerController
({
campusId
:
userinfo
.
areaId
,
customerId
:
userinfo
.
customerId
,
...
...
src/pages/Shower/ShowerAppointment.tsx
View file @
dde90b0f
...
...
@@ -46,6 +46,24 @@ function ShowerAppointment() {
const
searchEquipment
=
()
=>
{
setSearchString
(
search
.
value
);
};
const
appointingEquipmentHandle
=
(
deviceCode
:
string
)
=>
{
return
appointingEquipment
({
account
:
userInfo
.
customerId
.
toString
(),
phone
:
userInfo
.
customerPhone
,
userId
:
userInfo
.
customerId
,
userName
:
userInfo
.
customerName
,
deviceCode
:
deviceCode
,
})
.
then
(
res
=>
{
console
.
log
(
res
);
Taro
.
showToast
({
title
:
res
.
msg
,
});
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
};
const
appointingStart
=
(
deviceCode
:
string
,
operationMode
:
number
)
=>
{
const
thresholdValue
=
showerControlConfig
.
thresholdValue
;
let
aimiItem
=
showerControlConfig
.
balances
.
find
(
...
...
@@ -59,30 +77,23 @@ function ShowerAppointment() {
let
money
=
operationMode
===
OperationMode
.
onlyAimi
?
aimi
:
aimi
+
bean
;
if
(
money
<
thresholdValue
)
{
let
text
=
showerControlConfig
.
appointmentThresholdPrompt
;
let
i
=
0
;
let
text
=
showerControlConfig
.
appointmentThresholdPrompt
.
replace
(
/
\{\}
/g
,
()
=>
{
return
i
++
==
0
?
aimi
.
toFixed
(
2
)
:
bean
.
toFixed
(
2
);
},
);
Taro
.
showModal
({
title
:
'提示'
,
content
:
text
,
}).
then
(
res
=>
{
if
(
res
.
confirm
)
{
appointingEquipment
({
account
:
userInfo
.
customerId
.
toString
(),
phone
:
userInfo
.
customerPhone
,
userId
:
userInfo
.
customerId
,
userName
:
userInfo
.
customerName
,
deviceCode
:
deviceCode
,
})
.
then
(
res
=>
{
console
.
log
(
res
);
Taro
.
showToast
({
title
:
res
.
msg
,
});
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
appointingEquipmentHandle
(
deviceCode
);
}
});
}
else
{
appointingEquipmentHandle
(
deviceCode
);
}
};
const
goBluetoothShower
=
()
=>
{
...
...
src/pages/Shower/components/AppointermentCard/AppointermentCard.scss
View file @
dde90b0f
...
...
@@ -56,5 +56,11 @@
color
:
#6180f4
;
background-color
:
#fafafe
;
border-radius
:
0
0
16px
16px
;
text
:last-child
{
display
:
inline-block
;
margin-left
:
20px
;
width
:
300px
;
text-align
:
left
;
}
}
}
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