|
@@ -332,8 +332,6 @@ Page({
|
|
wx.setNavigationBarTitle({
|
|
wx.setNavigationBarTitle({
|
|
title: '小学语文朗读配音'
|
|
title: '小学语文朗读配音'
|
|
})
|
|
})
|
|
- console.log('页面返回页面返回', this.data.fromLoginIndex)
|
|
|
|
- console.log('页面返回页面返回', this.data.myIndex)
|
|
|
|
if (this.data.fromLoginIndex) {
|
|
if (this.data.fromLoginIndex) {
|
|
console.log('页面返回页面返回', this.data.fromLoginIndex)
|
|
console.log('页面返回页面返回', this.data.fromLoginIndex)
|
|
let index = this.data.fromLoginIndex;
|
|
let index = this.data.fromLoginIndex;
|
|
@@ -353,21 +351,12 @@ Page({
|
|
}
|
|
}
|
|
// 刷新课程资源的收藏数等
|
|
// 刷新课程资源的收藏数等
|
|
if (this.data.myIndex === 2) {
|
|
if (this.data.myIndex === 2) {
|
|
- console.log('去刷新')
|
|
|
|
this.refreshCourseAmount()
|
|
this.refreshCourseAmount()
|
|
}
|
|
}
|
|
-
|
|
|
|
- // const userInfo = wx.getStorageSync('user')
|
|
|
|
- // console.log('userInfo',userInfo)
|
|
|
|
- // if (userInfo.wechatName) {
|
|
|
|
- // this.setData({
|
|
|
|
- // isLogin: true
|
|
|
|
- // })
|
|
|
|
- // } else {
|
|
|
|
- // this.setData({
|
|
|
|
- // isLogin: false
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ shareImg: '',
|
|
|
|
+ shareId: ''
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
|
|
onHide: function () {
|
|
onHide: function () {
|
|
@@ -386,7 +375,7 @@ Page({
|
|
httpRequestApi.getHotRecommendSecond(grade, pageNo, pageSize).success(res => {
|
|
httpRequestApi.getHotRecommendSecond(grade, pageNo, pageSize).success(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
const recommendRes = res.data.data.list;
|
|
const recommendRes = res.data.data.list;
|
|
- if (recommendRes.length === 0) {
|
|
|
|
|
|
+ if (recommendRes.length <= 0) {
|
|
this.setData({
|
|
this.setData({
|
|
noMoreWork: true
|
|
noMoreWork: true
|
|
})
|
|
})
|
|
@@ -400,7 +389,7 @@ Page({
|
|
formatWorksList(list, notSet) {
|
|
formatWorksList(list, notSet) {
|
|
// const tempList = [];
|
|
// const tempList = [];
|
|
console.log('列表长度列表长度', list.length)
|
|
console.log('列表长度列表长度', list.length)
|
|
- if (list.length < 6 || list.length === 0) {
|
|
|
|
|
|
+ if (list.length < 3 || list.length === 0) {
|
|
this.setData({
|
|
this.setData({
|
|
noMoreWork: true
|
|
noMoreWork: true
|
|
})
|
|
})
|
|
@@ -775,12 +764,12 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
onShareAppMessage: function (res) {
|
|
onShareAppMessage: function (res) {
|
|
|
|
+ console.log('onShareAppMessage>>>>>>>>>>>>')
|
|
if (res.from === 'button') {
|
|
if (res.from === 'button') {
|
|
return {
|
|
return {
|
|
title: '请欣赏我的课文朗读作品,点赞+评论。',
|
|
title: '请欣赏我的课文朗读作品,点赞+评论。',
|
|
path: `/pages/index/index?readId=${this.data.shareId}`,
|
|
path: `/pages/index/index?readId=${this.data.shareId}`,
|
|
imageUrl: this.data.shareImg
|
|
imageUrl: this.data.shareImg
|
|
-
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
return {
|
|
return {
|
|
@@ -879,7 +868,7 @@ Page({
|
|
console.log('资源', this.data.coursesData)
|
|
console.log('资源', this.data.coursesData)
|
|
this.setData({
|
|
this.setData({
|
|
coursesData: this.data.coursesData.concat(res.data.data.list),
|
|
coursesData: this.data.coursesData.concat(res.data.data.list),
|
|
- noMoreWork: res.data.data.list <= 0 ? true : false
|
|
|
|
|
|
+ noMoreWork: res.data.data.list.length <= 0 ? true : false
|
|
}, () => {
|
|
}, () => {
|
|
console.log(this.data.coursesData)
|
|
console.log(this.data.coursesData)
|
|
})
|
|
})
|