소스 검색

删除useUser

tongshangming 2 년 전
부모
커밋
525e4f2cd8
2개의 변경된 파일1개의 추가작업 그리고 10개의 파일을 삭제
  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'
 				// })