diff --git a/App.vue b/App.vue index 0b15d3d..0c977f9 100644 --- a/App.vue +++ b/App.vue @@ -156,6 +156,9 @@ }); }, onShow(options) { + this.$u.post('/user/addLoginCount', { + houseId: uni.getStorageSync('buildingID').id + }) const token = uni.getStorageSync("weapp_session_login_data") if (typeof token.token != "string") { console.log("没有") diff --git a/pages/index/personal.vue b/pages/index/personal.vue index 966d545..bc7daed 100644 --- a/pages/index/personal.vue +++ b/pages/index/personal.vue @@ -171,6 +171,7 @@ if (res.confirm) { app.Closewebsocke() uni.clearStorageSync(); //清除缓存 + this.$u.post('/user/exitSystem', {id: uni.getStorageSync('exitSystemId')}) uni.showToast({ icon: "none", title: "退出成功" diff --git a/pages/login/index.vue b/pages/login/index.vue index a90958e..2138107 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -145,6 +145,9 @@ uni.setStorageSync("buildingID", lopan); //项目id写入缓存 this.$u.post('/user/addLoginCount', { houseId: arr[0].id + }).then(res => { + console.log(res) + uni.setStorageSync("exitSystemId", res) }) uni.switchTab({ url: '/pages/index/index'