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
3865b055
Commit
3865b055
authored
Sep 04, 2019
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
三颗星不显示问题
parent
1d1f6e63
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
34 deletions
+38
-34
growthRecord.vue
src/components/growthRecord.vue
+2
-0
evaluate.vue
src/components/newLesson/evaluate.vue
+15
-14
share.vue
src/components/newLesson/share.vue
+19
-18
detail.vue
src/components/star/detail.vue
+2
-2
No files found.
src/components/growthRecord.vue
View file @
3865b055
...
...
@@ -67,6 +67,8 @@
item
.
month
[
k
][
0
].
ataer
=
1
;
// 数据重新整合
for
(
let
i
=
0
;
i
<
item
.
month
[
k
].
length
;
i
++
)
{
// console.log(new Date(item.month[k][i].created_at).getDate());
// new Date(returns.openData).getDate()
item
.
monthArr
.
push
(
item
.
month
[
k
][
i
])
}
}
...
...
src/components/newLesson/evaluate.vue
View file @
3865b055
...
...
@@ -42,7 +42,7 @@
<div
class=
"skip-text"
@
click=
"skipTextClick"
>
跳过
</div>
</div>
<div
v-if=
"shareShow"
>
<share-page
@
closeShare=
"closeShare()"
:route=
"query"
/>
<share-page
@
closeShare=
"closeShare()"
:route=
"query"
:totalStarNum=
"totalStarNum"
/>
</div>
</div>
</
template
>
...
...
@@ -66,7 +66,8 @@
growthRecord
:
growthRecord
,
scoringCategoryImage
:
scoringCategory
,
shareShow
:
false
,
query
:
{}
query
:
{},
totalStarNum
:
0
}
},
components
:
{
...
...
@@ -99,19 +100,20 @@
*/
async
userCategoryClick
()
{
let
checkboxPutContenteditable
=
document
.
querySelector
(
'.checkbox-put-contenteditable'
);
let
classQuery
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
)),
// 获取elementId,category_id,periods_id
nowTime
=
Date
.
parse
(
new
Date
()),
// 时间
let
nowTime
=
Date
.
parse
(
new
Date
()),
// 时间
classQuery
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
)),
// 获取elementId,category_id,periods_id
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"lessonDetail"
)),
// 获取延长时间
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
.
imageNum2
!==
0
&&
this
.
imageNum3
!==
0
)
{
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
)
const
subUserLessonDatac
=
await
subUserLessonApi
(
classQuery
.
elementId
,
classQuery
.
category_id
,
classQuery
.
periods_id
,
watchLog
)
this
.
totalStarNum
=
subUserLessonDatac
.
total_star_num
// 删除缓存
localStorage
.
removeItem
(
"cache"
);
// 展示网页生成图片
...
...
@@ -122,17 +124,16 @@
buttonType
:
'点击'
,
buttonName
:
'提交成长记录加一颗星'
});
}
else
{
Toast
(
"请填写相关信息"
);
}
}
else
{
if
(
checkboxPutContenteditable
.
innerHTML
.
length
>
100
)
{
console
.
log
(
checkboxPutContenteditable
.
innerHTML
.
length
)
Toast
(
`您多输入了
${
checkboxPutContenteditable
.
innerHTML
.
length
-
100
}
个字`
);
}
else
if
(
checkboxPutContenteditable
.
innerHTML
.
length
<
15
){
Toast
(
"输入字数不满15个"
);
}
}
}
else
{
Toast
(
"请填写相关信息"
);
}
},
skipTextClick
()
{
let
classQuery
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
))
...
...
src/components/newLesson/share.vue
View file @
3865b055
...
...
@@ -6,7 +6,7 @@
<img
:src=
"img_logo"
class=
"imgLogo"
/>
<div
class=
"main-content"
>
<div
class=
"topBox"
>
<div
v-if=
"
s
tarNum == 3"
>
<div
v-if=
"
totalS
tarNum == 3"
>
<div
class=
"diyikexing animated"
>
<img
:src=
"diyikexing"
alt=
""
>
</div>
...
...
@@ -101,7 +101,7 @@
</div>
-->
</div>
</div>
<img
class=
"canvasImg"
@
touchstart=
"touchStart"
@
touchend=
"touchEnd"
:src=
"canvasData"
alt
/>
<img
class=
"canvasImg"
@
touchstart=
"touchStart"
@
touchend=
"touchEnd"
:src=
"canvasData"
alt
/>
<!-- @touchstart="touchStart" -->
<div
class=
"test"
></div>
<div
class=
"white-pannel"
>
<div
class=
"trs"
></div>
...
...
@@ -191,10 +191,11 @@
starNum
:
0
,
};
},
props
:
[
"route"
],
props
:
[
"route"
,
"totalStarNum"
],
mounted
()
{
// 判断星星
this
.
starNum
=
JSON
.
parse
(
localStorage
.
getItem
(
'lessonDetail'
)).
star_num
console
.
log
(
this
.
starNum
)
Toast
.
loading
({
mask
:
true
,
message
:
""
,
...
...
@@ -244,21 +245,21 @@
});
let
lessonDetail
=
JSON
.
parse
(
localStorage
.
getItem
(
"lessonDetail"
));
let
nowTime
=
Date
.
parse
(
new
Date
());
let
json
=
{
page_type
:
0
,
page_id
:
4
,
stay_time
:
0
};
subUserLessonApi
(
query
.
elementId
,
query
.
category_id
,
query
.
periods_id
,
json
).
then
(
res
=>
{
lessonDetail
.
total_watch_time
=
res
;
lessonDetail
.
nowTime
=
nowTime
;
localStorage
.
setItem
(
"lessonDetail"
,
JSON
.
stringify
(
lessonDetail
));
});
//
let json = {
//
page_type: 0,
//
page_id: 4,
//
stay_time: 0
//
};
//
subUserLessonApi(
//
query.elementId,
//
query.category_id,
//
query.periods_id,
//
json
//
).then(res => {
//
lessonDetail.total_watch_time = res;
//
lessonDetail.nowTime = nowTime;
//
localStorage.setItem("lessonDetail", JSON.stringify(lessonDetail));
//
});
},
800
);
},
touchEnd
()
{
...
...
src/components/star/detail.vue
View file @
3865b055
...
...
@@ -62,8 +62,8 @@ export default {
this
.
page
++
;
let
json
=
{
page
:
this
.
page
,
limit
:
"
5
0"
,
source
:
0
,
limit
:
"
10
0"
,
source
:
'0,5'
,
periods_id
:
this
.
$route
.
query
.
starInfo
.
periods_id
};
getUserIntegralListApi
(
json
).
then
(
res
=>
{
...
...
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