private async void Initial() { string jsonStars = await netHelper.RequestStr(starsUrl, null); string jsonVideos = await netHelper.RequestStr(videoUrl, null); Stars stars = netHelper.GetView <Stars>(jsonStars); HotVideos video = netHelper.GetView <HotVideos>(jsonVideos); if (stars.rescode != 0) { return; } if (video.rescode != 0) { return; } starsList = stars.hotStars; starsList.Add(new hotStars() { thumb = "/Assets/Icons/more.png", name = "更多", sid = 0 }); videoList = video.videos; lvStars.ItemsSource = starsList; lvVideo.ItemsSource = videoList; }
protected async override void OnNavigatedTo(NavigationEventArgs e) { star = e.Parameter as hotStars; videoUrl = string.Format(videoUrl, star.sid); string jsonVideos = await netHelper.RequestStr(videoUrl, null); HotVideos video = netHelper.GetView <HotVideos>(jsonVideos); if (video.rescode != 0) { return; } videoList = video.videos; lvstarVideo.ItemsSource = videoList; }