Commit 1fd1278a authored by wangxuelai's avatar wangxuelai

Merge remote-tracking branch 'origin/imagecomment_lvtz' into wxl-develop

parents 2c8ec0e0 db2041d5
......@@ -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 (saveDrawTrail.length > 0) {
if (drawTrail.length > 0) {
let pretimestamp = 0;
let currentPoint = saveDrawTrail[0];
let currentPoint = drawTrail[0];
function fn(point){
that.actionmake(point);
clearTimeout(that.playTimeOut);
pretimestamp = point.t;
saveDrawTrail.splice(0, 1);
currentPoint = saveDrawTrail[0];
drawTrail.splice(0, 1);
currentPoint = drawTrail[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;
}
......
<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
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment