获取按钮改成同步
parent
6749f2fc82
commit
957f14dde5
|
@ -216,7 +216,7 @@ class MyAppletHandler extends AppletHandler {
|
|||
}
|
||||
|
||||
@override
|
||||
Future<List<CustomMenu>> getCustomMenus(String appId) {
|
||||
List<CustomMenu> getCustomMenus(String appId) {
|
||||
CustomMenu menu1 = CustomMenu('WXTest', 'https://img1.baidu.com/it/u=2878938773,1765835171&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500', '百度图标', 'common');
|
||||
menu1.darkImage = 'https://img95.699pic.com/xsj/14/46/mh.jpg%21/fw/700/watermark/url/L3hzai93YXRlcl9kZXRhaWwyLnBuZw/align/southeast';
|
||||
|
||||
|
@ -233,7 +233,7 @@ class MyAppletHandler extends AppletHandler {
|
|||
// CustomMenu('WXShareAPPFriends', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSpvugSNLs9R7iopz_noeotAelvgzYj-74iCg&usqp=CAU', '微信好朋友', 'common'),
|
||||
// CustomMenu('WXShareAPPMoments', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR7cO4KB4e5-Ugdcq4pIyWunliH7LZRZzguKQ&usqp=CAU', '微信朋友圈', 'common'),
|
||||
];
|
||||
return Future.value(customMenus);
|
||||
return customMenus;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -33,7 +33,8 @@ abstract class AppletHandler {
|
|||
bool customCapsuleMoreButtonClick(String appId);
|
||||
|
||||
/// 获取自定义菜单
|
||||
Future<List<CustomMenu>> getCustomMenus(String appId);
|
||||
// Future<List<CustomMenu>> getCustomMenus(String appId);
|
||||
List<CustomMenu> getCustomMenus(String appId);
|
||||
|
||||
///自定义菜单点击处理
|
||||
Future<void> onCustomMenuClick(
|
||||
|
|
|
@ -1181,7 +1181,7 @@ class Mop {
|
|||
return handler.customCapsuleMoreButtonClick(params["appId"]);
|
||||
};
|
||||
_appletHandlerApis["getCustomMenus"] = (params) async {
|
||||
final res = await handler.getCustomMenus(params["appId"]);
|
||||
final res = handler.getCustomMenus(params["appId"]);
|
||||
List<Map<String, dynamic>> list = [];
|
||||
res.forEach((element) {
|
||||
Map<String, dynamic> map = Map();
|
||||
|
|
Loading…
Reference in New Issue