/// <summary> /// 设置封面 /// </summary> /// <param name="context"></param> public void uploadCoverImg(HttpContext context) { string src = HttpContext.Current.Request["src"]; string fileType = HttpContext.Current.Request["fileType"]; string x = HttpContext.Current.Request["x"]; string y = HttpContext.Current.Request["y"]; string w = HttpContext.Current.Request["w"]; string h = HttpContext.Current.Request["h"]; string id = HttpContext.Current.Request["id"]; sceneBll bll = new sceneBll(); if (bll.UpdateCover(src, fileType, int.Parse(x), int.Parse(y), int.Parse(w), int.Parse(h), id)) { string msg = @"{ 'success':true, 'code':200, 'msg':'操作成功', 'obj':'" + src + @"', 'map': { 'id':25467357, 'path':'" + src + @"', 'src':'" + src + @"', 'y':'" + y + @"', 'w':'" + w + @"', 'h':'" + h + @"', 'x':'" + x + @"', 'index':'', 'fileType':'" + fileType + @"' }, 'list':null } "; context.Response.Write(MentStr(msg)); } else { string msg = @"{ 'success': false, 'code': 403, 'msg': '上传缩略图失败', 'obj': null, 'map': null, 'list': null } "; context.Response.Write(MentStr(msg)); } }