jmash-core-mp 0.1.76 → 0.1.78
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.
- package/.editorconfig +9 -9
- package/.gitignore +8 -0
- package/.npmignore +44 -0
- package/README.md +60 -60
- package/babel.config.json +34 -34
- package/eslint.config.mjs +7 -7
- package/lib/api/auth/index.d.ts +22 -22
- package/lib/api/auth/index.js +211 -211
- package/lib/api/auth/types.d.ts +90 -90
- package/lib/api/auth/types.js +9 -9
- package/lib/api/cms/index.d.ts +20 -20
- package/lib/api/cms/index.js +161 -161
- package/lib/api/cms/types.d.ts +201 -201
- package/lib/api/cms/types.js +1 -1
- package/lib/api/constant.d.ts +6 -6
- package/lib/api/constant.js +8 -8
- package/lib/api/dict/index.d.ts +24 -24
- package/lib/api/dict/index.js +51 -51
- package/lib/api/dict/types.d.ts +40 -40
- package/lib/api/dict/types.js +1 -1
- package/lib/api/dicts.d.ts +32 -32
- package/lib/api/dicts.js +118 -118
- package/lib/api/files/index.d.ts +25 -25
- package/lib/api/files/index.js +134 -134
- package/lib/api/files/types.d.ts +38 -38
- package/lib/api/files/types.js +1 -1
- package/lib/api/index.d.ts +5 -5
- package/lib/api/index.js +8 -8
- package/lib/api/myorgan/index.d.ts +8 -8
- package/lib/api/myorgan/index.js +24 -24
- package/lib/api/myorgan/types.d.ts +22 -22
- package/lib/api/myorgan/types.js +1 -1
- package/lib/api/region/index.d.ts +7 -7
- package/lib/api/region/index.js +20 -20
- package/lib/api/region/types.d.ts +19 -19
- package/lib/api/region/types.js +1 -1
- package/lib/api/shop/index.d.ts +11 -11
- package/lib/api/shop/index.js +53 -53
- package/lib/api/shop/types.d.ts +123 -123
- package/lib/api/shop/types.js +1 -1
- package/lib/api/storage/index.d.ts +11 -11
- package/lib/api/storage/index.js +53 -53
- package/lib/api/storage/types.d.ts +39 -39
- package/lib/api/storage/types.js +1 -1
- package/lib/api/types.d.ts +43 -43
- package/lib/api/types.js +1 -1
- package/lib/components/organ/browser-organ-list.mpx.d.ts +1 -1
- package/lib/components/organ/my-organ-list.mpx.d.ts +1 -1
- package/lib/components/{auth-user/jmash-update-user.mpx.d.ts → organ/organ-search.mpx.d.ts} +1 -1
- package/lib/components/{auth-user/jmash-user.mpx.d.ts → shop/branch-search.mpx.d.ts} +1 -1
- package/lib/components/{core/jmash-login.mpx.d.ts → shop/shop-search.mpx.d.ts} +1 -1
- package/lib/index.d.ts +28 -28
- package/lib/index.js +23 -23
- package/lib/{packages/pages/auth/setting-page.mpx.d.ts → pages/branch-search.mpx.d.ts} +1 -1
- package/lib/pages/organ-search.mpx.d.ts +1 -0
- package/lib/pages/organ.mpx.d.ts +1 -1
- package/lib/pages/shop-search.mpx.d.ts +1 -0
- package/lib/store/organ.d.ts +19 -19
- package/lib/store/organ.js +83 -83
- package/lib/store/shop.d.ts +18 -18
- package/lib/store/shop.js +104 -104
- package/lib/store/user.d.ts +35 -35
- package/lib/store/user.js +243 -243
- package/lib/utils/common.d.ts +37 -35
- package/lib/utils/common.js +178 -165
- package/lib/utils/config.d.ts +5 -5
- package/lib/utils/config.js +36 -36
- package/lib/utils/db.d.ts +52 -52
- package/lib/utils/db.js +202 -202
- package/lib/utils/grpc.d.ts +5 -5
- package/lib/utils/grpc.js +20 -20
- package/lib/utils/net.d.ts +7 -7
- package/lib/utils/net.js +15 -15
- package/lib/utils/request.d.ts +2 -2
- package/lib/utils/request.js +114 -114
- package/lib/utils/share.d.ts +16 -16
- package/lib/utils/share.js +196 -196
- package/mpx.config.js +38 -38
- package/package.json +1 -1
- package/pnpm-workspace.yaml +5 -0
- package/postcss.config.js +11 -11
- package/project.config.json +24 -24
- package/project.private.config.json +13 -13
- package/public/index.html +15 -15
- package/src/api/auth/index.ts +241 -241
- package/src/api/auth/types.ts +173 -173
- package/src/api/cms/index.ts +218 -218
- package/src/api/cms/types.ts +385 -385
- package/src/api/constant.ts +8 -8
- package/src/api/dict/index.ts +68 -68
- package/src/api/dict/types.ts +73 -73
- package/src/api/dicts.ts +132 -132
- package/src/api/files/index.ts +162 -162
- package/src/api/files/types.ts +67 -67
- package/src/api/index.ts +15 -15
- package/src/api/myorgan/index.ts +29 -29
- package/src/api/myorgan/types.ts +42 -42
- package/src/api/region/index.ts +24 -24
- package/src/api/region/types.ts +36 -36
- package/src/api/shop/index.ts +74 -74
- package/src/api/shop/types.ts +244 -244
- package/src/api/storage/index.ts +74 -74
- package/src/api/storage/types.ts +74 -74
- package/src/api/types.ts +74 -74
- package/src/app.mpx +78 -78
- package/src/components/auth-user/jmash-logout.mpx +93 -93
- package/src/components/auth-user/jmash-update-user.mpx +387 -387
- package/src/components/auth-user/jmash-update-user.web.mpx +367 -367
- package/src/components/auth-user/jmash-user.mpx +310 -310
- package/src/components/cms/jmash-cms-activity-item.mpx +207 -207
- package/src/components/cms/jmash-cms-activity-list.mpx +357 -357
- package/src/components/cms/jmash-cms-article-item.mpx +221 -221
- package/src/components/cms/jmash-cms-article-list.mpx +248 -248
- package/src/components/cms/jmash-cms-article-view.mpx +131 -131
- package/src/components/cms/jmash-cms-article.mpx +231 -231
- package/src/components/cms/jmash-cms-like.mpx +151 -151
- package/src/components/cms/jmash-cms-location-list.mpx +286 -286
- package/src/components/cms/jmash-cms-location.mpx +256 -256
- package/src/components/cms/jmash-cms-product-item.mpx +185 -185
- package/src/components/cms/jmash-cms-product-list.mpx +230 -230
- package/src/components/common/jmash-avatar-edit.mpx +154 -154
- package/src/components/common/jmash-cascader-region.mpx +118 -118
- package/src/components/common/jmash-cell-group.mpx +206 -206
- package/src/components/common/jmash-code-interest-popup.mpx +223 -223
- package/src/components/common/jmash-form-cell.mpx +491 -525
- package/src/components/common/jmash-menu.mpx +129 -129
- package/src/components/common/jmash-none-data.mpx +95 -95
- package/src/components/common/jmash-pic-swiper.mpx +72 -72
- package/src/components/common/jmash-popup.mpx +138 -138
- package/src/components/common/jmash-search.mpx +130 -130
- package/src/components/common/jmash-single-btn.mpx +53 -53
- package/src/components/common/jmash-stepper.mpx +236 -236
- package/src/components/common/jmash-swipe-cell.mpx +153 -153
- package/src/components/common/jmash-tab-bar.mpx +58 -58
- package/src/components/common/jmash-textarea.mpx +88 -88
- package/src/components/common/jmash-top-navigation.mpx +203 -203
- package/src/components/common/jmash-upload-picture.mpx +199 -199
- package/src/components/core/jmash-cms-protocol.mpx +72 -72
- package/src/components/core/jmash-login.ali.mpx +284 -284
- package/src/components/core/jmash-login.mpx +378 -378
- package/src/components/core/jmash-login.web.mpx +420 -420
- package/src/components/core/jmash-popup-login.ali.mpx +312 -312
- package/src/components/core/jmash-popup-login.mpx +414 -416
- package/src/components/core/jmash-popup-login.web.mpx +389 -389
- package/src/components/organ/browser-organ-list.mpx +66 -66
- package/src/components/organ/my-organ-list.mpx +67 -67
- package/src/components/organ/organ-item.mpx +124 -124
- package/src/components/organ/organ-search.mpx +148 -148
- package/src/components/organ/organ-selected-item.mpx +88 -88
- package/src/components/shop/branch-item.mpx +111 -111
- package/src/components/shop/branch-search.mpx +142 -142
- package/src/components/shop/shop-item.mpx +112 -112
- package/src/components/shop/shop-search.mpx +142 -142
- package/src/components/shop/shop-selected-item.mpx +89 -89
- package/src/custom-tab-bar/index.mpx +10 -10
- package/src/global.d.ts +11 -11
- package/src/index.ts +94 -94
- package/src/packages/index.mpx +16 -16
- package/src/packages/pages/auth/cms-protocol.mpx +35 -35
- package/src/packages/pages/auth/login.mpx +62 -62
- package/src/packages/pages/auth/setting-page.mpx +134 -134
- package/src/packages/pages/auth/update-user.mpx +17 -17
- package/src/packages/pages/cms/cms-activity-list.mpx +86 -86
- package/src/packages/pages/cms/cms-article-list.mpx +88 -88
- package/src/packages/pages/cms/cms-article.mpx +32 -32
- package/src/packages/pages/cms/cms-location-list.mpx +83 -83
- package/src/packages/pages/cms/cms-location.mpx +32 -32
- package/src/packages/pages/cms/cms-product-list.mpx +88 -88
- package/src/packages/pages/share/scan.mpx +103 -103
- package/src/pages/basic-component.mpx +30 -30
- package/src/pages/branch-search.mpx +60 -60
- package/src/pages/half-home.mpx +58 -58
- package/src/pages/home.mpx +54 -54
- package/src/pages/home2.mpx +45 -45
- package/src/pages/index.mpx +43 -43
- package/src/pages/organ-search.mpx +60 -60
- package/src/pages/organ.mpx +105 -105
- package/src/pages/shop-search.mpx +60 -60
- package/src/pages/tabbar/home.mpx +114 -114
- package/src/pages/tabbar/mall.mpx +87 -87
- package/src/pages/tabbar/my.mpx +79 -79
- package/src/pages/tabbar/organ.mpx +86 -86
- package/src/store/organ.ts +100 -100
- package/src/store/shop.ts +130 -130
- package/src/store/user.ts +288 -288
- package/src/styles/index.scss +20 -20
- package/src/styles/vars.scss +27 -27
- package/src/utils/common.ts +196 -178
- package/src/utils/config.ts +43 -43
- package/src/utils/db.ts +229 -229
- package/src/utils/grpc.ts +21 -21
- package/src/utils/net.ts +18 -18
- package/src/utils/request.ts +126 -126
- package/src/utils/share.ts +194 -194
- package/static/ali/mini.project.json +4 -4
- package/static/dd/project.config.json +15 -15
- package/static/swan/project.swan.json +14 -14
- package/static/tt/project.config.json +11 -11
- package/static/wx/project.config.json +40 -40
- package/uno.config.js +9 -9
- package/lib/packages/pages/share/scan.mpx.d.ts +0 -1
package/lib/api/files/types.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 文件API类型声明
|
|
3
|
-
*/
|
|
4
|
-
export interface FileInfo {
|
|
5
|
-
fileId: string;
|
|
6
|
-
fileSrc: string;
|
|
7
|
-
contentType: string;
|
|
8
|
-
fileExt: string;
|
|
9
|
-
fileWidth: number;
|
|
10
|
-
fileHeight: number;
|
|
11
|
-
fileSize: number;
|
|
12
|
-
hashSha256: string;
|
|
13
|
-
hashSm3: string;
|
|
14
|
-
createDate: string;
|
|
15
|
-
tempFilePath: string;
|
|
16
|
-
}
|
|
17
|
-
export interface FileBase64Req {
|
|
18
|
-
tenant?: string;
|
|
19
|
-
base64?: string;
|
|
20
|
-
fileName?: string;
|
|
21
|
-
contentType?: string;
|
|
22
|
-
fileDir?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface FileDownInfo {
|
|
25
|
-
tempFilePath: string;
|
|
26
|
-
filePath: string;
|
|
27
|
-
statusCode: number;
|
|
28
|
-
}
|
|
29
|
-
export interface FileWebReq {
|
|
30
|
-
tenant?: string;
|
|
31
|
-
body?: string;
|
|
32
|
-
fileName?: string;
|
|
33
|
-
contentType?: string;
|
|
34
|
-
fileDir?: string;
|
|
35
|
-
fileSize?: number;
|
|
36
|
-
requestId?: string;
|
|
37
|
-
filePart?: number;
|
|
38
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 文件API类型声明
|
|
3
|
+
*/
|
|
4
|
+
export interface FileInfo {
|
|
5
|
+
fileId: string;
|
|
6
|
+
fileSrc: string;
|
|
7
|
+
contentType: string;
|
|
8
|
+
fileExt: string;
|
|
9
|
+
fileWidth: number;
|
|
10
|
+
fileHeight: number;
|
|
11
|
+
fileSize: number;
|
|
12
|
+
hashSha256: string;
|
|
13
|
+
hashSm3: string;
|
|
14
|
+
createDate: string;
|
|
15
|
+
tempFilePath: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FileBase64Req {
|
|
18
|
+
tenant?: string;
|
|
19
|
+
base64?: string;
|
|
20
|
+
fileName?: string;
|
|
21
|
+
contentType?: string;
|
|
22
|
+
fileDir?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface FileDownInfo {
|
|
25
|
+
tempFilePath: string;
|
|
26
|
+
filePath: string;
|
|
27
|
+
statusCode: number;
|
|
28
|
+
}
|
|
29
|
+
export interface FileWebReq {
|
|
30
|
+
tenant?: string;
|
|
31
|
+
body?: string;
|
|
32
|
+
fileName?: string;
|
|
33
|
+
contentType?: string;
|
|
34
|
+
fileDir?: string;
|
|
35
|
+
fileSize?: number;
|
|
36
|
+
requestId?: string;
|
|
37
|
+
filePart?: number;
|
|
38
|
+
}
|
package/lib/api/files/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/lib/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EnumDict, EntryLayDict } from "../api/dicts";
|
|
2
|
-
export declare class Dict {
|
|
3
|
-
static readonly genderDict: EnumDict;
|
|
4
|
-
static readonly regionDict: EntryLayDict;
|
|
5
|
-
}
|
|
1
|
+
import { EnumDict, EntryLayDict } from "../api/dicts";
|
|
2
|
+
export declare class Dict {
|
|
3
|
+
static readonly genderDict: EnumDict;
|
|
4
|
+
static readonly regionDict: EntryLayDict;
|
|
5
|
+
}
|
package/lib/api/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Constant } from "../api/constant";
|
|
2
|
-
import { EnumDict, EntryLayDict } from "../api/dicts";
|
|
3
|
-
export class Dict {
|
|
4
|
-
// 性别
|
|
5
|
-
static genderDict = new EnumDict(Constant.MODULE_RBAC, Constant.ENUM_GENDER);
|
|
6
|
-
// 字典-行政区划
|
|
7
|
-
static regionDict = new EntryLayDict(Constant.DICT_REGION);
|
|
8
|
-
}
|
|
1
|
+
import { Constant } from "../api/constant";
|
|
2
|
+
import { EnumDict, EntryLayDict } from "../api/dicts";
|
|
3
|
+
export class Dict {
|
|
4
|
+
// 性别
|
|
5
|
+
static genderDict = new EnumDict(Constant.MODULE_RBAC, Constant.ENUM_GENDER);
|
|
6
|
+
// 字典-行政区划
|
|
7
|
+
static regionDict = new EntryLayDict(Constant.DICT_REGION);
|
|
8
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ResponseData } from "../../api/types";
|
|
2
|
-
import type { RolesPerms, UserInfo } from "../auth/types";
|
|
3
|
-
declare class OrganUserApi {
|
|
4
|
-
userInfo(organTenant: string): Promise<ResponseData<UserInfo>>;
|
|
5
|
-
userRolesPerms(organTenant: string): Promise<ResponseData<RolesPerms>>;
|
|
6
|
-
}
|
|
7
|
-
export declare const organUserApi: OrganUserApi;
|
|
8
|
-
export {};
|
|
1
|
+
import { ResponseData } from "../../api/types";
|
|
2
|
+
import type { RolesPerms, UserInfo } from "../auth/types";
|
|
3
|
+
declare class OrganUserApi {
|
|
4
|
+
userInfo(organTenant: string): Promise<ResponseData<UserInfo>>;
|
|
5
|
+
userRolesPerms(organTenant: string): Promise<ResponseData<RolesPerms>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const organUserApi: OrganUserApi;
|
|
8
|
+
export {};
|
package/lib/api/myorgan/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import mpx from "@mpxjs/core";
|
|
2
|
-
class OrganUserApi {
|
|
3
|
-
// 获取当前会话用户
|
|
4
|
-
userInfo(organTenant) {
|
|
5
|
-
const config = getApp().globalData.config;
|
|
6
|
-
organTenant = organTenant || config.tenant;
|
|
7
|
-
return mpx.xfetch.fetch({
|
|
8
|
-
url: "/v1/rbac/auth/user?tenant=" + organTenant,
|
|
9
|
-
method: "GET",
|
|
10
|
-
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
// 当前用户角色权限
|
|
14
|
-
userRolesPerms(organTenant) {
|
|
15
|
-
const config = getApp().globalData.config;
|
|
16
|
-
organTenant = organTenant || config.tenant;
|
|
17
|
-
return mpx.xfetch.fetch({
|
|
18
|
-
url: "/v1/rbac/auth/roles_perms?tenant=" + organTenant,
|
|
19
|
-
method: "GET",
|
|
20
|
-
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export const organUserApi = new OrganUserApi();
|
|
1
|
+
import mpx from "@mpxjs/core";
|
|
2
|
+
class OrganUserApi {
|
|
3
|
+
// 获取当前会话用户
|
|
4
|
+
userInfo(organTenant) {
|
|
5
|
+
const config = getApp().globalData.config;
|
|
6
|
+
organTenant = organTenant || config.tenant;
|
|
7
|
+
return mpx.xfetch.fetch({
|
|
8
|
+
url: "/v1/rbac/auth/user?tenant=" + organTenant,
|
|
9
|
+
method: "GET",
|
|
10
|
+
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
// 当前用户角色权限
|
|
14
|
+
userRolesPerms(organTenant) {
|
|
15
|
+
const config = getApp().globalData.config;
|
|
16
|
+
organTenant = organTenant || config.tenant;
|
|
17
|
+
return mpx.xfetch.fetch({
|
|
18
|
+
url: "/v1/rbac/auth/roles_perms?tenant=" + organTenant,
|
|
19
|
+
method: "GET",
|
|
20
|
+
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export const organUserApi = new OrganUserApi();
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export interface BaseOrganModel {
|
|
2
|
-
organId?: string;
|
|
3
|
-
organName?: string;
|
|
4
|
-
organCode?: string;
|
|
5
|
-
pinYin?: string;
|
|
6
|
-
userId?: string;
|
|
7
|
-
shortName?: string;
|
|
8
|
-
organType?: string;
|
|
9
|
-
parentId?: string;
|
|
10
|
-
logoUrl?: string;
|
|
11
|
-
industry?: string;
|
|
12
|
-
address?: string;
|
|
13
|
-
geoLongitude?: string;
|
|
14
|
-
geoLatitude?: string;
|
|
15
|
-
contactPerson?: string;
|
|
16
|
-
contactPersonMobile?: string;
|
|
17
|
-
contactPersonMobileIns?: string;
|
|
18
|
-
perfectStatus?: boolean;
|
|
19
|
-
status?: string;
|
|
20
|
-
tenant: string;
|
|
21
|
-
memberInviteStatus: boolean;
|
|
22
|
-
}
|
|
1
|
+
export interface BaseOrganModel {
|
|
2
|
+
organId?: string;
|
|
3
|
+
organName?: string;
|
|
4
|
+
organCode?: string;
|
|
5
|
+
pinYin?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
shortName?: string;
|
|
8
|
+
organType?: string;
|
|
9
|
+
parentId?: string;
|
|
10
|
+
logoUrl?: string;
|
|
11
|
+
industry?: string;
|
|
12
|
+
address?: string;
|
|
13
|
+
geoLongitude?: string;
|
|
14
|
+
geoLatitude?: string;
|
|
15
|
+
contactPerson?: string;
|
|
16
|
+
contactPersonMobile?: string;
|
|
17
|
+
contactPersonMobileIns?: string;
|
|
18
|
+
perfectStatus?: boolean;
|
|
19
|
+
status?: string;
|
|
20
|
+
tenant: string;
|
|
21
|
+
memberInviteStatus: boolean;
|
|
22
|
+
}
|
package/lib/api/myorgan/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DictRegionList, DictRegionReq } from "./types";
|
|
2
|
-
import { ResponseData } from "../../api/types";
|
|
3
|
-
declare class RegionApiImpl {
|
|
4
|
-
findList(query?: DictRegionReq): Promise<ResponseData<DictRegionList>>;
|
|
5
|
-
}
|
|
6
|
-
declare const regionApi: RegionApiImpl;
|
|
7
|
-
export { regionApi };
|
|
1
|
+
import { DictRegionList, DictRegionReq } from "./types";
|
|
2
|
+
import { ResponseData } from "../../api/types";
|
|
3
|
+
declare class RegionApiImpl {
|
|
4
|
+
findList(query?: DictRegionReq): Promise<ResponseData<DictRegionList>>;
|
|
5
|
+
}
|
|
6
|
+
declare const regionApi: RegionApiImpl;
|
|
7
|
+
export { regionApi };
|
package/lib/api/region/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { grpc } from "../../utils/grpc";
|
|
2
|
-
import mpx from "@mpxjs/core";
|
|
3
|
-
class RegionApiImpl {
|
|
4
|
-
// 查询列表信息地区信息
|
|
5
|
-
findList(query) {
|
|
6
|
-
if (query) {
|
|
7
|
-
query.hasEnable = query.enable !== undefined;
|
|
8
|
-
}
|
|
9
|
-
grpc.clearEmpty(query);
|
|
10
|
-
const config = getApp().globalData.config;
|
|
11
|
-
return mpx.xfetch.fetch({
|
|
12
|
-
url: "/v1/region/dict_region/list/" + config.tenant,
|
|
13
|
-
method: "GET",
|
|
14
|
-
data: query,
|
|
15
|
-
header: { Authorization: false },
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
const regionApi = new RegionApiImpl();
|
|
20
|
-
export { regionApi };
|
|
1
|
+
import { grpc } from "../../utils/grpc";
|
|
2
|
+
import mpx from "@mpxjs/core";
|
|
3
|
+
class RegionApiImpl {
|
|
4
|
+
// 查询列表信息地区信息
|
|
5
|
+
findList(query) {
|
|
6
|
+
if (query) {
|
|
7
|
+
query.hasEnable = query.enable !== undefined;
|
|
8
|
+
}
|
|
9
|
+
grpc.clearEmpty(query);
|
|
10
|
+
const config = getApp().globalData.config;
|
|
11
|
+
return mpx.xfetch.fetch({
|
|
12
|
+
url: "/v1/region/dict_region/list/" + config.tenant,
|
|
13
|
+
method: "GET",
|
|
14
|
+
data: query,
|
|
15
|
+
header: { Authorization: false },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const regionApi = new RegionApiImpl();
|
|
20
|
+
export { regionApi };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export interface DictRegionReq {
|
|
2
|
-
tenant?: string;
|
|
3
|
-
hasEnable?: boolean;
|
|
4
|
-
enable?: boolean;
|
|
5
|
-
parentId?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface DictRegionList {
|
|
8
|
-
results: Array<DictRegionModel>;
|
|
9
|
-
}
|
|
10
|
-
export interface DictRegionModel {
|
|
11
|
-
regionId?: string;
|
|
12
|
-
regionCode?: string;
|
|
13
|
-
regionName?: string;
|
|
14
|
-
text?: string;
|
|
15
|
-
value?: string;
|
|
16
|
-
hasChildren?: boolean;
|
|
17
|
-
regionType?: string;
|
|
18
|
-
children?: Array<DictRegionModel>;
|
|
19
|
-
}
|
|
1
|
+
export interface DictRegionReq {
|
|
2
|
+
tenant?: string;
|
|
3
|
+
hasEnable?: boolean;
|
|
4
|
+
enable?: boolean;
|
|
5
|
+
parentId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DictRegionList {
|
|
8
|
+
results: Array<DictRegionModel>;
|
|
9
|
+
}
|
|
10
|
+
export interface DictRegionModel {
|
|
11
|
+
regionId?: string;
|
|
12
|
+
regionCode?: string;
|
|
13
|
+
regionName?: string;
|
|
14
|
+
text?: string;
|
|
15
|
+
value?: string;
|
|
16
|
+
hasChildren?: boolean;
|
|
17
|
+
regionType?: string;
|
|
18
|
+
children?: Array<DictRegionModel>;
|
|
19
|
+
}
|
package/lib/api/region/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/lib/api/shop/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ResponseData } from "../../api/types";
|
|
2
|
-
import { BranchPage, BranchPageReq, ShopInfoModel, BranchModel, ShopPage, ShopPageReq, ShopBranchsUsersModel } from "./types";
|
|
3
|
-
declare class ShopApiImpl {
|
|
4
|
-
findShopBranchPage(data: BranchPageReq): Promise<ResponseData<BranchPage>>;
|
|
5
|
-
findShopPage(data: ShopPageReq): Promise<ResponseData<ShopPage>>;
|
|
6
|
-
findShopInfoById(shopId: string): Promise<ResponseData<ShopInfoModel>>;
|
|
7
|
-
findShopBranchById(organTenant: string, branchId: string): Promise<ResponseData<BranchModel>>;
|
|
8
|
-
findMyShopBranchUser(organTenant: string, branchId: string): Promise<ResponseData<ShopBranchsUsersModel>>;
|
|
9
|
-
}
|
|
10
|
-
declare const shopApi: ShopApiImpl;
|
|
11
|
-
export { shopApi };
|
|
1
|
+
import { ResponseData } from "../../api/types";
|
|
2
|
+
import { BranchPage, BranchPageReq, ShopInfoModel, BranchModel, ShopPage, ShopPageReq, ShopBranchsUsersModel } from "./types";
|
|
3
|
+
declare class ShopApiImpl {
|
|
4
|
+
findShopBranchPage(data: BranchPageReq): Promise<ResponseData<BranchPage>>;
|
|
5
|
+
findShopPage(data: ShopPageReq): Promise<ResponseData<ShopPage>>;
|
|
6
|
+
findShopInfoById(shopId: string): Promise<ResponseData<ShopInfoModel>>;
|
|
7
|
+
findShopBranchById(organTenant: string, branchId: string): Promise<ResponseData<BranchModel>>;
|
|
8
|
+
findMyShopBranchUser(organTenant: string, branchId: string): Promise<ResponseData<ShopBranchsUsersModel>>;
|
|
9
|
+
}
|
|
10
|
+
declare const shopApi: ShopApiImpl;
|
|
11
|
+
export { shopApi };
|
package/lib/api/shop/index.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import mpx from "@mpxjs/core";
|
|
2
|
-
class ShopApiImpl {
|
|
3
|
-
// 查询分页信息门店管理
|
|
4
|
-
findShopBranchPage(data) {
|
|
5
|
-
const config = getApp().globalData.config;
|
|
6
|
-
data.tenant = data.tenant || config.tenant;
|
|
7
|
-
return mpx.xfetch.fetch({
|
|
8
|
-
url: "/v1/front/shop/scene_branch/page/" + data.tenant,
|
|
9
|
-
method: "GET",
|
|
10
|
-
data: data,
|
|
11
|
-
header: { Authorization: false },
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
// 查询分页信息电商管理
|
|
15
|
-
findShopPage(data) {
|
|
16
|
-
const config = getApp().globalData.config;
|
|
17
|
-
return mpx.xfetch.fetch({
|
|
18
|
-
url: "/v1/shop/info/page/" + config.tenant,
|
|
19
|
-
method: "GET",
|
|
20
|
-
data: data,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// 查询电商信息
|
|
24
|
-
findShopInfoById(shopId) {
|
|
25
|
-
const config = getApp().globalData.config;
|
|
26
|
-
return mpx.xfetch.fetch({
|
|
27
|
-
url: "/v1/front/shop/info/id/" + config.tenant + "/" + shopId,
|
|
28
|
-
method: "GET",
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
// 查询门店信息
|
|
32
|
-
findShopBranchById(organTenant, branchId) {
|
|
33
|
-
const config = getApp().globalData.config;
|
|
34
|
-
organTenant = organTenant || config.tenant;
|
|
35
|
-
return mpx.xfetch.fetch({
|
|
36
|
-
url: "/v1/front/shop/branch/id/" + organTenant + "/" + branchId,
|
|
37
|
-
method: "GET",
|
|
38
|
-
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
// 查询门店用户
|
|
42
|
-
findMyShopBranchUser(organTenant, branchId) {
|
|
43
|
-
const config = getApp().globalData.config;
|
|
44
|
-
organTenant = organTenant || config.tenant;
|
|
45
|
-
return mpx.xfetch.fetch({
|
|
46
|
-
url: "/v1/front/shop/branchs_users/my/" + organTenant + "/" + branchId,
|
|
47
|
-
method: "GET",
|
|
48
|
-
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
const shopApi = new ShopApiImpl();
|
|
53
|
-
export { shopApi };
|
|
1
|
+
import mpx from "@mpxjs/core";
|
|
2
|
+
class ShopApiImpl {
|
|
3
|
+
// 查询分页信息门店管理
|
|
4
|
+
findShopBranchPage(data) {
|
|
5
|
+
const config = getApp().globalData.config;
|
|
6
|
+
data.tenant = data.tenant || config.tenant;
|
|
7
|
+
return mpx.xfetch.fetch({
|
|
8
|
+
url: "/v1/front/shop/scene_branch/page/" + data.tenant,
|
|
9
|
+
method: "GET",
|
|
10
|
+
data: data,
|
|
11
|
+
header: { Authorization: false },
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
// 查询分页信息电商管理
|
|
15
|
+
findShopPage(data) {
|
|
16
|
+
const config = getApp().globalData.config;
|
|
17
|
+
return mpx.xfetch.fetch({
|
|
18
|
+
url: "/v1/shop/info/page/" + config.tenant,
|
|
19
|
+
method: "GET",
|
|
20
|
+
data: data,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
// 查询电商信息
|
|
24
|
+
findShopInfoById(shopId) {
|
|
25
|
+
const config = getApp().globalData.config;
|
|
26
|
+
return mpx.xfetch.fetch({
|
|
27
|
+
url: "/v1/front/shop/info/id/" + config.tenant + "/" + shopId,
|
|
28
|
+
method: "GET",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// 查询门店信息
|
|
32
|
+
findShopBranchById(organTenant, branchId) {
|
|
33
|
+
const config = getApp().globalData.config;
|
|
34
|
+
organTenant = organTenant || config.tenant;
|
|
35
|
+
return mpx.xfetch.fetch({
|
|
36
|
+
url: "/v1/front/shop/branch/id/" + organTenant + "/" + branchId,
|
|
37
|
+
method: "GET",
|
|
38
|
+
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// 查询门店用户
|
|
42
|
+
findMyShopBranchUser(organTenant, branchId) {
|
|
43
|
+
const config = getApp().globalData.config;
|
|
44
|
+
organTenant = organTenant || config.tenant;
|
|
45
|
+
return mpx.xfetch.fetch({
|
|
46
|
+
url: "/v1/front/shop/branchs_users/my/" + organTenant + "/" + branchId,
|
|
47
|
+
method: "GET",
|
|
48
|
+
header: { "Grpc-Metadata-Tenant": organTenant },
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const shopApi = new ShopApiImpl();
|
|
53
|
+
export { shopApi };
|