Commit d70c3cad authored by lvtz's avatar lvtz

“ffix

parent 9653bb6a
......@@ -87,7 +87,8 @@ Page({
voiceuploading: false,
timeBetween2points: 0,
startbtnTouchTime: 0,
pausebtnTouchTime: 0
pausebtnTouchTime: 0,
isPreview: false,
},
onLoad: function (options) {
var self = this;
......@@ -424,7 +425,8 @@ Page({
time: 0,
upload: false
},
audioStorage: {}
audioStorage: {},
isPreview: false,
})
this.data.saveDrawTrail = [];
that.data.context.clearRect(0, 0, `${that.data.imgWidth}`, `${that.data.imgHeight}`);
......@@ -612,15 +614,22 @@ Page({
that.drawLine(point, function() {});
break;
case "flower":
that.data.flowergivenarr.push(point);
that.data.previewflowergivenarr.push(point);
that.setData({
flowergivenarr: that.data.flowergivenarr
previewflowergivenarr: that.data.previewflowergivenarr,
}, () => {
})
setTimeout(() => {
let flowerCount = that.data.flowerCount + 1;
that.setData({
flowerCount,
})
}, 1800)
break;
case "medal":
that.data.medalgivenarr.push(point);
that.data.previewmedalgivenarr.push(point);
that.setData({
medalgivenarr: that.data.medalgivenarr
previewmedalgivenarr: that.data.previewmedalgivenarr
})
break;
case "score":
......@@ -692,9 +701,6 @@ Page({
doSubmit(e){
const {
formId
} = e.detail;
if (this.data.voiceuploading) {
wx.showToast({
title: '录音上传中,请稍等...',
......@@ -724,7 +730,6 @@ Page({
audio: this.data.audioInfo,
drawTrail: commitDrawTrail,
}
console.log(JSON.stringify(commitDrawTrail));
const medals = drawTrail.filter(ele => ele.type == 'medal').map(ele => ele.id).join(',');
const params = {
record_id: this.data.cid,
......@@ -735,12 +740,12 @@ Page({
type: 1,
flower: this.data.flowernum
}
this.commentPost(params, formId);
this.commentPost(params);
},
commentPost(params, formId) {
commentPost(params) {
let that = this;
commentActivePost(params).then((res) => {
that.setData({
......@@ -752,9 +757,6 @@ Page({
code
} = res;
if (code == 200) {
formIdCreate({
formId
})
this.setData({
hideCanvas: true,
commentSuccessHide: false
......@@ -821,6 +823,14 @@ Page({
title: shareObj.title,
path: shareObj.path,
}
}
},
formIdCreate(e) {
const {
formId
} = e.detail;
formIdCreate({
formId
})
},
})
\ No newline at end of file
......@@ -3,6 +3,7 @@
"navigationBarBackgroundColor": "#313131",
"navigationBarTextStyle": "white",
"disableSwipeBack": true,
"disableScroll": true,
"usingComponents": {
"sound-recording": "../../../components/soundrecording",
"sound-isrecording": "../../../components/soundisrecording"
......
......@@ -125,6 +125,11 @@
<view class="flower-box" bindtap="flowerGive">
<view class="flower-innerbox">
<image class="icon-flower" src="{{imageRoot}}2b/comment/icon_flower.png?{{imageVersion}}"></image>
<block wx:if="{{!isPreview}}">
<view class="flowerfloatbox" wx:key="index" wx:for="{{flowergivenarr}}">
<image class="flower-animate" wx:key="index" src="{{imageRoot}}2b/comment/icon_flower.png?{{imageVersion}}"></image>
</view>
</block>
</view>
<view class="text" wx:if="{{flowernum>0}}">×{{flowernum}}</view>
</view>
......@@ -167,7 +172,7 @@
<view>让TA知道您的用心良苦</view>
</view>
<view class="modal-buttons">
<view class="btn" bindtap="jixuComment">继续点评</view>
<view class="btn" bindtap="jixuComment">返回列表</view>
<view class="btn btn-primary">去转发
<button open-type='share'></button>
</view>
......
......@@ -87,33 +87,60 @@ canvas{
width: 250rpx;
height: 250rpx;
}
.flower-animate{
width: 34rpx;
height: 47rpx;
position: absolute;
/* right: 0;
bottom: 0; */
animation: flowerEnter 1s linear forwards;
}
@keyframes flowerEnter{
0%{
bottom: 0;
/* bottom: 0;
right: 10rpx;
transform: scale(1);
opacity: 0; */
opacity: 0;
transform: translateY(0);
}
50%,80%{
bottom: 50rpx;
80%{
opacity: 1;
transform: translateY(-100px);
/* bottom: 50rpx;
right: 50rpx;
transform: scale(1.2);
opacity: 1;
opacity: 1; */
}
100%{
bottom: 0;
right: 10rpx;
transform: scale(1);
100% {
opacity: 0;
transform: translate(0, -120px);
}
}
@keyframes flowerSwing{
0%{
transform: rotate(0deg)
}
25%{
transform: rotate(-30deg)
}
50% {
transform: rotate(0deg)
}
75% {
transform: rotate(30deg)
}
100% {
transform: rotate(0deg)
}
}
.flowerfloatbox {
width: 34rpx;
height: 47rpx;
position: absolute;
opacity: 0;
z-index: 100;
top: 0;
animation: flowerEnter 1s linear forwards;
}
.flower-animate{
width: 34rpx;
height: 47rpx;
display: block;
animation: flowerSwing 0.5s ease infinite forwards;
}
.bottom-optbox{
width: 100%;
......@@ -620,7 +647,7 @@ canvas{
}
100% {
left: 650rpx;
top: 1100rpx;
top: 1000rpx;
margin-left: -268rpx;
margin-top: -268rpx;
transform: scale(0);
......@@ -646,7 +673,7 @@ canvas{
}
100% {
left: 650rpx;
top: 1100rpx;
top: 1000rpx;
margin-top: -80rpx;
margin-left: -50rpx;
opacity: 0;
......@@ -673,7 +700,7 @@ canvas{
.flowershowbox {
position: fixed;
left: 620rpx;
top: 1077rpx;
top: 1000rpx;
display: flex;
align-items: center;
z-index: 200;
......
......@@ -636,7 +636,6 @@ Page({
})
},
doSubmit(e){
const { formId } = e.detail;
if (this.data.voiceuploading) {
wx.showToast({
title: '录音上传中,请稍等...',
......@@ -677,9 +676,9 @@ Page({
type: 2,
flower: flowercount,
}
this.commentPost(params,formId);
this.commentPost(params);
},
commentPost(params,formId) {
commentPost(params) {
let that = this;
wx.showLoading({
title: '保存中...',
......@@ -695,9 +694,6 @@ Page({
code
} = res;
if (code == 200) {
formIdCreate({
formId
})
this.setData({
commentSuccessHide: false
})
......@@ -820,5 +816,13 @@ Page({
},
touchmove (e) {
this.data.istouchmove = true;
}
},
formIdCreate(e) {
const {
formId
} = e.detail;
formIdCreate({
formId
})
},
})
\ No newline at end of file
......@@ -163,7 +163,7 @@
<view>让TA知道您的用心良苦</view>
</view>
<view class="modal-buttons">
<view class="btn" bindtap="jixuComment">继续点评</view>
<view class="btn" bindtap="jixuComment">返回列表</view>
<view class="btn btn-primary">去转发
<button open-type='share'></button>
</view>
......
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