public ActionResult save() { string poi_id = Request.Form["poi_id"]; string telephone = Request.Form["telephone"]; string photo1 = Request.Form["photo1"]; string photo2 = Request.Form["photo2"]; string photo3 = Request.Form["photo3"]; string photo4 = Request.Form["photo4"]; string photo5 = Request.Form["photo5"]; string recommend = Request.Form["recommend"]; string special = Request.Form["special"]; string introduction = Request.Form["introduction"]; string open_time = Request.Form["open_time"]; string avg_price = Request.Form["avg_price"]; string json = "{\"business\":{\"base_info\":{" + "\"poi_id\":\"" + poi_id + "\"\"telephone\":\"" + telephone + "\"" + "\"photo_list\":[{\"photo_url\":\"" + photo1 + "\"},{\"photo_url\":\"" + photo2 + "\"},{\"photo_url\":\"" + photo3 + "\"},{\"photo_url\":\"" + photo4 + "\"},{\"photo_url\":\"" + photo5 + "\"}],\"recommend\":\"" + recommend + "\",\"special\":\"" + special + "\",\"introduction\":\"" + introduction + "\",\"open_time\":\"" + open_time + "\", \"avg_price\":" + avg_price + "}}}"; string url = " http://api.weixin.qq.com/cgi-bin/poi/getpoi?access_token="+ weixinService.Access_token; string result = HttpService.Post(url, json); wxReturnPoiInfo info = JSONHelper.JSONToObject <wxReturnPoiInfo>(result); Response.Redirect("/poi/getpoilist"); return(View(info)); }
public ActionResult viewinfo(string poi_id) { string json = "{\"poi_id\":\"" + poi_id + "\"}"; string url = " http://api.weixin.qq.com/cgi-bin/poi/getpoi?access_token=" + weixinService.Access_token; string result = HttpService.Post(url, json); wxReturnPoiInfo info = JSONHelper.JSONToObject <wxReturnPoiInfo>(result); return(View(info)); }