Prechádzať zdrojové kódy

防止点击时,设置历史车牌失败

john.hong 2 rokov pred
rodič
commit
39d0750b41

+ 1 - 1
src/pages/parkingFee/mixins/vehicleManagement.js

@@ -147,7 +147,7 @@ export default {
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         name: 'parkingFeeDetail',
       });
-      uni.setStorageSync('carList', [...new Set([carno, ...JSON.parse(uni.getStorageSync('carList'))])].slice(0, 6));
+      uni.setStorageSync('carList', [...new Set([carno, ...JSON.parse(uni.getStorageSync('carList') || '[]')])].slice(0, 6));
       this.$store.commit('cachedViews/DEL_CACHED_VIEW', {
         name: 'parkingFeeDetail',
       });