|
@@ -58,14 +58,14 @@ Page({
|
|
|
// this.data.stackSize >= 2
|
|
|
console.log(this.data.stackSize)
|
|
|
if (this.innerAudioContext) {
|
|
|
- this.innerAudioContext.stop();
|
|
|
+ this.innerAudioContext.pause();
|
|
|
}
|
|
|
let videoCtx = wx.createVideoContext('worksVideo', this);
|
|
|
videoCtx.stop();
|
|
|
},
|
|
|
onUnload: function () {
|
|
|
if (this.innerAudioContext) {
|
|
|
- this.innerAudioContext.stop();
|
|
|
+ this.innerAudioContext.pause();
|
|
|
}
|
|
|
let videoCtx = wx.createVideoContext('worksVideo', this);
|
|
|
videoCtx.stop();
|
|
@@ -164,8 +164,9 @@ Page({
|
|
|
this.innerAudioContext.play();
|
|
|
httpRequestApi.playWorks(this.uid, this.data.id);
|
|
|
},
|
|
|
+ // 视频播放完毕销毁录音
|
|
|
videoEnd: function () {
|
|
|
- this.innerAudioContext.stop();
|
|
|
+ this.innerAudioContext.destroy();
|
|
|
},
|
|
|
videoPause: function () {
|
|
|
this.innerAudioContext.pause();
|
|
@@ -256,7 +257,7 @@ Page({
|
|
|
// let uid = wx.getStorageSync('uid');
|
|
|
let followUid = e.currentTarget.dataset.id;
|
|
|
let index = e.currentTarget.dataset.index;
|
|
|
- httpRequestApi.likeCommend(this.uid, followUid).success(res => {
|
|
|
+ httpRequestApi.likeCommend(this.uid, followUid).success(res => {
|
|
|
console.log(res);
|
|
|
const str = `replyList[${index}].likes`;
|
|
|
this.setData({
|
|
@@ -267,7 +268,6 @@ Page({
|
|
|
// 去用户主页
|
|
|
goToUsers: function (e) {
|
|
|
let uid = e.currentTarget.dataset.uid;
|
|
|
- console.log(uid);
|
|
|
wx.navigateTo({
|
|
|
url: `../../user/myworks/myworks?uid=${uid}`
|
|
|
});
|