jmash-core-mp 0.1.64 → 0.1.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/lib/api/auth/index.d.ts +2 -1
  2. package/lib/api/auth/index.js +12 -0
  3. package/lib/api/auth/types.d.ts +4 -0
  4. package/lib/index.d.ts +1 -1
  5. package/lib/utils/config.js +2 -0
  6. package/package.json +1 -1
  7. package/src/api/auth/index.ts +14 -0
  8. package/src/api/auth/types.ts +8 -0
  9. package/src/index.ts +1 -0
  10. package/src/utils/config.ts +2 -0
  11. package/lib/components/cms/jmash-cms-activity-item.mpx.d.ts +0 -1
  12. package/lib/components/cms/jmash-cms-activity-list.mpx.d.ts +0 -1
  13. package/lib/components/cms/jmash-cms-article-item.mpx.d.ts +0 -1
  14. package/lib/components/cms/jmash-cms-article-list.mpx.d.ts +0 -1
  15. package/lib/components/cms/jmash-cms-article-view.mpx.d.ts +0 -1
  16. package/lib/components/cms/jmash-cms-article.mpx.d.ts +0 -1
  17. package/lib/components/cms/jmash-cms-like.mpx.d.ts +0 -1
  18. package/lib/components/cms/jmash-cms-location-list.mpx.d.ts +0 -1
  19. package/lib/components/cms/jmash-cms-location.mpx.d.ts +0 -1
  20. package/lib/components/cms/jmash-cms-product-item.mpx.d.ts +0 -1
  21. package/lib/components/cms/jmash-cms-product-list.mpx.d.ts +0 -1
  22. package/lib/components/common/jmash-none-data.mpx.d.ts +0 -1
  23. package/lib/components/common/jmash-search.mpx.d.ts +0 -1
  24. package/lib/components/common/jmash-top-navigation.mpx.d.ts +0 -1
  25. package/lib/components/core/jmash-login.mpx.d.ts +0 -1
  26. package/lib/components/organ/browser-organ-list.mpx.d.ts +0 -1
  27. package/lib/components/organ/my-organ-list.mpx.d.ts +0 -1
  28. package/lib/components/organ/organ-item.mpx.d.ts +0 -1
  29. package/lib/components/organ/organ-search.mpx.d.ts +0 -1
  30. package/lib/components/shop/branch-item.mpx.d.ts +0 -1
  31. package/lib/components/shop/branch-search.mpx.d.ts +0 -1
  32. package/lib/components/shop/shop-item.mpx.d.ts +0 -1
  33. package/lib/components/shop/shop-search.mpx.d.ts +0 -1
  34. package/lib/components/shop/shop-selected-item.mpx.d.ts +0 -1
  35. package/lib/packages/pages/auth/setting-page.mpx.d.ts +0 -1
  36. package/lib/packages/pages/cms/cms-activity-list.mpx.d.ts +0 -1
  37. package/lib/packages/pages/cms/cms-article-list.mpx.d.ts +0 -1
  38. package/lib/packages/pages/cms/cms-location-list.mpx.d.ts +0 -1
  39. package/lib/packages/pages/cms/cms-product-list.mpx.d.ts +0 -1
  40. package/lib/pages/branch-search.mpx.d.ts +0 -1
  41. package/lib/pages/organ-search.mpx.d.ts +0 -1
  42. package/lib/pages/organ.mpx.d.ts +0 -1
  43. package/lib/pages/shop-search.mpx.d.ts +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ResponseData } from "../../api/types";
2
- import type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo } from "./types";
2
+ import type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo, GzhSubscribeCheckReq } from "./types";
3
3
  declare class AuthApi {
4
4
  mpLogin(data: LoginReq): Promise<ResponseData<LoginRes>>;
5
5
  mpPhoneRegister(data: PhoneRegisterReq): Promise<ResponseData<LoginRes>>;
@@ -16,6 +16,7 @@ declare class AuthApi {
16
16
  jobTree(jobId?: string, tenant?: string): Promise<ResponseData<any[]>>;
17
17
  updateUserInfo(data: UpdateUserReq): Promise<ResponseData<UserInfo>>;
18
18
  findUserInfo(data: UserInfoReq): Promise<ResponseData<UserInfo>>;
19
+ findUserIsSubscribe(data: GzhSubscribeCheckReq): Promise<ResponseData<any>>;
19
20
  }
20
21
  export declare const authApi: AuthApi;
21
22
  export {};
@@ -195,5 +195,17 @@ class AuthApi {
195
195
  data,
196
196
  });
197
197
  }
198
+ // 判断当前用户是否关注某公众号
199
+ findUserIsSubscribe(data) {
200
+ const config = getApp().globalData.config;
201
+ data.tenant = config.tenant;
202
+ grpc.clearEmpty(data);
203
+ return mpx.xfetch.fetch({
204
+ url: `/v1/front/rbac/gzh/subscribe/${data.tenant}`,
205
+ method: "GET",
206
+ data,
207
+ header: { "grpc-metadata-tenant": data.tenant },
208
+ });
209
+ }
198
210
  }
199
211
  export const authApi = new AuthApi();
@@ -84,3 +84,7 @@ export interface UpdateUserReq {
84
84
  export interface UserInfoReq {
85
85
  tenant?: string;
86
86
  }
87
+ export interface GzhSubscribeCheckReq {
88
+ tenant?: string;
89
+ appId: string;
90
+ }
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { AppConfig, ResponseData, ValidateData, EventBase, EventTarget, CanvasResponse, } from "./api/types";
2
- export type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo, } from "./api/auth/types";
2
+ export type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo, GzhSubscribeCheckReq, } from "./api/auth/types";
3
3
  export type { CmsSiteList, CmsChannelReq, CmsChannelList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoModel, CmsInfoContentModel, CmsChannelModel, } from "./api/cms/types";
4
4
  export type { Entry, DictEntryModel, DictEntryLayModel, } from "./api/dict/types";
5
5
  export { EntryDict, EnumDict, EntryLayDict, CustomBizDict } from "./api/dicts";
@@ -14,6 +14,8 @@ const defaultConfig = {
14
14
  siteTenant: "xyvcard",
15
15
  siteId: "c0a28f0f-023a-420b-b4e8-0ce138ac8269",
16
16
  socketBaseUrl: `wss://mm.sooyie.cn/websocket`,
17
+ // 公众号APPID-索易科技
18
+ officialAccountId: "wx2ec7549343d60f3a",
17
19
  };
18
20
  const config = { ...defaultConfig };
19
21
  function setConfig(cfg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core-mp",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -11,6 +11,7 @@ import type {
11
11
  UpdateUserReq,
12
12
  UserInfoReq,
13
13
  UserInfo,
14
+ GzhSubscribeCheckReq,
14
15
  } from "./types";
15
16
  import { db } from "../../utils/db";
16
17
  import { grpc } from "../../utils/grpc";
@@ -222,6 +223,19 @@ class AuthApi {
222
223
  data,
223
224
  });
224
225
  }
226
+
227
+ // 判断当前用户是否关注某公众号
228
+ findUserIsSubscribe(data: GzhSubscribeCheckReq): Promise<ResponseData<any>> {
229
+ const config = getApp().globalData.config;
230
+ data.tenant = config.tenant;
231
+ grpc.clearEmpty(data);
232
+ return mpx.xfetch.fetch({
233
+ url: `/v1/front/rbac/gzh/subscribe/${data.tenant}`,
234
+ method: "GET",
235
+ data,
236
+ header: { "grpc-metadata-tenant": data.tenant },
237
+ });
238
+ }
225
239
  }
226
240
 
227
241
  export const authApi = new AuthApi();
@@ -164,3 +164,11 @@ export interface UserInfoReq {
164
164
  // 租户
165
165
  tenant?: string;
166
166
  }
167
+
168
+ // 判断当前用户是否关注某公众号请求
169
+ export interface GzhSubscribeCheckReq {
170
+ // 租户
171
+ tenant?: string;
172
+ // 公众号APPID
173
+ appId: string
174
+ }
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ export type {
17
17
  UpdateUserReq,
18
18
  UserInfoReq,
19
19
  UserInfo,
20
+ GzhSubscribeCheckReq,
20
21
  } from "./api/auth/types";
21
22
  export type {
22
23
  CmsSiteList,
@@ -16,6 +16,8 @@ const defaultConfig: AppConfig = {
16
16
  siteTenant: "xyvcard",
17
17
  siteId: "c0a28f0f-023a-420b-b4e8-0ce138ac8269",
18
18
  socketBaseUrl: `wss://mm.sooyie.cn/websocket`,
19
+ // 公众号APPID-索易科技
20
+ officialAccountId: "wx2ec7549343d60f3a",
19
21
  };
20
22
 
21
23
  const config: AppConfig = { ...defaultConfig };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};