Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
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-back
Commits
f7704876
Commit
f7704876
authored
Mar 04, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
toast替换
parent
cf2a3e20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
49 deletions
+11
-49
index.js
pages/index/index.js
+11
-49
No files found.
pages/index/index.js
View file @
f7704876
...
...
@@ -769,13 +769,7 @@ Page({
},
fail
:
(
res
)
=>
{
console
.
log
(
"发送收款事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
type
:
'fail'
,
content
:
'操作失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
"操作失败"
);
},
});
},
...
...
@@ -819,6 +813,7 @@ Page({
//把手输条码发生到前屏
sendGoodsInfoToFront
(
barcode
)
{
let
context
=
this
;
my
.
showLoading
({});
var
commonRequest
=
{
action
:
ACTION_REQUEST_GOOD_INFO
,
...
...
@@ -833,13 +828,7 @@ Page({
fail
:
(
res
)
=>
{
console
.
log
(
"发送商品条码到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
hideLoading
();
my
.
showToast
({
type
:
'fail'
,
content
:
'操作失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
"操作失败"
);
}
})
},
...
...
@@ -973,13 +962,7 @@ Page({
goPay
(
e
)
{
//购物车不能为空
if
(
this
.
data
.
goods
.
length
==
0
)
{
my
.
showToast
({
type
:
'fail'
,
content
:
'等待收银员录入商品'
,
duration
:
3000
,
success
:
()
=>
{
},
});
this
.
showToast
(
"等待收银员录入商品"
,
3000
)
return
}
...
...
@@ -998,13 +981,7 @@ Page({
},
fail
:
(
res
)
=>
{
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
type
:
'fail'
,
content
:
'结算失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
'结算失败'
);
}
});
...
...
@@ -1022,6 +999,7 @@ Page({
this
.
operateResultClose
();
}
else
if
(
this
.
data
.
flowType
==
FLOW_COLLECTIONS
)
{
this
.
goPage
(
'landscan'
);
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
...
...
@@ -1033,13 +1011,7 @@ Page({
},
fail
:
(
res
)
=>
{
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
type
:
'fail'
,
content
:
'结算失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
'结算失败'
);
}
})
}
else
if
(
this
.
data
.
flowType
==
FLOW_DIRECT_PAYMENT
)
{
...
...
@@ -1182,6 +1154,7 @@ Page({
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
refundAmount
=
miyapay
.
yuan2Fen
(
amount
);
console
.
log
(
"amount"
+
refundAmount
);
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
...
...
@@ -1193,13 +1166,7 @@ Page({
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
my
.
showToast
({
type
:
'fail'
,
content
:
'发送退款金额到前屏失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
"操作失败"
);
}
})
},
...
...
@@ -1249,6 +1216,7 @@ Page({
this
.
setData
({
flowType
:
FLOW_IDLE
,
})
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
...
...
@@ -1260,13 +1228,7 @@ Page({
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
},
fail
:
(
res
)
=>
{
my
.
showToast
({
type
:
'fail'
,
content
:
'发送关闭前屏操作结果页失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
context
.
showToast
(
"操作失败"
);
}
})
},
...
...
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