Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
4c91197f
Commit
4c91197f
authored
Aug 28, 2020
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/goods' into 'master'
fix: H5支付跳转 See merge request
!108
parents
1703e665
25826555
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
pay.js
src/service/pay.js
+7
-5
detailPay.mixin.js
src/views/Goods/Detail/modules/detailPay.mixin.js
+7
-3
index.vue
src/views/Policy/PayWaiting/index.vue
+2
-2
No files found.
src/service/pay.js
View file @
4c91197f
...
...
@@ -2,7 +2,7 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52
* @LastEditors: gzw
* @LastEditTime: 2020-08-28 1
1:56
:33
* @LastEditTime: 2020-08-28 1
3:22
:33
*/
import
qs
from
"
qs
"
;
...
...
@@ -55,7 +55,7 @@ function payByWeixinJsapi(info = {}, callback) {
*/
function
payByWeixinH5
(
info
)
{
if
(
!
info
.
url
)
return
;
info
.
params
.
isXyqb
=
isXyqb
;
info
.
params
.
isXyqb
=
isXyqb
?
1
:
0
;
const
currentPath
=
encodeURIComponent
(
window
.
location
.
origin
+
"
/payWaiting
"
+
...
...
@@ -74,7 +74,7 @@ function payByWeixinH5(info) {
*/
function
payByThirdPartyCashier
(
info
)
{
if
(
!
info
.
url
)
return
;
info
.
params
.
isXyqb
=
isXyqb
;
info
.
params
.
isXyqb
=
isXyqb
?
1
:
0
;
const
currentPath
=
encodeURIComponent
(
window
.
location
.
origin
+
"
/payWaiting
"
+
...
...
@@ -91,7 +91,7 @@ function payByThirdPartyCashier(info) {
* @return {Promise} 回调
*/
export
function
payByWay
(
type
=
"
THIRD
"
,
payInfo
)
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
if
(
type
===
"
JSAPI
"
&&
!
payInfo
.
url
)
{
payByWeixinJsapi
(
payInfo
,
function
()
{
// if (e === "ok") {
...
...
@@ -104,10 +104,12 @@ export function payByWay(type = "THIRD", payInfo) {
}
else
{
if
(
payInfo
.
url
.
indexOf
(
"
tenpay
"
)
>
-
1
)
{
payByWeixinH5
(
payInfo
);
reject
();
}
else
{
payByThirdPartyCashier
(
payInfo
);
reject
();
}
resolve
();
//
resolve();
}
});
}
src/views/Goods/Detail/modules/detailPay.mixin.js
View file @
4c91197f
...
...
@@ -73,8 +73,12 @@ export default {
}
};
}
payByWay
(
tradeType
,
payInfo
).
then
(()
=>
{
payByWay
(
tradeType
,
payInfo
)
.
then
(()
=>
{
this
.
getPayResult
();
})
.
catch
(()
=>
{
console
.
log
(
"
h5支付
"
);
});
}
else
{
this
.
setIsPayWait
(
false
);
...
...
src/views/Policy/PayWaiting/index.vue
View file @
4c91197f
...
...
@@ -15,8 +15,8 @@ export default {
mounted
()
{
this
.
setIsPayWait
(
true
);
this
.
orderInfo
=
this
.
$route
.
query
;
if
(
this
.
orderInfo
.
isXyqb
)
{
window
.
location
.
href
=
"
xyqb://
"
;
if
(
this
.
orderInfo
.
isXyqb
==
1
)
{
window
.
location
.
href
=
"
xyqb://
my
"
;
return
;
}
if
(
!
this
.
orderInfo
.
payOrderNo
)
{
...
...
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