123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- const util = require('../../utils/util.js');
- const APIClient = require('../../utils/APIClient.js');
- const login = require('../../utils/loginSchedule.js');
- Component({
-
- properties: {
- friendsData: {
- type: Array,
- value: []
- },
- friendsThreeData: {
- type: Array,
- value: []
- },
- myData: {
- type: Object,
- value: {}
- },
- str: {
- type: String,
- value: ''
- },
- title: {
- type: String,
- value: ''
- },
- height: {
- type: String,
- value: ''
- }
- },
-
- data: {
- animationData: {},
- rankData: {},
- indexs: 0,
- flag: true
- },
-
- methods: {
-
- more (e) {
- let height = this.properties.friendsData.length * 79.9;
- this.util(height+'rpx')
- this.setData({
- flag: false
- })
- },
-
- util (height) {
-
- var animation = wx.createAnimation({
- duration: 200,
- timingFunction: "linear",
- delay: 0
- });
-
- this.animation = animation;
- animation.height(height).step();
- this.setData({
- animationData: animation.export()
- })
- },
-
- },
- ready: function () {
- let options = util.getUrl();
- console.log(options)
- this.setData({
- indexs: options.ind
- })
-
- login.getOpenidSessionKey(res => {
-
- APIClient.getFriendSchedule('wx/friendsRank/user', {
- uid: res.data.data.uid
- }).success(res => {
- console.log(res)
- this.setData({
- rankData: res.data.data,
- })
- })
- }, () => {
- });
- }
- })
|