| | |
| | | console.log(userInfo); |
| | | return new Promise(function (resolve, reject) { |
| | | wx.request({ |
| | | url: 'http://39.105.187.20/prod-api/login', |
| | | url: 'https://puyue.yhupai.com/prod-api/login', |
| | | header: { "content-type": "application/x-www-form-urlencoded" }, |
| | | method: 'POST', |
| | | header: { |
| | |
| | | }) |
| | | }) |
| | | } |
| | | function formatTime(date) { |
| | | // console.log(date); |
| | | var year = date.getFullYear() |
| | | var month = date.getMonth() + 1 |
| | | var day = date.getDate() |
| | | |
| | | var hour = date.getHours() |
| | | var minute = date.getMinutes() |
| | | |
| | | return [year, month, day].map(formatNumber).join('-') + ' ' + [hour, minute].map(formatNumber).join(':') |
| | | } |
| | | |
| | | |
| | | function formatNumber(n) { |
| | | n = n.toString() |
| | | return n[1] ? n : '0' + n |
| | | } |
| | | |
| | | |
| | | |
| | | // export |
| | | export { |
| | |
| | | Timeline, |
| | | BackLog, |
| | | LogOut, |
| | | fixPassWord |
| | | fixPassWord, |
| | | formatTime |
| | | } |