| | |
| | | import userservice from '../../../service/userservice' |
| | | import moment from '../../../utils/moment.min' |
| | | |
| | | const app = getApp() |
| | | |
| | |
| | | }, |
| | | methods: { |
| | | loginPw(accessTokenPW) { |
| | | // accessTokenPW.nickName = '\xF0\x9F\x98\x84' |
| | | // debugger |
| | | wx.showLoading({ |
| | | title: '登录中', |
| | | mask: true, |
| | |
| | | gotoHomePage() { |
| | | userservice.getUserInfo(app.globalData.accessToken.userId, { |
| | | success(data) { |
| | | if (data.uiCreateTime) { |
| | | const registerTime = moment(data.uiCreateTime) |
| | | const now = moment() |
| | | const m1 = now.month() |
| | | const m2 = registerTime.month() |
| | | app.globalData.newUser = m1 <= m2 |
| | | } |
| | | console.log(app.globalData.newUser); |
| | | |
| | | app.globalData.userInfo = data |
| | | app.globalData.isLogin = true |
| | | wx.setStorage({ |