Example #1
0
        /// <summary>
        /// 业务办理
        /// </summary>
        private async void ToBusiness()
        {
            try
            {
                if (!Tools.IsNetConnective())
                {
                    CrossToastPopUp.Current.ShowToastError("无网络连接,请检查网络。", ToastLength.Short);
                    return;
                }

                string content = await RestSharpService.GetBusinessHand();

                if (string.IsNullOrWhiteSpace(content))
                {
                    CrossToastPopUp.Current.ShowToastError("服务器出错", ToastLength.Short);
                    return;
                }
                else
                {
                    JObject jObject = JObject.Parse(content);
                    WebPage webPage = new WebPage(jObject["ShareUrl"].ToString(), "业务办理");
                    await Application.Current.MainPage.Navigation.PushAsync(webPage);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }