|
@@ -18,7 +18,8 @@ Page({
|
|
rankData: {},
|
|
rankData: {},
|
|
share: false,
|
|
share: false,
|
|
studyLog: [],
|
|
studyLog: [],
|
|
- height: ''
|
|
|
|
|
|
+ height: '',
|
|
|
|
+ flag: true
|
|
},
|
|
},
|
|
|
|
|
|
lower: function (e) {
|
|
lower: function (e) {
|
|
@@ -36,6 +37,57 @@ Page({
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ jurisdiction: function () {
|
|
|
|
+ //登录页信息
|
|
|
|
+ login.getOpenidSessionKey(res => {
|
|
|
|
+ //隐藏弹框
|
|
|
|
+ this.setData({
|
|
|
|
+ flag: !this.data.flag
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ APIClient.getMySchedule({
|
|
|
|
+ uid: res.data.data.uid
|
|
|
|
+ }).success(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.setData({
|
|
|
|
+ data: res.data.data,
|
|
|
|
+ grade: util.gradeUpper(res.data.data.users.grade),
|
|
|
|
+ test:util.day(),
|
|
|
|
+ time: util.day(res.data.data.timeSpend),
|
|
|
|
+ studyLog: util.studyTime(res.data.data.studyLog)
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ if(res.data.data.studyLog.length > 10) {
|
|
|
|
+ this.setData({
|
|
|
|
+ height: '700'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ //获取排名
|
|
|
|
+ APIClient.getFriendSchedule('wx/friendsRank/user', {
|
|
|
|
+ uid: res.data.data.uid
|
|
|
|
+ }).success(res => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.setData({
|
|
|
|
+ rankData: res.data.data,
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }, function() {
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
|
|
|
|
+ showCancel: false,
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ console.log('用户点击确定')
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
+ console.log('用户点击取消')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ },
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
//获取分享过来的值跳转页面
|
|
//获取分享过来的值跳转页面
|
|
const ind = options.ind;
|
|
const ind = options.ind;
|
|
@@ -86,18 +138,9 @@ Page({
|
|
})
|
|
})
|
|
|
|
|
|
})
|
|
})
|
|
- }, function() {
|
|
|
|
- wx.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '需要获取您的公开信息(昵称、头像等),请从小程序列表删除小学王者班后再次扫码进入,允许授权后可正常使用',
|
|
|
|
- showCancel: false,
|
|
|
|
- success: function (res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- console.log('用户点击确定')
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
- console.log('用户点击取消')
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }, () => {
|
|
|
|
+ this.setData({
|
|
|
|
+ flag: !this.data.flag
|
|
})
|
|
})
|
|
});
|
|
});
|
|
},
|
|
},
|