(#18)万仕诚接口测试页面重写,返回正确响应头。
This commit is contained in:
		
							parent
							
								
									5b6455cb91
								
							
						
					
					
						commit
						edb8eaa72e
					
				@ -17,7 +17,7 @@ namespace Cmdjy.Controllers
 | 
			
		||||
        public ActionResult Index() {
 | 
			
		||||
            var model = new WsdRequest {
 | 
			
		||||
                StartNo = "0",MaxCount = "10",
 | 
			
		||||
                CompanyCode = "1",CompanyName = "万仕达",
 | 
			
		||||
                CompanyCode = "1",CompanyName = "万仕诚代煎药",
 | 
			
		||||
            };
 | 
			
		||||
            return PartialView(model);
 | 
			
		||||
        }
 | 
			
		||||
@ -100,11 +100,15 @@ namespace Cmdjy.Controllers
 | 
			
		||||
                result.More = db.PrescriptionInfos.Max(m => m.Id) > (start + count);
 | 
			
		||||
            }
 | 
			
		||||
            //编码:json串 +  加密信息
 | 
			
		||||
            //return Json(result);
 | 
			
		||||
            var resStr = JsonConvert.SerializeObject(result);
 | 
			
		||||
            var mw = noDes == null ? DesHelper.GetHelper().Encrypty(cKey,resStr) : resStr;
 | 
			
		||||
            logWsdRequest(info,result,resStr,mw);
 | 
			
		||||
            return Content(mw);
 | 
			
		||||
            if(noDes == null) {
 | 
			
		||||
                var resStr = JsonConvert.SerializeObject(result);
 | 
			
		||||
                var mw = DesHelper.GetHelper().Encrypty(cKey,resStr);
 | 
			
		||||
                logWsdRequest(info,result,resStr,mw);
 | 
			
		||||
                return Content(mw);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
                return Json(result,JsonRequestBehavior.AllowGet);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 记录日志
 | 
			
		||||
 | 
			
		||||
@ -22,11 +22,11 @@
 | 
			
		||||
 | 
			
		||||
<script type="text/javascript">
 | 
			
		||||
  $("#wsdMsg").hide();
 | 
			
		||||
  function wsdSucc(data) {
 | 
			
		||||
    if (!data.match("^\{(.+:.+,*){1,}\}$")) {
 | 
			
		||||
      $("#wsdMsg").show().text(data);
 | 
			
		||||
  function wsdSucc(data, status, xhr) {
 | 
			
		||||
    if (xhr.getResponseHeader("Content-Type").indexOf("application/json") >= 0) {
 | 
			
		||||
      $("#wsdMsg").show().text(JSON.stringify(data, null, 2));
 | 
			
		||||
    } else {
 | 
			
		||||
      $("#wsdMsg").show().text(JSON.stringify(JSON.parse(data), null, 2));
 | 
			
		||||
      $("#wsdMsg").show().text(data);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  function wsdBeg() {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user