跨境電商申報訂單加簽申報

来源:https://www.cnblogs.com/kuangood2018/archive/2019/09/24/kjtcn.html
-Advertisement-
Play Games

public class CEBSignClient { public void StartSignClient() { } private static SignClientConfig _signClientConfig; public static SignClientConfig CebSi ...


 public class CEBSignClient
    {

        public void StartSignClient()
        {

        }

        private static SignClientConfig _signClientConfig;
        public static SignClientConfig CebSignClientConfig
        {
            get { return _signClientConfig; }
            set { _signClientConfig = value; }
        }
        public static SignClientConfig GetCebSignClientConfig()
        {
            if (_signClientConfig == null)
            {
                _signClientConfig = new SignClientConfig();
            }
            return _signClientConfig;
        }
        public static void SetCebSignClientConfig(SignClientConfig CebSignClientConfig)
        {
            _signClientConfig = CebSignClientConfig;
        }


        /// <summary>
        /// 處理報文加簽服務64位
        /// </summary>
        /// <param name="CEBMessagesXml"></param>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static string StartSignTransform(string CEBMessagesXml, string FileName, ref bool retunValue)
        {
            string StatusCode = string.Empty;
            string StatusMessage = string.Empty;
            retunValue = true;
            SignHelper signHelper = new SignHelper();
            GetCebSignClientConfig();
            string centiNo = "";
            signHelper.Password = CebSignClientConfig.SignPwd;
            signHelper.MsgType = CebSignClientConfig.MsgType;
            signHelper.ReceiverId = CebSignClientConfig.ReceiverId;
            signHelper.SenderId = CebSignClientConfig.SenderId;
            try
            {
                if (signHelper.IsICOrUKeyOk(out centiNo))
                {
                    string text = CebSignClientConfig.ReceiveSignin;//接收文件夾
                    string text2 = CebSignClientConfig.SendIn;//發送文件夾
                                                              //改造
                    string text4;
                    try
                    {

                        signHelper.CopMsgId = Guid.NewGuid().ToString();
                        text4 = signHelper.SignInfo(CEBMessagesXml, centiNo);
                        //是否生成終端報文
                        if (CebSignClientConfig.CheckedTerminal)
                        {
                            text4 = signHelper.ShellInfo(text4);
                        }
                    }
                    catch (Exception ex)
                    {
                        //this.TransformException("文件" + text3 + "異常:" + ex.Message);
                        StatusMessage = ex.Message;
                        return StatusMessage;
                    }
                    //拼接目標文件夾和文件路徑
                    //string path = Path.Combine(text2, Path.GetFileName(FileName));
                    var CEBMessage = SignHelper.FormatXml(text4);
                    StatusMessage = CEBMessage;
                    //File.WriteAllText(path, CEBMessage);
                    //File.Delete(FileName);

                }
                else
                {
                    //this.TransformException("卡信息讀取失敗");
                    StatusMessage = "卡信息讀取失敗";
                    retunValue = false;
                }
            }
            catch (Exception ex)
            {
                //this.TransformException(ex.Message);
                StatusMessage = ex.Message;
                retunValue = false;
            }
            return StatusMessage;
        }

        /// <summary>
        /// 處理報文加簽服務64位
        /// </summary>
        /// <param name="CEBMessagesXml"></param>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static string StartSignTransform(string CEBMessagesXml, ref bool retunValue)
        {
            string StatusCode = string.Empty;
            string StatusMessage = string.Empty;
            retunValue = true;
            SignHelper signHelper = new SignHelper();
            GetCebSignClientConfig();
            string centiNo = "";
            signHelper.Password = CebSignClientConfig.SignPwd;
            signHelper.MsgType = CebSignClientConfig.MsgType;
            signHelper.ReceiverId = CebSignClientConfig.ReceiverId;
            signHelper.SenderId = CebSignClientConfig.SenderId;
            try
            {
                if (signHelper.IsICOrUKeyOk(out centiNo))
                {
                    string text = CebSignClientConfig.ReceiveSignin;//接收文件夾
                    string text2 = CebSignClientConfig.SendIn;//發送文件夾
                                                              //改造
                    string text4;
                    try
                    {

                        signHelper.CopMsgId = Guid.NewGuid().ToString();
                        text4 = signHelper.SignInfo(CEBMessagesXml, centiNo);
                        //是否生成終端報文
                        if (CebSignClientConfig.CheckedTerminal)
                        {
                            text4 = signHelper.ShellInfo(text4);
                        }
                    }
                    catch (Exception ex)
                    {
                        //this.TransformException("文件" + text3 + "異常:" + ex.Message);
                        StatusMessage = ex.Message;
                        return StatusMessage;
                    }
                    //拼接目標文件夾和文件路徑
                    //string path = Path.Combine(text2, Path.GetFileName(FileName));
                    var CEBMessage = SignHelper.FormatXml(text4);
                    StatusMessage = CEBMessage;
                    //File.WriteAllText(path, CEBMessage);
                    //File.Delete(FileName);

                }
                else
                {
                    //this.TransformException("卡信息讀取失敗");
                    StatusMessage = "卡信息讀取失敗";
                    retunValue = false;
                }
            }
            catch (Exception ex)
            {
                //this.TransformException(ex.Message);
                StatusMessage = ex.Message;
                retunValue = false;
            }
            return StatusMessage;
        }
    }

    public class SignClientConfig
    {
        public SignClientConfig()
        {
            SignPwd = "88888888";
            ReceiveSignin = @"D:\跨境通\CustomsDeclarationWebMvcWMS3.5\DotNet.WinForm\bin\Debug\EportExchange\signin";
            SendIn = @"D:\跨境通\CustomsDeclarationWebMvcWMS3.5\DotNet.WinForm\bin\Debug\EportExchange\in";
            CheckedTerminal = false;
            MsgType = "";
            ReceiverId = "";
            SenderId = "";
        }
        /// <summary>
        /// 密碼
        /// </summary>
        public string SignPwd { get; set; }
        /// <summary>
        /// 加簽後的文件夾 接收文件夾
        /// </summary>
        public string ReceiveSignin { get; set; }
        /// <summary>
        /// 待加簽文件夾 發送文件夾
        /// </summary>
        public string SendIn { get; set; }
        /// <summary>
        /// 消息類型
        /// </summary>
        public string MsgType { get; set; }
        /// <summary>
        /// 接收Id
        /// </summary>
        public string ReceiverId { get; set; }
        /// <summary>
        /// 發送Id
        /// </summary>
        public string SenderId { get; set; }
        /// <summary>
        /// 是否生成終端報文
        /// </summary>
        public bool CheckedTerminal { get; set; }



    }

 

 

 //杭州版報文組裝    //報文組裝 按多條訂單批量發送
                    foreach (KcyCeb311messageorderheadEntity item in Ceb311messageList)
                    {
                        progress.SetProgressValue(1);
                        if (string.IsNullOrWhiteSpace(item.Waybills))
                        {
                            StatusMessage = "發現訂單運單不存在!";
                            
                            return;
                        }
                        //每條訂單不同的GUID
                        Ceb311HZSendmodel.Guid = CEBHelpUtilities.GetGuid();
                        CEB311MessageOrderSendModel Sendmodel = new CEB311MessageOrderSendModel();
                        Sendmodel.Ceb311OrderheadInfo = item;//主體信息
                        Condition = new SearchCondition();
                        SqlCondition = string.Empty;
                        Condition.AddCondition(KcyCeb311messageorderlistEntity.FieldOrderheadid, item.Orderheadid, SqlOperator.Equal)//
                         .AddCondition(KcyCeb311messageorderlistEntity.FieldCompanyid, UserInfo.CompanyId, SqlOperator.Equal)
                         .AddCondition(KcyCeb311messageorderlistEntity.FieldDeletionStateCode, 0, SqlOperator.Equal)//刪除狀態
                        .AddCondition(KcyCeb311messageorderlistEntity.FieldEnabled, 1, SqlOperator.Equal);//有效的
                        SqlCondition = Condition.BuildConditionSql(DatabaseType.SQLServer);
                        List<KcyCeb311messageorderlistEntity> ceb311messageorderlist = new List<KcyCeb311messageorderlistEntity>();
                        ceb311messageorderlist = new KcyCeb311messageorderlistManager().GetList<KcyCeb311messageorderlistEntity>(SqlCondition);
                        Sendmodel.Ceb311OrderDateilList = ceb311messageorderlist;//明細信息
                        Ceb311HZSendmodel.CEB311MessageHZSendList.Add(Sendmodel);
                        bool returnValue = true;
                        //報文校驗
                        returnValue = HZCEB311Message.CheckCEB311Message(Ceb311HZSendmodel, out StatusCode, out StatusMessage);
                        if (!returnValue)
                        {
                            // 消息提醒   
                            LoadingUtil.ShowInformationMessage(StatusMessage, AppMessage.MSG0000);
                            return;
                        }
                        if (StatusCode.Equals("IsStockQty"))
                        {

                        }
                        StatusMessage = "杭州報文發送";
                        progress.SetProgressValue(10);
                        progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                        progress.SetStatusInfo.Update();
                        //生成杭州版報文
                        string CEB311MessageXml = HZCEB311Message.GetCareateHZOrderXml(Ceb311HZSendmodel);
                        Ceb311HZSendmodel.CebSoapOrdersXml = CEB311MessageXml;//原始報文
                        Ceb311HZSendmodel.SendOrdersXml = CEB311MessageXml;//杭州版報文
                        //報文加密私鑰
                        Ceb311HZSendmodel.Secretkey = Ceb311HZSendmodel.Ceb311StoresorderdeclareparameterInfo.Aessign;//AES
                        Ceb311HZSendmodel.Privatekey = Ceb311HZSendmodel.Ceb311StoresorderdeclareparameterInfo.Privatekey.Trim();
                        Ceb311HZSendmodel.SendUrl = Ceb311HZSendmodel.Ceb311StoresorderdeclareparameterInfo.Declareaddress;//訂單申報地址
                        //AES加密
                        Ceb311HZSendmodel.SendOrdersXml = KuangBaseAESUtil.Encrypt(Ceb311HZSendmodel.SendOrdersXml, Ceb311HZSendmodel.Secretkey);
                        CEBMessageHZJkfSignModel.Sign(ref Ceb311HZSendmodel);
                        if (!Ceb311HZSendmodel.Status)
                        {
                            // 消息提醒   
                            LoadingUtil.ShowInformationMessage(Ceb311HZSendmodel.StatusMessage, AppMessage.MSG0000);
                            return;
                        }
                        Ceb311HZSendmodel.SendOrdersXml = HzOperationHttp.DataSoap(Ceb311HZSendmodel.SendOrdersXml, Ceb311HZSendmodel.BusinessType, Ceb311HZSendmodel.DataDigest, Ceb311HZSendmodel.CompanyCode);
                        Ceb311HZSendmodel.ResponseOrdersXml = HzOperationHttp.HttpPost(Ceb311HZSendmodel);
                        if (Ceb311HZSendmodel.Status)
                        {
                            StatusMessage = "處理回執消息";
                            progress.SetProgressValue(10);
                            progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                            progress.SetStatusInfo.Update();
                            //讀取返回消息處理狀態
                            HZJKFOrderResultModel ResponseOrdersResultModel = new HZJKFOrderResultModel();
                            //處理返回的Xml報文
                            ResponseOrdersResultModel.DeccontentXml = JKFMessageXmlOperation.ReadReturnXml(Ceb311HZSendmodel.ResponseOrdersXml.Trim());
                            List<BaseJKFOrderMessageModel> ListbaseJKFMessageModel = JKFMessageXmlOperation.ReadJkfResultMessage(ResponseOrdersResultModel);
                            foreach (var Jkfitem in ListbaseJKFMessageModel)
                            {
                                Jkfitem.JKFCustomsorderlogInfo.Orderno = Jkfitem.JkfResultInfo.BusinessNo;
                                Jkfitem.JKFCustomsorderlogInfo.Servicename = "CEB311訂單服務";
                                Jkfitem.JKFCustomsorderlogInfo.Operationname = "CEB311杭州申報";
                                Jkfitem.JKFCustomsorderlogInfo.CreateUserId = UserInfo.Id;
                                Jkfitem.JKFCustomsorderlogInfo.CreateBy = UserInfo.RealName;
                                Jkfitem.JKFCustomsorderlogInfo.Operation = UserInfo.UserName;
                                Jkfitem.JKFCustomsorderlogInfo.Companyid = UserInfo.CompanyId;
                            }
                            bool returnLogValue = HZJKFOrderResultService.AddJKFResponseResult(ListbaseJKFMessageModel);
                        }

                        //發送成功,再發送總署報文
                        if (Ceb311HZSendmodel.Status)
                        {
                            StatusMessage = "進行總署加簽";
                            progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                            progress.SetProgressValue(50);
                            progress.SetStatusInfo.Update();
                            //總署版報文生成 //生成報文 本地加簽
                            Ceb311HZSendmodel = HZCEB311Message.GetSendSignatureCEB311Message(Ceb311HZSendmodel);
                            //生成報文 本地加簽
                            bool retunValue = true;
                            string FileName = "CEB311_ZONGSHU_" + Ceb311HZSendmodel.Guid + ".xml";
                            //是否生成終端報文
                            SignClientConfig signClientConfig = CEBSignClient.GetCebSignClientConfig();
                            signClientConfig.CheckedTerminal = true;
                            signClientConfig.SignPwd = Ceb311HZSendmodel.CebBasetransferInfo.Note;// "88888888";
                            signClientConfig.SenderId = Ceb311HZSendmodel.DXPId;
                            signClientConfig.ReceiverId = Ceb311HZSendmodel.ReceiverId;
                            signClientConfig.MsgType = Ceb311HZSendmodel.MessageType;
                            CEBSignClient.SetCebSignClientConfig(signClientConfig);
                            //進行簽名
                            Ceb311HZSendmodel.CEBDeclareServiceXml = CEBSignClient.StartSignTransform(Ceb311HZSendmodel.SendOrdersXml, FileName, ref retunValue);
                            if (!retunValue)
                            {
                                StatusMessage = Ceb311HZSendmodel.CEBDeclareServiceXml;
                                //消息提醒
                                //LoadingUtil.ShowInformationMessage(StatusMessage, AppMessage.MSG0000);
                                return;
                            }
                            else
                            {
                                StatusMessage = "加簽完成";
                                progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                                progress.SetProgressValue(50);
                                progress.SetStatusInfo.Update();
                                Ceb311HZSendmodel.EportExchangePath = AppDomain.CurrentDomain.BaseDirectory + @"\EportExchange\in";
                                string path = Path.Combine(Ceb311HZSendmodel.EportExchangePath, FileName);
                                File.WriteAllText(path, Ceb311HZSendmodel.CEBDeclareServiceXml);
                            }
                            //包裝總署發送報文 包裝SAOP格式發送
                            Ceb311HZSendmodel.CebSoapOrdersXml = HzOperationHttp.CEBDeclareDataSoap(Ceb311HZSendmodel.CEBDeclareServiceXml);
                            Ceb311HZSendmodel.SendUrl = "http://api.kjeport.com/newyorkWS/ws/ReceiveCebDeclare";
                            //測試環璋地址 "http://122.224.230.4:18003/newyorkWS/ws/ReceiveCebDeclare";正試環璋地址//http://api.kjeport.com/newyorkWS/ws/ReceiveCebDeclare?wsdl//
                            Ceb311HZSendmodel.ResponseOrdersXml = HzOperationHttp.CEBDeclareServiceHttpPost(Ceb311HZSendmodel);//發送總署申報
                            //處理總署發送報文返回消息
                            #region 處理總署發送報文返回消息
                            //處理返回的Xml報文
                            Ceb311HZSendmodel.ResponseOrdersXml = JKFMessageXmlOperation.ReadCEBZONGSHUReturnXml(Ceb311HZSendmodel.ResponseOrdersXml.Trim());
                            List<BaseJKFOrderMessageModel> ListbaseJKFMessageModel = JKFMessageXmlOperation.ReadCEB311HZZONGSHUResultMessage(Ceb311HZSendmodel, Sendmodel);
                            bool returnLogValue = false;
                            foreach (BaseJKFOrderMessageModel Jkfitem in ListbaseJKFMessageModel)
                            {
                                //Jkfitem.JKFCustomsorderlogInfo.Orderno = Jkfitem.JkfResultInfo.BusinessNo;
                                Jkfitem.JKFCustomsorderlogInfo.Servicename = "CEB311杭州總署申報";
                                Jkfitem.JKFCustomsorderlogInfo.Operationname = "CEB311杭州總署申報";
                                Jkfitem.JKFCustomsorderlogInfo.CreateUserId = UserInfo.Id;
                                Jkfitem.JKFCustomsorderlogInfo.CreateBy = UserInfo.RealName;
                                Jkfitem.JKFCustomsorderlogInfo.Operation = UserInfo.UserName;
                                Jkfitem.JKFCustomsorderlogInfo.Companyid = UserInfo.CompanyId;
                            }
                            returnLogValue = HZJKFOrderResultService.AddJKFResponseResult(ListbaseJKFMessageModel);
                            #endregion
                            //申報中狀態
                            if (returnLogValue)
                            {
                                int StateInt = ((int)OrderState.InDeclaration);//訂單狀態申報中
                                CEB311MessageOrderService.UptateCEB311OrderState(Sendmodel.Ceb311OrderheadInfo.Orderno, StateInt);
                                //生成總署報文發送成功
                                StatusCode = Status.OK.ToString();
                                StatusMessage = "發送成功!";
                                itemCount++;
                                progress.SetProgressValue(100);
                                progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                                progress.Update();
                            }
                            else
                            {
                                StatusCode = Status.Error.ToString();
                                StatusMessage = "發送失敗!";
                                itemErrcount++;
                                progress.SetProgressValue(100);
                                progress.SetStatusInfo.Text = string.Format("操作{0}:{1}條 " + "錯誤:{2} 條", StatusMessage, itemCount, itemErrcount);
                                progress.Update();
                            }
                        }

                    }

這是本人的關於跨境的倉儲管理系統,跨境申報,打單發貨一體,支持普貿中境一起操作。

 

 這是本人的關於跨境的倉儲管理系統,跨境申報,打單發貨一體,支持普貿中境一起操作。

 

 

 

 

插上IC卡即可加簽發送申報,目前支持杭州,海南,上海,深圳等海關對接申報。

 

 

 

就展示到這裡了,希望有關做這方面的公司使用幫你快速進行跨境貿易通關服務。15557148372,QQ:183840232

 


您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 連接類型:1、 JDBC OCI: oci是oracle call interface的縮寫,此驅動類似於傳統的ODBC 驅動。因為它需要Oracle Call Interface and Net8,所以它需要在運行使用此驅動的JAVA程式的機器上安裝客戶端軟體,其實主要是用到orcale客戶端里以 ...
  • 談談枚舉 [TOC] 如果一個類的對象個數是有限的而且是不變的,我們通常將這樣的類設計成枚舉類。 1. 枚舉類的定義 枚舉類有如下特點: 枚舉類預設是使用final關鍵字修飾的,所以枚舉類不能被繼承; 枚舉類的構造函數預設是使用private修飾的; 定義枚舉類時所有實例必須在第一行全部列出; 枚舉 ...
  • 第一步 接下來我們將看見如何在 Python 中運行一個傳統的“Hello World”程式。Python教程本章將會教你如何編寫、保存與運行 Python 程式。 通過 Python 來運行的你的程式有兩種方法——使用互動式解釋器提示符或直接運行一個源代碼文件。我們將瞭解如何使用他們二者的功能。 ...
  • 在應用中需要使用調度框架來做一些統計的功能,可惜在Windows上可用的不多,最後選擇了APScheduler這個調度器。 用法不多介紹,只總結一下在使用中遇到的坑。 app_context 問題 凡是在APScheduler中調用的function,只要用到初始化跟app相關的對象(如db,mai ...
  • 一、迴圈 輸入一個數字,輸出該數字有幾位 二、while迴圈 迴圈體內要有改變條件的機會,避免死迴圈 while迴圈的意思就是:當條件滿足時,不斷地重覆迴圈體內的語句 迴圈執行之前判斷是否繼續迴圈,所以有可能迴圈一次也沒有被執行 看我們上面的代碼,是否有點多餘的成分,我們來進行改造,但是還有一個問題 ...
  • # 深淺拷貝 1 import copy 2 3 a = ["xiaoming",111,[5000,2000]] 4 b = a 5 print("b:%s" % b) #a,b共用同一塊記憶體地址,輸出結果b:['xiaoming', 111, [5000, 2000]] 6 7 #淺拷貝只拷貝第 ...
  • 通過以下思維導圖,學習委托的基本概念,後面著重講解委托的運用,希望通過最簡單的方式收穫更多的知識。 1.委托的各種寫法 1、委托 委托名=new 委托(會調用的方法名); 委托名(參數); 2、委托 委托名 =會調用的方法名; 委托名(參數); 3、匿名方法:委托 委托名=delegate(參數){ ...
  • ASP.NET有個大佬,HttpContext(在.Net Core中依然是它)Http請求的上下文,任何一個環節都是需要HttpContext的,需要的參數信息,處理的中間結果,最終的結果,都是放在HttpContext,是一個貫穿全局的對象。 所謂的六大對象,其實就是HttpContext的屬性 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...