From 3e08b43635dec13bbe750d2bddd903b03b7e51da Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Tue, 22 Nov 2022 17:53:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 3 +++ pages/index/personal.vue | 1 + pages/login/index.vue | 3 +++ 3 files changed, 7 insertions(+) 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'