wk
2024-06-06 27d01f3731d0737d8ffb61fd4c15829d10a6a7dd
pages/login/userPassword.vue
@@ -99,6 +99,12 @@
                              uni.setStorageSync("userId", res.data.userId)
                              uni.setStorageSync("carNo", res.data.carNo)
                              uni.setStorageSync("userInfo", res.data)
                              let data=uni.getStorageSync('userList')?JSON.parse(uni.getStorageSync('userList')):[];
                              let id = data.length + 1;
                               if (data.filter(item=> item.username == this.username).length == 0){
                               data.push({username: this.username,password: this.password,type:res.data.type})
                              }
                              uni.setStorageSync("userList", JSON.stringify(data))
                              setCustomerId(res.data.customerid);
                              setName(res.data.name);
                              uni.hideLoading();