Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
36b5db16
authored
Jul 28, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【功能优化】MALL:商品分类界面,增加【查看商品】按钮
parent
8bbe9ad4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
src/views/ai/chat/index/index.vue
+1
-2
src/views/mall/product/category/index.vue
+19
-1
src/views/mall/product/spu/index.vue
+6
-0
No files found.
src/views/ai/chat/index/index.vue
View file @
36b5db16
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<el-button
size=
"small"
class=
"btn"
>
<el-button
size=
"small"
class=
"btn"
>
<Icon
icon=
"ep:download"
color=
"#787878"
/>
<Icon
icon=
"ep:download"
color=
"#787878"
/>
</el-button>
</el-button>
<el-button
size=
"small"
class=
"btn"
@
click=
"handleGoTopMessage"
>
<el-button
size=
"small"
class=
"btn"
@
click=
"handleGoTopMessage"
>
<Icon
icon=
"ep:top"
color=
"#787878"
/>
<Icon
icon=
"ep:top"
color=
"#787878"
/>
</el-button>
</el-button>
</div>
</div>
...
@@ -119,7 +119,6 @@ import MessageList from './components/message/MessageList.vue'
...
@@ -119,7 +119,6 @@ import MessageList from './components/message/MessageList.vue'
import
MessageListEmpty
from
'./components/message/MessageListEmpty.vue'
import
MessageListEmpty
from
'./components/message/MessageListEmpty.vue'
import
MessageLoading
from
'./components/message/MessageLoading.vue'
import
MessageLoading
from
'./components/message/MessageLoading.vue'
import
MessageNewConversation
from
'./components/message/MessageNewConversation.vue'
import
MessageNewConversation
from
'./components/message/MessageNewConversation.vue'
import
{
Download
,
Top
}
from
'@element-plus/icons-vue'
/** AI 聊天对话 列表 */
/** AI 聊天对话 列表 */
defineOptions
({
name
:
'AiChat'
})
defineOptions
({
name
:
'AiChat'
})
...
...
src/views/mall/product/category/index.vue
View file @
36b5db16
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
width=
"180"
width=
"180"
:formatter=
"dateFormatter"
:formatter=
"dateFormatter"
/>
/>
<el-table-column
label=
"操作"
align=
"center"
>
<el-table-column
label=
"操作"
align=
"center"
min-width=
"180"
>
<
template
#
default=
"scope"
>
<
template
#
default=
"scope"
>
<el-button
<el-button
link
link
...
@@ -68,6 +68,15 @@
...
@@ -68,6 +68,15 @@
</el-button>
</el-button>
<el-button
<el-button
link
link
type=
"primary"
v-if=
"scope.row.parentId > 0"
@
click=
"handleViewSpu(scope.row.id)"
v-hasPermi=
"['product:spu:query']"
>
查看商品
</el-button>
<el-button
link
type=
"danger"
type=
"danger"
@
click=
"handleDelete(scope.row.id)"
@
click=
"handleDelete(scope.row.id)"
v-hasPermi=
"['product:category:delete']"
v-hasPermi=
"['product:category:delete']"
...
@@ -142,6 +151,15 @@ const handleDelete = async (id: number) => {
...
@@ -142,6 +151,15 @@ const handleDelete = async (id: number) => {
}
catch
{}
}
catch
{}
}
}
/** 查看商品操作 */
const
router
=
useRouter
()
// 路由
const
handleViewSpu
=
(
id
:
number
)
=>
{
router
.
push
({
name
:
'ProductSpu'
,
query
:
{
categoryId
:
id
}
})
}
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
getList
()
getList
()
...
...
src/views/mall/product/spu/index.vue
View file @
36b5db16
...
@@ -244,6 +244,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
...
@@ -244,6 +244,7 @@ import * as ProductCategoryApi from '@/api/mall/product/category'
defineOptions
({
name
:
'ProductSpu'
})
defineOptions
({
name
:
'ProductSpu'
})
const
message
=
useMessage
()
// 消息弹窗
const
message
=
useMessage
()
// 消息弹窗
const
route
=
useRoute
()
// 路由
const
{
t
}
=
useI18n
()
// 国际化
const
{
t
}
=
useI18n
()
// 国际化
const
{
push
}
=
useRouter
()
// 路由跳转
const
{
push
}
=
useRouter
()
// 路由跳转
...
@@ -431,6 +432,11 @@ onActivated(() => {
...
@@ -431,6 +432,11 @@ onActivated(() => {
/** 初始化 **/
/** 初始化 **/
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// 解析路由的 categoryId
if
(
route
.
query
.
categoryId
)
{
queryParams
.
value
.
categoryId
=
Number
(
route
.
query
.
categoryId
)
}
// 获得商品信息
await
getTabsCount
()
await
getTabsCount
()
await
getList
()
await
getList
()
// 获得分类树
// 获得分类树
...
...
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