Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

zybridge

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zybridge - npm Package Compare versions

Comparing version
1.1.12
to
2.0.1
+7
-48
lib/main.d.ts
declare class Bridge {
static CALL_NAME: string;
/**
* 打开我的徽章页面
*/
openMyBadge(): void;
/**
* 打开邀请好友页面
*/
openInviteFriends(): void;
/**
* 关闭去开启设置的弹框
*/
closeToOpen(): void;
/**
* 打开草坪页
*/
openPersonalHomePage(id: string): void;
/**
* 跳转至系统设置页面
*
*/
openSystemMessage(): void;
/**
* 弹出设置对话框
*
*/
openModal(): void;
/**
* 系统通知是否开启
*
*/
checkPushSwitch(): void;
/**
* 查询徽章
*
* @param id badge_id
*/
checkBadge(id: string): void;
/**
* 去首页
*/
openHomePage(): void;
/**
* 去发布
*/
openPublishPage(): void;
/**
* 打开文章详页
* @param id 内容id 兼容1.8.1以下
* @param commentId 评论id
* @param paramenterId 主id
* @param autoShow 是否展开
*/
openContentDetail(commentId: string, paramenterId: string, autoShow: boolean): void;
openContentDetail(id: string, commentId?: string, paramenterId?: string, autoShow?: boolean): void;
/**

@@ -100,3 +59,3 @@ * 打开作品详情

*/
openURL(URL: string, title?: string, isShowModal?: boolean): void;
openURL(URL: string, title?: string): void;
/**

@@ -111,3 +70,3 @@ * 设置 Webview 标题

*/
eventRegisterAsyn(name: string, fn: (val?: any) => void): void;
eventRegisterAsyn(name: string, fn: () => void): void;
/**

@@ -114,0 +73,0 @@ * 事件监听同步步

@@ -7,95 +7,15 @@ import core from './core';

/**
* 打开我的徽章页面
*/
Bridge.prototype.openMyBadge = function () {
return this.openPage({
pageType: PageType.OPEN_MY_BADGE
});
};
/**
* 打开邀请好友页面
*/
Bridge.prototype.openInviteFriends = function () {
return this.openPage({
pageType: PageType.OPEN_INVITE_FRIENDS
});
};
/**
* 关闭去开启设置的弹框
*/
Bridge.prototype.closeToOpen = function () {
return this.call({
actionType: ActionType.CLOST_TO_OPEN
});
};
/**
* 打开草坪页
*/
Bridge.prototype.openPersonalHomePage = function (id) {
return this.openPage({
pageType: PageType.PERSONAL_HOME_PAGE,
args: { id: id }
});
};
/**
* 跳转至系统设置页面
*
*/
Bridge.prototype.openSystemMessage = function () {
return this.call({
actionType: ActionType.OPEN_SYSTEM_MESSAGE
});
};
/**
* 弹出设置对话框
*
*/
Bridge.prototype.openModal = function () {
return this.call({
actionType: ActionType.OPEN_MODAL
});
};
/**
* 系统通知是否开启
*
*/
Bridge.prototype.checkPushSwitch = function () {
return this.call({
actionType: ActionType.CHECK_PUSH_SWITCH
});
};
/**
* 查询徽章
*
* @param id badge_id
*/
Bridge.prototype.checkBadge = function (id) {
return this.call({
actionType: ActionType.CHECK_BADGE,
options: { id: id }
});
};
/**
* 去首页
*/
Bridge.prototype.openHomePage = function () {
return this.openPage({
pageType: PageType.HOME_PAGE
});
};
/**
* 去发布
*/
Bridge.prototype.openPublishPage = function () {
return this.openPage({
pageType: PageType.PUBLISH_PAGE
});
};
/**
* 打开文章详页
* @param id 内容id 兼容1.8.1以下
* @param commentId 评论id
* @param paramenterId 主id
* @param autoShow 是否展开
*/
Bridge.prototype.openContentDetail = function (commentId, paramenterId, autoShow) {
Bridge.prototype.openContentDetail = function (id, commentId, paramenterId, autoShow) {
var args = id
? { id: commentId }
: { comment_id: commentId, paramenter_id: paramenterId, auto_show: autoShow };
return this.openPage({
pageType: PageType.CONTENT_PAGE,
args: { comment_id: commentId, paramenter_id: paramenterId, auto_show: autoShow }
args: args
});

@@ -188,6 +108,6 @@ };

*/
Bridge.prototype.openURL = function (URL, title, isShowModal) {
Bridge.prototype.openURL = function (URL, title) {
return this.call({
actionType: ActionType.OPEN_URL,
options: { URL: URL, title: title, isShowModal: isShowModal }
options: { URL: URL, title: title }
});

@@ -194,0 +114,0 @@ };

@@ -10,8 +10,3 @@ export declare enum PageType {

PRODUCT_COMMENT_PAGE = 7,
REFUND_DETAILS_PAGE = 8,
HOME_PAGE = 9,
PUBLISH_PAGE = 10,
PERSONAL_HOME_PAGE = 11,
OPEN_INVITE_FRIENDS = 12,
OPEN_MY_BADGE = 13
REFUND_DETAILS_PAGE = 8
}

@@ -22,8 +17,3 @@ export declare enum ActionType {

SET_TITLE = 2,
CLOSE = 3,
CHECK_BADGE = 4,
CHECK_PUSH_SWITCH = 5,
OPEN_MODAL = 6,
OPEN_SYSTEM_MESSAGE = 7,
CLOST_TO_OPEN = 8
CLOSE = 3
}

@@ -45,3 +35,2 @@ export interface IOpenPageOptions {

title?: string;
isShowModal?: boolean;
};

@@ -58,21 +47,3 @@ }

}
export interface ICheckBadgeParams {
actionType: ActionType.CHECK_BADGE;
options: {
id: string;
};
}
export interface ICheckPushSwitchParams {
actionType: ActionType.CHECK_PUSH_SWITCH;
}
export interface IOpenModal {
actionType: ActionType.OPEN_MODAL;
}
export interface IOpenSystemParams {
actionType: ActionType.OPEN_SYSTEM_MESSAGE;
}
export interface ICloseToOpenParams {
actionType: ActionType.CLOST_TO_OPEN;
}
export declare type ICallParams = IOpenURLParams | IOpenPageParams | ICloseParams | ISetTitleParams | ICheckBadgeParams | ICheckPushSwitchParams | IOpenModal | IOpenSystemParams | ICloseToOpenParams;
export declare type ICallParams = IOpenURLParams | IOpenPageParams | ICloseParams | ISetTitleParams;
export declare type IBaseResp = {

@@ -79,0 +50,0 @@ status: true;

@@ -12,7 +12,2 @@ export var PageType;

PageType[PageType["REFUND_DETAILS_PAGE"] = 8] = "REFUND_DETAILS_PAGE";
PageType[PageType["HOME_PAGE"] = 9] = "HOME_PAGE";
PageType[PageType["PUBLISH_PAGE"] = 10] = "PUBLISH_PAGE";
PageType[PageType["PERSONAL_HOME_PAGE"] = 11] = "PERSONAL_HOME_PAGE";
PageType[PageType["OPEN_INVITE_FRIENDS"] = 12] = "OPEN_INVITE_FRIENDS";
PageType[PageType["OPEN_MY_BADGE"] = 13] = "OPEN_MY_BADGE";
})(PageType || (PageType = {}));

@@ -25,7 +20,2 @@ export var ActionType;

ActionType[ActionType["CLOSE"] = 3] = "CLOSE";
ActionType[ActionType["CHECK_BADGE"] = 4] = "CHECK_BADGE";
ActionType[ActionType["CHECK_PUSH_SWITCH"] = 5] = "CHECK_PUSH_SWITCH";
ActionType[ActionType["OPEN_MODAL"] = 6] = "OPEN_MODAL";
ActionType[ActionType["OPEN_SYSTEM_MESSAGE"] = 7] = "OPEN_SYSTEM_MESSAGE";
ActionType[ActionType["CLOST_TO_OPEN"] = 8] = "CLOST_TO_OPEN";
})(ActionType || (ActionType = {}));
+1
-1
{
"name": "zybridge",
"version": "1.1.12",
"version": "2.0.1",
"main": "lib/main.js",

@@ -5,0 +5,0 @@ "typings": "lib/main.d.ts",