Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-weapp-smartshop
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 49dfd2b7
authored
Jul 17, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
取消键盘收起
1 parent
53c31841
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
packagesPayment/pages/QRPayment/QRPayment.js
packagesPayment/pages/payment/index.js
packagesPayment/pages/QRPayment/QRPayment.js
View file @
49dfd2b
...
@@ -188,9 +188,9 @@ Page({
...
@@ -188,9 +188,9 @@ Page({
},
},
// 隐藏键盘
// 隐藏键盘
handleHiddenKey
()
{
handleHiddenKey
()
{
this
.
setData
({
//
this.setData({
keyHidden
:
true
//
keyHidden: true
})
//
})
},
},
// 显示键盘
// 显示键盘
handleShowKey
()
{
handleShowKey
()
{
...
@@ -266,7 +266,7 @@ Page({
...
@@ -266,7 +266,7 @@ Page({
res
=>
{
res
=>
{
util
.
hideLoading
()
util
.
hideLoading
()
// console.log(res)
// console.log(res)
let
{
returnCode
,
data
,
message
}
=
res
let
{
returnCode
,
data
,
message
}
=
res
if
(
returnCode
==
0
)
{
if
(
returnCode
==
0
)
{
let
jsapiPayInfo
=
data
.
jsapiPayInfo
?
JSON
.
parse
(
data
.
jsapiPayInfo
)
:
{}
let
jsapiPayInfo
=
data
.
jsapiPayInfo
?
JSON
.
parse
(
data
.
jsapiPayInfo
)
:
{}
...
@@ -275,10 +275,10 @@ Page({
...
@@ -275,10 +275,10 @@ Page({
outTradeNo
:
data
.
outTradeNo
outTradeNo
:
data
.
outTradeNo
})
})
_this
.
wxPayment
(
jsapiPayInfo
)
_this
.
wxPayment
(
jsapiPayInfo
)
}
else
if
(
returnCode
==
-
1
)
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
message
||
'发起支付
失败'
,
title
:
message
||
returnCode
==
-
1
?
'发起支付失败'
:
'支付请求
失败'
,
icon
:
'error'
icon
:
'error'
})
})
}
}
// console.log(JSON.parse(res.data))
// console.log(JSON.parse(res.data))
...
@@ -365,9 +365,9 @@ Page({
...
@@ -365,9 +365,9 @@ Page({
// )
// )
// },
// },
getOrderScreenShot
()
{
getOrderScreenShot
()
{
let
{
merchantName
,
shopMerchantName
,
dataTime
,
outTradeNo
,
payMoney
,
isYqType
}
=
this
.
data
let
{
merchantName
,
shopMerchantName
,
dataTime
,
outTradeNo
,
payMoney
,
isYqType
}
=
this
.
data
let
params
=
JSON
.
stringify
({
merchantName
:
isYqType
?
merchantName
:
shopMerchantName
,
formatAccountDate
:
dataTime
,
selectPayType
:
1
,
outTradeNo
,
payMoney
})
let
params
=
JSON
.
stringify
({
merchantName
:
isYqType
?
merchantName
:
shopMerchantName
,
formatAccountDate
:
dataTime
,
selectPayType
:
1
,
outTradeNo
,
payMoney
})
console
.
log
(
params
,
'params'
);
console
.
log
(
params
,
'params'
)
api
api
.
orderScreenShot
({
url
:
orderPosterImgUrl
+
'orderInfo='
+
params
})
.
orderScreenShot
({
url
:
orderPosterImgUrl
+
'orderInfo='
+
params
})
.
then
(
result
=>
{
.
then
(
result
=>
{
...
...
packagesPayment/pages/payment/index.js
View file @
49dfd2b
...
@@ -36,11 +36,11 @@ Page({
...
@@ -36,11 +36,11 @@ Page({
// console.log('隐藏成功!')
// console.log('隐藏成功!')
}
}
})
})
// options.orderCode = 'S2307141727472187'
// 是别的小程序 跳转过来的
// 是别的小程序 跳转过来的
if
(
options
.
orderCode
)
{
if
(
options
.
orderCode
)
{
this
.
setData
({
this
.
setData
({
orderCode
:
options
.
orderCode
o
therO
rderCode
:
options
.
orderCode
})
})
}
}
// 开发用
// 开发用
...
@@ -87,7 +87,7 @@ Page({
...
@@ -87,7 +87,7 @@ Page({
},
},
gteOpenId
()
{
gteOpenId
()
{
let
that
=
this
let
that
=
this
let
{
orderCode
}
=
this
.
data
let
{
o
therO
rderCode
}
=
this
.
data
// debugger
// debugger
// 登录
// 登录
wx
.
login
({
wx
.
login
({
...
@@ -110,9 +110,9 @@ Page({
...
@@ -110,9 +110,9 @@ Page({
self
.
setData
({
self
.
setData
({
openId
:
data
.
openId
openId
:
data
.
openId
})
})
orderCode
o
therO
rderCode
?
that
.
getOrderDetail
({
?
that
.
getOrderDetail
({
orderCode
orderCode
:
otherOrderCode
})
})
:
that
.
getScenInfo
()
:
that
.
getScenInfo
()
}
}
...
@@ -156,9 +156,9 @@ Page({
...
@@ -156,9 +156,9 @@ Page({
o
o
})
})
_this
.
wxPayment
(
o
)
_this
.
wxPayment
(
o
)
}
else
if
(
returnCode
==
-
1
)
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
message
||
'发起
支付失败'
,
title
:
message
||
returnCode
==
-
1
?
'发起支付失败'
:
'订单
支付失败'
,
icon
:
'error'
icon
:
'error'
})
})
}
}
...
@@ -168,7 +168,7 @@ Page({
...
@@ -168,7 +168,7 @@ Page({
// 调用微信支付
// 调用微信支付
wxPayment
:
function
(
row
)
{
wxPayment
:
function
(
row
)
{
let
_this
=
this
let
_this
=
this
let
{
orderCode
}
=
this
.
data
let
{
o
therO
rderCode
}
=
this
.
data
if
(
this
.
data
.
ajaxing
)
{
if
(
this
.
data
.
ajaxing
)
{
return
false
return
false
}
}
...
@@ -190,7 +190,7 @@ Page({
...
@@ -190,7 +190,7 @@ Page({
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
'支付成功'
title
:
'支付成功'
})
})
if
(
orderCode
)
{
if
(
o
therO
rderCode
)
{
// 跳转回对应的小程序
// 跳转回对应的小程序
return
wx
.
navigateToMiniProgram
({
return
wx
.
navigateToMiniProgram
({
appId
:
'wxe10067a63c1856ac'
,
appId
:
'wxe10067a63c1856ac'
,
...
@@ -200,7 +200,8 @@ Page({
...
@@ -200,7 +200,8 @@ Page({
extraData
:
{
extraData
:
{
// foo: 'bar'
// foo: 'bar'
},
},
envVersion
:
envName
,
// envVersion: envName,
envVersion
:
'trial'
,
success
(
res
)
{
success
(
res
)
{
// 打开成功
// 打开成功
}
}
...
@@ -273,7 +274,7 @@ Page({
...
@@ -273,7 +274,7 @@ Page({
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
let
{
code
,
data
,
errId
}
=
res
let
{
code
,
data
,
errId
,
message
}
=
res
// console.log(data, 'data')
// console.log(data, 'data')
// console.log(data.sceneType == 1);
// console.log(data.sceneType == 1);
// debugger
// debugger
...
@@ -292,7 +293,7 @@ Page({
...
@@ -292,7 +293,7 @@ Page({
}
}
}
else
if
(
errId
==
'-5003'
)
{
}
else
if
(
errId
==
'-5003'
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'订单已失效'
,
title
:
message
||
'订单已失效'
,
icon
:
'error'
icon
:
'error'
})
})
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment