Skip to content

Commit 0aded82

Browse files
authored
Merge pull request #95 from jpush/dev
Dev
2 parents b166833 + 5ab8bac commit 0aded82

32 files changed

+957
-159
lines changed

ionic/example/config.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@
8989
<allow-navigation href="http://192.168.11.141:8100" />
9090
<allow-navigation href="http://192.168.8.167:8100" />
9191
<allow-navigation href="http://192.168.8.222:8100" />
92+
<allow-navigation href="http://192.168.10.171:8100" />
93+
<allow-navigation href="http://192.168.8.18:8100" />
94+
<engine name="android" spec="^7.0.0" />
9295
<engine name="ios" spec="^4.5.4" />
9396
<plugin name="cordova-plugin-camera" spec="^4.0.3" />
94-
<plugin name="cordova-plugin-device" spec="^1.1.4" />
97+
<plugin name="cordova-plugin-device" spec="^2.0.2" />
9598
<plugin name="cordova-plugin-file" spec="^6.0.1" />
9699
<plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
97100
<plugin name="cordova-plugin-media" spec="^5.0.2">
@@ -100,10 +103,7 @@
100103
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
101104
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
102105
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
103-
<engine name="android" spec="~7.0.0" />
104-
<plugin name="jmessage-phonegap-plugin" spec="/Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin">
106+
<plugin name="jmessage-phonegap-plugin" spec="file:///Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin">
105107
<variable name="APP_KEY" value="a1703c14b186a68a66ef86c1" />
106108
</plugin>
107-
<allow-navigation href="http://192.168.10.171:8100" />
108-
<allow-navigation href="http://192.168.8.18:8100" />
109109
</widget>

ionic/example/ionic.config.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "jmessageIonic",
3-
"app_id": "",
4-
"type": "ionic-angular",
53
"integrations": {
64
"cordova": {}
7-
}
8-
}
5+
},
6+
"type": "ionic-angular"
7+
}

ionic/example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@
3131
"cordova-android": "^7.0.0",
3232
"cordova-ios": "^4.5.4",
3333
"cordova-plugin-camera": "^4.0.3",
34-
"cordova-plugin-device": "^1.1.4",
34+
"cordova-plugin-device": "^2.0.2",
3535
"cordova-plugin-file": "^6.0.1",
3636
"cordova-plugin-ionic-webview": "^1.2.1",
37-
"cordova-plugin-jcore": "^1.2.0",
37+
"cordova-plugin-jcore": "^1.2.6",
3838
"cordova-plugin-media": "^5.0.2",
3939
"cordova-plugin-splashscreen": "^4.0.3",
4040
"cordova-plugin-whitelist": "^1.3.1",
4141
"ionic-angular": "3.9.2",
4242
"ionic-plugin-keyboard": "^2.2.1",
4343
"ionicons": "3.0.0",
44-
"jmessage-phonegap-plugin": "3.4.7",
44+
"jmessage-phonegap-plugin": "file:///Users/HuminiOS/Desktop/workproject/jmessage-phonegap-plugin",
4545
"rxjs": "5.5.2",
4646
"sw-toolbox": "3.6.0",
4747
"zone.js": "0.8.18"

ionic/index.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ export interface JMUserInfo {
186186
extras?: { [key: string]: string; }; // 自定义键值对
187187
};
188188

189+
export interface JMGroupMemberInfo {
190+
user: JMUserInfo; // 群用户详情
191+
groupNickname: string; // 用户的群昵称
192+
memberType: 'owner' | 'admin' | 'ordinary'; // 用户类型
193+
joinGroupTime: number; // 用户入群时间(单位:毫秒)
194+
}
195+
189196
export interface JMGroupInfo {
190197
type: 'group';
191198
id: string; // 群组 id
@@ -613,7 +620,7 @@ export class JMessagePlugin extends IonicNativePlugin {
613620
@Cordova()
614621
getGroupMembers(params: {
615622
id: string;
616-
}): Promise<any> {
623+
}): Promise<JMGroupMemberInfo[]> {
617624
return;
618625
}
619626

@@ -762,7 +769,50 @@ export class JMessagePlugin extends IonicNativePlugin {
762769
return;
763770
}
764771

772+
@Cordova()
773+
transferGroupOwner(params: {
774+
groupId: string;
775+
username: string;
776+
appKey?: string;
777+
}): Promise<any> {
778+
return;
779+
}
780+
781+
@Cordova()
782+
setGroupMemberSilence(params: {
783+
groupId: string;
784+
isSilence: boolean;
785+
username: string;
786+
appKey?: string;
787+
}): Promise<any> {
788+
return;
789+
}
765790

791+
@Cordova()
792+
isSilenceMember(params: {
793+
groupId: string;
794+
username: string;
795+
appKey?: string;
796+
}): Promise<any> {
797+
return;
798+
}
799+
800+
@Cordova()
801+
groupSilenceMembers(params: {
802+
groupId: string;
803+
}): Promise<any> {
804+
return;
805+
}
806+
807+
@Cordova()
808+
setGroupNickname(params: {
809+
groupId: string;
810+
nickName: string;
811+
username: string;
812+
appKey?: string;
813+
}): Promise<any> {
814+
return;
815+
}
766816

767817
/**
768818
* TODO:

ionic/jmessage/index.d.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ export interface JMUserInfo {
149149
[key: string]: string;
150150
};
151151
}
152+
export interface JMGroupMemberInfo {
153+
user: JMUserInfo;
154+
groupNickname: string;
155+
memberType: 'owner' | 'admin' | 'ordinary';
156+
joinGroupTime: number;
157+
}
152158
export interface JMGroupInfo {
153159
type: 'group';
154160
id: string;
@@ -403,7 +409,7 @@ export declare class JMessagePlugin extends IonicNativePlugin {
403409
}): Promise<any>;
404410
getGroupMembers(params: {
405411
id: string;
406-
}): Promise<any>;
412+
}): Promise<JMGroupMemberInfo[]>;
407413
addUsersToBlacklist(params: {
408414
usernameArray: string[];
409415
appKey?: string;
@@ -456,6 +462,31 @@ export declare class JMessagePlugin extends IonicNativePlugin {
456462
getConversation(params: JMAllType): Promise<any>;
457463
getConversations(): Promise<any>;
458464
resetUnreadMessageCount(params: JMAllType): Promise<any>;
465+
transferGroupOwner(params: {
466+
groupId: string;
467+
username: string;
468+
appKey?: string;
469+
}): Promise<any>;
470+
setGroupMemberSilence(params: {
471+
groupId: string;
472+
isSilence: boolean;
473+
username: string;
474+
appKey?: string;
475+
}): Promise<any>;
476+
isSilenceMember(params: {
477+
groupId: string;
478+
username: string;
479+
appKey?: string;
480+
}): Promise<any>;
481+
groupSilenceMembers(params: {
482+
groupId: string;
483+
}): Promise<any>;
484+
setGroupNickname(params: {
485+
groupId: string;
486+
nickName: string;
487+
username: string;
488+
appKey?: string;
489+
}): Promise<any>;
459490
/**
460491
* TODO:
461492
*

ionic/jmessage/index.js

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ionic/jmessage/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ionic/jmessage/index.metadata.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ionic/jmessage/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jiguang-ionic/jmessage",
3-
"version": "4.7.0",
3+
"version": "2.0.0",
44
"description": "Ionic Native - Native plugins for ionic apps",
55
"module": "index.js",
66
"typings": "index.d.ts",
@@ -9,7 +9,8 @@
99
"peerDependencies": {
1010
"@ionic-native/core": "^4.2.0",
1111
"@angular/core": "*",
12-
"rxjs": "^5.0.1"
12+
"rxjs": "^5.0.1",
13+
"jmessage-phonegap-plugin": ">= 4.0.0"
1314
},
1415
"repository": {
1516
"type": "git",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jmessage-phonegap-plugin",
3-
"version": "3.6.0",
3+
"version": "4.0.1",
44
"description": "JMessage Cordova Plugin.",
55
"cordova": {
66
"id": "jmessage-phonegap-plugin",

0 commit comments

Comments
 (0)