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
89db8777
Commit
89db8777
authored
Nov 13, 2024
by
shirlyn.guo
👌🏻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 个人应用&应用广场规范代码
parent
960fc374
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
43 deletions
+55
-43
applications-square.vue
src/views/applications-square/applications-square.vue
+12
-5
app-publish.vue
...nal-space/personal-app-setting/components/app-publish.vue
+2
-10
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+20
-14
sale-applications-configuration-modal.vue
...ce/personal-app/sale-applications-configuration-modal.vue
+13
-14
types.d.ts
src/views/personal-space/personal-app/types.d.ts
+8
-0
No files found.
src/views/applications-square/applications-square.vue
View file @
89db8777
...
...
@@ -41,6 +41,13 @@ const emptyTableText = ref(t('personal_space_module.agent_module.agent_list_modu
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
behavior
=
computed
(()
=>
(
smooth
.
value
?
'smooth'
:
'auto'
))
const
isShowAgentListBottomText
=
computed
(
()
=>
agentApplicationList
.
value
.
length
>
8
&&
pagingInfo
.
value
.
pageNo
===
pagingInfo
.
value
.
totalPages
&&
!
agentApplicationClassifyIsLoading
.
value
&&
!
agentApplicationBottomIsLoading
.
value
,
)
const
{
arrivedState
}
=
useScroll
(
cardContentWrapRef
,
{
behavior
})
;(
function
()
{
...
...
@@ -83,11 +90,12 @@ function handleGetAgentApplicationList(update = false, search = false, clear = f
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
isShowCarousel
.
value
=
false
agentApplicationClassifyIsLoading
.
value
=
true
}
else
{
isShowCarousel
.
value
=
true
}
if
(
search
)
agentApplicationClassifyIsLoading
.
value
=
true
if
(
update
)
pagingInfo
.
value
.
pageNo
=
1
checkedClassifyValue
.
value
===
0
?
(
agentTypeId
.
value
=
null
)
:
(
agentTypeId
.
value
=
checkedClassifyValue
.
value
)
...
...
@@ -153,7 +161,6 @@ function handleEnterKeypress(event: KeyboardEvent) {
function
handleSearchGetApplicationList
(
clear
=
false
)
{
if
(
clear
)
{
agentApplicationClassifyIsLoading
.
value
=
true
searchQuery
.
value
=
''
handleGetAgentApplicationList
(
true
,
true
)
}
else
{
...
...
@@ -268,7 +275,7 @@ function handleSearchGetApplicationList(clear = false) {
<div
class=
"h-[84px] w-[84px]"
>
<img
:src=
"agentApplicationItem.baseInfo.agentAvatar"
class=
"h-
[84px] w-[84px]
rounded-[10px] object-cover"
class=
"h-
full w-full
rounded-[10px] object-cover"
/>
</div>
</div>
...
...
@@ -303,7 +310,7 @@ function handleSearchGetApplicationList(clear = false) {
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-show=
"agentApplicationBottomIsLoading
&& pagingInfo.pageNo !== pagingInfo.totalPages
"
>
<div
v-show=
"agentApplicationBottomIsLoading"
>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
...
...
@@ -317,7 +324,7 @@ function handleSearchGetApplicationList(clear = false) {
</div>
</div>
<div
v-show=
"
agentApplicationList.length > 8 && pagingInfo.pageNo === pagingInfo.totalPages
"
v-show=
"
isShowAgentListBottomText
"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
...
...
src/views/personal-space/personal-app-setting/components/app-publish.vue
View file @
89db8777
...
...
@@ -16,15 +16,7 @@ import {
fetchRemoveSalePublishApplication
,
}
from
'@/apis/agent-application'
import
{
defaultPersonalAppConfigState
,
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
import
{
ApplicationMallInfo
}
from
'../../personal-app/types'
const
{
t
}
=
useI18n
()
...
...
@@ -334,7 +326,7 @@ function handleToApplicationSquare() {
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
:application-mall-info=
"applicationMallInfo"
@
update=
"(newValue: string) => (applicationMallInfo.isSale = newValue)"
@
trigger-get-application-mall-info=
"handleGetApplicationMallInfo"
...
...
src/views/personal-space/personal-app/personal-app.vue
View file @
89db8777
<
script
setup
lang=
"ts"
>
import
{
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
computed
,
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
Search
,
MoreOne
,
Star
}
from
'@icon-park/vue-next'
import
{
PaginationInfo
}
from
'@/components/custom-pagination/custom-pagination.vue'
...
...
@@ -60,10 +60,18 @@ const agentAppListLoading = ref(true)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
isAgentAppListBottom
=
ref
(
false
)
const
isCollect
=
ref
(
''
)
const
isShowAgentListBottomText
=
computed
(
()
=>
pagingInfo
.
value
.
pageNo
===
pagingInfo
.
value
.
totalPages
&&
agentAppList
.
value
.
length
!==
0
&&
pagingInfo
.
value
.
totalRows
>
12
&&
!
agentAppListLoading
.
value
&&
!
agentAppListBottomLoadingMore
.
value
,
)
watch
(
()
=>
isAgentAppListBottom
.
value
,
...
...
@@ -92,15 +100,16 @@ function getApplicationList(isLoadMore = false, clear = false) {
pagingInfo
.
value
.
totalPages
=
0
pagingInfo
.
value
.
totalRows
=
0
}
const
isCollect
=
ref
(
''
)
const
publishStatus
=
ref
(
selectedPublishStatusValue
.
value
)
let
publishStatus
=
selectedPublishStatusValue
.
value
isCollect
.
value
=
''
if
(
selectedPublishStatusValue
.
value
===
'Y'
)
{
isCollect
.
value
=
'Y'
publishStatus
.
value
=
''
publishStatus
=
''
}
const
payload
=
{
query
:
agentSearchInputValue
.
value
,
publishStatus
:
publishStatus
.
value
,
publishStatus
:
publishStatus
,
isCollect
:
isCollect
.
value
,
pagingInfo
:
pagingInfo
.
value
,
}
...
...
@@ -182,7 +191,6 @@ function handleSelectAddType() {
function
handleSearchGetApplicationList
(
clear
=
false
)
{
if
(
clear
)
{
agentAppListLoading
.
value
=
true
agentSearchInputValue
.
value
=
''
getApplicationList
()
}
else
{
...
...
@@ -284,7 +292,7 @@ const handleCardContentScrollDebounce = debounce(
>
</div>
<div
class=
"h-[68px] w-[68px]"
>
<img
:src=
"agentAppItem.baseInfo.agentAvatar"
class=
"h-
[68px]
rounded-[10px] object-cover"
/>
<img
:src=
"agentAppItem.baseInfo.agentAvatar"
class=
"h-
full w-full
rounded-[10px] object-cover"
/>
</div>
</div>
<div>
...
...
@@ -365,7 +373,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<div
v-show=
"agentAppListBottomLoadingMore
&& pagingInfo.pageNo !== pagingInfo.totalPages
"
>
<div
v-show=
"agentAppListBottomLoadingMore"
>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
...
...
@@ -392,9 +400,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
<div
v-show=
"
pagingInfo.pageNo === pagingInfo.totalPages && agentAppList.length !== 0 && pagingInfo.totalRows > 12
"
v-show=
"isShowAgentListBottomText"
class=
"mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
...
...
@@ -409,7 +415,7 @@ const handleCardContentScrollDebounce = debounce(
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
@
update=
"(newValue: string) => (saleApplicationsInfo.isSale = newValue)"
/>
</div>
...
...
src/views/personal-space/personal-app/sale-applications-configuration-modal.vue
View file @
89db8777
...
...
@@ -5,25 +5,17 @@ import { PersonalAppConfigState } from '@/store/types/personal-app-config'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
ref
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
ApplicationMallInfo
}
from
'./types'
interface
MallCategory
{
id
:
number
categoryName
:
string
}
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
const
isShowSaleApplicationsConfigurationModal
=
defineModel
<
boolean
>
()
const
props
=
defineProps
<
{
d
ata
:
PersonalAppConfigState
saleApplicationsD
ata
:
PersonalAppConfigState
applicationMallInfo
?:
ApplicationMallInfo
}
>
()
const
emit
=
defineEmits
<
{
...
...
@@ -34,9 +26,10 @@ const emit = defineEmits<{
const
{
t
}
=
useI18n
()
const
checkedClassifyValue
=
ref
<
number
|
null
>
(
props
.
applicationMallInfo
?.
categoryId
??
0
)
const
isCopy
=
ref
(
props
.
d
ata
.
isCopy
===
'Y'
)
const
isCopy
=
ref
(
props
.
saleApplicationsD
ata
.
isCopy
===
'Y'
)
const
isClassifyError
=
ref
(
false
)
const
applicationsClassify
=
ref
<
MallCategory
[]
>
([])
const
agentPublishId
=
ref
(
props
.
saleApplicationsData
.
agentPublishId
)
;(
function
()
{
handleGetMallCategoryList
()
...
...
@@ -49,6 +42,13 @@ watch(
},
)
watch
(
()
=>
props
.
saleApplicationsData
.
agentPublishId
,
(
newValue
)
=>
{
agentPublishId
.
value
=
newValue
},
)
function
handleApplicationsSaleSettingModalClose
()
{
isShowSaleApplicationsConfigurationModal
.
value
=
false
checkedClassifyValue
.
value
=
null
...
...
@@ -56,7 +56,6 @@ function handleApplicationsSaleSettingModalClose() {
}
function
handleApplicationReleaseBtn
()
{
const
agentPublishId
=
ref
(
props
.
data
.
agentPublishId
)
if
(
!
checkedClassifyValue
.
value
)
{
isClassifyError
.
value
=
true
return
...
...
@@ -102,8 +101,8 @@ function handleGetMallCategoryList() {
}
function
handleModalOpenAfter
()
{
if
(
props
.
data
.
isCopy
)
isCopy
.
value
=
props
.
d
ata
.
isCopy
===
'Y'
if
(
props
.
d
ata
.
isSale
===
'Y'
)
{
if
(
props
.
saleApplicationsData
.
isCopy
)
isCopy
.
value
=
props
.
saleApplicationsD
ata
.
isCopy
===
'Y'
if
(
props
.
saleApplicationsD
ata
.
isSale
===
'Y'
)
{
checkedClassifyValue
.
value
=
props
.
applicationMallInfo
!
.
categoryId
}
else
{
checkedClassifyValue
.
value
=
0
...
...
src/views/personal-space/personal-app/types.d.ts
0 → 100644
View file @
89db8777
export
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
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