123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- import {
- get,
- post
- } from '../../utils/http';
- Page({
-
- data: {
- userInfo: {},
- agree: false,
- visible: false,
- sum: 0,
- activity: {}
- },
-
- onLoad: function (options) {
- },
-
- onReady: function () {
- },
-
- onShow: function () {
- this.getUser()
-
-
- },
-
- onHide: function () {
- },
-
- onUnload: function () {
- if(this.timer_) {
- clearInterval(this.timer_);
- }
- },
-
- onPullDownRefresh: function () {
- },
-
- onReachBottom: function () {
- },
-
- onShareAppMessage: function () {
- },
-
- onAvatar() {
- this.data.sum++
- if(this.data.sum >= 10) {
- this.setData({
- visible: true,
- sum: 0
- })
- }
- },
-
- getUser() {
-
- get('api/mruser/info',{},(res) => {
- if(res.data) {
- this.setData({
- userInfo: res.data
- })
- wx.setStorageSync('userInfo',res.data);
- }
- console.log(res)
- })
- },
- })
|