Example #1
0
        /// <summary>
        /// 修改门店服务信息
        /// </summary>
        /// <param name="accessTokenOrAppId">AccessToken或AppId(推荐使用AppId,需要先注册)</param>
        /// <param name="updateStoreData">修改门店服务信息需要Post的数据</param>
        /// 商户可以通过该接口,修改门店的服务信息,包括:图片列表、营业时间、推荐、特色服务、简介、人均价格、电话7 个字段。目前基础字段包括(名称、坐标、地址等不可修改)
        /// 若有填写内容则为覆盖更新,若无内容则视为不修改,维持原有内容。
        /// photo_list 字段为全列表覆盖,若需要增加图片,需将之前图片同样放入list 中,在其后增加新增图片。如:已有A、B、C 三张图片,又要增加D、E 两张图,则需要调用该接口,photo_list 传入A、B、C、D、E 五张图片的链接。
        /// <param name="timeOut"></param>
        /// <returns></returns>
        public static WxJsonResult UpdatePoi(string accessTokenOrAppId, UpdateStoreData updateStoreData, int timeOut = Config.TIME_OUT)
        {
            return(ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                var url = string.Format(Config.ApiMpHost + "/cgi-bin/poi/updatepoi?access_token={0}", accessToken.AsUrlData());

                return CommonJsonSend.Send <WxJsonResult>(null, url, updateStoreData, CommonJsonSendType.POST, timeOut);
            }, accessTokenOrAppId));
        }
Example #2
0
        public static UpdateStoreResultJson UpdateStore(string accessTokenOrAppId, UpdateStoreData data, int timeOut = Config.TIME_OUT)
        {
            return(ApiHandlerWapper.TryCommonApi(accessToken =>
            {
                var urlFormat = string.Format(Config.ApiMpHost + "/wxa/update_store?access_token={0}", accessToken.AsUrlData());

                return CommonJsonSend.Send <UpdateStoreResultJson>(null, urlFormat, data, timeOut: timeOut);
            }, accessTokenOrAppId));
        }
Example #3
0
        public static async Task <WxJsonResult> UpdatePoiAsync(string accessTokenOrAppId, UpdateStoreData updateStoreData, int timeOut = Config.TIME_OUT)
        {
            return(await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
            {
                var url = string.Format(Config.ApiMpHost + "/cgi-bin/poi/updatepoi?access_token={0}", accessToken.AsUrlData());

                return await Senparc.Weixin.CommonAPIs.CommonJsonSend.SendAsync <WxJsonResult>(null, url, updateStoreData, CommonJsonSendType.POST, timeOut);
            }, accessTokenOrAppId));
        }
Example #4
0
 public static async Task <UpdateStoreJsonResult> UpdateStoreAsync(string accessTokenOrAppId, UpdateStoreData data, int timeOut = Config.TIME_OUT)
 {
     return(await ApiHandlerWapper.TryCommonApiAsync(async accessToken =>
     {
         var url = string.Format(Config.ApiMpHost + "/wxa/update_store?access_token={0}", accessToken.AsUrlData());
         return await CommonJsonSend.SendAsync <UpdateStoreJsonResult>(null, url, data, CommonJsonSendType.POST, timeOut);
     }, accessTokenOrAppId));
 }