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({
...
@@ -769,13 +769,7 @@ Page({
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
log
(
"发送收款事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
console
.
log
(
"发送收款事件到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
context
.
showToast
(
"操作失败"
);
type
:
'fail'
,
content
:
'操作失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
},
},
});
});
},
},
...
@@ -819,6 +813,7 @@ Page({
...
@@ -819,6 +813,7 @@ Page({
//把手输条码发生到前屏
//把手输条码发生到前屏
sendGoodsInfoToFront
(
barcode
)
{
sendGoodsInfoToFront
(
barcode
)
{
let
context
=
this
;
my
.
showLoading
({});
my
.
showLoading
({});
var
commonRequest
=
{
var
commonRequest
=
{
action
:
ACTION_REQUEST_GOOD_INFO
,
action
:
ACTION_REQUEST_GOOD_INFO
,
...
@@ -833,13 +828,7 @@ Page({
...
@@ -833,13 +828,7 @@ Page({
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
log
(
"发送商品条码到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
console
.
log
(
"发送商品条码到前屏小程序 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
hideLoading
();
my
.
hideLoading
();
my
.
showToast
({
context
.
showToast
(
"操作失败"
);
type
:
'fail'
,
content
:
'操作失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
}
})
})
},
},
...
@@ -973,13 +962,7 @@ Page({
...
@@ -973,13 +962,7 @@ Page({
goPay
(
e
)
{
goPay
(
e
)
{
//购物车不能为空
//购物车不能为空
if
(
this
.
data
.
goods
.
length
==
0
)
{
if
(
this
.
data
.
goods
.
length
==
0
)
{
my
.
showToast
({
this
.
showToast
(
"等待收银员录入商品"
,
3000
)
type
:
'fail'
,
content
:
'等待收银员录入商品'
,
duration
:
3000
,
success
:
()
=>
{
},
});
return
return
}
}
...
@@ -998,13 +981,7 @@ Page({
...
@@ -998,13 +981,7 @@ Page({
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
context
.
showToast
(
'结算失败'
);
type
:
'fail'
,
content
:
'结算失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
}
});
});
...
@@ -1022,6 +999,7 @@ Page({
...
@@ -1022,6 +999,7 @@ Page({
this
.
operateResultClose
();
this
.
operateResultClose
();
}
else
if
(
this
.
data
.
flowType
==
FLOW_COLLECTIONS
)
{
}
else
if
(
this
.
data
.
flowType
==
FLOW_COLLECTIONS
)
{
this
.
goPage
(
'landscan'
);
this
.
goPage
(
'landscan'
);
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
data
:
{
...
@@ -1033,13 +1011,7 @@ Page({
...
@@ -1033,13 +1011,7 @@ Page({
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
console
.
log
(
"通知前屏跳转到结算页面 失败 ===》 "
+
JSON
.
stringify
(
res
));
my
.
showToast
({
context
.
showToast
(
'结算失败'
);
type
:
'fail'
,
content
:
'结算失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
}
})
})
}
else
if
(
this
.
data
.
flowType
==
FLOW_DIRECT_PAYMENT
)
{
}
else
if
(
this
.
data
.
flowType
==
FLOW_DIRECT_PAYMENT
)
{
...
@@ -1182,6 +1154,7 @@ Page({
...
@@ -1182,6 +1154,7 @@ Page({
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
refundAmount
=
miyapay
.
yuan2Fen
(
amount
);
var
refundAmount
=
miyapay
.
yuan2Fen
(
amount
);
console
.
log
(
"amount"
+
refundAmount
);
console
.
log
(
"amount"
+
refundAmount
);
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
data
:
{
...
@@ -1193,13 +1166,7 @@ Page({
...
@@ -1193,13 +1166,7 @@ Page({
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
my
.
showToast
({
context
.
showToast
(
"操作失败"
);
type
:
'fail'
,
content
:
'发送退款金额到前屏失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
}
})
})
},
},
...
@@ -1249,6 +1216,7 @@ Page({
...
@@ -1249,6 +1216,7 @@ Page({
this
.
setData
({
this
.
setData
({
flowType
:
FLOW_IDLE
,
flowType
:
FLOW_IDLE
,
})
})
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
data
:
{
...
@@ -1260,13 +1228,7 @@ Page({
...
@@ -1260,13 +1228,7 @@ Page({
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
my
.
showToast
({
context
.
showToast
(
"操作失败"
);
type
:
'fail'
,
content
:
'发送关闭前屏操作结果页失败'
,
duration
:
3000
,
success
:
()
=>
{
},
});
}
}
})
})
},
},
...
...
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