|
@@ -17,7 +17,7 @@ Page({
|
|
|
isSwiper: false,
|
|
|
noMoreWork: false,
|
|
|
hotAmountTopData: [],
|
|
|
- sortImg: ['../../../static/activity/1.png', '../../../static/activity/2.png' , '../../../static/activity/3.png'],
|
|
|
+ sortImg: ['../../../static/activity/1.png', '../../../static/activity/2.png', '../../../static/activity/3.png'],
|
|
|
grades: '',
|
|
|
gradeObj: {
|
|
|
"PRIMARY_FIRST_GRADE": "一年级",
|
|
@@ -72,7 +72,7 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- /**
|
|
|
+ /**
|
|
|
* 获取我的排名信息
|
|
|
*/
|
|
|
httpRequestApi.getMyHotAmount().success(res => {
|
|
@@ -103,8 +103,8 @@ Page({
|
|
|
* 下拉
|
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
|
- wx.showNavigationBarLoading() //在标题栏中显示加载
|
|
|
- /**
|
|
|
+ wx.showNavigationBarLoading() //在标题栏中显示加载
|
|
|
+ /**
|
|
|
* 获取排名信息
|
|
|
*/
|
|
|
httpRequestApi.getHotAmountTop().success(res => {
|
|
@@ -117,7 +117,7 @@ Page({
|
|
|
wx.stopPullDownRefresh() //停止下拉刷新
|
|
|
}
|
|
|
})
|
|
|
- /**
|
|
|
+ /**
|
|
|
* 获取我的排名信息
|
|
|
*/
|
|
|
httpRequestApi.getMyHotAmount().success(res => {
|
|
@@ -162,7 +162,7 @@ Page({
|
|
|
selectInd
|
|
|
});
|
|
|
if (selectInd === 1) {
|
|
|
- this.getMyRead();
|
|
|
+ this.getMyRead();
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
@@ -238,8 +238,8 @@ Page({
|
|
|
},
|
|
|
/**
|
|
|
* 点击删除按钮
|
|
|
- */
|
|
|
- delHideMyWork() {
|
|
|
+ */
|
|
|
+ delHideMyWork() {
|
|
|
this.getMyRead()
|
|
|
},
|
|
|
/**
|
|
@@ -383,25 +383,25 @@ Page({
|
|
|
/**
|
|
|
* 点击头像
|
|
|
*/
|
|
|
- headTap (e) {
|
|
|
- if (!wx.getStorageSync('user').wechatName) {
|
|
|
- wx.navigateTo({
|
|
|
- url: `../../pages/login/login`
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- let uid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
|
|
|
- // this.trigger(e, 'headTap')
|
|
|
- console.log('点击头像', e)
|
|
|
+ headTap(e) {
|
|
|
+ if (!wx.getStorageSync('user').wechatName) {
|
|
|
wx.navigateTo({
|
|
|
- url: `../../pages/myworks/myworks?uid=${uid}`,
|
|
|
- fail: (err) => {
|
|
|
- console.log('跳转错误', err)
|
|
|
- wx.navigateTo({
|
|
|
- url: `../../../pages/myworks/myworks?uid=${uid}`
|
|
|
- });
|
|
|
- }
|
|
|
+ url: `../../pages/login/login`
|
|
|
});
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let uid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
|
|
|
+ // this.trigger(e, 'headTap')
|
|
|
+ console.log('点击头像', e)
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `../../pages/myworks/myworks?uid=${uid}`,
|
|
|
+ fail: (err) => {
|
|
|
+ console.log('跳转错误', err)
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `../../../pages/myworks/myworks?uid=${uid}`
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
},
|
|
|
/**
|
|
@@ -411,22 +411,22 @@ Page({
|
|
|
const followUid = e.target.dataset.uid ? e.target.dataset.uid : e.currentTarget.dataset.uid;
|
|
|
const uid = wx.getStorageSync('uid');
|
|
|
httpRequestApi.followUser(uid, followUid).success((res) => {
|
|
|
- // this.setData({
|
|
|
- // isFans: true
|
|
|
- // })
|
|
|
- wx.showToast({
|
|
|
- title: '关注啦',
|
|
|
- icon: 'success',
|
|
|
- duration: 1000
|
|
|
- })
|
|
|
+ // this.setData({
|
|
|
+ // isFans: true
|
|
|
+ // })
|
|
|
+ wx.showToast({
|
|
|
+ title: '关注啦',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 1000
|
|
|
+ })
|
|
|
});
|
|
|
httpRequestApi.getHotAmountTop().success(res => {
|
|
|
- if (res.data.code === 200) {
|
|
|
- const hotAmountTopData = [...res.data.data]
|
|
|
- this.setData({
|
|
|
- hotAmountTopData
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-})
|
|
|
+ if (res.data.code === 200) {
|
|
|
+ const hotAmountTopData = [...res.data.data]
|
|
|
+ this.setData({
|
|
|
+ hotAmountTopData
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|