@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 1,
IsActive = true,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""今日歌曲"",
Key = ""V1001_TODAY_MUSIC"",
Type = ClickButtonType.click
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 2,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""我的博客"",
Url = ""http://inday.cnblogs.com"",
Type = ClickButtonType.view
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 3,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""扫码推事件"",
Key = ""rselfmenu_0_1"",
Type = ClickButtonType.scancode_push
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 4,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""扫码带提示"",
Key = ""rselfmenu_0_0"",
Type = ClickButtonType.scancode_waitmsg
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 5,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""系统拍照发图"",
Key = ""rselfmenu_1_0"",
Type = ClickButtonType.pic_sysphoto
}
}
};
var response = _clientExecute(request);";
}})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 6,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""拍照或者相册发图"",
Key = ""rselfmenu_1_1"",
Type = ClickButtonType.pic_photo_or_album
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 7,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""微信相册发图"",
Key = ""rselfmenu_1_2"",
Type = ClickButtonType.pic_weixin
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 8,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""发送位置"",
Key = ""rselfmenu_2_0"",
Type = ClickButtonType.location_select
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 9,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""图片"",
Media_Id = ""MEDIA_ID1"",
Type = ClickButtonType.media_id
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 10,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""图文消息"",
Media_Id = ""MEDIA_ID2"",
Type = ClickButtonType.view_limited
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 11,
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton{
Name = ""小程序"",
Url = ""http://mp.weixin.qq.com"",
MiniProgramAppId = ""wx286b93c14bbf93aa"",
MiniProgramPagePath = ""pages/lunar/index"",
Type = ClickButtonType.miniprogram
}
}
};
var response = _clientExecute(request);";
}
})
@Html.Partial("~/Pages/Partials/CodePartail.cshtml", new SupplierWeb.Pages.Partials.CodePartailModel
{
Index = 12,
ShowTestButtons = true,
Api = "/api/menucreate",
Code = () =>
{
return @"
var request = new MenuCreateRequest
{
AccessToken = AccessToken,
Buttons = new List
{
new ClickButton
{
Type = ClickButtonType.click,
Name = ""关注我"",
Key = ""Key_Follow_Me""
},
new ClickButton
{
Type = ClickButtonType.view,
Url = ""http://inday.cnblogs.com"",
Name = ""我的博客""
},
new ClickButton
{
Name=""主菜单"",
SubButton = new List
{
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""
},
new ClickButton
{
Type = ClickButtonType.miniprogram,
Name = ""我的小程序"",
Url =""http://inday.cnblogs.com"",
MiniProgramAppId = ""wx286b93c14bbf93aa"",
MiniProgramPagePath = ""pages/lunar/index""
}
}
}
}
};
var response = _clientExecute(request);";
}
})