Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
zxn-adputin
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lijin
zxn-adputin
Commits
56bcee1f
Commit
56bcee1f
authored
Dec 31, 2024
by
jiyonggang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量上传
parent
18ed921e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
229 additions
and
50 deletions
+229
-50
report.js
src/api/report.js
+51
-16
index.vue
src/views/createDelivery/index.vue
+42
-5
AdMaterialManager.vue
src/views/createMaterial/AdMaterialManager.vue
+136
-29
No files found.
src/api/report.js
View file @
56bcee1f
...
...
@@ -499,24 +499,24 @@ export function fetchConversionAction(data) {
export
function
getMaterialDirectoriesTree
()
{
return
request
({
url
:
'http://localhost:8567/material/business/youtube/directories/tree'
,
//
url: 'https://putinapi.zhangxindiet.com/material/business/youtube/directories/tree',
//
url: 'http://localhost:8567/material/business/youtube/directories/tree',
url
:
'https://putinapi.zhangxindiet.com/material/business/youtube/directories/tree'
,
method
:
'get'
,
})
}
export
function
getDirectoryById
(
params
)
{
return
request
({
url
:
'http://localhost:8567/material/business/youtube/getDirectoryById'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/getDirectoryById',
//
url: 'http://localhost:8567/material/business/youtube/getDirectoryById',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/getDirectoryById'
,
method
:
'get'
,
params
})
}
export
function
createDirectory
(
params
)
{
return
request
({
url
:
'http://localhost:8567/material/business/youtube/createdirectories'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/createdirectories',
//
url: 'http://localhost:8567/material/business/youtube/createdirectories',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/createdirectories'
,
method
:
'get'
,
params
})
...
...
@@ -524,16 +524,16 @@ export function createDirectory(params) {
export
function
updateDirectory
()
{
return
request
({
url
:
'http://localhost:8567/business/youtube/updateDirectory'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory',
//
url: 'http://localhost:8567/business/youtube/updateDirectory',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory'
,
method
:
'get'
,
})
}
export
function
getMaterialCount
(
params
)
{
return
request
({
url
:
'http://localhost:8567/material/count'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory',
//
url: 'http://localhost:8567/material/count',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory'
,
method
:
'get'
,
params
})
...
...
@@ -541,8 +541,8 @@ export function getMaterialCount(params) {
export
function
movematerial
(
params
)
{
return
request
({
url
:
'http://localhost:8567/material/business/youtube/movematerial'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory',
//
url: 'http://localhost:8567/material/business/youtube/movematerial',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/updateDirectory'
,
method
:
'get'
,
params
})
...
...
@@ -551,8 +551,8 @@ export function movematerial(params) {
export
function
deleteDirectory
(
params
)
{
return
request
({
url
:
'http://localhost:8567/material/business/youtube/deleteDirectory'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/deleteDirectory',
//
url: 'http://localhost:8567/material/business/youtube/deleteDirectory',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/deleteDirectory'
,
method
:
'get'
,
params
})
...
...
@@ -560,8 +560,8 @@ export function deleteDirectory(params) {
export
function
uploadMaterial
(
body
,
params
){
return
request
({
url
:
'http://localhost:8567/material/business/youtube/uploadVideo'
,
//
url: 'https://putinapi.zhangxindiet.com/business/youtube/deleteDirectory',
//
url: 'http://localhost:8567/material/business/youtube/uploadVideo',
url
:
'https://putinapi.zhangxindiet.com/business/youtube/deleteDirectory'
,
method
:
'post'
,
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
data
:
body
,
// Body 数据
...
...
@@ -570,5 +570,40 @@ export function uploadMaterial(body,params){
}
export
function
getMaterialDesigners
()
{
return
request
({
// url: 'http://localhost:8567/material/getMaterialDesigners',
url
:
'https://putinapi.zhangxindiet.com/material/getMaterialDesigners'
,
method
:
'get'
,
})
}
export
function
getMaterialsByTag
(
params
)
{
return
request
({
// url: 'http://localhost:8567/material/business/youtube/getMaterialsByTag',
url
:
'https://putinapi.zhangxindiet.com/material/getMaterialDesigners'
,
method
:
'get'
,
params
})
}
export
function
getAllTags
()
{
return
request
({
// url: 'http://localhost:8567/material/getAllTags',
url
:
'https://putinapi.zhangxindiet.com/material/getMaterialDesigners'
,
method
:
'get'
,
})
}
export
function
getYoutubeUploadDetaillist
()
{
return
request
({
// url: 'http://localhost:8567/material/getYoutubeUploadDetaillist',
url
:
'https://putinapi.zhangxindiet.com/material/getYoutubeUploadDetaillist'
,
method
:
'get'
,
})
}
// ----------------------------------------
src/views/createDelivery/index.vue
View file @
56bcee1f
...
...
@@ -618,8 +618,16 @@
<el-form-item
label=
"选择图片"
>
<ImageUploader
@
change=
"handleUploadChange"
/>
</el-form-item>
<el-form-item
label=
"输入Youtube链接"
>
<TextInputList
v-model=
"putinTask.videoUrls"
:maxLength=
"100"
/>
<el-form-item
label=
"选择 Youtube 视频"
>
<el-button
type=
"primary"
@
click=
"fetchVideoList"
>
加载视频列表
</el-button>
<el-input
v-model=
"videoUrlsString"
placeholder=
"YouTube 链接将自动填充"
:disabled=
"true"
type=
"textarea"
:rows=
"3"
></el-input>
<div
class=
"video-list"
style=
"display: flex; flex-wrap: wrap;"
>
<div
v-for=
"video in videoDataList"
:key=
"video.videoId"
class=
"video-item"
@
click=
"toggleVideoSelection(video)"
style=
"margin: 10px; text-align: center; cursor: pointer;"
>
<video
:src=
"video.ossUrl"
controls
width=
"200"
></video>
<p>
{{ video.materialName }}
</p>
<el-checkbox
v-model=
"selectedVideoId"
:label=
"video.videoId"
></el-checkbox>
</div>
</div>
</el-form-item>
</el-form>
</div>
...
...
@@ -696,7 +704,8 @@ import {
putinCreatePutinTask
,
getAdvList
,
getAdvertiseCount
,
fetchConversionAction
fetchConversionAction
,
getYoutubeUploadDetaillist
}
from
"@/api/report"
;
import
{
dateOptions
}
from
"@/assets/js/dateOptions"
;
import
moment
from
"moment"
;
...
...
@@ -731,7 +740,14 @@ export default {
ImageUploader
,
YouTubeVideoInput
},
// 注册
watch
:
{
selectedVideoId
:
{
handler
(
newVal
)
{
this
.
putinTask
.
videoUrls
=
newVal
.
map
(
videoId
=>
`https://www.youtube.com/watch?v=
${
videoId
}
`
);
},
deep
:
true
}
},
data
()
{
return
{
tagId
:
""
,
...
...
@@ -1001,6 +1017,8 @@ export default {
activePutin
:
"newPutin"
,
advGroupSelect
:
[],
checkedAdvId
:
""
,
// 点击户时,选中的id
videoDataList
:
[],
// 存储通过 getYoutubeUploadDetaillist 获取的视频列表
selectedVideoId
:
[],
// 存储用户选择的视频的 videoId
};
},
...
...
@@ -1008,6 +1026,9 @@ export default {
showGroupBudget
()
{
return
this
.
putinBaseInfo
.
budgetMode
===
"BUDGET_MODE_DAY"
;
},
videoUrlsString
()
{
return
this
.
putinTask
.
videoUrls
.
join
(
'
\
n'
);
},
},
created
()
{
this
.
putinTask
.
startDate
=
moment
().
subtract
(
0
,
"days"
).
format
(
"YYYY-MM-DD"
);
...
...
@@ -1716,7 +1737,23 @@ export default {
handleUploadChange
(
files
){
console
.
log
(
"aabbccddeeff"
,
files
)
this
.
putinTask
.
imageAssets
=
files
}
},
fetchVideoList
()
{
getYoutubeUploadDetaillist
().
then
(
res
=>
{
this
.
videoDataList
=
res
.
result
.
data
;
});
},
selectVideo
(
video
)
{
this
.
selectedVideoId
=
video
.
videoId
;
},
toggleVideoSelection
(
video
)
{
const
index
=
this
.
selectedVideoId
.
indexOf
(
video
.
videoId
);
if
(
index
>
-
1
)
{
this
.
selectedVideoId
.
splice
(
index
,
1
);
// 取消选中
}
else
{
this
.
selectedVideoId
.
push
(
video
.
videoId
);
// 选中
}
},
},
};
</
script
>
src/views/createMaterial/AdMaterialManager.vue
View file @
56bcee1f
This diff is collapsed.
Click to expand it.
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