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