Browse Source

fix: 添加登录请求节流并优化闪屏页标签栏隐藏逻辑

在登录接口添加200ms的节流控制防止重复请求
闪屏页标签栏隐藏增加条件判断,仅在首次展示时执行
main
前端-胡立永 2 days ago
parent
commit
3f4b2204b6
2 changed files with 4 additions and 1 deletions
  1. +1
    -0
      api/modules/login.js
  2. +3
    -1
      pages/components/SplashScreen.vue

+ 1
- 0
api/modules/login.js View File

@ -17,6 +17,7 @@ export default {
url: '/login/wxLogin', url: '/login/wxLogin',
method: 'POST', method: 'POST',
data, data,
throttle : 200,
// header: { // header: {
// 'Content-Type': 'application/x-www-form-urlencoded' // 'Content-Type': 'application/x-www-form-urlencoded'
// }, // },


+ 3
- 1
pages/components/SplashScreen.vue View File

@ -73,7 +73,9 @@ export default {
mounted() { mounted() {
this.initSplash() this.initSplash()
uni.hideTabBar()
if(!this.hasShownSplash()){
uni.hideTabBar()
}
}, },
beforeDestroy() { beforeDestroy() {
this.clearTimer() this.clearTimer()


Loading…
Cancel
Save