Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
source-trace-manage
Commits
dfc4b8ee
Commit
dfc4b8ee
authored
Aug 04, 2022
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3ac1c8d7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
12 deletions
+57
-12
copyrightService.ts
src/service/copyrightService.ts
+13
-0
index.vue
src/views/userCenter/components/OrderRecords/index.vue
+39
-7
table.ts
src/views/userCenter/components/OrderRecords/table.ts
+3
-5
index.vue
src/views/userCenter/index.vue
+2
-0
No files found.
src/service/copyrightService.ts
View file @
dfc4b8ee
...
...
@@ -134,3 +134,16 @@ export function deleteCopyRights(ids: number[]) {
},
});
}
export
function
getBills
(
payload
:
{
name
?:
string
;
type
?:
number
;
page
:
number
;
page_size
:
number
;
})
{
return
$ajax
({
type
:
"get"
,
url
:
"/api/billings"
,
params
:
payload
,
});
}
src/views/userCenter/components/OrderRecords/index.vue
View file @
dfc4b8ee
...
...
@@ -4,29 +4,48 @@
ref=
"tableRef"
:columns=
"tableColumns"
height=
"100%"
:data=
"
d
ata"
:data=
"
tableD
ata"
v-loading=
"loading"
element-loading-text=
"加载中..."
>
<template
#
fee=
"slotProps"
>
<div
:style=
"
{
color: green.color || red.color,
color: (
slotProps.amount !== 0
? slotProps.amount
: slotProps.chain_times > 0
)
? green.color
: red.color,
}"
>
{{
11
}}
元 积分
{{
slotProps
.
amount
!==
0
?
slotProps
.
amount
+
"元"
:
""
}}
{{
slotProps
.
amount
===
0
?
slotProps
.
chain_times
+
"次"
:
""
}}
</div>
</
template
>
<
template
#
type=
"slotProps"
>
{{
(
slotProps
.
type
===
1
&&
"实名认证"
)
||
""
}}
{{
(
slotProps
.
type
===
2
&&
"套餐购买"
)
||
""
}}
{{
(
slotProps
.
type
===
3
&&
"存证上链"
)
||
""
}}
{{
(
slotProps
.
type
===
4
&&
"文件上链"
)
||
""
}}
{{
(
slotProps
.
type
===
5
&&
"版权备案"
)
||
""
}}
</
template
>
<
template
#
create_time=
"slotProps"
>
{{
formatTime
(
slotProps
.
create_time
)
}}
</
template
>
</Table>
</template>
<
script
setup
lang=
"ts"
>
import
Table
from
"@/components/Table/index.vue"
;
import
{
tableColumns
}
from
"./table"
;
import
{
ref
}
from
"vue"
;
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
formatTime
}
from
"cqk-sy-ui"
;
import
{
eStatusOfCopyright
}
from
"@/components/ApproveStatus/status"
;
import
{
useTableScrollListener
}
from
"@/components/Table/hooks"
;
import
{
useTable
Data
,
useTable
ScrollListener
}
from
"@/components/Table/hooks"
;
import
{
green
,
red
}
from
"@/components/ApproveStatus/btnStyle"
;
import
{
getBills
}
from
"@/service/copyrightService"
;
// defineProps
<
{
// // data: any[];
...
...
@@ -37,7 +56,6 @@ const data = [] as any[];
const
loading
=
false
;
const
emit
=
defineEmits
<
{
(
e
:
"scrollToEnd"
):
void
;
(
e
:
"clickOperate"
,
payload
:
{
...
...
@@ -50,8 +68,22 @@ const emit = defineEmits<{
const
tableRef
=
ref
<
InstanceType
<
typeof
Table
>>
();
const
{
tableData
,
fetchNextPage
}
=
useTableData
({
fetchData
:
async
({
page
,
page_size
})
=>
{
const
res
=
await
getBills
({
name
:
""
,
page
,
page_size
,
});
return
{
total
:
res
?.
data
.
total
,
data
:
res
?.
data
.
results
||
[],
};
},
});
useTableScrollListener
(
tableRef
,
()
=>
{
emit
(
"scrollToEnd"
);
fetchNextPage
(
);
});
</
script
>
...
...
src/views/userCenter/components/OrderRecords/table.ts
View file @
dfc4b8ee
...
...
@@ -6,18 +6,16 @@ export const tableColumns = [
prop
:
"name"
,
},
{
label
:
"商品名称"
,
prop
:
"address"
,
},
{
label
:
"费用"
,
slotName
:
"fee"
,
},
{
label
:
"费用类型"
,
prop
:
"date"
,
prop
:
"type"
,
slotName
:
"type"
,
},
{
label
:
"费用时间"
,
slotName
:
"create_time"
,
},
]
as
iTableColumn
[];
src/views/userCenter/index.vue
View file @
dfc4b8ee
...
...
@@ -38,7 +38,9 @@
:infos=
"userInfo"
@
ToUpdate=
"ToUpdate"
></Secutiry>
<div
style=
"height: 400px"
>
<OrderRecords></OrderRecords>
</div>
</ModuleContainer>
</div>
<div
class=
""
>
...
...
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