Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training-new
Commits
8a218e55
提交
8a218e55
authored
10月 12, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 营销工具1.1开发
上级
080f552a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
62 行增加
和
8 行删除
+62
-8
api.js
src/modules/market-tools/api.js
+19
-0
DouYin.vue
src/modules/market-tools/components/DouYin.vue
+43
-8
没有找到文件。
src/modules/market-tools/api.js
浏览文件 @
8a218e55
...
@@ -13,3 +13,22 @@ export function submitReport(data) {
...
@@ -13,3 +13,22 @@ export function submitReport(data) {
headers
:
{
'Content-Type'
:
'application/json'
}
headers
:
{
'Content-Type'
:
'application/json'
}
})
})
}
}
// 保存营销工具记录
export
function
cacheReport
(
id
,
data
)
{
return
httpRequest
.
post
(
`/api/xtraining/api/v1/answer/
${
id
}
/save-marketing-record`
,
data
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
// 获取营销工具报告详情
export
function
getReportDetail
(
id
)
{
return
httpRequest
.
get
(
`/api/xtraining/api/v1/answer/
${
id
}
/marketing-report`
).
then
({})
}
// 验证是否有未完成的答题记录
export
function
checkRecord
(
id
,
type
)
{
return
httpRequest
.
post
(
`/api/xtraining/api/v1/answer/
${
id
}
/check-record/
${
type
}
`
,
{
headers
:
{
'Content-Type'
:
'application/json'
}
})
}
src/modules/market-tools/components/DouYin.vue
浏览文件 @
8a218e55
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"视频"
>
<el-form-item
label=
"视频"
>
<upload-video
v-model=
"form.url"
@
input=
"input"
></upload-video>
<upload-video
v-model=
"form.url"
@
input=
"input"
></upload-video>
ddd'd'd'd'd'd'd'd
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
<div
class=
"dy-box"
>
<div
class=
"dy-box"
>
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
<div
class=
"text"
>
{{
registerText
}}
</div>
<div
class=
"text"
>
{{
registerText
}}
</div>
</div>
</div>
<div
class=
"mian-btn"
>
<div
class=
"mian-btn"
>
<el-button
type=
"primary"
@
click=
"cacheReport"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"stepsIndex--"
v-if=
"stepsIndex != 0"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"stepsIndex--"
v-if=
"stepsIndex != 0"
>
上一步
</el-button>
<el-button
v-if=
"stepsIndex == 0"
type=
"primary"
@
click=
"registerNextBtn"
>
下一步
</el-button>
<el-button
v-if=
"stepsIndex == 0"
type=
"primary"
@
click=
"registerNextBtn"
>
下一步
</el-button>
<el-button
v-if=
"stepsIndex == 1"
type=
"primary"
@
click=
"formNextBtn"
>
下一步
</el-button>
<el-button
v-if=
"stepsIndex == 1"
type=
"primary"
@
click=
"formNextBtn"
>
下一步
</el-button>
...
@@ -68,7 +69,7 @@
...
@@ -68,7 +69,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getReport
,
submitReport
}
from
'../api'
import
{
submitReport
,
cacheReport
,
checkRecord
,
getReportDetail
}
from
'../api'
import
UploadVideo
from
'@/components/upload/UploadVideo.vue'
import
UploadVideo
from
'@/components/upload/UploadVideo.vue'
export
default
{
export
default
{
components
:
{
UploadVideo
},
components
:
{
UploadVideo
},
...
@@ -86,10 +87,22 @@ export default {
...
@@ -86,10 +87,22 @@ export default {
dataText
:
'第一步:点击“我”,进入个人主页'
dataText
:
'第一步:点击“我”,进入个人主页'
}
}
},
},
computed
:
{
cases
()
{
return
this
.
$store
.
state
.
case
}
},
mounted
()
{
mounted
()
{
this
.
getReport
()
this
.
checkRecord
()
},
},
methods
:
{
methods
:
{
// 验证是否有未完成的答题记录
checkRecord
()
{
checkRecord
(
this
.
cases
.
id
,
2
)
.
then
(
res
=>
{
this
.
getReportDetail
(
res
.
data
.
items
[
0
].
id
)
})
},
registerNextBtn
()
{
registerNextBtn
()
{
if
(
this
.
registerIndex
===
4
)
{
if
(
this
.
registerIndex
===
4
)
{
this
.
stepsIndex
++
this
.
stepsIndex
++
...
@@ -137,12 +150,34 @@ export default {
...
@@ -137,12 +150,34 @@ export default {
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
})
})
},
},
// 保存报告
cacheReport
()
{
console
.
log
(
this
.
form
)
const
commitReport
=
[
this
.
form
,
{
steps
:
this
.
stepsIndex
,
registerIndex
:
this
.
registerIndex
,
dataIndex
:
this
.
dataIndex
}
]
console
.
log
(
commitReport
,
'=123'
)
const
param
=
{
type
:
1
,
commit_report
:
commitReport
}
cacheReport
(
this
.
cases
.
id
,
{
reports
:
JSON
.
stringify
(
param
)
})
.
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'保存成功'
})
})
.
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
message
||
'稍后再试'
)
})
},
// 获取报告
// 获取报告
getReport
()
{
getReportDetail
(
id
)
{
getReport
().
then
(
res
=>
{
getReportDetail
(
id
).
then
(
res
=>
{
if
(
res
.
data
.
reports
.
length
)
{
const
cachData
=
res
.
data
.
detail
.
answer
.
commit_report
this
.
form
=
res
.
data
.
reports
[
0
].
answer
.
commit_report
this
.
form
.
title
=
cachData
[
0
].
title
}
this
.
form
.
dec
=
cachData
[
0
].
dec
this
.
form
.
url
=
cachData
[
0
].
url
this
.
stepsIndex
=
cachData
[
1
].
steps
this
.
registerIndex
=
cachData
[
1
].
registerIndex
this
.
dataIndex
=
cachData
[
1
].
dataIndex
// this.stepsIndex = cachData[1].steps
})
})
},
},
// 查看营销数据教程
// 查看营销数据教程
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论