2020-04-26 14:57:08 +08:00
|
|
|
|
class CustomMenu {
|
2021-03-02 14:04:51 +08:00
|
|
|
|
String menuId;
|
2020-04-26 14:57:08 +08:00
|
|
|
|
String image;
|
2023-06-14 19:06:10 +08:00
|
|
|
|
String? darkImage;
|
2020-04-26 14:57:08 +08:00
|
|
|
|
String title;
|
2021-03-02 14:04:51 +08:00
|
|
|
|
String type;
|
|
|
|
|
|
|
|
|
|
CustomMenu(this.menuId, this.image, this.title, this.type);
|
2020-04-26 14:57:08 +08:00
|
|
|
|
|
2023-01-11 14:55:08 +08:00
|
|
|
|
Map<String, dynamic> toJson() =>
|
2023-06-14 19:06:10 +08:00
|
|
|
|
{'menuId': menuId, 'image': image, 'darkImage': darkImage, 'title': title, 'type': type};
|
2020-04-26 14:57:08 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class AppletHandler {
|
|
|
|
|
///
|
|
|
|
|
/// 转发小程序
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
void forwardApplet(Map<String, dynamic> appletInfo);
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
///获取用户信息
|
|
|
|
|
/// "userId"
|
|
|
|
|
/// "nickName"
|
|
|
|
|
/// "avatarUrl"
|
|
|
|
|
/// "jwt"
|
|
|
|
|
/// "accessToken"
|
|
|
|
|
///
|
|
|
|
|
Future<Map<String, dynamic>> getUserInfo();
|
|
|
|
|
|
2023-04-07 21:40:02 +08:00
|
|
|
|
/// 是否自定义胶囊里更多按钮的点击事件(该代理方法只对iOS端生效)
|
|
|
|
|
bool customCapsuleMoreButtonClick(String appId);
|
|
|
|
|
|
2020-04-26 14:57:08 +08:00
|
|
|
|
/// 获取自定义菜单
|
|
|
|
|
Future<List<CustomMenu>> getCustomMenus(String appId);
|
|
|
|
|
|
|
|
|
|
///自定义菜单点击处理
|
2021-03-04 16:09:04 +08:00
|
|
|
|
Future<void> onCustomMenuClick(
|
2023-01-11 16:31:12 +08:00
|
|
|
|
String appId, String path, String menuId, String appInfo);
|
2021-10-19 21:26:05 +08:00
|
|
|
|
|
2022-05-18 11:00:32 +08:00
|
|
|
|
///打开小程序
|
2021-10-19 21:26:05 +08:00
|
|
|
|
Future<void> appletDidOpen(String appId);
|
2022-05-18 11:00:32 +08:00
|
|
|
|
|
|
|
|
|
///getMobileNumber
|
|
|
|
|
Future<void> getMobileNumber(Function(dynamic params) param0);
|
2020-04-26 14:57:08 +08:00
|
|
|
|
}
|