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
27e291f1
Commit
27e291f1
authored
Nov 13, 2024
by
tyyin lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'shirlyn' into 'master'
Merge branch 'shirlyn' into 'master' See merge request
!72
parents
3e88f2f7
89db8777
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
133 additions
and
83 deletions
+133
-83
applications-square.vue
src/views/applications-square/applications-square.vue
+53
-21
app-publish.vue
...nal-space/personal-app-setting/components/app-publish.vue
+3
-11
personal-app.vue
src/views/personal-space/personal-app/personal-app.vue
+52
-31
sale-applications-configuration-modal.vue
...ce/personal-app/sale-applications-configuration-modal.vue
+17
-20
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 @
27e291f1
...
@@ -36,11 +36,18 @@ const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
...
@@ -36,11 +36,18 @@ const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
const
isShowCarousel
=
ref
(
true
)
const
isShowCarousel
=
ref
(
true
)
const
smooth
=
ref
(
false
)
const
smooth
=
ref
(
false
)
const
agentApplicationBottomIsLoading
=
ref
(
false
)
const
agentApplicationBottomIsLoading
=
ref
(
false
)
const
agentApplicationClassifyIsLoading
=
ref
(
fals
e
)
const
agentApplicationClassifyIsLoading
=
ref
(
tru
e
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
))
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
behavior
=
computed
(()
=>
(
smooth
.
value
?
'smooth'
:
'auto'
))
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
})
const
{
arrivedState
}
=
useScroll
(
cardContentWrapRef
,
{
behavior
})
;(
function
()
{
;(
function
()
{
...
@@ -74,8 +81,11 @@ watch(
...
@@ -74,8 +81,11 @@ watch(
},
},
)
)
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
)
{
function
handleGetAgentApplicationList
(
update
=
false
,
search
=
false
,
clear
=
false
)
{
const
agentTypeId
=
ref
<
number
|
null
>
(
0
)
const
agentTypeId
=
ref
<
number
|
null
>
(
0
)
if
(
clear
&&
searchQuery
.
value
.
trim
()
===
''
)
return
if
(
agentApplicationBottomIsLoading
.
value
&&
agentApplicationClassifyIsLoading
.
value
)
return
if
(
agentApplicationBottomIsLoading
.
value
&&
agentApplicationClassifyIsLoading
.
value
)
return
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
if
(
search
&&
searchQuery
.
value
.
length
!==
0
)
{
...
@@ -84,6 +94,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -84,6 +94,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
isShowCarousel
.
value
=
true
isShowCarousel
.
value
=
true
}
}
if
(
search
)
agentApplicationClassifyIsLoading
.
value
=
true
if
(
update
)
pagingInfo
.
value
.
pageNo
=
1
if
(
update
)
pagingInfo
.
value
.
pageNo
=
1
checkedClassifyValue
.
value
===
0
?
(
agentTypeId
.
value
=
null
)
:
(
agentTypeId
.
value
=
checkedClassifyValue
.
value
)
checkedClassifyValue
.
value
===
0
?
(
agentTypeId
.
value
=
null
)
:
(
agentTypeId
.
value
=
checkedClassifyValue
.
value
)
...
@@ -92,7 +104,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -92,7 +104,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
pagingInfo
:
pagingInfo
.
value
,
pagingInfo
:
pagingInfo
.
value
,
categoryId
:
agentTypeId
.
value
,
categoryId
:
agentTypeId
.
value
,
}
}
fetchGetAgentApplicationList
<
PersonalAppConfigState
[]
>
(
payload
).
then
((
res
)
=>
{
fetchGetAgentApplicationList
<
PersonalAppConfigState
[]
>
(
payload
)
.
then
((
res
)
=>
{
agentApplicationList
.
value
=
update
?
res
.
data
:
[...
agentApplicationList
.
value
,
...
res
.
data
]
agentApplicationList
.
value
=
update
?
res
.
data
:
[...
agentApplicationList
.
value
,
...
res
.
data
]
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
...
@@ -102,7 +115,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
...
@@ -102,7 +115,8 @@ function handleGetAgentApplicationList(update = false, search = false) {
:
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
)
:
t
(
'personal_space_module.agent_module.agent_list_module.empty_agent_list'
)
emptyTableImage
.
value
=
emptyTableImage
.
value
=
searchQuery
.
value
&&
agentApplicationList
.
value
.
length
===
0
?
searchEmptyImage
:
applicationEmptyImage
searchQuery
.
value
&&
agentApplicationList
.
value
.
length
===
0
?
searchEmptyImage
:
applicationEmptyImage
})
.
finally
(()
=>
{
agentApplicationClassifyIsLoading
.
value
=
false
agentApplicationClassifyIsLoading
.
value
=
false
agentApplicationBottomIsLoading
.
value
=
false
agentApplicationBottomIsLoading
.
value
=
false
})
})
...
@@ -133,9 +147,26 @@ function handleGetMallCategoryList() {
...
@@ -133,9 +147,26 @@ function handleGetMallCategoryList() {
function
handleToUseAgentApplication
(
agentId
:
string
)
{
function
handleToUseAgentApplication
(
agentId
:
string
)
{
router
.
push
({
name
:
'ShareWebApplication'
,
params
:
{
agentId
:
agentId
}
})
router
.
push
({
name
:
'ShareWebApplication'
,
params
:
{
agentId
:
agentId
}
})
}
}
function
handleAddAgentApplications
()
{
function
handleAddAgentApplications
()
{
router
.
push
({
name
:
'PersonalAppSetting'
})
router
.
push
({
name
:
'PersonalAppSetting'
})
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
}
function
handleSearchGetApplicationList
(
clear
=
false
)
{
if
(
clear
)
{
searchQuery
.
value
=
''
handleGetAgentApplicationList
(
true
,
true
)
}
else
{
handleGetAgentApplicationList
(
true
,
true
,
true
)
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -154,10 +185,11 @@ function handleAddAgentApplications() {
...
@@ -154,10 +185,11 @@ function handleAddAgentApplications() {
:placeholder=
"t('common_module.search')"
:placeholder=
"t('common_module.search')"
class=
"search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
class=
"search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
clearable
clearable
@
keyup
.
enter=
"handleGetAgentApplicationList(true, true)"
:on-clear=
"() => handleSearchGetApplicationList(true)"
@
keyup
.
enter=
"handleEnterKeypress"
>
>
<template
#
prefix
>
<template
#
prefix
>
<div
@
click=
"
handleGetAgentApplicationList(tru
e)"
>
<div
@
click=
"
() => handleSearchGetApplicationList(fals
e)"
>
<img
src=
"@/assets/images/search.png"
width=
"14"
height=
"14"
class=
"mr-[5px] cursor-pointer"
/>
<img
src=
"@/assets/images/search.png"
width=
"14"
height=
"14"
class=
"mr-[5px] cursor-pointer"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -204,8 +236,8 @@ function handleAddAgentApplications() {
...
@@ -204,8 +236,8 @@ function handleAddAgentApplications() {
<n-scrollbar
style=
"max-height: 920px"
>
<n-scrollbar
style=
"max-height: 920px"
>
<div>
<div>
<div
class=
"mt-[14px] min-h-[800px]"
>
<div
class=
"mt-[14px] min-h-[800px]"
>
<div
class=
"flex
justify-center"
>
<div
v-show=
"agentApplicationClassifyIsLoading"
class=
"flex h-[500px] items-center
justify-center"
>
<n-spin
v-show=
"agentApplicationClassifyIsLoading"
size=
"large"
/>
<n-spin
size=
"large"
/>
</div>
</div>
<div
<div
v-show=
"!agentApplicationClassifyIsLoading && agentApplicationList.length !== 0"
v-show=
"!agentApplicationClassifyIsLoading && agentApplicationList.length !== 0"
...
@@ -243,7 +275,7 @@ function handleAddAgentApplications() {
...
@@ -243,7 +275,7 @@ function handleAddAgentApplications() {
<div
class=
"h-[84px] w-[84px]"
>
<div
class=
"h-[84px] w-[84px]"
>
<img
<img
:src=
"agentApplicationItem.baseInfo.agentAvatar"
:src=
"agentApplicationItem.baseInfo.agentAvatar"
class=
"h-
[84px] w-[84px]
rounded-[10px] object-cover"
class=
"h-
full w-full
rounded-[10px] object-cover"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -278,7 +310,7 @@ function handleAddAgentApplications() {
...
@@ -278,7 +310,7 @@ function handleAddAgentApplications() {
</div>
</div>
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<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%"
/>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
</div>
</div>
...
@@ -292,7 +324,7 @@ function handleAddAgentApplications() {
...
@@ -292,7 +324,7 @@ function handleAddAgentApplications() {
</div>
</div>
</div>
</div>
<div
<div
v-show=
"
agentApplicationList.length > 9 && pagingInfo.pageNo === pagingInfo.totalPages
"
v-show=
"
isShowAgentListBottomText
"
class=
"mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
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>
<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 @
27e291f1
...
@@ -16,15 +16,7 @@ import {
...
@@ -16,15 +16,7 @@ import {
fetchRemoveSalePublishApplication
,
fetchRemoveSalePublishApplication
,
}
from
'@/apis/agent-application'
}
from
'@/apis/agent-application'
import
{
defaultPersonalAppConfigState
,
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
defaultPersonalAppConfigState
,
usePersonalAppConfigStore
}
from
'@/store/modules/personal-app-config'
import
{
ApplicationMallInfo
}
from
'../../personal-app/types'
interface
ApplicationMallInfo
{
agentId
:
string
agentPublishId
:
number
categoryId
:
number
isCopy
:
string
isSale
:
string
launchTime
:
string
}
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
...
@@ -334,8 +326,8 @@ function handleToApplicationSquare() {
...
@@ -334,8 +326,8 @@ function handleToApplicationSquare() {
<SaleApplicationsConfigurationModal
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
:
category-id=
"applicationMallInfo.categoryId
"
:
application-mall-info=
"applicationMallInfo
"
@
update=
"(newValue: string) => (applicationMallInfo.isSale = newValue)"
@
update=
"(newValue: string) => (applicationMallInfo.isSale = newValue)"
@
trigger-get-application-mall-info=
"handleGetApplicationMallInfo"
@
trigger-get-application-mall-info=
"handleGetApplicationMallInfo"
/>
/>
...
...
src/views/personal-space/personal-app/personal-app.vue
View file @
27e291f1
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
computed
,
ref
,
useTemplateRef
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
Search
,
MoreOne
,
Star
}
from
'@icon-park/vue-next'
import
{
Search
,
MoreOne
,
Star
}
from
'@icon-park/vue-next'
import
{
PaginationInfo
}
from
'@/components/custom-pagination/custom-pagination.vue'
import
{
PaginationInfo
}
from
'@/components/custom-pagination/custom-pagination.vue'
...
@@ -56,14 +56,22 @@ const pagingInfo = ref<PaginationInfo>({
...
@@ -56,14 +56,22 @@ const pagingInfo = ref<PaginationInfo>({
const
agentAppList
=
ref
<
PersonalAppConfigState
[]
>
([])
const
agentAppList
=
ref
<
PersonalAppConfigState
[]
>
([])
const
agentSearchInputValue
=
ref
(
''
)
const
agentSearchInputValue
=
ref
(
''
)
const
agentAppListLoading
=
ref
(
fals
e
)
const
agentAppListLoading
=
ref
(
tru
e
)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
agentAppListBottomLoadingMore
=
ref
(
false
)
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
const
emptyTableText
=
ref
(
t
(
'personal_space_module.agent_module.agent_list_module.application_empty'
))
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
emptyTableImage
=
ref
(
applicationEmptyImage
)
const
isAgentAppListBottom
=
ref
(
false
)
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
(
watch
(
()
=>
isAgentAppListBottom
.
value
,
()
=>
isAgentAppListBottom
.
value
,
...
@@ -78,25 +86,30 @@ watch(
...
@@ -78,25 +86,30 @@ watch(
},
},
)
)
;(
function
()
{
;(
function
()
{
agentAppListLoading
.
value
=
true
getApplicationList
()
getApplicationList
()
})()
})()
function
getApplicationList
(
isLoadMore
=
false
)
{
function
getApplicationList
(
isLoadMore
=
false
,
clear
=
false
)
{
if
(
clear
&&
agentSearchInputValue
.
value
.
trim
()
===
''
)
{
return
}
else
{
if
(
!
agentAppListBottomLoadingMore
.
value
)
agentAppListLoading
.
value
=
true
}
if
(
!
isLoadMore
)
{
if
(
!
isLoadMore
)
{
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
totalPages
=
0
pagingInfo
.
value
.
totalPages
=
0
pagingInfo
.
value
.
totalRows
=
0
pagingInfo
.
value
.
totalRows
=
0
}
}
const
isCollect
=
ref
(
''
)
let
publishStatus
=
selectedPublishStatusValue
.
value
const
publishStatus
=
ref
(
selectedPublishStatusValue
.
value
)
isCollect
.
value
=
''
if
(
selectedPublishStatusValue
.
value
===
'Y'
)
{
if
(
selectedPublishStatusValue
.
value
===
'Y'
)
{
isCollect
.
value
=
'Y'
isCollect
.
value
=
'Y'
publishStatus
.
value
=
''
publishStatus
=
''
}
}
const
payload
=
{
const
payload
=
{
query
:
agentSearchInputValue
.
value
,
query
:
agentSearchInputValue
.
value
,
publishStatus
:
publishStatus
.
value
,
publishStatus
:
publishStatus
,
isCollect
:
isCollect
.
value
,
isCollect
:
isCollect
.
value
,
pagingInfo
:
pagingInfo
.
value
,
pagingInfo
:
pagingInfo
.
value
,
}
}
...
@@ -122,14 +135,6 @@ function handleBasePublishingStatusGetAgentList() {
...
@@ -122,14 +135,6 @@ function handleBasePublishingStatusGetAgentList() {
getApplicationList
()
getApplicationList
()
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
getApplicationList
()
}
}
function
handleDeletePersonalApp
(
agentId
:
string
)
{
function
handleDeletePersonalApp
(
agentId
:
string
)
{
window
.
$message
window
.
$message
.
ctWarning
(
t
(
'personal_space_module.agent_module.agent_list_module.delete_agent_dialog_title'
))
.
ctWarning
(
t
(
'personal_space_module.agent_module.agent_list_module.delete_agent_dialog_title'
))
...
@@ -184,9 +189,21 @@ function handleSelectAddType() {
...
@@ -184,9 +189,21 @@ function handleSelectAddType() {
router
.
push
({
name
:
'PersonalAppSetting'
})
router
.
push
({
name
:
'PersonalAppSetting'
})
}
}
// function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
function
handleSearchGetApplicationList
(
clear
=
false
)
{
// console.log('分析', personalApp)
if
(
clear
)
{
// }
agentSearchInputValue
.
value
=
''
getApplicationList
()
}
else
{
getApplicationList
(
false
,
true
)
}
}
function
handleEnterKeypress
(
event
:
KeyboardEvent
)
{
if
(
event
.
code
===
'Enter'
&&
!
event
.
shiftKey
)
{
event
.
preventDefault
()
getApplicationList
(
false
,
true
)
}
}
const
handleCardContentScrollDebounce
=
debounce
(
const
handleCardContentScrollDebounce
=
debounce
(
(
event
:
{
target
:
{
scrollTop
:
number
;
clientHeight
:
number
;
scrollHeight
:
number
}
})
=>
{
(
event
:
{
target
:
{
scrollTop
:
number
;
clientHeight
:
number
;
scrollHeight
:
number
}
})
=>
{
...
@@ -198,6 +215,10 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -198,6 +215,10 @@ const handleCardContentScrollDebounce = debounce(
},
},
200
,
200
,
)
)
// function handleAnalysisPersonalApp(personalApp: PersonalAppConfigState) {
// console.log('分析', personalApp)
// }
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -214,6 +235,8 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -214,6 +235,8 @@ const handleCardContentScrollDebounce = debounce(
v-model:value=
"agentSearchInputValue"
v-model:value=
"agentSearchInputValue"
:placeholder=
"t('common_module.search')"
:placeholder=
"t('common_module.search')"
class=
"w-[256px]! h-[32px]!"
class=
"w-[256px]! h-[32px]!"
clearable
:on-clear=
"() => handleSearchGetApplicationList(true)"
@
keypress=
"handleEnterKeypress"
@
keypress=
"handleEnterKeypress"
>
>
<template
#
suffix
>
<template
#
suffix
>
...
@@ -222,16 +245,16 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -222,16 +245,16 @@ const handleCardContentScrollDebounce = debounce(
size=
"16"
size=
"16"
fill=
"#999"
fill=
"#999"
:stroke-width=
"3"
:stroke-width=
"3"
class=
"cursor-pointer text-base"
class=
"
ml-[10px]
cursor-pointer text-base"
@
click=
"
getApplicationList(
)"
@
click=
"
() => handleSearchGetApplicationList(false
)"
/>
/>
</
template
>
</
template
>
</NInput>
</NInput>
</div>
</div>
<n-scrollbar
style=
"max-height: 700px"
@
scroll=
"handleCardContentScrollDebounce"
>
<n-scrollbar
style=
"max-height: 700px"
@
scroll=
"handleCardContentScrollDebounce"
>
<div
ref=
"cardContentWrapRef"
class=
"pb-[50px]"
>
<div
ref=
"cardContentWrapRef"
class=
"pb-[50px]"
>
<div
class=
"flex
justify-center"
>
<div
v-show=
"agentAppListLoading"
class=
"flex h-[700px] items-center
justify-center"
>
<n-spin
v-show=
"agentAppListLoading"
size=
"large"
/>
<n-spin
size=
"large"
/>
</div>
</div>
<div
v-show=
"!agentAppListLoading"
class=
"mt-[5px]"
>
<div
v-show=
"!agentAppListLoading"
class=
"mt-[5px]"
>
<div
v-if=
"agentAppList.length"
class=
"grid-content grid grid-cols-4"
>
<div
v-if=
"agentAppList.length"
class=
"grid-content grid grid-cols-4"
>
...
@@ -269,7 +292,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -269,7 +292,7 @@ const handleCardContentScrollDebounce = debounce(
>
>
</div>
</div>
<div
class=
"h-[68px] w-[68px]"
>
<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>
</div>
<div>
<div>
...
@@ -350,7 +373,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -350,7 +373,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
</div>
</div>
<div
v-for=
"item in 4"
:key=
"item"
class=
"mr-[15px]"
>
<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%"
/>
<n-skeleton
text
:repeat=
"6"
/>
<n-skeleton
text
style=
"width: 60%"
/>
</div>
</div>
</div>
</div>
...
@@ -377,9 +400,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -377,9 +400,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
</div>
</div>
</div>
<div
<div
v-show=
"
v-show=
"isShowAgentListBottomText"
pagingInfo.pageNo === pagingInfo.totalPages && agentAppList.length !== 0 && pagingInfo.totalRows > 12
"
class=
"mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
class=
"mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
<div
class=
"relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"
></div>
...
@@ -394,7 +415,7 @@ const handleCardContentScrollDebounce = debounce(
...
@@ -394,7 +415,7 @@ const handleCardContentScrollDebounce = debounce(
<SaleApplicationsConfigurationModal
<SaleApplicationsConfigurationModal
v-model=
"isShowSaleApplicationsConfigurationModal"
v-model=
"isShowSaleApplicationsConfigurationModal"
:data=
"saleApplicationsInfo"
:
sale-applications-
data=
"saleApplicationsInfo"
@
update=
"(newValue: string) => (saleApplicationsInfo.isSale = newValue)"
@
update=
"(newValue: string) => (saleApplicationsInfo.isSale = newValue)"
/>
/>
</div>
</div>
...
...
src/views/personal-space/personal-app/sale-applications-configuration-modal.vue
View file @
27e291f1
...
@@ -5,6 +5,7 @@ import { PersonalAppConfigState } from '@/store/types/personal-app-config'
...
@@ -5,6 +5,7 @@ import { PersonalAppConfigState } from '@/store/types/personal-app-config'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
Close
,
Help
,
Notes
,
CheckSmall
}
from
'@icon-park/vue-next'
import
{
ref
,
watch
}
from
'vue'
import
{
ref
,
watch
}
from
'vue'
import
{
useI18n
}
from
'vue-i18n'
import
{
useI18n
}
from
'vue-i18n'
import
{
ApplicationMallInfo
}
from
'./types'
interface
MallCategory
{
interface
MallCategory
{
id
:
number
id
:
number
...
@@ -14,8 +15,8 @@ interface MallCategory {
...
@@ -14,8 +15,8 @@ interface MallCategory {
const
isShowSaleApplicationsConfigurationModal
=
defineModel
<
boolean
>
()
const
isShowSaleApplicationsConfigurationModal
=
defineModel
<
boolean
>
()
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
d
ata
:
PersonalAppConfigState
saleApplicationsD
ata
:
PersonalAppConfigState
categoryId
?:
number
applicationMallInfo
?:
ApplicationMallInfo
}
>
()
}
>
()
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
update
:
[
value
:
string
]
update
:
[
value
:
string
]
...
@@ -23,13 +24,12 @@ const emit = defineEmits<{
...
@@ -23,13 +24,12 @@ const emit = defineEmits<{
}
>
()
}
>
()
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
checkedClassifyValue
=
ref
<
number
|
null
>
(
props
.
applicationMallInfo
?.
categoryId
??
0
)
const
checkedClassifyValue
=
ref
<
number
|
null
>
(
props
.
categoryId
!
)
const
isCopy
=
ref
(
props
.
saleApplicationsData
.
isCopy
===
'Y'
)
const
isCopy
=
ref
(
props
.
data
.
isCopy
===
'Y'
)
const
saleApplicationsId
=
ref
(
props
.
data
.
agentPublishId
)
const
isClassifyError
=
ref
(
false
)
const
isClassifyError
=
ref
(
false
)
const
applicationsClassify
=
ref
<
MallCategory
[]
>
([])
const
applicationsClassify
=
ref
<
MallCategory
[]
>
([])
const
agentPublishId
=
ref
(
props
.
saleApplicationsData
.
agentPublishId
)
;(
function
()
{
;(
function
()
{
handleGetMallCategoryList
()
handleGetMallCategoryList
()
...
@@ -43,17 +43,9 @@ watch(
...
@@ -43,17 +43,9 @@ watch(
)
)
watch
(
watch
(
()
=>
props
.
category
Id
,
()
=>
props
.
saleApplicationsData
.
agentPublish
Id
,
(
newValue
)
=>
{
(
newValue
)
=>
{
checkedClassifyValue
.
value
=
newValue
!
agentPublishId
.
value
=
newValue
},
)
watch
(
()
=>
props
.
data
,
(
newVal
)
=>
{
saleApplicationsId
.
value
=
newVal
.
agentPublishId
isCopy
.
value
=
newVal
.
isCopy
===
'Y'
},
},
)
)
...
@@ -69,8 +61,12 @@ function handleApplicationReleaseBtn() {
...
@@ -69,8 +61,12 @@ function handleApplicationReleaseBtn() {
return
return
}
}
if
(
props
.
applicationMallInfo
?.
agentPublishId
)
{
agentPublishId
.
value
=
props
.
applicationMallInfo
.
agentPublishId
}
const
payload
=
{
const
payload
=
{
agentPublishId
:
props
.
data
.
agentPublishId
,
agentPublishId
:
agentPublishId
.
value
,
categoryId
:
checkedClassifyValue
.
value
,
categoryId
:
checkedClassifyValue
.
value
,
isCopy
:
isCopy
.
value
?
'Y'
:
'N'
,
isCopy
:
isCopy
.
value
?
'Y'
:
'N'
,
isSale
:
'Y'
,
isSale
:
'Y'
,
...
@@ -105,9 +101,9 @@ function handleGetMallCategoryList() {
...
@@ -105,9 +101,9 @@ function handleGetMallCategoryList() {
}
}
function
handleModalOpenAfter
()
{
function
handleModalOpenAfter
()
{
if
(
props
.
data
.
isCopy
)
isCopy
.
value
=
props
.
d
ata
.
isCopy
===
'Y'
if
(
props
.
saleApplicationsData
.
isCopy
)
isCopy
.
value
=
props
.
saleApplicationsD
ata
.
isCopy
===
'Y'
if
(
props
.
d
ata
.
isSale
===
'Y'
)
{
if
(
props
.
saleApplicationsD
ata
.
isSale
===
'Y'
)
{
checkedClassifyValue
.
value
=
props
.
categoryId
!
checkedClassifyValue
.
value
=
props
.
applicationMallInfo
!
.
categoryId
}
else
{
}
else
{
checkedClassifyValue
.
value
=
0
checkedClassifyValue
.
value
=
0
}
}
...
@@ -141,6 +137,7 @@ function handleModalOpenAfter() {
...
@@ -141,6 +137,7 @@ function handleModalOpenAfter() {
@
click=
"handleApplicationsSaleSettingModalClose"
@
click=
"handleApplicationsSaleSettingModalClose"
/>
/>
</div>
</div>
<div
class=
"items-center justify-center rounded-[4px]"
>
<div
class=
"items-center justify-center rounded-[4px]"
>
<div
class=
"mb-[16px] flex items-center text-[14px] text-[#151B26]"
>
<div
class=
"mb-[16px] flex items-center text-[14px] text-[#151B26]"
>
<div
class=
"bg-theme-color mr-[8px] h-[20px] w-[20px] rounded-2xl text-center text-[#fff]"
>
1
</div>
<div
class=
"bg-theme-color mr-[8px] h-[20px] w-[20px] rounded-2xl text-center text-[#fff]"
>
1
</div>
...
...
src/views/personal-space/personal-app/types.d.ts
0 → 100644
View file @
27e291f1
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