更改重复请求 加了节流

This commit is contained in:
魏啾
2024-08-09 15:28:28 +08:00
parent c83aa0b4c4
commit fddaea0e7b
2 changed files with 1 additions and 3 deletions

View File

@@ -53,10 +53,8 @@
},
methods: {
userlogin() {
console.log(333)
if (!uni.cache.get('token')) {
// this.$store.dispatch("loginEvent"); //获取shapid
uni.login({
provider: 'weixin',
success: (data) => {

View File

@@ -113,7 +113,7 @@ async function request(options) {
// // }, 1000)
// }
// })
uni.$u.debounce(store.dispatch("loginEvent"), 1000); //获取shapid
uni.$u.throttle(store.dispatch("loginEvent"), 1000); //获取shapid
} else if (res.code == 482) {
let nowTime = new Date() / 1000 | 0