///<summary> /// 上传头像 /// /App/TouXiangUpLoad /// 参数: /// UserID:用户ID /// TouXiang:图片 /// 返回: /// {"success": true, "message": "成功", "TouXiang": "123456798.jpg"} ///</summary> public UploadImageModel3 UploadTouXiangImage(int uId, string imgPath) { string url = string.Format("{0}App/TouXiangUpLoad", ApiUrl); FangChan.Common.WebClient wc = new FangChan.Common.WebClient(); wc.Encoding = System.Text.Encoding.UTF8; FangChan.Common.MultipartForm mf = new FangChan.Common.MultipartForm(); mf.AddFlie("TouXiang", imgPath); mf.AddString("UserID", uId.ToString()); string s = wc.Post(url, mf); return(ValueConvert.StrToObj <UploadImageModel3>(s)); }
///<summary> /// 9.上传成交确认单图片(进度说明第3条第4条中间) /// /App/ChengJiaoQueRenImageUpLoad /// 参数: /// ID:新房定单ID /// DaiKanQueRenImage:图片 ///</summary> public UploadImageModel2 UploadDealHouseImage(int oId, string imgPath) { string url = string.Format("{0}App/ChengJiaoQueRenImageUpLoad", ApiUrl); FangChan.Common.WebClient wc = new FangChan.Common.WebClient(); wc.Encoding = System.Text.Encoding.UTF8; FangChan.Common.MultipartForm mf = new FangChan.Common.MultipartForm(); mf.AddFlie("DaiKanQueRenImage", imgPath); mf.AddString("ID", oId.ToString()); string s = wc.Post(url, mf); return(ValueConvert.StrToObj <UploadImageModel2>(s)); }