Ejemplo n.º 1
0
        public bool DeletePoi(string poiId)
        {
            WxJsonResult wxJsonResult = PoiApi.DeletePoi(_accessToken, poiId, 10000);

            if (wxJsonResult.errcode == (ReturnCode.获取access_token时AppSecret错误或者access_token无效 | ReturnCode.合法的凭证类型 | ReturnCode.合法的OpenID | ReturnCode.合法的按钮个数1 | ReturnCode.合法的按钮个数2 | ReturnCode.合法的按钮名字长度 | ReturnCode.合法的按钮KEY长度 | ReturnCode.access_token超时 | ReturnCode.refresh_token超时 | ReturnCode.oauth_code超时 | ReturnCode.客服帐号个数超过限制 | ReturnCode.无效头像文件类型invalid_file_type) || wxJsonResult.errcode == ReturnCode.系统繁忙此时请开发者稍候再试)
            {
                throw new HimallException("系统繁忙,请稍后尝试!");
            }
            if (wxJsonResult.errcode != ReturnCode.请求成功)
            {
                throw new Exception(wxJsonResult.errmsg);
            }
            return(true);
        }
Ejemplo n.º 2
0
        public bool DeletePoi(string poiId)
        {
            var result = PoiApi.DeletePoi(this._accessToken, poiId);

            if ((int)result.errcode == 65107 || result.errcode == Senparc.Weixin.ReturnCode.系统繁忙此时请开发者稍候再试)
            {
                throw new HimallException("系统繁忙,请稍后尝试!");
            }
            else if (result.errcode == 0)
            {
                return(true);
            }
            else
            {
                throw new Exception(result.errmsg);
            }
        }
Ejemplo n.º 3
0
 public static WxJsonResult DeleteWXStore(string poiId)
 {
     return(PoiApi.DeletePoi(WXStoreHelper.siteSettings.WeixinAppId, poiId, 10000));
 }