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
f77499fc
Commit
f77499fc
authored
5 years ago
by
IvyXia123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chess
parent
1f59f303
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
38 deletions
+76
-38
index.vue
src/components/mine/index.vue
+16
-3
evaluate.vue
src/components/newLesson/evaluate.vue
+26
-17
share.vue
src/components/newLesson/share.vue
+31
-15
main.js
src/main.js
+3
-3
No files found.
src/components/mine/index.vue
View file @
f77499fc
...
...
@@ -8,8 +8,8 @@
</div>
-->
<div
class=
"contentBox"
>
<div
class=
"left"
>
<img
class=
"header-icon"
:src=
"
userDetail.avatar
"
/>
<p
class=
"name"
>
{{
userDetail
.
nickname
}}
</p>
<img
class=
"header-icon"
:src=
"
avatarActive
"
/>
<p
class=
"name"
>
{{
nicknameActive
}}
</p>
</div>
<div
class=
"right"
>
<p
class=
"id"
>
学员号:
{{
userDetail
.
user_id
}}
</p>
...
...
@@ -102,7 +102,9 @@ export default {
phoneNumber
:
""
,
starNum
:
""
,
addressInfo
:
{},
acitivityType
:
1
acitivityType
:
1
,
avatarActive
:
''
,
nicknameActive
:
''
};
},
mounted
()
{
...
...
@@ -119,6 +121,17 @@ export default {
// getUserAdressApi().then(res => {
// this.addressInfo = res;
// });
getUserDetailApi
()
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
avatarActive
=
res
.
avatar
this
.
nicknameActive
=
res
.
nickname
localStorage
.
setItem
(
"userDesc"
,
JSON
.
stringify
(
res
));
})
.
catch
(
res
=>
{
if
(
localStorage
.
getItem
(
"userDesc"
))
{
}
});
getStarInfoApi
().
then
(
res
=>
{
if
(
res
.
code
==
500
){
this
.
acitivityType
=
2
...
...
This diff is collapsed.
Click to expand it.
src/components/newLesson/evaluate.vue
View file @
f77499fc
...
...
@@ -28,7 +28,8 @@
</ul>
<!-- 输入框 -->
<div
class=
"checkbox-put"
>
<div
contenteditable=
"true"
class=
"checkbox-put-contenteditable"
v-text=
"myHtmlCode"
@
input=
"handleInput"
placeholder=
"点击输入宝贝今天的学习表现、收获…"
></div>
<!--
<div
contenteditable=
"true"
class=
"checkbox-put-contenteditable"
v-text=
"myHtmlCode"
@
input=
"handleInput"
placeholder=
"点击输入宝贝今天的学习表现、收获…"
></div>
-->
<textarea
class=
"checkbox-put-contenteditable"
v-model=
"myHtmlCode"
@
change=
"handleInput"
></textarea>
<div
class=
"checkbox-text"
>
*可输入15-100字
</div>
</div>
<!-- btn -->
...
...
@@ -44,6 +45,7 @@
<div
v-if=
"shareShow"
>
<share-page
@
closeShare=
"closeShare()"
@
backList=
"backList()"
:route=
"query"
:totalStarNum=
"totalStarNum"
/>
</div>
<audio
ref=
"audioDom"
id=
"audioDom"
class=
"audio"
:src=
"audioPoint"
></audio>
</div>
</
template
>
...
...
@@ -53,6 +55,9 @@
import
growthRecord
from
"../../assets/growth_record.png"
;
import
{
Toast
}
from
"vant"
;
import
sharePage
from
"./share"
;
import
audioGood
from
"../../assets/good.mp3"
;
import
audioGreat
from
"../../assets/great.mp3"
;
import
audioPerfect
from
"../../assets/perfect.mp3"
;
export
default
{
name
:
'evaluate'
,
...
...
@@ -68,6 +73,7 @@
shareShow
:
false
,
query
:
{},
totalStarNum
:
0
,
audioPoint
:
""
,
}
},
components
:
{
...
...
@@ -91,7 +97,7 @@
handleInput
(
e
){
let
classQuery
=
JSON
.
parse
(
sessionStorage
.
getItem
(
"classQuery"
))
let
checkboxPutContenteditable
=
document
.
querySelector
(
'.checkbox-put-contenteditable'
);
this
.
cache
=
Object
.
assign
({},
this
.
cache
,
{
inner
:
checkboxPutContenteditable
.
innerHTML
,
id
:
classQuery
.
elementId
})
this
.
cache
=
Object
.
assign
({},
{
imageNum
:
this
.
imageNum
,
imageNum2
:
this
.
imageNum2
,
imageNum3
:
this
.
imageNum3
,
inner
:
this
.
myHtmlCode
,
id
:
classQuery
.
elementId
})
localStorage
.
setItem
(
'cache'
,
JSON
.
stringify
(
this
.
cache
))
},
/**
...
...
@@ -118,20 +124,7 @@
localStorage
.
removeItem
(
"cache"
);
// 展示网页生成图片
this
.
shareShow
=
true
/*setTimeout(() => {
if (this.$store.state.lookStatus == 0) {
this.audioPoint = audioGood;
} else if (this.$store.state.lookStatus == 1) {
this.audioPoint = audioGreat;
} else {
this.audioPoint = audioPerfect;
}
this.$refs.audioDom.load();
setTimeout(() => {
this.$refs.audioDom.play();
}, 100);
}, 300);*/
this
.
audioFn
()
this
.
$sa
.
track
(
'buttonClick'
,{
tabTitle
:
'评价'
,
...
...
@@ -159,6 +152,22 @@
buttonName
:
'提交成长记录不提交跳过'
});
this
.
shareShow
=
true
this
.
audioFn
()
},
audioFn
(){
setTimeout
(()
=>
{
if
(
this
.
$store
.
state
.
lookStatus
==
0
)
{
this
.
audioPoint
=
audioGood
;
}
else
if
(
this
.
$store
.
state
.
lookStatus
==
1
)
{
this
.
audioPoint
=
audioGreat
;
}
else
{
this
.
audioPoint
=
audioPerfect
;
}
this
.
$refs
.
audioDom
.
load
();
setTimeout
(()
=>
{
this
.
$refs
.
audioDom
.
play
();
},
100
);
},
300
);
},
/**
* 初始化
...
...
@@ -172,7 +181,7 @@
this
.
imageNum
=
cacheObj
.
imageNum
||
0
;
this
.
imageNum2
=
cacheObj
.
imageNum2
||
0
;
this
.
imageNum3
=
cacheObj
.
imageNum3
||
0
;
this
.
myHtmlCode
=
cacheObj
.
inner
||
''
;
this
.
myHtmlCode
=
cacheObj
.
inner
||
0
;
}
else
{
localStorage
.
removeItem
(
"cache"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/components/newLesson/share.vue
View file @
f77499fc
...
...
@@ -19,10 +19,10 @@
</div>
<img
class=
"shareTitle"
:src=
"shareTitle"
/>
<div
class=
"head-block"
>
<img
:src=
"
userDetail.avatar
"
/>
<img
:src=
"
avatarActive
"
/>
</div>
<div
class=
"content-title"
>
<span
class
>
{{
nickname
}}
</span>
<span
class
>
{{
nickname
Active
}}
</span>
<span>
家宝宝
</span>
</div>
</div>
...
...
@@ -89,16 +89,16 @@
<img
src=
"../../assets/icon_copy.png"
alt
/>
<p>
以下学习心得,可复制粘贴到朋友圈啦!
</p>
</div>
<div
class=
"pannel-main"
v-html=
"htmlContent"
></div>
<div
class=
"pannel-footer"
>
<div
class=
"pannel-main"
v-html=
"htmlContent"
></div>
<div
class=
"pannel-footer"
>
<span
@
click=
"changeText"
>
<img
:src=
"icon_change"
alt=
""
>
换一换
</span>
</div>
</div>
</div>
<div
@
click=
"copyText"
class=
'transparentBtn'
>
复制心得
</div>
</div>
-->
<div
@
click=
"copyText"
class=
'transparentBtn'
>
复制心得
</div>
</div>
-->
</div>
</div>
<img
class=
"canvasImg"
@
touchstart=
"touchStart"
@
touchend=
"touchEnd"
:src=
"canvasData"
alt
/>
<!-- @touchstart="touchStart" -->
...
...
@@ -142,7 +142,8 @@
getUserWatchApi
,
getShortApi
,
subUserLessonApi
,
postErrorLogApi
postErrorLogApi
,
getUserDetailApi
}
from
"../../service/api"
;
import
share_code_bg
from
"../../assets/newLesson/share-code-bg.png"
;
import
img_logo
from
"../../assets/newLesson/logo@2x.png"
;
...
...
@@ -189,13 +190,28 @@
dierkexing
:
dierkexing
,
// 三颗星第一第三颗
diyikexing
:
diyikexing
,
// 第二课星
starNum
:
0
,
avatarActive
:
''
,
nicknameActive
:
''
};
},
props
:
[
"route"
,
"totalStarNum"
],
mounted
()
{
// 判断星星
// this.starNum = JSON.parse(localStorage.getItem('lessonDetail')).star_num
// console.log(this.starNum)
getUserDetailApi
()
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
avatarActive
=
res
.
avatar
this
.
nicknameActive
=
res
.
nickname
localStorage
.
setItem
(
"userDesc"
,
JSON
.
stringify
(
res
));
})
.
catch
(
res
=>
{
if
(
localStorage
.
getItem
(
"userDesc"
))
{
}
});
this
.
starNum
=
JSON
.
parse
(
localStorage
.
getItem
(
'lessonDetail'
)).
star_num
console
.
log
(
this
.
starNum
)
Toast
.
loading
({
mask
:
true
,
message
:
""
,
...
...
@@ -1295,17 +1311,17 @@
}
.animated {
animation: mymove 1s .5s
ease
;
animation: mymove 1s .5s;
animation-fill-mode: forwards;
}
.animated1 {
animation: mymove 1s 1s
ease
;
animation: mymove 1s 1s;
animation-fill-mode: forwards;
}
.animated2 {
animation: mymove 1s 1.5s
ease
;
animation: mymove 1s 1.5s;
animation-fill-mode: forwards;
}
...
...
This diff is collapsed.
Click to expand it.
src/main.js
View file @
f77499fc
...
...
@@ -39,9 +39,9 @@ Vue.config.errorHandler = errorHandler;
Vue
.
prototype
.
$throw
=
(
error
)
=>
errorHandler
(
error
,
this
);
Vue
.
prototype
.
$common
=
common
//VConsole关闭屏蔽代码
if
(
process
.
env
.
NODE_ENV
!=
'production'
)
{
new
VConsole
();
}
//
if (process.env.NODE_ENV != 'production') {
//
new VConsole();
//
}
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
()
...
...
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