zoukankan      html  css  js  c++  java
  • 物流

        <add key="shipkey" value="345dc95fe52045868496e471734025d5" />
        <!--物流key-->
        <add key="shipuid" value="48600" />
        <!--物流uid-->
    #region 物流
            /// <summary>
            /// 查看物流
            /// </summary>
            public ActionResult ordership()
            {
    
                int oid = WebHelper.GetQueryInt("oid");
                OrderInfo orderInfo = Orders.GetOrderByOid(oid);
                if (orderInfo == null || orderInfo.Uid != WorkContext.Uid)
                    return PromptView("订单不存在");
    
                OrderActionListModel model = new OrderActionListModel();
                model.OrderInfo = orderInfo;
                model.OrderActionList = OrderActions.GetOrderActionList(oid);
    
                string shipSN = model.OrderInfo.ShipSN;    //快递单号
                string shipSFN = model.OrderInfo.shipSFN;    //快递公司api
                //string shipSN = WebHelper.GetQueryString(ship);//WebHelper.GetFormString("shipSN").Trim();
                if (shipSFN.Trim() == "") //默认是顺丰的
                {
    
                    shipSFN = "shunfeng";
                }
    
                string recordjson = GetShipRecord(shipSN, shipSFN);
                ViewData["shiprecord"] = recordjson;
    
                return View(model);
            }
    
            /// <summary>
            /// 获取快递记录
            /// </summary>
            /// <param name="shipSN">快递单号</param>
            /// <param name="shipCode">快递公司代码</param>
            /// <returns>快递记录json</returns>
            public string GetShipRecord(string shipSN, string shipCode)
            {
                //用户名vastao-2
                //密码Vastao6043
                //测试快递单号100459275286
                //string key = "345dc95fe52045868496e471734025d5";
                //string uid = "48600";
                string key = System.Configuration.ConfigurationSettings.AppSettings["shipkey"].ToString();
                string uid = System.Configuration.ConfigurationSettings.AppSettings["shipuid"].ToString();
                string url = "http://www.kuaidiapi.cn/rest/?uid=" + uid + "&key=" + key + "&order=" + shipSN + "&id=" + shipCode;
    
                string backinfo = WxInterface.GetPageByGet(url);
                return backinfo;
            }
            #endregion
  • 相关阅读:
    Linux 共享库
    使用Visual Studio(VS)开发Qt程序代码提示功能的实现(转)
    ZOJ 3469 Food Delivery(区间DP)
    POJ 2955 Brackets (区间DP)
    HDU 3555 Bomb(数位DP)
    HDU 2089 不要62(数位DP)
    UESTC 1307 windy数(数位DP)
    HDU 4352 XHXJ's LIS(数位DP)
    POJ 3252 Round Numbers(数位DP)
    HDU 2476 String painter (区间DP)
  • 原文地址:https://www.cnblogs.com/fjptwwf/p/5241894.html
Copyright © 2011-2022 走看看