|
@@ -58,16 +58,21 @@ Page({
|
|
},
|
|
},
|
|
onLoad: function (option) {
|
|
onLoad: function (option) {
|
|
console.log(option)
|
|
console.log(option)
|
|
- if (option.flowerCount > 0) {
|
|
|
|
|
|
+ console.log(option.flowerCount)
|
|
|
|
+ console.log(option.flowerCount === 0)
|
|
|
|
+ if (option.flowerCount) {
|
|
this.setData({
|
|
this.setData({
|
|
- flowerNum: option.flowerCount
|
|
|
|
|
|
+ fromReading: true
|
|
})
|
|
})
|
|
- }
|
|
|
|
- if (option.flowerCount) {
|
|
|
|
this.flowerAnimationHandler();
|
|
this.flowerAnimationHandler();
|
|
- setTimeout(() => {
|
|
|
|
- this.openShare();
|
|
|
|
- }, 300)
|
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.openShare();
|
|
|
|
+ // }, 300)
|
|
|
|
+ if (option.flowerCount > 0) {
|
|
|
|
+ this.setData({
|
|
|
|
+ flowerNum: option.flowerCount
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
getOpenidSessionKey((res) => {
|
|
getOpenidSessionKey((res) => {
|
|
let id = option.id ? option.id : option.scene.replace('QR', '')
|
|
let id = option.id ? option.id : option.scene.replace('QR', '')
|
|
@@ -89,8 +94,10 @@ Page({
|
|
id,
|
|
id,
|
|
myUid: this.uid,
|
|
myUid: this.uid,
|
|
stackSize
|
|
stackSize
|
|
|
|
+ },()=>{
|
|
|
|
+ this.getWorks(this.uid, id);
|
|
})
|
|
})
|
|
- this.getWorks(this.uid, id);
|
|
|
|
|
|
+
|
|
}, (error) => {
|
|
}, (error) => {
|
|
this.setData({
|
|
this.setData({
|
|
hide: !this.data.hide,
|
|
hide: !this.data.hide,
|
|
@@ -177,20 +184,25 @@ Page({
|
|
console.log('音频暂停')
|
|
console.log('音频暂停')
|
|
})
|
|
})
|
|
this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
|
|
this.innerAudioContext.src = this.data.audioSrc; // 这里可以是录音的临时路径
|
|
-
|
|
|
|
|
|
+ if(this.data.fromReading){
|
|
|
|
+ setTimeout(()=>{
|
|
|
|
+ this.openShare()
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- console.log(this.data.stackSize)
|
|
|
|
- this.setData({
|
|
|
|
- replyList: [],
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 2
|
|
|
|
- }, () => {
|
|
|
|
- this.getReply();
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.data.myUid){
|
|
|
|
+ this.setData({
|
|
|
|
+ replyList: [],
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 2
|
|
|
|
+ }, () => {
|
|
|
|
+ this.getReply();
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
videoPlayHandler: function () {
|
|
videoPlayHandler: function () {
|
|
this.setData({
|
|
this.setData({
|
|
@@ -204,6 +216,7 @@ Page({
|
|
// + 1 + 1的动画
|
|
// + 1 + 1的动画
|
|
this.setData({
|
|
this.setData({
|
|
addComeOut: 'add-one-come-out'
|
|
addComeOut: 'add-one-come-out'
|
|
|
|
+ // isLike: true
|
|
})
|
|
})
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
if (this.data.addComeOut) {
|
|
if (this.data.addComeOut) {
|
|
@@ -236,6 +249,11 @@ Page({
|
|
},
|
|
},
|
|
// 弹出分享框
|
|
// 弹出分享框
|
|
openShare: function (e) {
|
|
openShare: function (e) {
|
|
|
|
+ console.log(this.data.authorAvatar)
|
|
|
|
+ console.log(this.data.author)
|
|
|
|
+ console.log(this.data.iconImg)
|
|
|
|
+ console.log(this.data.title)
|
|
|
|
+ console.log(this.data.id)
|
|
if (this.data.authorAvatar && this.data.author && this.data.iconImg && this.data.title && this.data.id) {
|
|
if (this.data.authorAvatar && this.data.author && this.data.iconImg && this.data.title && this.data.id) {
|
|
this.shareDialog = this.selectComponent("#share-dialog");
|
|
this.shareDialog = this.selectComponent("#share-dialog");
|
|
const data = {
|
|
const data = {
|