|
|
|
@ -19,21 +19,14 @@ struct ContentView: View { |
|
|
|
|
@State var selection=2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var body: some View { |
|
|
|
|
TabView(selection: self.$selection) { |
|
|
|
|
if self.user.access_token==nil{ |
|
|
|
|
if (self.user.access_token != nil){ |
|
|
|
|
IndexView().tabItem { VStack { |
|
|
|
|
Image("house") |
|
|
|
|
Text("首页") |
|
|
|
|
.foregroundColor(Color.black) |
|
|
|
|
} }.tag(1).hidden() |
|
|
|
|
}else{ |
|
|
|
|
IndexView().tabItem { VStack { |
|
|
|
|
Image("house") |
|
|
|
|
Text("首页") |
|
|
|
|
.foregroundColor(Color.black) |
|
|
|
|
} }.tag(1) |
|
|
|
|
} }.tag(1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LoginView().tabItem { VStack { |
|
|
|
|