Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_admin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_admin
Commits
415ecc76
Commit
415ecc76
authored
May 17, 2024
by
gaia
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature/20240301_1544_sale' into release_pre_20240517101516
parents
e3e05bce
46153fd1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
191 additions
and
2 deletions
+191
-2
src/api/business/consign.js
src/api/business/consign.js
+8
-0
src/router/index.js
src/router/index.js
+13
-1
src/views/books/bookManager.vue
src/views/books/bookManager.vue
+169
-0
src/views/sale/itemDetail.vue
src/views/sale/itemDetail.vue
+1
-1
No files found.
src/api/business/consign.js
View file @
415ecc76
...
@@ -90,3 +90,11 @@ export function returnOrderDetail(params) {
...
@@ -90,3 +90,11 @@ export function returnOrderDetail(params) {
data
:
params
data
:
params
})
})
}
}
export
function
requestBookList
(
params
)
{
return
request
({
url
:
'
/imageCatelog/find
'
,
method
:
'
post
'
,
data
:
params
})
}
src/router/index.js
View file @
415ecc76
...
@@ -623,6 +623,18 @@ export const asyncRouterMap = [
...
@@ -623,6 +623,18 @@ export const asyncRouterMap = [
],
],
hidden
:
true
hidden
:
true
},
},
{
path
:
'
/books
'
,
component
:
Layout
,
redirect
:
'
bookManager
'
,
children
:
[
{
path
:
'
bookManager
'
,
component
:
()
=>
import
(
'
@/views/books/bookManager
'
),
name
:
'
bookManager
'
,
meta
:
{
title
:
'
图录管理
'
,
icon
:
'
table
'
,
noCache
:
true
}
}
]
},
{
path
:
'
*
'
,
redirect
:
'
/404
'
,
hidden
:
true
}
{
path
:
'
*
'
,
redirect
:
'
/404
'
,
hidden
:
true
}
]
]
src/views/books/bookManager.vue
0 → 100644
View file @
415ecc76
<
template
>
<div
class=
"page_bookManager"
>
<el-table
v-loading=
"listLoading"
:data=
"list"
size=
"small"
element-loading-text=
"正在查询中..."
border
highlight-current-row
>
<el-table-column
align=
"center"
min-width=
"100px"
prop=
"title"
label=
"标题"
/>
<el-table-column
align=
"center"
label=
"操作"
width=
"500"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"handleCopyCode(scope.row)"
>
复制链接
</el-button>
</
template
>
</el-table-column>
</el-table>
<Pagination
v-show=
"total>0"
:total=
"total"
:page.sync=
"listQuery.page"
:limit.sync=
"listQuery.size"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
Pagination
from
'
@/components/Pagination
'
import
{
requestBookList
}
from
'
@/api/business/consign
'
export
default
{
name
:
'
BookManager
'
,
components
:
{
Pagination
},
data
()
{
return
{
itemKey
:
0
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
size
:
20
},
list
:
[],
total
:
0
// 物流
}
},
created
()
{
this
.
getList
()
},
destroyed
()
{
this
.
clearAll
()
},
methods
:
{
// 清除所有定时器
clearAll
()
{
if
(
this
.
list
)
{
this
.
list
.
forEach
((
el
)
=>
{
clearInterval
(
el
.
countDown
)
})
}
},
handlerGetList
()
{
this
.
listQuery
.
page
=
1
this
.
getList
()
},
handleClick
(
tab
,
event
)
{
this
.
listQuery
.
page
=
1
this
.
getList
()
},
getList
()
{
this
.
listLoading
=
true
requestBookList
(
this
.
listQuery
).
then
(
response
=>
{
this
.
clearAll
()
this
.
list
=
response
.
data
.
data
.
dataList
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
((
e
)
=>
{
this
.
list
=
[]
this
.
total
=
0
this
.
listLoading
=
false
})
},
/**
* 复制链接
*/
handleCopyCode
(
row
)
{
// 复制结果
let
copyResult
=
true
// 设置想要复制的文本内容
if
(
!
row
.
id
)
{
return
}
console
.
log
(
'
==环境=
'
,
process
.
env
.
NODE_ENV
)
let
text
=
`http://tulu.tppv.cn/bookDetail?bookId=
${
row
.
id
}
`
if
(
process
.
env
.
NODE_ENV
===
'
development
'
)
{
text
=
`http://tulu-dev.tppv.cn/bookDetail?bookId=
${
row
.
id
}
`
}
// 判断是否支持clipboard方式
if
(
window
.
navigator
.
clipboard
)
{
// 利用clipboard将文本写入剪贴板(这是一个异步promise)
window
.
navigator
.
clipboard
.
writeText
(
text
).
then
((
res
)
=>
{
console
.
log
(
'
复制成功
'
)
// 返回复制操作的最终结果
this
.
$notify
.
success
({
message
:
'
复制成功,快去分享给好友吧~
'
})
return
copyResult
}).
catch
((
err
)
=>
{
copyResult
=
false
console
.
log
(
'
复制失败
'
,
err
)
// 返回复制操作的最终结果
return
copyResult
})
}
else
{
// 不支持clipboard方式 则采用document.execCommand()方式
// 创建一个input元素
const
inputDom
=
document
.
createElement
(
'
textarea
'
)
// 设置为只读 防止移动端手机上弹出软键盘
inputDom
.
setAttribute
(
'
readonly
'
,
'
readonly
'
)
// 给input元素赋值
inputDom
.
value
=
text
// 将创建的input添加到body
document
.
body
.
appendChild
(
inputDom
)
// 选中input元素的内容
inputDom
.
select
()
// 执行浏览器复制命令
// 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签中的内容)
// Input要在正常的编辑状态下原生复制方法才会生效
const
result
=
document
.
execCommand
(
'
copy
'
)
// 判断是否复制成功
if
(
result
)
{
console
.
log
(
'
复制成功
'
)
}
else
{
console
.
log
(
'
复制失败
'
)
copyResult
=
false
}
// 复制操作后再将构造的标签 移除
document
.
body
.
removeChild
(
inputDom
)
// 返回复制操作的最终结果
}
this
.
$notify
.
success
({
message
:
'
复制成功,快去分享给好友吧~
'
})
}
}
}
</
script
>
<
style
scoped
>
.page_bookManager
{
padding
:
20px
;
}
/
deep
/
.cell
{
display
:
flex
;
justify-content
:
center
;
}
.page_consignList
{
padding
:
0
20px
20px
;
}
</
style
>
src/views/sale/itemDetail.vue
View file @
415ecc76
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<div>
{{
`¥${itemContent && itemContent.distributionPrice || '-'
}
`
}}
<
/div
>
<div>
{{
`¥${itemContent && itemContent.distributionPrice || '-'
}
`
}}
<
/div
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品详情:
"
>
<
el
-
form
-
item
label
=
"
商品详情:
"
>
<
div
>
{{
itemContent
&&
itemContent
.
name
||
'
-
'
}}
<
/div
>
<
div
>
{{
itemContent
&&
itemContent
.
description
||
'
-
'
}}
<
/div
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
商品图片/视频:
"
>
<
el
-
form
-
item
label
=
"
商品图片/视频:
"
>
<
div
v
-
if
=
"
itemContent && itemContent.imagelist && (typeof itemContent.imagelist === 'object')
"
class
=
"
image
"
>
<
div
v
-
if
=
"
itemContent && itemContent.imagelist && (typeof itemContent.imagelist === 'object')
"
class
=
"
image
"
>
...
...
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