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
df9d76c3
Commit
df9d76c3
authored
Sep 14, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 发布应用后状态没有更新及分享链接有误
parent
2a5514dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
15 deletions
+19
-15
columns.ts
src/views/personal-space/personal-app-setting/columns.ts
+4
-6
app-publish.vue
...nal-space/personal-app-setting/components/app-publish.vue
+10
-8
page-narbar.vue
...nal-space/personal-app-setting/components/page-narbar.vue
+5
-1
No files found.
src/views/personal-space/personal-app-setting/columns.ts
View file @
df9d76c3
...
@@ -2,9 +2,7 @@ import { h } from 'vue'
...
@@ -2,9 +2,7 @@ import { h } from 'vue'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
CustomIcon
from
'@/components/custom-icon/custom-icon.vue'
import
{
formatDateTime
}
from
'@/utils/date-formatter'
import
{
formatDateTime
}
from
'@/utils/date-formatter'
export
function
createChannelPublishColumn
(
export
function
createChannelPublishColumn
(
handleChannelPublishTableAction
:
(
actionType
:
string
)
=>
void
)
{
handleChannelPublishTableAction
:
(
actionType
:
string
,
linkUrl
:
string
)
=>
void
,
)
{
return
[
return
[
{
{
title
:
'发布渠道'
,
title
:
'发布渠道'
,
...
@@ -122,7 +120,7 @@ export function createChannelPublishColumn(
...
@@ -122,7 +120,7 @@ export function createChannelPublishColumn(
key
:
'action'
,
key
:
'action'
,
align
:
'left'
,
align
:
'left'
,
width
:
'460'
,
width
:
'460'
,
render
(
row
:
{
linkUrl
:
string
}
)
{
render
()
{
return
h
(
return
h
(
'div'
,
'div'
,
{
{
...
@@ -148,7 +146,7 @@ export function createChannelPublishColumn(
...
@@ -148,7 +146,7 @@ export function createChannelPublishColumn(
color
:
'#2468f2'
,
color
:
'#2468f2'
,
},
},
className
:
'cursor-pointer rounded-md border hover:opacity-80'
,
className
:
'cursor-pointer rounded-md border hover:opacity-80'
,
onClick
:
()
=>
handleChannelPublishTableAction
(
'accessPage'
,
row
.
linkUrl
),
onClick
:
()
=>
handleChannelPublishTableAction
(
'accessPage'
),
},
},
{
{
default
:
()
=>
[
default
:
()
=>
[
...
@@ -176,7 +174,7 @@ export function createChannelPublishColumn(
...
@@ -176,7 +174,7 @@ export function createChannelPublishColumn(
background
:
'#f7f7f9'
,
background
:
'#f7f7f9'
,
},
},
className
:
'cursor-pointer hover:text-theme-color rounded-md border hover:border-theme-color'
,
className
:
'cursor-pointer hover:text-theme-color rounded-md border hover:border-theme-color'
,
onClick
:
()
=>
handleChannelPublishTableAction
(
'copyLink'
,
row
.
linkUrl
),
onClick
:
()
=>
handleChannelPublishTableAction
(
'copyLink'
),
},
},
{
{
default
:
()
=>
[
default
:
()
=>
[
...
...
src/views/personal-space/personal-app-setting/components/app-publish.vue
View file @
df9d76c3
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
rea
donly
}
from
'vue'
import
{
rea
ctive
}
from
'vue'
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
import
{
createChannelPublishColumn
}
from
'../columns'
import
{
createChannelPublishColumn
}
from
'../columns'
import
{
INDEX_URLS
}
from
'@/config/base-url'
import
{
INDEX_URLS
}
from
'@/config/base-url'
...
@@ -10,30 +10,32 @@ const { pageContentWrapRef, tableContentY } = useTableScrollY()
...
@@ -10,30 +10,32 @@ const { pageContentWrapRef, tableContentY } = useTableScrollY()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
channelPublishList
=
rea
donly
([
const
channelPublishList
=
rea
ctive
([
{
{
linkUrl
:
`
${
INDEX_URLS
[
window
.
ENV
||
'DEV'
]}
share/web_source/
${
router
.
currentRoute
.
value
.
params
.
agentId
}
`
,
type
:
'web'
,
},
},
])
])
const
columns
=
createChannelPublishColumn
(
handleClickChannelPublishTableAction
)
const
columns
=
createChannelPublishColumn
(
handleClickChannelPublishTableAction
)
function
handleClickChannelPublishTableAction
(
actionType
:
string
,
channleUrl
:
string
)
{
function
handleClickChannelPublishTableAction
(
actionType
:
string
)
{
switch
(
actionType
)
{
switch
(
actionType
)
{
case
'accessPage'
:
case
'accessPage'
:
handleAccessPage
(
channleUrl
)
handleAccessPage
()
break
break
case
'copyLink'
:
case
'copyLink'
:
handleCopyShareLink
(
channleUrl
)
handleCopyShareLink
()
break
break
}
}
}
}
function
handleAccessPage
(
channleUrl
:
string
)
{
function
handleAccessPage
()
{
const
channleUrl
=
`
${
INDEX_URLS
[
window
.
ENV
||
'DEV'
]}
share/web_source/
${
router
.
currentRoute
.
value
.
params
.
agentId
}
`
location
.
href
=
channleUrl
location
.
href
=
channleUrl
}
}
function
handleCopyShareLink
(
channleUrl
:
string
)
{
function
handleCopyShareLink
()
{
const
channleUrl
=
`
${
INDEX_URLS
[
window
.
ENV
||
'DEV'
]}
share/web_source/
${
router
.
currentRoute
.
value
.
params
.
agentId
}
`
copyToClip
(
channleUrl
)
copyToClip
(
channleUrl
)
window
.
$message
.
success
(
'链接复制成功,快分享给你的好友吧!'
)
window
.
$message
.
success
(
'链接复制成功,快分享给你的好友吧!'
)
}
}
...
...
src/views/personal-space/personal-app-setting/components/page-narbar.vue
View file @
df9d76c3
...
@@ -146,8 +146,11 @@ async function handlePublishApplication() {
...
@@ -146,8 +146,11 @@ async function handlePublishApplication() {
router
.
replace
({
router
.
replace
({
name
:
router
.
currentRoute
.
value
.
name
as
string
,
name
:
router
.
currentRoute
.
value
.
name
as
string
,
query
:
{
tabKey
:
'publish'
},
query
:
{
tabKey
:
'publish'
},
params
:
{
...
router
.
currentRoute
.
value
.
params
},
params
:
{
agentId
:
personalAppConfig
.
value
.
baseInfo
.
agentId
},
})
})
personalAppConfig
.
value
.
baseInfo
.
agentPublishStatus
=
'publish'
emit
(
'changeAgentAppTabKey'
,
'publish'
)
emit
(
'changeAgentAppTabKey'
,
'publish'
)
}
}
}
}
...
@@ -225,6 +228,7 @@ async function handlePublishApplication() {
...
@@ -225,6 +228,7 @@ async function handlePublishApplication() {
v-show=
"isShowPublishBtn"
v-show=
"isShowPublishBtn"
type=
"primary"
type=
"primary"
class=
"h-[32px]! min-w-20! rounded-md!"
class=
"h-[32px]! min-w-20! rounded-md!"
:disabled=
"!personalAppConfig.baseInfo.agentId"
:loading=
"publishBtnloading"
:loading=
"publishBtnloading"
@
click=
"handlePublishApplication"
@
click=
"handlePublishApplication"
>
>
...
...
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