Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
h5-base
Project
Project
Details
Activity
Releases
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
new-sing
h5-base
Commits
d6e1f798
Commit
d6e1f798
authored
Sep 04, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拉取音频代码
parent
eba3597e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
36 deletions
+40
-36
growthRecord.vue
src/components/growthRecord.vue
+12
-6
evaluate.vue
src/components/newLesson/evaluate.vue
+25
-7
index.vue
src/components/newLesson/index.vue
+1
-23
index.js
src/router/index.js
+2
-0
No files found.
src/components/growthRecord.vue
View file @
d6e1f798
...
...
@@ -24,8 +24,9 @@
<span
class=
"num"
>
{{
itemChild
.
parent_child
}}
</span>
</div>
<div
class=
"rowthRecord-content-sub"
>
<span
class=
"text"
>
{{
itemChild
.
growth_record
}}
</span>
<!--
<span
class=
""
><img
class=
"xiajiantou"
:src=
"scoringCategoryImage.xiajiantou"
alt=
""
></span>
-->
<!--
<span
class=
"text"
>
{{
itemChild
.
growth_record
}}
</span>
-->
<span
:class=
"text"
>
不要老是把学习当作一种负担,兴趣永远都是最好的老师。要学习当作一种乐趣,每一次的练习就是一个尝对的试的机不要老是把学习当作一种负担,兴趣永远都是最好的老师。要学习当作一种乐趣,每一次的练习就是一个尝
</span>
<span
class=
""
><img
@
click=
"xiajiantou"
class=
"xiajiantou"
:src=
"scoringCategoryImage.xiajiantou"
alt=
""
></span>
</div>
<div
class=
"timer"
>
{{
itemChild
.
created_at
.
split
(
' '
)[
1
]
}}
</div>
</div>
...
...
@@ -51,6 +52,7 @@
return
{
dataNull
:
dataNull
,
// 图片
dataTimer
:
''
,
// 获取滚动时间
textArew
:
false
,
scoringCategoryData
:
[],
// 获取数据
scoringCategoryImage
:
scoringCategory
// 获取图片
}
...
...
@@ -81,6 +83,9 @@
if
(
scroll
>=
top
&&
scroll
<=
top
+
height
)
this
.
dataTimer
=
dataTimer
;
}
},
xiajiantou
()
{
}
},
mounted
()
{
...
...
@@ -182,6 +187,10 @@
line-height: 21 * @toVw;
font-size: 14 * @toVw;
color: #666666;
text1 {
overflow: auto;
}
.text {
word-wrap: break-word;
word-break: break-all;
...
...
@@ -189,16 +198,13 @@
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
/*text-align-last:justify;*/
/*text-align:justify;*/
/*text-justify:distribute-all-lines;*/
}
.xiajiantou {
width: 17 * @toVw;
height: 10 * @toVw;
position: absolute;
right: -7 * @toVw;
bottom: 0;
right: 0;
}
}
...
...
src/components/newLesson/evaluate.vue
View file @
d6e1f798
...
...
@@ -48,6 +48,7 @@
import
{
postUserGrowthAddApi
,
subUserLessonApi
,
getUserGrowthRecordApi
}
from
"../../service/api"
;
import
{
scoringCategory
}
from
"../../util/imgUrl"
;
import
growthRecord
from
"../../assets/growth_record.png"
;
import
{
Toast
}
from
"vant"
;
export
default
{
name
:
'evaluate'
,
...
...
@@ -93,17 +94,34 @@
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
,
watchLog
=
{
page_type
:
0
,
page_id
:
7
,
stay_time
:
lookTime
};
let
data
=
{
interest
:
this
.
imageNum
,
concert
:
this
.
imageNum2
,
parent_child
:
this
.
imageNum3
,
growth_record
:
checkboxPutContenteditable
.
innerHTML
}
if
(
this
.
imageNum
!==
0
||
this
.
imageNum
!==
0
||
this
.
imageNum
!==
0
)
{
// 提交评价页面
const
postUserGrowthAddData
=
await
postUserGrowthAddApi
(
classQuery
.
elementId
,
classQuery
.
category_id
,
classQuery
.
periods_id
,
data
)
// 提交看课数据
const
subUserLessonDatac
=
subUserLessonApi
(
classQuery
.
elementId
,
classQuery
.
category_id
,
classQuery
.
periods_id
,
watchLog
)
localStorage
.
removeItem
(
"cache"
);
this
.
$router
.
push
({
name
:
'newLesson'
,
params
:
{
evaluate
:
1
,
type
:
3
},
query
:
{
periods_id
:
classQuery
.
periods_id
,
category_id
:
classQuery
.
category_id
,
elementId
:
classQuery
.
elementId
}})
// 字数限制
if
(
checkboxPutContenteditable
.
innerHTML
.
length
>
15
&&
checkboxPutContenteditable
.
innerHTML
.
length
<
100
)
{
if
(
this
.
imageNum
!==
0
||
this
.
imageNum
!==
0
||
this
.
imageNum
!==
0
)
{
// 提交评价页面
const
postUserGrowthAddData
=
await
postUserGrowthAddApi
(
classQuery
.
elementId
,
classQuery
.
category_id
,
classQuery
.
periods_id
,
data
)
// 提交看课数据
const
subUserLessonDatac
=
subUserLessonApi
(
classQuery
.
elementId
,
classQuery
.
category_id
,
classQuery
.
periods_id
,
watchLog
)
this
.
$sa
.
track
(
'buttonClick'
,{
tabTitle
:
'评价'
,
moduleTitle
:
'评价'
,
buttonType
:
'点击'
,
buttonName
:
'提交成长记录加一颗星'
});
localStorage
.
removeItem
(
"cache"
);
this
.
$router
.
push
({
name
:
'newLesson'
,
params
:
{
evaluate
:
1
,
type
:
3
},
query
:
{
periods_id
:
classQuery
.
periods_id
,
category_id
:
classQuery
.
category_id
,
elementId
:
classQuery
.
elementId
}})
}
}
else
{
Toast
(
"可输入15-100字"
);
}
},
skipTextClick
()
{
let
classQuery
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
))
this
.
$sa
.
track
(
'buttonClick'
,{
tabTitle
:
'评价'
,
moduleTitle
:
'评价'
,
buttonType
:
'点击'
,
buttonName
:
'提交成长记录不提交跳过'
});
this
.
$router
.
push
({
name
:
'newLesson'
,
params
:
{
evaluate
:
3
,
type
:
3
},
query
:
{
periods_id
:
classQuery
.
periods_id
,
category_id
:
classQuery
.
category_id
,
elementId
:
classQuery
.
elementId
}})
},
/**
...
...
src/components/newLesson/index.vue
View file @
d6e1f798
...
...
@@ -215,32 +215,10 @@
let
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"lessonDetail"
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
lookTime
=
(
nowTime
-
lessonDetail
.
nowTime
)
/
1000
;
this
.
$sa
.
track
(
"watchClick"
,
{
buttonName
:
"返回课程列表"
,
partName
:
this
.
nowShow
==
1
?
"爸妈看一看"
:
this
.
nowShow
==
2
?
"宝贝玩一玩"
:
this
.
nowShow
==
3
?
"磨磨小耳朵"
:
""
,
elementID
:
this
.
lesson
.
id
.
toString
(),
dayModule
:
this
.
lesson
.
domTitle
.
slice
(
0
,
9
),
weekName
:
this
.
lesson
.
domTitle
.
slice
(
10
,
this
.
lesson
.
domTitle
.
length
),
elementName
:
this
.
lesson
.
domTitle
.
slice
(
0
,
9
)
+
"-"
+
this
.
lesson
.
domTitle
.
slice
(
10
,
this
.
lesson
.
domTitle
.
length
),
themeID
:
this
.
lesson
.
themeID
,
themeName
:
this
.
lesson
.
themeName
,
goodsID
:
this
.
lesson
.
goodsID
,
classID
:
this
.
lesson
.
classID
});
let
json
=
{
page_type
:
0
,
page_id
:
this
.
page_id
,
stay_time
:
lookTime
stay_time
:
lookTime
``
};
subUserLessonApi
(
this
.
elementId
,
...
...
src/router/index.js
View file @
d6e1f798
...
...
@@ -554,7 +554,9 @@ const router = new Router({
name
:
'growthRecord'
,
component
:
e
=>
require
([
'@/components/growthRecord'
],
e
),
meta
:
{
deep
:
0
,
noNew
:
true
,
title
:
'成长记录'
}
},
{
...
...
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