Esempio n. 1
0
        /// <summary>
        /// 更新门店。
        /// </summary>
        /// <param name="model">更新门店模型。</param>
        public void Update(UpdateStoreModel model)
        {
            var url = "http://api.weixin.qq.com/cgi-bin/poi/updatepoi?access_token=" + _accountModel.GetAccessToken();

            var json = JsonConvert.SerializeObject(model);

            var obj = JObject.Parse(json);

            if (model.PhotoList != null)
            {
                obj["photo_list"] = new JArray(model.PhotoList.Select(i => new { photo_url = i }));
            }

            WeiXinHttpHelper.PostString(url, Encoding.UTF8.GetBytes(obj.ToString()));
        }
Esempio n. 2
0
        /// <summary>
        /// 更新门店。
        /// </summary>
        /// <param name="model">更新门店模型。</param>
        public void Update(UpdateStoreModel model)
        {
            var url = "http://api.weixin.qq.com/cgi-bin/poi/updatepoi?access_token=" + _accountModel.GetAccessToken();

            var json = JsonConvert.SerializeObject(model);

            var obj = JObject.Parse(json);
            if (model.PhotoList != null)
                obj["photo_list"] = new JArray(model.PhotoList.Select(i => new { photo_url = i }));

            WeiXinHttpHelper.PostString(url, Encoding.UTF8.GetBytes(obj.ToString()));
        }