Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
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
poc
poc-fe
Commits
8d460109
Commit
8d460109
authored
Dec 12, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 订单管理代码优化
parent
700e6713
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
25 deletions
+49
-25
order-manage.ts
src/router/modules/order-manage.ts
+7
-9
package-manage.vue
src/views/order-manage/components/package-manage.vue
+31
-13
recharge-manage.vue
src/views/order-manage/components/recharge-manage.vue
+11
-3
No files found.
src/router/modules/order-manage.ts
View file @
8d460109
...
@@ -3,31 +3,29 @@ import Layout from '@/layout/index.vue'
...
@@ -3,31 +3,29 @@ import Layout from '@/layout/index.vue'
export
default
[
export
default
[
{
{
path
:
'/order-manage-layout'
,
path
:
'/order/manage'
,
name
:
'OrderManage-Layout'
,
meta
:
{
meta
:
{
rank
:
1001
,
rank
:
1001
,
title
:
'
router_title_module.order_manage
'
,
title
:
''
,
},
},
component
:
Layout
,
component
:
Layout
,
redirect
:
'/order-manage'
,
children
:
[
children
:
[
{
{
path
:
'
/order-manage
'
,
path
:
''
,
name
:
'OrderManage'
,
name
:
'OrderManage'
,
meta
:
{
meta
:
{
rank
:
1001
,
rank
:
1001
,
title
:
'
router_title_module.order_manage
'
,
title
:
''
,
},
},
component
:
()
=>
import
(
'@/views/order-manage/order-manage.vue'
),
component
:
()
=>
import
(
'@/views/order-manage/order-manage.vue'
),
redirect
:
'/order
-
manage/package'
,
redirect
:
'/order
/
manage/package'
,
children
:
[
children
:
[
{
{
path
:
'package'
,
path
:
'package'
,
name
:
'OrderManagePackage'
,
name
:
'OrderManagePackage'
,
meta
:
{
meta
:
{
rank
:
1001
,
rank
:
1001
,
title
:
'
router_title_module.order_man
age'
,
title
:
'
common_module.pack
age'
,
},
},
component
:
()
=>
import
(
'@/views/order-manage/components/package-manage.vue'
),
component
:
()
=>
import
(
'@/views/order-manage/components/package-manage.vue'
),
},
},
...
@@ -36,7 +34,7 @@ export default [
...
@@ -36,7 +34,7 @@ export default [
name
:
'OrderManageRecharge'
,
name
:
'OrderManageRecharge'
,
meta
:
{
meta
:
{
rank
:
1001
,
rank
:
1001
,
title
:
'
router_title_module.order_mana
ge'
,
title
:
'
common_module.rechar
ge'
,
},
},
component
:
()
=>
import
(
'@/views/order-manage/components/recharge-manage.vue'
),
component
:
()
=>
import
(
'@/views/order-manage/components/recharge-manage.vue'
),
},
},
...
...
src/views/order-manage/components/package-manage.vue
View file @
8d460109
...
@@ -40,26 +40,44 @@ function handleGetPackageList() {
...
@@ -40,26 +40,44 @@ function handleGetPackageList() {
}
}
function
judgeExpirationDate
(
lifespan
:
number
)
{
function
judgeExpirationDate
(
lifespan
:
number
)
{
if
(
lifespan
===
-
1
)
return
t
(
'common_module.expired'
)
switch
(
lifespan
)
{
else
if
(
lifespan
===
-
2
)
return
t
(
'common_module.forever_effective'
)
case
-
1
:
else
return
t
(
'common_module.expired'
)
return
(
case
-
2
:
t
(
'order_manage_module.remaining_validity_period'
)
+
return
t
(
'common_module.forever_effective'
)
lifespan
+
default
:
t
(
'order_manage_module.remaining_validity_period_day'
)
return
(
)
t
(
'order_manage_module.remaining_validity_period'
)
+
lifespan
+
t
(
'order_manage_module.remaining_validity_period_day'
)
)
}
}
}
function
splicingPackageName
(
orderItem
:
OrderItem
)
{
function
splicingPackageName
(
orderItem
:
OrderItem
)
{
let
expiredType
=
''
let
expiredType
=
''
let
equityType
=
''
let
equityType
=
''
if
(
orderItem
.
type
===
'normal'
)
expiredType
=
t
(
'order_manage_module.basic_edition'
)
switch
(
orderItem
.
type
)
{
else
if
(
orderItem
.
type
===
'professional'
)
expiredType
=
t
(
'order_manage_module.professional_edition'
)
case
'normal'
:
else
if
(
orderItem
.
type
===
'ultimate'
)
expiredType
=
t
(
'order_manage_module.flagship_edition'
)
expiredType
=
t
(
'order_manage_module.basic_edition'
)
break
case
'professional'
:
expiredType
=
t
(
'order_manage_module.professional_edition'
)
break
case
'ultimate'
:
expiredType
=
t
(
'order_manage_module.flagship_edition'
)
break
}
if
(
orderItem
.
expiredType
===
'year'
)
equityType
=
t
(
'common_module.year'
)
switch
(
orderItem
.
expiredType
)
{
else
if
(
orderItem
.
expiredType
===
'month'
)
equityType
=
t
(
'common_module.month'
)
case
'year'
:
equityType
=
t
(
'common_module.year'
)
break
case
'month'
:
equityType
=
t
(
'common_module.month'
)
break
}
return
expiredType
+
orderItem
.
expiredNum
+
equityType
return
expiredType
+
orderItem
.
expiredNum
+
equityType
}
}
...
...
src/views/order-manage/components/recharge-manage.vue
View file @
8d460109
...
@@ -41,9 +41,17 @@ function handleGetRechargeList() {
...
@@ -41,9 +41,17 @@ function handleGetRechargeList() {
function
splicingRechargeDetails
(
orderItem
:
OrderItem
)
{
function
splicingRechargeDetails
(
orderItem
:
OrderItem
)
{
let
rechargeType
=
''
let
rechargeType
=
''
if
(
orderItem
.
type
===
'normal'
)
rechargeType
=
100
+
t
(
'order_manage_module.points'
)
switch
(
orderItem
.
type
)
{
else
if
(
orderItem
.
type
===
'professional'
)
rechargeType
=
300
+
t
(
'order_manage_module.points'
)
case
'normal'
:
else
if
(
orderItem
.
type
===
'ultimate'
)
rechargeType
=
800
+
t
(
'order_manage_module.points'
)
rechargeType
=
100
+
t
(
'order_manage_module.points'
)
break
case
'professional'
:
rechargeType
=
300
+
t
(
'order_manage_module.points'
)
break
case
'ultimate'
:
rechargeType
=
800
+
t
(
'order_manage_module.points'
)
break
}
return
rechargeType
return
rechargeType
}
}
...
...
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