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 1c25b1a0
authored
Aug 14, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!26
2 parents
e19534fd
88252bf1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
27 deletions
config.js
packagesPayment/environment.js
packagesPayment/pages/payment/image/failIcon.png
packagesPayment/pages/payment/index.js
packagesPayment/pages/payment/index.wxml
packagesPayment/pages/payment/index.wxss
project.private.config.json
config.js
View file @
1c25b1a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
* 1开发
* 1开发
* 2测试
* 2测试
* 3生产环境
* 3生产环境
* 4预发布
*/
*/
let
index
=
2
let
index
=
2
...
@@ -43,7 +44,8 @@ export const envIndex = index
...
@@ -43,7 +44,8 @@ export const envIndex = index
const
createOrderPosterImgUrl
=
{
const
createOrderPosterImgUrl
=
{
develop
:
`http://192.168.1.178:9528/dj-scrm-wx-work-main-zhangls/#/orderDetailPoster?`
,
develop
:
`http://192.168.1.178:9528/dj-scrm-wx-work-main-zhangls/#/orderDetailPoster?`
,
trial
:
`http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
,
trial
:
`http://frontend.test.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
,
release
:
`https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
release
:
`https://dj.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
,
preRelease
:
`https://dj.beta.glsx.com.cn/dj-car-boutique-work-wechat/#/orderDetailPoster?`
}
}
const
target
=
[
'ip'
,
'develop'
,
'trial'
,
'release'
,
'preRelease'
]
const
target
=
[
'ip'
,
'develop'
,
'trial'
,
'release'
,
'preRelease'
]
// 订单详情地址
// 订单详情地址
...
...
packagesPayment/environment.js
View file @
1c25b1a
...
@@ -58,7 +58,11 @@ const secretKey_items = {
...
@@ -58,7 +58,11 @@ const secretKey_items = {
prod
:
{
prod
:
{
appKey
:
'd7ffc3346fc9a45bccaaa35300d59022'
,
appKey
:
'd7ffc3346fc9a45bccaaa35300d59022'
,
secret
:
'4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
secret
:
'4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}
},
preRelease
:
{
appKey
:
'48e5e13229b82c1b4e6e8c96151f0637'
,
secret
:
'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
},
}
}
const
domain_items
=
{
const
domain_items
=
{
// ip: 'http://192.168.2.59:8292',
// ip: 'http://192.168.2.59:8292',
...
@@ -66,9 +70,10 @@ const domain_items = {
...
@@ -66,9 +70,10 @@ const domain_items = {
// ip: 'http://192.168.2.3:8292',
// ip: 'http://192.168.2.3:8292',
dev
:
'https://dj.dev.glsx.com.cn'
,
dev
:
'https://dj.dev.glsx.com.cn'
,
uat
:
'https://dj.test.glsx.com.cn'
,
uat
:
'https://dj.test.glsx.com.cn'
,
prod
:
'https://dj.glsx.com.cn'
prod
:
'https://dj.glsx.com.cn'
,
preRelease
:
'https://dj.beta.glsx.com.cn'
}
}
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
]
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
// console.log(domain_items[target[index]]);
// console.log(domain_items[target[index]]);
module
.
exports
=
{
module
.
exports
=
{
domain
:
domain_items
[
target
[
index
]],
domain
:
domain_items
[
target
[
index
]],
...
...
packagesPayment/pages/payment/image/failIcon.png
0 → 100644
View file @
1c25b1a
3.6 KB
packagesPayment/pages/payment/index.js
View file @
1c25b1a
...
@@ -12,11 +12,13 @@ Page({
...
@@ -12,11 +12,13 @@ Page({
data
:
{
data
:
{
authToast
:
false
,
// 是否显示授权提示框
authToast
:
false
,
// 是否显示授权提示框
authType
:
true
,
// 授权类型(true:授权用户信息;false:授权手机号)
authType
:
true
,
// 授权类型(true:授权用户信息;false:授权手机号)
payFail
:
false
,
sceneId
:
''
,
sceneId
:
''
,
ajaxing
:
false
,
ajaxing
:
false
,
paySuccess
:
false
,
paySuccess
:
false
,
posterUrl
:
''
,
posterUrl
:
''
,
sceneType
:
true
//默认是1.1的支付场景
sceneType
:
true
,
//默认是1.1的支付场景
miniProgramParams
:
{}
},
},
onLogin
()
{
onLogin
()
{
...
@@ -31,6 +33,7 @@ Page({
...
@@ -31,6 +33,7 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
console
.
log
(
options
,
'options'
)
wx
.
hideHomeButton
({
wx
.
hideHomeButton
({
success
:
function
()
{
success
:
function
()
{
// console.log('隐藏成功!')
// console.log('隐藏成功!')
...
@@ -40,7 +43,8 @@ Page({
...
@@ -40,7 +43,8 @@ Page({
// 是别的小程序 跳转过来的
// 是别的小程序 跳转过来的
if
(
options
.
orderCode
)
{
if
(
options
.
orderCode
)
{
this
.
setData
({
this
.
setData
({
otherOrderCode
:
options
.
orderCode
otherOrderCode
:
options
.
orderCode
,
miniProgramParams
:
options
})
})
}
}
// 开发用
// 开发用
...
@@ -161,6 +165,7 @@ Page({
...
@@ -161,6 +165,7 @@ Page({
title
:
message
||
returnCode
==
-
1
?
'发起支付失败'
:
'订单支付失败'
,
title
:
message
||
returnCode
==
-
1
?
'发起支付失败'
:
'订单支付失败'
,
icon
:
'error'
icon
:
'error'
})
})
this
.
payFail
()
}
}
})
})
},
},
...
@@ -168,7 +173,7 @@ Page({
...
@@ -168,7 +173,7 @@ Page({
// 调用微信支付
// 调用微信支付
wxPayment
:
function
(
row
)
{
wxPayment
:
function
(
row
)
{
let
_this
=
this
let
_this
=
this
let
{
otherOrderCode
}
=
this
.
data
let
{
otherOrderCode
,
miniProgramParams
}
=
this
.
data
if
(
this
.
data
.
ajaxing
)
{
if
(
this
.
data
.
ajaxing
)
{
return
false
return
false
}
}
...
@@ -192,14 +197,22 @@ Page({
...
@@ -192,14 +197,22 @@ Page({
})
})
if
(
otherOrderCode
)
{
if
(
otherOrderCode
)
{
// 跳转回对应的小程序
// 跳转回对应的小程序
let
path
=
miniProgramParams
?.
path
?
miniProgramParams
.
path
:
'packageShopmall/packageMine/pages/order/index/index'
,
params
=
''
for
(
const
key
in
miniProgramParams
)
{
params
+=
`
${
key
}
=
${
miniProgramParams
[
key
]}
&`
}
return
wx
.
navigateToMiniProgram
({
return
wx
.
navigateToMiniProgram
({
appId
:
'wxe10067a63c1856ac'
,
appId
:
'wxe10067a63c1856ac'
,
path
:
'packageShopmall/packageMine/pages/order/index/index'
,
path
:
path
+
'?'
+
params
,
// appId: 'wxe10067a63c1856ac',
// appId: 'wxe10067a63c1856ac',
// path: 'pages/sceneIndex/sceneIndex',
// path: 'pages/sceneIndex/sceneIndex',
extraData
:
{
// extraData: {
// foo: 'bar'
// // foo: 'bar'
},
// ...miniProgramParams
// },
// envVersion: envName,
// envVersion: envName,
envVersion
:
'trial'
,
envVersion
:
'trial'
,
success
(
res
)
{
success
(
res
)
{
...
@@ -219,10 +232,7 @@ Page({
...
@@ -219,10 +232,7 @@ Page({
title
:
'支付失败'
,
title
:
'支付失败'
,
icon
:
'error'
icon
:
'error'
})
})
// wx.showToast({
_this
.
setPayFail
()
// title: '支付请求失败',
// icon: 'error'
// })
}
}
})
})
},
},
...
@@ -264,6 +274,11 @@ Page({
...
@@ -264,6 +274,11 @@ Page({
)
)
}
}
},
},
setPayFail
(){
this
.
setData
({
payFail
:
true
})
}
,
getOrderDetail
(
item
)
{
getOrderDetail
(
item
)
{
console
.
log
(
item
,
'item'
)
console
.
log
(
item
,
'item'
)
...
@@ -282,16 +297,19 @@ Page({
...
@@ -282,16 +297,19 @@ Page({
if
(
data
?.
payOrder
==
null
||
data
.
payOrder
.
payStatus
==
1
)
{
if
(
data
?.
payOrder
==
null
||
data
.
payOrder
.
payStatus
==
1
)
{
this
.
getInfo
(
item
)
this
.
getInfo
(
item
)
}
else
{
}
else
{
this
.
setPayFail
()
wx
.
showToast
({
wx
.
showToast
({
title
:
message
||
'订单已失效'
,
title
:
message
||
'订单已失效'
,
icon
:
'error'
icon
:
'error'
})
})
}
}
}
else
if
(
errId
==
'-5003'
)
{
}
else
if
(
errId
==
'-5003'
)
{
this
.
setPayFail
()
wx
.
showToast
({
wx
.
showToast
({
title
:
'订单已失效'
,
title
:
'订单已失效'
,
icon
:
'error'
icon
:
'error'
})
})
}
else
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
'请求失败'
,
title
:
'请求失败'
,
...
@@ -299,15 +317,5 @@ Page({
...
@@ -299,15 +317,5 @@ Page({
})
})
}
}
})
})
// ,
// res => {
// // else {
// // util.showToast('系统异常')
// // }
// }
// )
}
}
// })
})
})
packagesPayment/pages/payment/index.wxml
View file @
1c25b1a
<!-- 支付 -->
<!-- 支付 -->
<!-- wx:if="{{orderInfo}}" -->
<!-- wx:if="{{orderInfo}}" -->
<block wx:if="{{paySuccess}}">
<!-- 不是scrm跳转过来的 -->
<block wx:if="{{paySuccess && !otherOrderCode}}">
<view class="poster">
<view class="poster">
<image
<image
show-menu-by-longpress="true"
show-menu-by-longpress="true"
...
@@ -16,5 +17,14 @@
...
@@ -16,5 +17,14 @@
<image class="logoIcon" src="../../../images/djLogin.png" />
<image class="logoIcon" src="../../../images/djLogin.png" />
</view>
</view>
</block>
</block>
<block wx:if="{{payFail }}">
<view class="faliCon">
<image
class="faliConImg"
src="./image/failIcon.png" />
</view>
<view class="failTips" >支付失败</view>
<view class="failTipsLabel" >支付遇到问题,请尝试重新支付。</view>
</block>
<!-- <auth-setting auth='{{authToast}}' type='{{authType}}' /> -->
<!-- <auth-setting auth='{{authToast}}' type='{{authType}}' /> -->
packagesPayment/pages/payment/index.wxss
View file @
1c25b1a
...
@@ -53,3 +53,32 @@
...
@@ -53,3 +53,32 @@
width: 200rpx;
width: 200rpx;
height: 50rpx;
height: 50rpx;
}
}
.faliCon {
/* margin-top: 200rpx; */
margin: 200rpx auto 30rpx;
width: 88rpx;
height: 88rpx;
}
.faliConImg {
width: 100%;
height: 100%;
}
.failTips {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 40rpx;
color: #1B233D;
text-align: center;
}
.failTipsLabel {
margin-top: 12rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #7A8299;
text-align: center;
}
\ No newline at end of file
\ No newline at end of file
project.private.config.json
View file @
1c25b1a
{
{
"setting"
:
{
"setting"
:
{
"compileHotReLoad"
:
true
,
"compileHotReLoad"
:
true
,
"urlCheck"
:
fals
e
"urlCheck"
:
tru
e
},
},
"condition"
:
{
"condition"
:
{
"miniprogram"
:
{
"miniprogram"
:
{
...
@@ -274,6 +274,17 @@
...
@@ -274,6 +274,17 @@
"query"
:
"scene=sceneId%253D4"
,
"query"
:
"scene=sceneId%253D4"
,
"launchMode"
:
"default"
,
"launchMode"
:
"default"
,
"scene"
:
null
"scene"
:
null
},
{
"name"
:
""
,
"pathName"
:
"packagesPayment/pages/payment/index"
,
"query"
:
""
,
"launchMode"
:
"default"
,
"scene"
:
1037
,
"referrerInfo"
:
{
"appId"
:
"wxe10067a63c1856ac"
,
"extraData"
:
"{
\"
orderId
\"
:
\"
222
\"
,
\"
path
\"
:
\"
loading
\"
}"
}
}
}
]
]
}
}
...
...
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