Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
viitto
pptist
Commits
39687ba8
Commit
39687ba8
authored
Jun 03, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消订单接口
parent
80c9b98b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
WePay.vue
src/components/Pay/WePay.vue
+29
-4
Order.vue
src/views/UserCenter/Order.vue
+1
-0
No files found.
src/components/Pay/WePay.vue
View file @
39687ba8
...
...
@@ -9,7 +9,7 @@
</div>
<div
class=
"text-body2 q-mt-lg text-grey-6"
>
请打开微信(WeChat),使用 [扫一扫]扫描上方二维码进行支付
</div>
<div
class=
"q-mt-xl text-right"
>
<el-button
class=
"q-px-md q-mr-md"
@
click=
"close"
>
取消支付
</el-button>
<el-button
class=
"q-px-md q-mr-md"
@
click=
"close"
:loading=
"CancelLoading"
>
取消支付
</el-button>
<el-button
type=
"primary"
class=
"q-px-md"
@
click=
"CompletePayment"
>
已完成付款
</el-button>
</div>
</div>
...
...
@@ -21,7 +21,7 @@ import { ref } from "vue";
import
QRCode
from
'../QRCode/QRCode.vue'
;
import
OrderService
from
"@/services/OrderService"
;
import
{
ApiResult
}
from
"@/configs/axios"
;
import
{
ElMessage
}
from
'element-plus'
;
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
const
props
=
defineProps
({
orderid
:
{
type
:
Number
,
...
...
@@ -34,8 +34,33 @@ const emit = defineEmits<{
const
orders
=
ref
({}
as
any
)
const
loading
=
ref
(
false
)
const
close
=
()
=>
{
emit
(
'close'
)
const
CancelLoading
=
ref
(
false
)
const
close
=
async
()
=>
{
ElMessageBox
.
confirm
(
`此操作将取消该订单,是否确定?`
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(
async
()
=>
{
try
{
await
CanceltOrders
()
}
catch
(
error
)
{
}
})
.
catch
(()
=>
{
});
}
const
CanceltOrders
=
async
()
=>
{
if
(
CancelLoading
.
value
)
return
CancelLoading
.
value
=
true
const
response
=
await
OrderService
.
CancelPPTOrder
(
props
.
orderid
)
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
){
emit
(
'success'
)
}
CancelLoading
.
value
=
false
}
const
CompletePayment
=
async
()
=>
{
...
...
src/views/UserCenter/Order.vue
View file @
39687ba8
...
...
@@ -82,6 +82,7 @@ import { ref, onMounted } from "vue";
import
{
useRouter
}
from
"vue-router"
;
import
{
openNewBlank
}
from
'@/utils/common'
import
WePay
from
'@/components/Pay/WePay.vue'
import
{
ElMessageBox
}
from
"element-plus"
;
const
activeName
=
ref
<
string
>
(
'all'
)
const
parameters
=
ref
({
pageIndex
:
1
,
...
...
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