@@ -5,6 +5,8 @@ import {
module.exports = {
// 用户登录
userLogin: data => request('/user/openId', 'get', data),
+ // 统计用户登录
+ loginLog: data => request('/loginLog', 'post', data),
//获取他人用户信息,
getUserInfo: data => request('/user/info', 'get', data),
//获取用户信息
@@ -1,5 +1,6 @@
// app.js
import {
+ loginLog,
userLogin,
getMyInfo
} from '~/api/user'
@@ -11,10 +12,11 @@ import {
} from '~/store/index'
let storeBindings
App({
- onLaunch() {
+ async onLaunch() {
this.updateApplet()
this.checkIsIos()
this.getNavbarInfo()
+ await loginLog()
},
async onShow(options) {
if (!this.storeBindings) {
@@ -234,7 +234,7 @@ Page({
readingReset: false,
'countDown.state': true
})
- this.stl = setInterval(() => {
+ this.stl = setInterval(async () => {
if (this.data.countDown.num == 0) {
clearInterval(this.stl)
this.setData({
@@ -244,8 +244,8 @@ Page({
num: 3
}
- this.playMediaState()
- this.soundRecording()
+ await this.playMediaState()
+ await this.soundRecording()
this.startRecording()
} else {