/// <summary> /// 设置菜单 /// </summary> /// <returns></returns> public async Task <bool> SetMenu() { var token = ""; var data = _weiXinDb.WeiXinConfigs.FirstOrDefault(p => p.AppId == AppID); if (data.Token_EndDate.HasValue) { if (data.Token_EndDate.Value.AddMinutes(-10) < DateTime.Now) { token = data.Token; } } token = await GetAccess_token(); return(await WeiXinApi.UpdateMenu(token, null)); }
/// <summary> /// 设置菜单 /// </summary> /// <returns></returns> public async Task <bool> SetMenu(object data) { var token = await GetAccess_token(); return(await WeiXinApi.UpdateMenu(token, null)); }