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 bf4f75be
authored
Dec 18, 2025
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.5.0' into 'master'
上线合并 See merge request
!38
2 parents
ba058310
1c0a5aae
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
123 additions
and
54 deletions
components/modal/modal.js
components/modal/modal.wxml
components/modal/modal.wxss
config.js
packagesPayment/pages/QRPayment/QRPayment.js
packagesPayment/pages/QRPayment/QRPayment.wxml
packagesPayment/pages/QRPayment/QRPayment.wxss
packagesPayment/pages/payment/index.js
project.private.config.json
components/modal/modal.js
View file @
bf4f75b
...
@@ -18,11 +18,12 @@ Component({
...
@@ -18,11 +18,12 @@ Component({
value
:
'alert'
,
value
:
'alert'
,
observer
:
function
(
newVal
,
oldVal
)
{
}
observer
:
function
(
newVal
,
oldVal
)
{
}
},
},
closeApp
:
Boolean
closeApp
:
Boolean
},
},
data
:
{},
data
:
{},
methods
:
{
methods
:
{
confirm
:
function
(
e
)
{
confirm
:
function
(
e
)
{
console
.
log
(
111
);
this
.
setData
({
this
.
setData
({
hidden
:
true
hidden
:
true
});
});
...
...
components/modal/modal.wxml
View file @
bf4f75b
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
<view class="modal-footer {{type === 'custom' ? 'hidden' : ''}}">
<view class="modal-footer {{type === 'custom' ? 'hidden' : ''}}">
<view hover-class hidden="{{type === 'alert' }}" bindtap='confirm' class='btn btn-cancel'>取消</view>
<view hover-class hidden="{{type === 'alert' }}" bindtap='confirm' class='btn btn-cancel'>取消</view>
<block wx:if='{{closeApp}}'>
<block wx:if='{{closeApp}}'>
<navigator class='btn btn-ok' target="miniProgram" open-type="exit">确定</navigator
>
<navigator class='btn btn-ok' target="miniProgram" open-type="exit">确定</navigator
>
</block>
</block>
<block wx:else>
<block wx:else>
<view hover-class data-is-confirm="true" bindtap='confirm' class='btn btn-ok'>确认
</view>
<view hover-class data-is-confirm="true" bindtap='confirm' class='btn btn-ok'>知道了
</view>
</block>
</block>
</view>
</view>
</view>
</view>
...
...
components/modal/modal.wxss
View file @
bf4f75b
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
height: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
background: rgba(0, 0, 0, 0.4);
}
}
.hidden {
.hidden {
display: none !important;
display: none !important;
}
}
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
content: '';
content: '';
background: rgba(0, 0, 0, 0.4);
background: rgba(0, 0, 0, 0.4);
}
}
.modal-wrapper .modal {
.modal-wrapper .modal {
position: fixed;
position: fixed;
top: 50%;
top: 50%;
...
@@ -34,6 +36,7 @@
...
@@ -34,6 +36,7 @@
transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
overflow: hidden;
overflow: hidden;
}
}
.modal-wrapper .modal-bottom {
.modal-wrapper .modal-bottom {
top: auto;
top: auto;
bottom: 0;
bottom: 0;
...
@@ -42,6 +45,7 @@
...
@@ -42,6 +45,7 @@
border-radius: 0;
border-radius: 0;
transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.modal-wrapper .modal-top {
.modal-wrapper .modal-top {
top: 0;
top: 0;
bottom: auto;
bottom: auto;
...
@@ -50,14 +54,17 @@
...
@@ -50,14 +54,17 @@
border-radius: 0;
border-radius: 0;
transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.modal-wrapper .modal-sm {
.modal-wrapper .modal-sm {
left: 12%;
left: 12%;
right: 12%;
right: 12%;
}
}
.modal-wrapper .modal-block {
.modal-wrapper .modal-block {
left: 0;
left: 0;
right: 0;
right: 0;
}
}
.modal-wrapper .modal.transparent-dark {
.modal-wrapper .modal.transparent-dark {
background-color: rgba(0, 0, 0, 0.7);
background-color: rgba(0, 0, 0, 0.7);
color: #FFF;
color: #FFF;
...
@@ -65,26 +72,32 @@
...
@@ -65,26 +72,32 @@
max-width: 300rpx;
max-width: 300rpx;
margin: 0 auto;
margin: 0 auto;
}
}
.modal-wrapper .modal-header {
.modal-wrapper .modal-header {
padding: 68rpx 30rpx 0;
padding: 68rpx 30rpx 0;
text-align: center;
text-align: center;
}
}
.modal-wrapper .modal-header .title {
.modal-wrapper .modal-header .title {
font-weight: normal;
font-weight: normal;
color: #333;
color: #333;
}
}
.modal-wrapper .modal-header.no-borders {
.modal-wrapper .modal-header.no-borders {
padding: 15rpx;
padding: 15rpx;
}
}
.modal-wrapper .modal-header.no-borders + .modal-body {
.modal-wrapper .modal-header.no-borders+.modal-body {
padding: 0 30rpx 22rpx;
padding: 0 30rpx 22rpx;
}
}
.modal-wrapper .modal-body {
.modal-wrapper .modal-body {
overflow-y: auto;
overflow-y: auto;
max-height: 660rpx;
max-height: 660rpx;
padding:
100rpx 15
rpx;
padding:
30rpx 15rpx 60
rpx;
text-align: center;
text-align: center;
}
}
.modal-wrapper .modal-footer {
.modal-wrapper .modal-footer {
display: flex;
display: flex;
border-top: 1rpx solid #D8D8D8;
border-top: 1rpx solid #D8D8D8;
...
@@ -92,6 +105,7 @@
...
@@ -92,6 +105,7 @@
justify-content: space-around;
justify-content: space-around;
text-align: center;
text-align: center;
}
}
.modal-wrapper .modal-footer .btn {
.modal-wrapper .modal-footer .btn {
padding: 24rpx;
padding: 24rpx;
border: none;
border: none;
...
@@ -99,14 +113,17 @@
...
@@ -99,14 +113,17 @@
border-radius: 0;
border-radius: 0;
flex: 1;
flex: 1;
font-size: 28rpx;
font-size: 28rpx;
color: #
007A
FF;
color: #
347B
FF;
}
}
.modal-wrapper .modal-footer .btn + .btn {
.modal-wrapper .modal-footer .btn+.btn {
border-left: 1rpx solid #D8D8D8;
border-left: 1rpx solid #D8D8D8;
}
}
.modal-wrapper .modal-footer .btn-ok {
.modal-wrapper .modal-footer .btn-ok {
color: #007AFF;
color: #007AFF;
}
}
.mask_relative {
.mask_relative {
position: absolute;
position: absolute;
top: 0;
top: 0;
...
...
config.js
View file @
bf4f75b
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* 3生产环境
* 3生产环境
* 4预发布
* 4预发布
*/
*/
let
index
=
1
let
index
=
2
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
accountInfo
=
wx
.
getAccountInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
const
systemInfo
=
wx
.
getSystemInfoSync
()
...
...
packagesPayment/pages/QRPayment/QRPayment.js
View file @
bf4f75b
...
@@ -10,6 +10,8 @@ Page({
...
@@ -10,6 +10,8 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
tips
:
'222'
,
showModal
:
true
,
KeyboardKeys
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
0
,
'.'
],
KeyboardKeys
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
0
,
'.'
],
merchantId
:
''
,
merchantId
:
''
,
merchantName
:
''
,
merchantName
:
''
,
...
@@ -38,7 +40,6 @@ Page({
...
@@ -38,7 +40,6 @@ Page({
userCollaborationCheck
:
false
,
userCollaborationCheck
:
false
,
isYqType
:
true
isYqType
:
true
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
...
@@ -53,30 +54,28 @@ Page({
...
@@ -53,30 +54,28 @@ Page({
console
.
log
(
'隐藏成功!'
)
console
.
log
(
'隐藏成功!'
)
}
}
})
})
// options = {
// options = {
// sceneId%3D4
// sceneId%3D4
// scene: 'sceneId%3D4'
// scene: 'sceneId%3D4'
// }
// }
console
.
log
(
decodeURIComponent
(
options
.
scene
))
// console.log(decodeURIComponent(options.scene))
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
// let id = decodeURIComponent(options.scene).split('=')[1]
if
(
!
id
)
{
// if (!id) {
throw
new
Error
(
'id缺失'
)
// throw new Error('id缺失')
}
// }
// console.log(id)
// // console.log(id)
//获取门店信息
// //获取门店信息
this
.
getMerthcantInfo
(
id
)
// this.getMerthcantInfo(id)
// 获取用户隐私协议配置
this
.
getTitleByModule
()
// // 获取用户隐私协议配置
// this.getTitleByModule()
// this.navToUserCollaboration()
// this.navToUserCollaboration()
// this.setData({
// this.setData({
// merchantId: id
// merchantId: id
// })
// })
this
.
wxPayment
()
},
close
()
{
console
.
log
(
'close'
);
wx
.
exitMiniProgram
()
},
},
navToUserCollaboration
()
{
navToUserCollaboration
()
{
wx
.
$router
.
go
(
'userCollaboration'
)
wx
.
$router
.
go
(
'userCollaboration'
)
...
@@ -85,6 +84,7 @@ Page({
...
@@ -85,6 +84,7 @@ Page({
getMiniAppConfig
(
id
)
{
getMiniAppConfig
(
id
)
{
console
.
log
(
id
,
'id'
);
console
.
log
(
id
,
'id'
);
let
that
=
this
let
that
=
this
let
{
isYqType
}
=
this
.
data
const
target
=
[
'develop'
,
'develop'
,
'test'
,
'production'
,
'beta'
]
const
target
=
[
'develop'
,
'develop'
,
'test'
,
'production'
,
'beta'
]
wx
.
request
({
wx
.
request
({
// url: `${domain}${path}?method=${method}`,
// url: `${domain}${path}?method=${method}`,
...
@@ -96,13 +96,25 @@ Page({
...
@@ -96,13 +96,25 @@ Page({
responseType
:
'text'
,
responseType
:
'text'
,
success
(
response
)
{
success
(
response
)
{
// app.globalData.configInfo = response.data
// app.globalData.configInfo = response.data
let
{
statusCode
,
data
:
{
disabledList
}
}
=
response
let
{
statusCode
,
data
:
{
disabledList
,
prohibitedList
}
}
=
response
console
.
log
(
statusCode
,
'statusCode'
);
console
.
log
(
statusCode
,
'statusCode'
);
if
(
statusCode
==
200
)
{
if
(
statusCode
==
200
)
{
let
merchantDisabled
=
disabledList
.
some
(
item
=>
item
.
merchantId
==
id
)
let
merchantDisabled
=
disabledList
.
some
(
item
=>
item
.
merchantId
==
id
)
that
.
setData
({
that
.
setData
({
merchantDisabled
merchantDisabled
})
})
if
(
isYqType
)
{
let
disabledPay
=
!
prohibitedList
.
some
(
item
=>
item
.
merchantId
==
id
)
// console.log(this.disabledPay, prohibitedList)
if
(
disabledPay
)
{
that
.
setData
({
disabledPay
,
showModal
:
false
})
// this.show = true
}
}
// isYqType && this.setDisabledList(op?.merchantId)
}
}
// console.log(data.disabledList, 'response');
// console.log(data.disabledList, 'response');
// resolve(response.data)
// resolve(response.data)
...
@@ -175,8 +187,8 @@ Page({
...
@@ -175,8 +187,8 @@ Page({
...
op
,
...
op
,
isYqType
isYqType
})
})
// 获取质保卡配置
// 获取质保卡配置
isYqType
&&
this
.
getwxQrcode
()
isYqType
&&
this
.
getwxQrcode
()
this
.
getMiniAppConfig
(
op
.
merchantId
||
op
.
shopMerchantId
)
this
.
getMiniAppConfig
(
op
.
merchantId
||
op
.
shopMerchantId
)
//util.showLoading('加载中...')
//util.showLoading('加载中...')
...
@@ -264,10 +276,8 @@ Page({
...
@@ -264,10 +276,8 @@ Page({
}
else
{
}
else
{
money
=
payMoney
+
key
money
=
payMoney
+
key
}
}
// console.log(/^(\d+\.?\d{0,2})$/.test(money), money, 'money')
// console.log(/^(\d+\.?\d{0,2})$/.test(money), money, 'money')
// console.log(/^(\d{0,7}\.?\d{0,2})$/.test(money), money, 'money')
// console.log(/^(\d{0,7}\.?\d{0,2})$/.test(money), money, 'money')
if
(
/^
(\d{0,6}\.?\d{0,2})
$/
.
test
(
money
))
{
if
(
/^
(\d{0,6}\.?\d{0,2})
$/
.
test
(
money
))
{
// 此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
// 此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
if
(
money
.
indexOf
(
'.'
)
<
0
&&
money
!=
''
)
{
if
(
money
.
indexOf
(
'.'
)
<
0
&&
money
!=
''
)
{
...
@@ -285,17 +295,23 @@ Page({
...
@@ -285,17 +295,23 @@ Page({
// 支付
// 支付
handlePay
()
{
handlePay
()
{
let
_this
=
this
let
_this
=
this
const
{
payMoney
,
merchantId
,
isYqType
,
shopMerchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
,
merchantDisabled
}
=
this
.
data
const
{
disabledPay
,
payMoney
,
merchantId
,
isYqType
,
shopMerchantId
,
openId
,
unPayMoneyList
,
userCollaborationName
,
userCollaborationCheck
,
merchantDisabled
,
paymentChannelId
}
=
this
.
data
if
(
isYqType
&&
disabledPay
)
{
return
this
.
setData
({
showModal
:
false
})
}
if
(
userCollaborationName
&&
!
userCollaborationCheck
&&
!
merchantDisabled
)
{
if
(
userCollaborationName
&&
!
userCollaborationCheck
&&
!
merchantDisabled
)
{
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
return
util
.
showToast
(
`请先阅读并勾选《
${
userCollaborationName
}
》`
)
}
}
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
if
(
payMoney
===
''
||
unPayMoneyList
.
includes
(
payMoney
))
return
// this.wxPayment(payMoney)
// this.wxPayment(payMoney)
// console.log(Number(payMoney), '付款')
// console.log(Number(payMoney), '付款')
let
params
=
{
let
params
=
{
openId
,
openId
,
receivedMoney
:
payMoney
*
100
receivedMoney
:
payMoney
*
100
,
paymentChannelId
,
appId
:
app
.
globalData
.
appId
}
}
if
(
isYqType
)
{
if
(
isYqType
)
{
params
.
merchantId
=
merchantId
params
.
merchantId
=
merchantId
...
@@ -316,9 +332,11 @@ Page({
...
@@ -316,9 +332,11 @@ Page({
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
)
:
{}
if
(
jsapiPayInfo
?.
chnlPayInfo
)
{
jsapiPayInfo
=
JSON
.
parse
(
jsapiPayInfo
.
chnlPayInfo
)
}
// 保存参考交易号在支付成功时调用
// 保存参考交易号在支付成功时调用
this
.
setData
({
this
.
setData
({
outTradeNo
:
data
.
outTradeNo
outTradeNo
:
data
.
outTradeNo
...
@@ -349,7 +367,6 @@ Page({
...
@@ -349,7 +367,6 @@ Page({
// _this.wxPayment(jsapiPayInfo)
// _this.wxPayment(jsapiPayInfo)
// })
// })
},
},
// 调用微信支付
// 调用微信支付
wxPayment
(
row
)
{
wxPayment
(
row
)
{
let
_this
=
this
let
_this
=
this
...
@@ -359,16 +376,13 @@ Page({
...
@@ -359,16 +376,13 @@ Page({
// _this.setData({
// _this.setData({
// ajaxing: true
// ajaxing: true
// })
// })
console
.
log
(
row
,
'row'
);
wx
.
requestPayment
({
wx
.
requestPayment
({
// nonceStr: row.nonceStr,
nonceStr
:
row
.
nonceStr
,
// package: row.package,
package
:
row
.
package
,
// paySign: row.paySign,
paySign
:
row
.
paySign
,
nonceStr
:
'82bbe0aa7f4c41eabd10a3b21172efc6'
,
timeStamp
:
row
.
timeStamp
,
package
:
'prepay_id=wx3116401807672131003ecc94470aa00001'
,
signType
:
'MD5'
,
paySign
:
'wCKGkB7Dbuz2YyJTiQC8kiO9Y6gfgwCRincAVkXntYHEOE3Fd9hQkioaeYJpC9uCPQoH0+EC54geeqwuOeUPmHsjsuXMP0v6Su8tVwQLaUYqkF+Fpgk8wpl4eNQMvzAgAgkAqJlTSlhdBQ6r+ZgQpVdBbVMnAXdAgifTOCs7R4FdBfXWZIFVU9+qNFVLaSWBsoZ5iK7Ft5YO/FGZSAmEsQVmmrYSB7xbQSCRKsM00IIeApWOtkYw0AO2NKa+Nx3ee44qV9siSGbCDZmIfYImP8bUQ0XJiT9orslvtdT+KUx1M/zF9HBKor8KexwE/xdVMgdvFb7rSe0e7uYUzEGXmg=='
,
timeStamp
:
'1753951218'
,
signType
:
'RSA'
,
// signType: 'MD5',
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
// 查询订单信息
// 查询订单信息
...
@@ -387,6 +401,7 @@ Page({
...
@@ -387,6 +401,7 @@ Page({
// _this.successInfo()
// _this.successInfo()
},
},
fail
:
function
(
error
)
{
fail
:
function
(
error
)
{
console
.
log
(
error
,
'error'
);
wx
.
showToast
({
wx
.
showToast
({
title
:
'支付失败'
,
title
:
'支付失败'
,
icon
:
'fail'
,
icon
:
'fail'
,
...
@@ -395,7 +410,6 @@ Page({
...
@@ -395,7 +410,6 @@ Page({
}
}
})
})
},
},
// 支付成功获取订单回调信息
// 支付成功获取订单回调信息
// successInfo() {
// successInfo() {
// let { outTradeNo, orderInfoList, showOrderInfo } = this.data
// let { outTradeNo, orderInfoList, showOrderInfo } = this.data
...
...
packagesPayment/pages/QRPayment/QRPayment.wxml
View file @
bf4f75b
...
@@ -105,3 +105,8 @@
...
@@ -105,3 +105,8 @@
</view>
</view>
</view>
</view>
</view>
</view>
<modal hidden='{{showModal}}' class="modal" bindclose="close">
<image class="errorIcon" src="https://img02.glsx.com.cn/weapp/resource/saas/h5/image/error.png" />
<view class="text ">当前收款码已停用,请联系销售人员</view>
<view class="text text_bottom">重新提供新的收款码,谢谢~</view>
</modal>
\ No newline at end of file
\ No newline at end of file
packagesPayment/pages/QRPayment/QRPayment.wxss
View file @
bf4f75b
...
@@ -340,3 +340,28 @@
...
@@ -340,3 +340,28 @@
width: 100%;
width: 100%;
/* height: 100%; */
/* height: 100%; */
}
}
.text {
text-align: center;
}
.errorIcon {
display: flex;
align-items: center;
width: 234rpx;
height: 168rpx;
margin: 30rpx auto 16rpx;
}
.modal .modal-wrapper .modal-body {
/* overflow-y: auto; */
/* max-height: 660rpx; */
padding: 30rpx 15rpx 16rpx;
/* text-align: center; */
}
.text_bottom {
/* margin-bottom: 32rpx; */
}
\ No newline at end of file
\ No newline at end of file
packagesPayment/pages/payment/index.js
View file @
bf4f75b
...
@@ -72,12 +72,12 @@ Page({
...
@@ -72,12 +72,12 @@ Page({
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{},
onReady
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{},
onShow
:
function
()
{
},
onUnload
:
function
()
{
onUnload
:
function
()
{
this
.
setData
({
this
.
setData
({
...
@@ -138,16 +138,20 @@ Page({
...
@@ -138,16 +138,20 @@ Page({
posterUrl
:
result
.
data
posterUrl
:
result
.
data
})
})
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
})
},
},
// 获取订单信息
// 获取订单信息
getInfo
:
function
(
row
)
{
getInfo
:
function
(
row
,
data
)
{
console
.
log
(
row
,
data
,
'row'
);
console
.
log
(
data
.
paymentChannel
.
paymentChannelId
,
'data.paymentChannel.paymentChannelId'
);
let
{
openId
}
=
this
.
data
let
{
openId
}
=
this
.
data
let
_this
=
this
let
_this
=
this
let
oParams
=
{}
let
oParams
=
{}
oParams
.
orderCode
=
row
.
orderCode
oParams
.
orderCode
=
row
.
orderCode
oParams
.
workWxSessionId
=
row
.
workWxSessionId
oParams
.
workWxSessionId
=
row
.
workWxSessionId
oParams
.
openId
=
openId
oParams
.
openId
=
openId
oParams
.
appId
=
app
.
globalData
.
appId
oParams
.
paymentChannelId
=
data
.
paymentChannel
.
paymentChannelId
if
(
!
((
row
.
zyVoucherStatus
??
''
)
===
''
))
{
if
(
!
((
row
.
zyVoucherStatus
??
''
)
===
''
))
{
oParams
.
zyVoucherStatus
=
row
.
zyVoucherStatus
oParams
.
zyVoucherStatus
=
row
.
zyVoucherStatus
}
}
...
@@ -159,6 +163,9 @@ Page({
...
@@ -159,6 +163,9 @@ Page({
if
(
returnCode
==
0
)
{
if
(
returnCode
==
0
)
{
let
o
=
data
?
JSON
.
parse
(
data
)
:
{}
let
o
=
data
?
JSON
.
parse
(
data
)
:
{}
if
(
o
?.
chnlPayInfo
)
{
o
=
JSON
.
parse
(
o
.
chnlPayInfo
)
}
this
.
setData
({
this
.
setData
({
o
o
})
})
...
@@ -277,15 +284,15 @@ Page({
...
@@ -277,15 +284,15 @@ Page({
)
)
}
}
},
},
setPayFail
()
{
setPayFail
()
{
this
.
setData
({
this
.
setData
({
payFail
:
true
payFail
:
true
})
})
}
,
},
getOrderDetail
(
item
)
{
getOrderDetail
(
item
)
{
console
.
log
(
item
,
'item'
)
console
.
log
(
item
,
'item'
)
let
{
orderCode
}
=
item
let
{
orderCode
,
}
=
item
api
.
getOrderDetail
({
orderCode
}).
then
(
res
=>
{
api
.
getOrderDetail
({
orderCode
}).
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
let
{
code
,
data
,
errId
}
=
res
let
{
code
,
data
,
errId
}
=
res
...
@@ -298,7 +305,7 @@ Page({
...
@@ -298,7 +305,7 @@ Page({
})
})
// 必须要订单 为待支付才能发起支付
// 必须要订单 为待支付才能发起支付
if
(
data
?.
payOrder
==
null
||
data
.
payOrder
.
payStatus
==
1
)
{
if
(
data
?.
payOrder
==
null
||
data
.
payOrder
.
payStatus
==
1
)
{
this
.
getInfo
(
item
)
this
.
getInfo
(
item
,
data
)
}
else
{
}
else
{
this
.
setPayFail
()
this
.
setPayFail
()
wx
.
showToast
({
wx
.
showToast
({
...
...
project.private.config.json
View file @
bf4f75b
...
@@ -299,5 +299,5 @@
...
@@ -299,5 +299,5 @@
},
},
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"description"
:
"项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
,
"projectname"
:
"dj-car-weapp-smartshop"
,
"projectname"
:
"dj-car-weapp-smartshop"
,
"libVersion"
:
"3.
8.11
"
"libVersion"
:
"3.
0.2
"
}
}
\ No newline at end of file
\ No newline at end of file
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