|
@@ -1,18 +1,14 @@
|
|
|
-import {
|
|
|
- setStorage,
|
|
|
- getStorage,
|
|
|
- removeStorage
|
|
|
-} from "@/common/utils/storage.js"
|
|
|
+import { setStorage, getStorage, removeStorage } from '@/common/utils/storage.js'
|
|
|
|
|
|
export default {
|
|
|
//
|
|
|
set_token: (state, token) => {
|
|
|
state.token = token
|
|
|
- state.crossPagePam = (new Date().getTime())
|
|
|
+ state.crossPagePam = new Date().getTime()
|
|
|
if (token) {
|
|
|
setStorage('token', token)
|
|
|
} else {
|
|
|
- removeStorage("token")
|
|
|
+ removeStorage('token')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -21,7 +17,7 @@ export default {
|
|
|
if (userId) {
|
|
|
setStorage('userId', userId)
|
|
|
} else {
|
|
|
- removeStorage("userId")
|
|
|
+ removeStorage('userId')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -30,7 +26,7 @@ export default {
|
|
|
if (mobile) {
|
|
|
setStorage('mobile', mobile)
|
|
|
} else {
|
|
|
- removeStorage("mobile")
|
|
|
+ removeStorage('mobile')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -39,7 +35,7 @@ export default {
|
|
|
if (openId) {
|
|
|
setStorage('openId', openId)
|
|
|
} else {
|
|
|
- removeStorage("openId")
|
|
|
+ removeStorage('openId')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -48,7 +44,7 @@ export default {
|
|
|
if (name) {
|
|
|
setStorage('name', name)
|
|
|
} else {
|
|
|
- removeStorage("name")
|
|
|
+ removeStorage('name')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -57,7 +53,7 @@ export default {
|
|
|
if (avatar) {
|
|
|
setStorage('avatar', avatar)
|
|
|
} else {
|
|
|
- removeStorage("avatar")
|
|
|
+ removeStorage('avatar')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -66,7 +62,7 @@ export default {
|
|
|
if (city) {
|
|
|
setStorage('city', city)
|
|
|
} else {
|
|
|
- removeStorage("city")
|
|
|
+ removeStorage('city')
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -75,11 +71,11 @@ export default {
|
|
|
if (province) {
|
|
|
setStorage('province', province)
|
|
|
} else {
|
|
|
- removeStorage("province")
|
|
|
+ removeStorage('province')
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- setcrossPagePam:(state, crossPagePam) => {
|
|
|
+ setcrossPagePam: (state, crossPagePam) => {
|
|
|
state.crossPagePam = crossPagePam
|
|
|
- },
|
|
|
+ }
|
|
|
}
|