Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-front
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-front
Commits
157de391
Commit
157de391
authored
Feb 27, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixed
parent
dfdf1a77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
6 deletions
+38
-6
actioncmd.js
const/actioncmd.js
+3
-0
home.js
pages/home/home.js
+35
-6
No files found.
const/actioncmd.js
View file @
157de391
...
...
@@ -66,3 +66,6 @@ export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING";
//结算页面back到扫商品页面
export
const
ACTION_BALANCE_BACK_GOODS
=
"ACTION_BALANCE_BACK_GOODS"
;
//提货
export
const
ACTION_PICK_UP_GOODS
=
"ACTION_PICK_UP_GOODS"
;
\ No newline at end of file
pages/home/home.js
View file @
157de391
...
...
@@ -9,7 +9,7 @@ import {
ACTION_DIRECT_PAYMENT
,
ACTION_CONVERT_COUPON
,
ACTION_GO_HOME
,
ACTION_REFUND
,
ACTION_REFUND_FAILED
,
ACTION_REFUND_SUCCESS
,
ACTION_PRINT_LAST_ORDER
,
ACTION_SYSTEM_SETTING
,
ACTION_SYSTEM_SETTING
,
ACTION_PICK_UP_GOODS
}
from
'../../const/actioncmd'
...
...
@@ -17,7 +17,7 @@ Page({
data
:
{
//显示弹窗,>1为显示,2loading 3 result success 4 result failed
scanDialogDisplay
:
0
,
dialogShowType
:
""
,
//弹窗类型:如refund coupon
dialogShowType
:
""
,
//弹窗类型:如refund coupon
pickgoods
dialogRemindText
:
"请扫描兑换码"
,
dialogLoadingText
:
"识别中"
,
dialogResultSuccessRemind
:
"兑换码已识别"
,
...
...
@@ -173,6 +173,28 @@ Page({
context
.
setData
({
toSetting
:
true
,
})
}
else
if
(
res
.
action
==
ACTION_PICK_UP_GOODS
){
//提货
context
.
setData
({
scanDialogDisplay
:
res
.
data
,
dialogShowType
:
"pickgoods"
,
//弹窗类型:如refund coupon pickgoods
dialogRemindText
:
"请扫描提货码"
,
dialogLoadingText
:
"识别中"
,
dialogResultSuccessRemind
:
"提货码已识别"
,
dialogResultSuccessText
:
"恭喜您!提货成功"
,
dialogResultFailureRemind
:
"提货失败"
,
dialogResultFailureText
:
"提货失败!无效的提货码!"
,
});
if
(
res
.
data
!=
0
)
{
var
speechContent
=
"请扫描提货码"
;
my
.
ix
.
speech
({
text
:
speechContent
,
speak
:
true
,
success
:
(
r
)
=>
{
}
});
}
}
}
});
...
...
@@ -309,6 +331,9 @@ Page({
}
else
if
(
this
.
data
.
dialogShowType
==
"coupon"
)
{
// 兑换券
this
.
verifyCoupon
(
r
);
}
else
if
(
this
.
data
.
dialogShowType
==
"pickgoods"
)
{
// 提货
this
.
pickGoods
(
r
);
}
}
},
...
...
@@ -469,10 +494,14 @@ Page({
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
}
});
}
},
//提货商品
pickGoods
(
code
)
{
this
.
setData
({
scanDialogDisplay
:
2
})
setTimeout
(()
=>
{
},
700
);
},
});
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