1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using JCSoft.WX.Framework.Api;
- using JCSoft.WX.Framework.Models;
- using JCSoft.WX.Framework.Models.ApiRequests;
- using JCSoft.WX.Framework.Models.ApiResponses;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.Extensions.Caching.Memory;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- namespace SupplierWeb.Controllers
- {
- [Route("api/menuCreate")]
- public class MenuCreateController : BaseApiController<MenuCreateResponse>
- {
- public MenuCreateController(IMemoryCache cache, IApiClient client) : base(cache, client)
- {
- }
- protected override ApiRequest<MenuCreateResponse> GetApiRequest()
- {
- return new MenuCreateRequest
- {
- Buttons = new List<ClickButton>
- {
- //new ClickButton
- //{
- // Type = ClickButtonType.click,
- // Name = "关注我",
- // Key = "Key_Follow_Me"
- //},
- new ClickButton
- {
- Type = ClickButtonType.view,
- Url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdc3ee459a9b8f109&redirect_uri=http://119.27.191.247/web/supplymobile/bindphone&response_type=code&scope=snsapi_base#wechat_redirect",
- Name = "绑定手机号"
- },
- new ClickButton
- {
- Name="主菜单",
- SubButton = new List<ClickButton>
- {
- //new ClickButton
- //{
- // Type = ClickButtonType.scancode_push,
- // Name = "扫一扫",
- // Key = "Event_Scan"
- //},
- //new ClickButton
- //{
- // Type = ClickButtonType.pic_sysphoto,
- // Name = "系统拍照发图",
- // Key = "Event_SysPhoto"
- //},
- //new ClickButton
- //{
- // Type = ClickButtonType.pic_weixin,
- // Name = "微信相册发图",
- // Key = "Event_Pic_WeiXin"
- //},
- new ClickButton
- {
- Type = ClickButtonType.location_select,
- Name = "发送位置",
- Key = "Event_Location_Select"
- }
- }
- }
- },
- AccessToken = AccessToken
- };
- }
- }
- }
|