Ver código fonte

删除useUser

tongshangming 2 anos atrás
pai
commit
525e4f2cd8
2 arquivos alterados com 1 adições e 10 exclusões
  1. 0 9
      hooks/useUser/index.js
  2. 1 1
      utils/http.js

+ 0 - 9
hooks/useUser/index.js

@@ -1,9 +0,0 @@
-import { computed } from 'vue'
-import { useStore } from 'vuex'
-
-export default () => {
-	const store = useStore()
-	const userInfo = computed(() => store.state.userInfo)
-	
-	return userInfo.value
-}

+ 1 - 1
utils/http.js

@@ -62,7 +62,7 @@ methods.forEach(method => {
 		)
 
 		if (opt.isAuth) {
-			if (!store.state.token) {
+			if (!user.token) {
 				// uni.navigateTo({
 				// 	url: '/pages/login/login'
 				// })