|
@@ -42,71 +42,12 @@ Page({
|
|
|
},
|
|
|
|
|
|
jurisdiction: function () {
|
|
|
+ //隐藏弹框
|
|
|
+ this.setData({
|
|
|
+ flag: !this.data.flag
|
|
|
+ })
|
|
|
//登录页信息
|
|
|
- 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: '670'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- //获取排名
|
|
|
- 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('用户点击取消')
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
- /* 分享 */
|
|
|
- const columnId = util.column('6').columnId;
|
|
|
- this.distinction(2, columnId, 1, 2, res => {
|
|
|
- if(res.data.success) {
|
|
|
- console.log(res.data.data)
|
|
|
- this.setData({
|
|
|
- productionData: res.data.data
|
|
|
- })
|
|
|
- if(res.data.data) {
|
|
|
- if(res.data.data.totalSize > 2) {
|
|
|
- this.setData({
|
|
|
- productionMore: true
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ this.onShow();
|
|
|
},
|
|
|
|
|
|
/*点击获取canvas高度*/
|
|
@@ -140,23 +81,6 @@ Page({
|
|
|
this.setData({left: 200 });
|
|
|
}
|
|
|
}
|
|
|
- /* 分享 */
|
|
|
- const columnId = util.column('6').columnId;
|
|
|
- this.distinction(2, columnId, 1, 2, res => {
|
|
|
- if(res.data.success) {
|
|
|
- console.log(res.data.data)
|
|
|
- this.setData({
|
|
|
- productionData: res.data.data
|
|
|
- })
|
|
|
- if(res.data.data) {
|
|
|
- if(res.data.data.totalSize > 2) {
|
|
|
- this.setData({
|
|
|
- productionMore: true
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
},
|
|
|
onShow: function () {
|
|
|
//登录页信息
|
|
@@ -194,6 +118,23 @@ Page({
|
|
|
flag: !this.data.flag
|
|
|
})
|
|
|
});
|
|
|
+ /* 分享 */
|
|
|
+ const columnId = util.column('6').columnId;
|
|
|
+ this.distinction(2, columnId, 1, 2, res => {
|
|
|
+ if(res.data.success) {
|
|
|
+ console.log(res.data.data)
|
|
|
+ this.setData({
|
|
|
+ productionData: res.data.data
|
|
|
+ })
|
|
|
+ if(res.data.data) {
|
|
|
+ if(res.data.data.totalSize > 2) {
|
|
|
+ this.setData({
|
|
|
+ productionMore: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
/* 区分答疑和分享 */
|
|
|
distinction: function(type, columnId, pageNo, pageSize, success) {
|