Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
frontend
mall-webview
Commits
1becb8ab
Commit
1becb8ab
authored
May 18, 2026
by
zengqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: appId从后端返回,不再使用固定值
- WithdrawResponse和WithdrawPackageInfoResponseData添加appId字段 - withdraw/index.vue传递appId到ConfirmReceipt页面 - ConfirmReceipt.vue从URL参数或fetchPackageInfo响应获取appId
parent
2792a20a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
index.ts
src/model/bonus/index.ts
+1
-0
withdrawService.ts
src/server/api/withdrawService.ts
+1
-0
index.vue
src/views/bonus/withdraw/index.vue
+2
-1
ConfirmReceipt.vue
src/views/withdraw/ConfirmReceipt.vue
+7
-7
No files found.
src/model/bonus/index.ts
View file @
1becb8ab
...
@@ -94,6 +94,7 @@ export interface WithdrawResponse {
...
@@ -94,6 +94,7 @@ export interface WithdrawResponse {
expectedPayTime
:
string
;
expectedPayTime
:
string
;
packageInfo
?:
string
;
packageInfo
?:
string
;
mchId
?:
string
;
mchId
?:
string
;
appId
?:
string
;
}
}
export
interface
WithdrawRiskResponse
{
export
interface
WithdrawRiskResponse
{
...
...
src/server/api/withdrawService.ts
View file @
1becb8ab
...
@@ -12,6 +12,7 @@ interface WithdrawStatusResponseData {
...
@@ -12,6 +12,7 @@ interface WithdrawStatusResponseData {
interface
WithdrawPackageInfoResponseData
{
interface
WithdrawPackageInfoResponseData
{
packageInfo
:
string
;
packageInfo
:
string
;
mchId
:
string
;
mchId
:
string
;
appId
:
string
;
}
}
/**
/**
...
...
src/views/bonus/withdraw/index.vue
View file @
1becb8ab
...
@@ -140,7 +140,8 @@ const Withdraw = defineComponent({
...
@@ -140,7 +140,8 @@ const Withdraw = defineComponent({
amount
:
data
.
amount
.
toFixed
(
2
),
amount
:
data
.
amount
.
toFixed
(
2
),
withdrawAccount
:
encodeURIComponent
(
data
.
withdrawAccount
),
withdrawAccount
:
encodeURIComponent
(
data
.
withdrawAccount
),
packageInfo
:
encodeURIComponent
(
data
.
packageInfo
),
packageInfo
:
encodeURIComponent
(
data
.
packageInfo
),
mchId
:
data
.
mchId
||
''
mchId
:
data
.
mchId
||
''
,
appId
:
data
.
appId
||
''
}
}
})
})
}
else
{
}
else
{
...
...
src/views/withdraw/ConfirmReceipt.vue
View file @
1becb8ab
...
@@ -33,9 +33,6 @@ import { defineComponent } from 'vue'
...
@@ -33,9 +33,6 @@ import { defineComponent } from 'vue'
import
{
getWithdrawPackageInfo
}
from
'@/server/api/withdrawService'
import
{
getWithdrawPackageInfo
}
from
'@/server/api/withdrawService'
import
{
requestMerchantTransfer
}
from
'@/util/use-native-bridge'
import
{
requestMerchantTransfer
}
from
'@/util/use-native-bridge'
// 微信开放平台移动应用 appId
const
WECHAT_APP_ID
=
'wxce3ddfea994471b9'
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'ConfirmReceipt'
,
name
:
'ConfirmReceipt'
,
data
()
{
data
()
{
...
@@ -45,6 +42,7 @@ export default defineComponent({
...
@@ -45,6 +42,7 @@ export default defineComponent({
withdrawAccount
:
''
,
withdrawAccount
:
''
,
packageInfo
:
''
,
packageInfo
:
''
,
mchId
:
''
,
mchId
:
''
,
appId
:
''
,
loading
:
true
loading
:
true
}
}
},
},
...
@@ -58,6 +56,7 @@ export default defineComponent({
...
@@ -58,6 +56,7 @@ export default defineComponent({
// 场景1:从提现表单页进入,已有 packageInfo
// 场景1:从提现表单页进入,已有 packageInfo
this
.
packageInfo
=
decodeURIComponent
(
query
.
packageInfo
as
string
)
this
.
packageInfo
=
decodeURIComponent
(
query
.
packageInfo
as
string
)
this
.
mchId
=
(
query
.
mchId
as
string
)
||
''
this
.
mchId
=
(
query
.
mchId
as
string
)
||
''
this
.
appId
=
(
query
.
appId
as
string
)
||
''
this
.
loading
=
false
this
.
loading
=
false
}
else
if
(
this
.
withdrawNo
)
{
}
else
if
(
this
.
withdrawNo
)
{
// 场景2:从列表页进入,需要查询 packageInfo
// 场景2:从列表页进入,需要查询 packageInfo
...
@@ -75,7 +74,8 @@ export default defineComponent({
...
@@ -75,7 +74,8 @@ export default defineComponent({
if
(
res
)
{
if
(
res
)
{
this
.
packageInfo
=
res
.
packageInfo
||
''
this
.
packageInfo
=
res
.
packageInfo
||
''
this
.
mchId
=
res
.
mchId
||
''
this
.
mchId
=
res
.
mchId
||
''
console
.
log
(
'packageInfo:'
,
this
.
packageInfo
,
'mchId:'
,
this
.
mchId
)
this
.
appId
=
res
.
appId
||
''
console
.
log
(
'packageInfo:'
,
this
.
packageInfo
,
'mchId:'
,
this
.
mchId
,
'appId:'
,
this
.
appId
)
}
else
{
}
else
{
console
.
log
(
'no data in response'
)
console
.
log
(
'no data in response'
)
alert
(
'获取提现信息失败'
)
alert
(
'获取提现信息失败'
)
...
@@ -88,8 +88,8 @@ export default defineComponent({
...
@@ -88,8 +88,8 @@ export default defineComponent({
}
}
},
},
async
handleConfirm
()
{
async
handleConfirm
()
{
if
(
!
this
.
packageInfo
||
!
this
.
mchId
)
{
if
(
!
this
.
packageInfo
||
!
this
.
mchId
||
!
this
.
appId
)
{
console
.
error
(
'Missing params:'
,
{
packageInfo
:
this
.
packageInfo
,
mchId
:
this
.
mchId
})
console
.
error
(
'Missing params:'
,
{
packageInfo
:
this
.
packageInfo
,
mchId
:
this
.
mchId
,
appId
:
this
.
appId
})
alert
(
'缺少必要参数,无法确认收款'
)
alert
(
'缺少必要参数,无法确认收款'
)
return
return
}
}
...
@@ -98,7 +98,7 @@ export default defineComponent({
...
@@ -98,7 +98,7 @@ export default defineComponent({
// 调用原生方法唤起微信确认收款
// 调用原生方法唤起微信确认收款
await
requestMerchantTransfer
({
await
requestMerchantTransfer
({
mchId
:
this
.
mchId
,
mchId
:
this
.
mchId
,
appId
:
WECHAT_APP_ID
,
appId
:
this
.
appId
,
package
:
this
.
packageInfo
package
:
this
.
packageInfo
})
})
...
...
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