Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ydl-packages
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
许振钊
ydl-packages
Commits
f4955d03
Commit
f4955d03
authored
Feb 10, 2023
by
郑炬波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优惠券
parent
81dbb618
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
14 deletions
+15
-14
package.json
packages/toolkit/package.json
+1
-1
Defined.ts
packages/toolkit/src/Payment/Defined.ts
+12
-11
Payment.ts
packages/toolkit/src/Payment/Payment.ts
+2
-2
No files found.
packages/toolkit/package.json
View file @
f4955d03
{
{
"name"
:
"@ydl-packages/toolkit"
,
"name"
:
"@ydl-packages/toolkit"
,
"version"
:
"1.0.6"
,
"version"
:
"1.0.6
-next.1
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"./dist/index.umd.js"
,
"main"
:
"./dist/index.umd.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
packages/toolkit/src/Payment/Defined.ts
View file @
f4955d03
...
@@ -145,43 +145,43 @@ export const FULL_PAY_METHODS: PayMethod[] = [
...
@@ -145,43 +145,43 @@ export const FULL_PAY_METHODS: PayMethod[] = [
{
{
label
:
'余额'
,
label
:
'余额'
,
value
:
PayType
.
BALANCE
,
value
:
PayType
.
BALANCE
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-qb
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
balance
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'微信支付'
,
label
:
'微信支付'
,
value
:
PayType
.
WECHAT
,
value
:
PayType
.
WECHAT
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-wx
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
weixinzhifu
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'支付宝
支付
'
,
label
:
'支付宝'
,
value
:
PayType
.
ALIPAY
,
value
:
PayType
.
ALIPAY
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-zfb
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
zhifubaozhifu
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'微信支付'
,
label
:
'微信支付'
,
value
:
PayType
.
WECHAT_BALANCE
,
value
:
PayType
.
WECHAT_BALANCE
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-wx
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
weixinzhifu
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'支付宝
支付
'
,
label
:
'支付宝'
,
value
:
PayType
.
ALIPAY_BALANCE
,
value
:
PayType
.
ALIPAY_BALANCE
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-zfb
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
zhifubaozhifu
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'花呗
支付
'
,
label
:
'花呗'
,
value
:
PayType
.
HUABEI
,
value
:
PayType
.
HUABEI
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-hb
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
huabei
.png'
,
disabled
:
false
disabled
:
false
},
},
{
{
label
:
'花呗
支付
'
,
label
:
'花呗'
,
value
:
PayType
.
HUABEI_BALANCE
,
value
:
PayType
.
HUABEI_BALANCE
,
icon
:
'https://static.ydlcdn.com/m/order/
icon-pay-hb
.png'
,
icon
:
'https://static.ydlcdn.com/m/order/
huabei
.png'
,
disabled
:
false
disabled
:
false
}
}
]
]
\ No newline at end of file
packages/toolkit/src/Payment/Payment.ts
View file @
f4955d03
...
@@ -121,7 +121,7 @@ export class Payment {
...
@@ -121,7 +121,7 @@ export class Payment {
case
PayType
.
BALANCE
:
case
PayType
.
BALANCE
:
return
{
return
{
...
item
,
...
item
,
label
:
`余额
支付(¥
${
this
.
balance
}
)
`
,
label
:
`余额
<span class="balance">(可用¥
${
this
.
balance
}
)</span>
`
,
disabled
:
this
.
balance
>
0
&&
this
.
balance
<
totalAmount
disabled
:
this
.
balance
>
0
&&
this
.
balance
<
totalAmount
}
}
}
}
...
@@ -152,7 +152,7 @@ export class Payment {
...
@@ -152,7 +152,7 @@ export class Payment {
case
PayType
.
BALANCE
:
case
PayType
.
BALANCE
:
return
{
return
{
...
item
,
...
item
,
label
:
`余额
支付(¥
${
payBalance
}
)
`
,
label
:
`余额
<span class="balance">(可用¥
${
this
.
balance
}
)</span>
`
,
disabled
:
this
.
balance
>
0
&&
this
.
balance
<
totalAmount
disabled
:
this
.
balance
>
0
&&
this
.
balance
<
totalAmount
}
}
}
}
...
...
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