private async void FreshPage(string id) { try { music_detail _music_detail = await Http.APIService.Get_music_detail(id); var writeableBitmap = await ImageOperation.GetImage(_music_detail.data.cover); musicPageViewModel.cover = writeableBitmap; writeableBitmap = await ImageOperation.GetImage(_music_detail.data.author.web_url); //音乐作者 musicPageViewModel.author_web_url = writeableBitmap; musicPageViewModel.title = _music_detail.data.title; musicPageViewModel.author_user_name = _music_detail.data.author.user_name; musicPageViewModel.author_desc = _music_detail.data.author.desc; //音乐故事 musicPageViewModel.story_title = _music_detail.data.story_title; musicPageViewModel.story_author = _music_detail.data.story_author.user_name; musicPageViewModel.story = Regex.Replace(_music_detail.data.story, "<br>", Environment.NewLine); //音乐歌词 musicPageViewModel.lyric = Regex.Replace(_music_detail.data.lyric, "<br>", Environment.NewLine); //音乐信息 musicPageViewModel.info = _music_detail.data.info; //责任编辑 musicPageViewModel.charge_edt = _music_detail.data.charge_edt; //评论点赞分享数 musicPageViewModel.praisenum = _music_detail.data.praisenum.ToString(); musicPageViewModel.sharenum = _music_detail.data.sharenum.ToString(); musicPageViewModel.commentnum = _music_detail.data.commentnum.ToString(); } catch { } }
public async void PageFresh() { hpIDList = await Http.APIService.Get_hp_idlist(); if (homePageData != null) { for (int i = 0; i < hpIDList.data.Count() - 1; i++) { var hp_detail = await APIService.Get_hp_detail(hpIDList.data[i]); homePageData.Add( new HomePageModel { writeableBitmap = await ImageOperation.GetImage(hp_detail.data.hp_img_url), author = hp_detail.data.hp_author, date = hp_detail.data.hp_makettime, content = hp_detail.data.hp_content } ); } } else { } }
private async void FreshPage(string hpDate) { hp_month _hp_month = await APIService.Get_hp_month(hpDate); for (int i = 0; i < _hp_month.data.Count(); i++) { homeMonthPageData.Add(new HomeMonthPageModel { wb = await ImageOperation.GetImage(_hp_month.data[i].hp_img_url), hpId = _hp_month.data[i].hpcontent_id, date = _hp_month.data[i].hp_makettime }); } }
public async void PageFresh() { var _movie_list = await APIService.Get_movie_list(); //一句话就内存溢出 //for (int j = 0; j < 20; j++) for (int i = 0; i < _movie_list.data.Count(); i++) { ImageCollection.Add(new MoviePageModel { wb = await ImageOperation.GetImage(_movie_list.data[i].cover), id = _movie_list.data[i].id, score = _movie_list.data[i].score }); } }
private async void FreshPage() { var _movie_story = await APIService.Get_movie_story(movieId); InfoTextBlock.Text = _movie_story.data.data.Count().ToString(); for (int i = 0; i < _movie_story.data.data.Count(); i++) { movieStoryPageData.Add(new MovieStoryPageModel { userName = _movie_story.data.data[i].user.user_name, userImage = await ImageOperation.GetImage(_movie_story.data.data[i].user.web_url), makeTime = _movie_story.data.data[i].input_date, praiseNum = _movie_story.data.data[i].praisenum.ToString(), title = _movie_story.data.data[i].title, content = _movie_story.data.data[i].content }); } }
protected override async void OnNavigatedTo(NavigationEventArgs e) { string hpId = (string)e.Parameter; if (!string.IsNullOrEmpty(hpId)) { homePageData.Clear(); var hp_detail = await APIService.Get_hp_detail(hpId); homePageData.Add( new HomePageModel { writeableBitmap = await ImageOperation.GetImage(hp_detail.data.hp_img_url), author = hp_detail.data.hp_author, date = hp_detail.data.hp_makettime, content = hp_detail.data.hp_content } ); } else { PageFresh(); } }
public async void PageFresh(string movieId) { var _movie_detail = await APIService.Get_movie_detail(movieId); movieDetailPageViewModel.video = _movie_detail.data.video; movieDetailPageViewModel.title = _movie_detail.data.title; movieDetailPageViewModel.keywords = _movie_detail.data.keywords; movieDetailPageViewModel.info = _movie_detail.data.info; movieDetailPageViewModel.detailcover = await ImageOperation.GetImage(_movie_detail.data.detailcover); for (int i = 0; i < _movie_detail.data.photo.Count(); i++) { slide.Add(new MovieDetailPageSlideModel { slide = await ImageOperation.GetImage(_movie_detail.data.photo[i]) }); } var _movie_story = await APIService.Get_movie_story(movieId); movieDetailPageViewModel.story_web_url = await ImageOperation.GetImage(_movie_story.data.data[0].user.web_url); movieDetailPageViewModel.story_input_date = _movie_story.data.data[0].input_date; movieDetailPageViewModel.story_user_name = _movie_story.data.data[0].user.user_name; movieDetailPageViewModel.story_content = _movie_story.data.data[0].content; }