Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
ztx_wx_gzt
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
3daf0a09
authored
2026-05-25 13:49:43 +0800
by
lttnew
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化支付
1 parent
3c74f831
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
17 deletions
App.vue
common/api.js
common/login.js
common/request.js
myCenter/goPay.vue
pages/index/daoGuanPerson.vue
personal/certPreview.vue
App.vue
View file @
3daf0a0
...
...
@@ -17,8 +17,18 @@
let
userName
=
uni
.
getStorageSync
(
'userName'
)
if
(
userName
)
{
try
{
await
getInfo
(
this
)
this
.
globalData
.
isLogin
=
true
}
catch
(
e
)
{
this
.
globalData
.
isLogin
=
false
uni
.
removeStorageSync
(
'token'
)
uni
.
removeStorageSync
(
'userName'
)
uni
.
reLaunch
({
url
:
'/login/login'
})
return
}
// 道馆用户跳转到道馆首页
const
deptType
=
this
.
globalData
.
deptType
const
userType
=
this
.
globalData
.
userType
...
...
common/api.js
View file @
3daf0a0
...
...
@@ -1684,12 +1684,14 @@ export function getMyStatus() {
// 个人会员缴费支付
export
function
goPay
(
params
)
{
let
url
=
`/person/paymentRangeNew/pay/
${
params
.
id
}
/
${
params
.
payType
}
`
const
type
=
params
.
type
||
params
.
payType
let
url
=
`/person/paymentRangeNew/pay/
${
params
.
id
}
/
${
type
}
`
const
queryParams
=
[]
if
(
params
.
id
)
queryParams
.
push
(
`id=
${
params
.
id
}
`
)
if
(
params
.
contactPerson
)
queryParams
.
push
(
`contactPerson=
${
params
.
contactPerson
}
`
)
if
(
params
.
contactTel
)
queryParams
.
push
(
`contactTel=
${
params
.
contactTel
}
`
)
if
(
params
.
payType
)
queryParams
.
push
(
`payType=
${
params
.
payType
}
`
)
if
(
type
)
queryParams
.
push
(
`type=
${
type
}
`
)
if
(
queryParams
.
length
>
0
)
{
url
+=
'?'
+
queryParams
.
join
(
'&'
)
}
...
...
@@ -2252,3 +2254,14 @@ export function inMyMember(params) {
params
})
}
/**
* 退款
* @param params
* @returns {id}
*/
export
function
refundOrder
(
id
)
{
return
request
({
url
:
`/common/order/refundOrder/
${
id
}
`
,
method
:
'post'
})
}
\ No newline at end of file
...
...
common/login.js
View file @
3daf0a0
...
...
@@ -140,6 +140,7 @@ function getInfo(appInstance) {
return
res
}).
catch
(
err
=>
{
console
.
error
(
'getInfo 失败:'
,
err
)
throw
err
})
}
...
...
common/request.js
View file @
3daf0a0
import
config
from
'@/config.js'
import
_
from
'underscore'
const
excludeUrls
=
[
'getMemberCountInfo'
,
'getInfo'
]
const
excludeUrls
=
[
'getMemberCountInfo'
]
const
SUCCESS_CODES
=
[
0
,
200
]
const
TOKEN_EXPIRE_CODES
=
[
60001
,
60002
,
401
]
...
...
@@ -111,6 +111,13 @@ const request = function (req) {
throw
new
Error
(
`HTTP
${
statusCode
}
`
)
}
// Token过期处理
if
(
TOKEN_EXPIRE_CODES
.
includes
(
data
.
code
))
{
handleTokenExpire
()
reject
(
new
Error
(
'登录已过期,请重新登录'
))
return
}
// 业务状态码处理
const
isSuccess
=
SUCCESS_CODES
.
includes
(
data
.
code
)
||
data
.
pageData
?.
code
==
200
||
...
...
@@ -121,13 +128,6 @@ const request = function (req) {
return
}
// Token过期处理
if
(
TOKEN_EXPIRE_CODES
.
includes
(
data
.
code
))
{
handleTokenExpire
()
reject
(
new
Error
(
'登录已过期,请重新登录'
))
return
}
// 业务错误(code != 200 且非 Token 过期)- 统一显示错误提示
const
errorMsg
=
data
.
msg
||
'操作失败'
showError
(
errorMsg
)
...
...
myCenter/goPay.vue
View file @
3daf0a0
...
...
@@ -122,6 +122,58 @@ const payType = ref('2')
const
isPaying
=
ref
(
false
)
const
payName
=
ref
(
''
)
const
assoName
=
ref
(
''
)
const
app
=
getApp
()
const
pickFirst
=
(...
values
)
=>
{
const
value
=
values
.
find
(
item
=>
item
!==
undefined
&&
item
!==
null
&&
String
(
item
).
trim
()
!==
''
)
return
value
?
String
(
value
)
:
''
}
const
getOrderContent
=
(
content
)
=>
{
if
(
!
content
)
return
{}
if
(
typeof
content
===
'object'
)
return
content
try
{
return
JSON
.
parse
(
content
)
}
catch
(
e
)
{
return
{}
}
}
const
fillPayDisplayInfo
=
(
data
=
{},
content
=
{},
option
=
{})
=>
{
const
memberInfo
=
app
.
globalData
?.
memberInfo
||
{}
const
deptInfo
=
app
.
globalData
?.
dept
||
app
.
globalData
?.
userInfo
?.
dept
||
{}
payName
.
value
=
pickFirst
(
memberInfo
.
name
,
content
.
memberName
,
data
.
memberName
,
data
.
payDeptName
,
content
.
payDeptName
,
data
.
payMemName
,
content
.
payMemName
,
option
.
payName
?
decodeURIComponent
(
option
.
payName
)
:
''
,
data
.
orderName
,
content
.
orderName
,
deptInfo
.
deptName
)
assoName
.
value
=
pickFirst
(
memberInfo
.
aname
,
memberInfo
.
associateName
,
memberInfo
.
assoName
,
deptInfo
.
aname
,
deptInfo
.
associateName
,
data
.
assoName
,
data
.
associateName
,
data
.
associationName
,
data
.
aname
,
data
.
parentName
,
content
.
assoName
,
content
.
associateName
,
content
.
associationName
,
content
.
aname
,
content
.
parentName
,
option
.
assoName
?
decodeURIComponent
(
option
.
assoName
)
:
''
)
}
const
memberTotalFee
=
computed
(()
=>
{
const
total
=
memberFee
.
value
*
form
.
value
.
renewYear
...
...
@@ -274,6 +326,7 @@ const handelPay = async () => {
onLoad
((
option
)
=>
{
console
.
log
(
66
,
option
)
fillPayDisplayInfo
({},
{},
option
)
// 接收订单ID(再次支付时)
if
(
option
.
orderId
)
{
payForm
.
value
.
id
=
option
.
orderId
...
...
@@ -281,9 +334,9 @@ onLoad((option) => {
// 获取订单详情
to
(
api
.
orderDetail
(
option
.
orderId
)).
then
(([
err
,
res
])
=>
{
if
(
!
err
&&
res
.
data
)
{
const
content
=
res
.
data
.
content
?
JSON
.
parse
(
res
.
data
.
content
)
:
{}
const
content
=
getOrderContent
(
res
.
data
.
content
)
form
.
value
.
renewYear
=
content
.
yearCount
||
1
payName
.
value
=
res
.
data
.
orderName
||
''
fillPayDisplayInfo
(
res
.
data
,
content
,
option
)
}
})
}
...
...
@@ -291,10 +344,6 @@ onLoad((option) => {
if
(
option
.
renewYear
)
{
form
.
value
.
renewYear
=
Number
(
option
.
renewYear
)
}
// 接收缴费单位和所属协会
payName
.
value
=
payName
.
value
||
decodeURIComponent
(
option
.
payName
||
''
)
console
.
log
(
77
,
payName
.
value
)
assoName
.
value
=
decodeURIComponent
(
option
.
assoName
||
''
)
// 初始化获取费用和优惠
init
()
})
...
...
pages/index/daoGuanPerson.vue
View file @
3daf0a0
...
...
@@ -358,11 +358,13 @@ function closePasswordTipDialog() {
passwordTipPopup
.
value
?.
close
()
}
function
goAuthPayV2
()
{
async
function
goAuthPayV2
()
{
if
(
!
canAuthPayByAccountStatus
())
{
showAuthPayDialog
(
'当前账号状态暂无法办理缴费业务'
)
return
}
const
canGoPay
=
await
handelGetMyRecent
()
if
(
!
canGoPay
)
return
// if (authPayDisabled.value) {
// showAuthPayDialog('您有一笔缴费正在审核中,请勿重复缴费。您可前往【认证详情】查看审核进度。')
// return
...
...
personal/certPreview.vue
View file @
3daf0a0
...
...
@@ -148,7 +148,7 @@ const retryLoad = () => {
const
url
=
currentPage
.
$page
.
options
.
url
;
if
(
url
)
{
let
fullUrl
=
BASE_URL
+
decodeURIComponent
(
url
);
let
fullUrl
=
config
.
baseUrl_api
+
decodeURIComponent
(
url
);
openPdfWithDocument
(
fullUrl
);
}
};
...
...
Write
Preview
Styling with
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