我在带有传奇的redux thunk上使用它,不知道是什么原因造成的。
这是fetchCurrentUser:
import random
house = ['S','C','H','D']
faces = ['J','Q','K']
deck = [(house[y] + str(i if i < 11 else faces[i-11]), i) for y in range(len(house)) for i in range(1,14)]
deck.extend([('J',14),('j',0)])
print("Highest card wins \n")
print("S = spades. \n H = hearts. \n C = clubs. \n D = diamonds. \n J = big joker. \n j = small joker. \n ")
input("Press any key to draw your card \n" "Player One: ")
P1 = random.sample(deck,1)
print("Player One drew: ", P1[0][0])
input("Press any key to draw your card \n" "Player Two: ")
P2 = random.sample(deck,1)
print("Player Two drew: ", P2[0][0])
print("Player One Wins!") if P1[0][1] > P2[0][1] else print("Player Two Wins!") if P1[0][1] < P2[0][1] else print("Draw!")
/ api / user / current_user的网络请求成功返回,但是为什么我会得到这个帮助?
答案 0 :(得分:0)
您的问题来自此:您应该返回res.data.user
而不是user
。