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