Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
1fd1278a
Commit
1fd1278a
authored
Sep 27, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/imagecomment_lvtz' into wxl-develop
parents
2c8ec0e0
db2041d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
27 deletions
+46
-27
imagecomment.js
business/pages/commenteditor/imagecomment.js
+20
-10
imagecomment.wxml
business/pages/commenteditor/imagecomment.wxml
+17
-16
imagecomment.wxss
business/pages/commenteditor/imagecomment.wxss
+9
-1
No files found.
business/pages/commenteditor/imagecomment.js
View file @
1fd1278a
...
...
@@ -601,7 +601,10 @@ Page({
play
:
function
()
{
let
that
=
this
;
let
drawTrail
=
[];
this
.
data
.
startPlaytimeStamp
=
new
Date
().
getTime
();
this
.
innerAudioContext
.
src
=
audioorigin
(
this
.
data
.
audioInfo
.
src
);
this
.
innerAudioContext
.
play
();
this
.
innerAudioContext
.
obeyMuteSwitch
=
false
;
this
.
resetAudiosPlayStatus
();
clearInterval
(
this
.
data
.
voiceInterval
);
...
...
@@ -609,12 +612,14 @@ Page({
let
saveDrawTrail
=
[];
if
(
audioStorage
.
currentTime
==
0
)
{
this
.
data
.
pretimestamp
=
0
;
saveDrawTrail
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
drawTrail
));
this
.
data
.
copyDrawTrail
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
drawTrail
));
// saveDrawTrail = JSON.parse(JSON.stringify(this.data.drawTrail));
}
if
(
audioStorage
.
currentTime
==
audioStorage
.
duration
)
{
audioStorage
.
currentTime
=
0
;
this
.
data
.
pretimestamp
=
0
;
saveDrawTrail
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
drawTrail
));
// saveDrawTrail = JSON.parse(JSON.stringify(this.data.drawTrail));
this
.
data
.
copyDrawTrail
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
drawTrail
));
audioStorage
.
play
=
true
;
}
else
{
audioStorage
.
play
=
true
;
...
...
@@ -639,25 +644,24 @@ Page({
})
this
.
data
.
context
=
wx
.
createCanvasContext
(
'tempCanvas2'
);
// let saveDrawTrail = [];
// saveDrawTrail = JSON.parse(JSON.stringify(this.data.drawTrail));
saveDrawTrail
.
forEach
(
item
=>
{
drawTrail
=
this
.
data
.
copyDrawTrail
;
drawTrail
.
forEach
(
item
=>
{
item
.
t
=
item
.
t
-
this
.
data
.
systemTimeStamp
;
if
(
item
.
type
==
'line'
){
item
.
x
=
item
.
x
*
this
.
data
.
imgWidth
;
item
.
y
=
item
.
y
*
this
.
data
.
imgHeight
;
}
});
if
(
saveD
rawTrail
.
length
>
0
)
{
if
(
d
rawTrail
.
length
>
0
)
{
let
pretimestamp
=
0
;
let
currentPoint
=
saveD
rawTrail
[
0
];
let
currentPoint
=
d
rawTrail
[
0
];
function
fn
(
point
){
that
.
actionmake
(
point
);
clearTimeout
(
that
.
playTimeOut
);
pretimestamp
=
point
.
t
;
saveD
rawTrail
.
splice
(
0
,
1
);
currentPoint
=
saveD
rawTrail
[
0
];
d
rawTrail
.
splice
(
0
,
1
);
currentPoint
=
d
rawTrail
[
0
];
if
(
currentPoint
){
that
.
playTimeOut
=
setTimeout
(()
=>
{
fn
(
currentPoint
);
...
...
@@ -737,7 +741,7 @@ Page({
},
resetAudiosPlayStatus
()
{
let
audioStorage
=
this
.
data
.
audioStorage
;
//
audioStorage.play = false
audioStorage
.
play
=
false
this
.
setData
({
audioStorage
,
})
...
...
@@ -759,6 +763,7 @@ Page({
audioStorage
})
clearInterval
(
this
.
data
.
voiceInterval
);
clearInterval
(
this
.
secondinterval
);
// this.data.voiceInterval = null;
}
},
1000
);
...
...
@@ -817,6 +822,10 @@ Page({
commentPost
(
params
)
{
let
that
=
this
;
wx
.
showLoading
({
title
:
'保存中...'
,
mask
:
true
,
})
commentActivePost
(
params
).
then
((
res
)
=>
{
that
.
setData
({
submitting
:
false
...
...
@@ -921,6 +930,7 @@ Page({
value
,
}
=
e
.
detail
;
let
audioStorage
=
this
.
data
.
audioStorage
;
console
.
log
(
value
,
audioStorage
.
currentTime
)
if
(
value
==
audioStorage
.
currentTime
)
{
return
;
}
...
...
business/pages/commenteditor/imagecomment.wxml
View file @
1fd1278a
<wxs src="../../../filter/index.wxs" module="filter" />
<view class="container"
catchtap="closeModal"
>
<view class="container" >
<canvas
canvas-id="tempCanvas"
disable-scroll="true"
...
...
@@ -19,6 +19,7 @@
wx:if="{{!canvasShow && !hideCanvas}}"
>
</canvas>
<cover-view class="medal-mask" wx:if="{{medalModal}}" catchtap="closeModal"></cover-view>
<cover-view class="common-dialog" wx:if="{{showAuthSettingDia}}">
<cover-view class="dialog-box" >
...
...
@@ -200,20 +201,20 @@
<view class="total-time">{{filter.voiceTimeFormat(audioInfo.duration)}}</view>
</view>
<view class="success-modal" hidden="{{commentSuccessHide}}">
<
view class="mask" bindtap="closeCommentModal"></
view>
<view class="modal-box">
<
image class="header-bg" src="{{imageRoot}}2b/comment/header_bg.png?{{imageVersion}}" mode="aspectFit"></
image>
<view class="modal-tip">
<
view>转发此链接给学员</
view>
<
view>让TA知道您的用心良苦</
view>
</view>
<view class="modal-buttons">
<
view class="btn" bindtap="jixuComment">返回列表</
view>
<view class="btn btn-primary">去转发
<
cover-
view class="success-modal" hidden="{{commentSuccessHide}}">
<
cover-view class="mask" bindtap="closeCommentModal"></cover-
view>
<
cover-
view class="modal-box">
<
cover-image class="header-bg" src="{{imageRoot}}2b/comment/header_bg.png?{{imageVersion}}" mode="aspectFit"></cover-
image>
<
cover-
view class="modal-tip">
<
cover-view>转发此链接给学员</cover-
view>
<
cover-view>让TA知道您的用心良苦</cover-
view>
</
cover-
view>
<
cover-
view class="modal-buttons">
<
cover-view class="btn" bindtap="jixuComment">返回列表</cover-
view>
<
cover-
view class="btn btn-primary">去转发
<button open-type='share'></button>
</view>
</view>
</view>
</view>
</
cover-
view>
</
cover-
view>
</
cover-
view>
</
cover-
view>
</view>
\ No newline at end of file
business/pages/commenteditor/imagecomment.wxss
View file @
1fd1278a
...
...
@@ -355,7 +355,15 @@ canvas{
height: 38rpx;
border: 7rpx solid #fff;
}
.medal-mask{
width: 100%;
height: 100%;
background: rgba(0,0,0,.05);
position: fixed;
top: 0;
left: 0;
z-index: 100
}
.medal-modal{
padding: 49rpx 24rpx 39rpx;
justify-content: space-between;
...
...
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