jmash-core-mp 0.1.72 → 0.1.73
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/lib/utils/share.js +6 -6
- package/package.json +1 -1
- package/src/utils/share.ts +7 -6
package/lib/utils/share.js
CHANGED
|
@@ -32,13 +32,13 @@ class ShareUtil {
|
|
|
32
32
|
// 分享用户页给好友
|
|
33
33
|
shareUserPath(pagePath, query) {
|
|
34
34
|
const userStore = useUserStore();
|
|
35
|
-
const referee = userStore.userInfo?.userId || "";
|
|
35
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
36
36
|
return `${pagePath}?referee=${referee}&${query}`;
|
|
37
37
|
}
|
|
38
38
|
// 分享用户页到朋友圈
|
|
39
39
|
shareUserQuery(query) {
|
|
40
40
|
const userStore = useUserStore();
|
|
41
|
-
const referee = userStore.userInfo?.userId || "";
|
|
41
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
42
42
|
return `referee=${referee}&${query}`;
|
|
43
43
|
}
|
|
44
44
|
// 分享用户页加载
|
|
@@ -54,7 +54,7 @@ class ShareUtil {
|
|
|
54
54
|
// 分享组织页给好友
|
|
55
55
|
shareOrganPath(pagePath, query) {
|
|
56
56
|
const userStore = useUserStore();
|
|
57
|
-
const referee = userStore.userInfo?.userId || "";
|
|
57
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
58
58
|
const organStore = useOrganStore();
|
|
59
59
|
const organTenant = organStore.organTenant || "";
|
|
60
60
|
return `${pagePath}?referee=${referee}&organTenant=${organTenant}&${query}`;
|
|
@@ -62,7 +62,7 @@ class ShareUtil {
|
|
|
62
62
|
// 分享组织页给朋友圈
|
|
63
63
|
shareOrganQuery(query) {
|
|
64
64
|
const userStore = useUserStore();
|
|
65
|
-
const referee = userStore.userInfo?.userId || "";
|
|
65
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
66
66
|
const organStore = useOrganStore();
|
|
67
67
|
const organTenant = organStore.organTenant || "";
|
|
68
68
|
return `referee=${referee}&organTenant=${organTenant}&${query}`;
|
|
@@ -89,7 +89,7 @@ class ShareUtil {
|
|
|
89
89
|
// 分享电商页给好友
|
|
90
90
|
shareMallPath(pagePath, query) {
|
|
91
91
|
const userStore = useUserStore();
|
|
92
|
-
const referee = userStore.userInfo?.userId || "";
|
|
92
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
93
93
|
const shopStore = useShopStore();
|
|
94
94
|
if (shopStore.isShop) {
|
|
95
95
|
const shopId = shopStore.shopInfo?.shopId || "";
|
|
@@ -105,7 +105,7 @@ class ShareUtil {
|
|
|
105
105
|
// 分享电商页给朋友圈
|
|
106
106
|
shareMallQuery(query) {
|
|
107
107
|
const userStore = useUserStore();
|
|
108
|
-
const referee = userStore.userInfo?.userId || "";
|
|
108
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
109
109
|
const shopStore = useShopStore();
|
|
110
110
|
if (shopStore.isShop) {
|
|
111
111
|
const shopId = shopStore.shopInfo?.shopId || "";
|
package/package.json
CHANGED
package/src/utils/share.ts
CHANGED
|
@@ -34,19 +34,20 @@ class ShareUtil {
|
|
|
34
34
|
// 分享用户页给好友
|
|
35
35
|
shareUserPath(pagePath: string, query: string): string {
|
|
36
36
|
const userStore = useUserStore();
|
|
37
|
-
const referee = userStore.userInfo?.userId || "";
|
|
37
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
38
38
|
return `${pagePath}?referee=${referee}&${query}`;
|
|
39
39
|
}
|
|
40
40
|
// 分享用户页到朋友圈
|
|
41
41
|
shareUserQuery(query: string): string {
|
|
42
42
|
const userStore = useUserStore();
|
|
43
|
-
const referee = userStore.userInfo?.userId || "";
|
|
43
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
44
44
|
return `referee=${referee}&${query}`;
|
|
45
45
|
}
|
|
46
46
|
// 分享用户页加载
|
|
47
47
|
shareUserLoad(options: Record<string, string>): Promise<boolean> {
|
|
48
48
|
//推荐人
|
|
49
49
|
const userStore = useUserStore();
|
|
50
|
+
console.log("推荐人:", options.referee);
|
|
50
51
|
if (options.referee) {
|
|
51
52
|
userStore.setReferee(options.referee);
|
|
52
53
|
}
|
|
@@ -56,7 +57,7 @@ class ShareUtil {
|
|
|
56
57
|
// 分享组织页给好友
|
|
57
58
|
shareOrganPath(pagePath: string, query: string): string {
|
|
58
59
|
const userStore = useUserStore();
|
|
59
|
-
const referee = userStore.userInfo?.userId || "";
|
|
60
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
60
61
|
const organStore = useOrganStore();
|
|
61
62
|
const organTenant = organStore.organTenant || "";
|
|
62
63
|
return `${pagePath}?referee=${referee}&organTenant=${organTenant}&${query}`;
|
|
@@ -64,7 +65,7 @@ class ShareUtil {
|
|
|
64
65
|
// 分享组织页给朋友圈
|
|
65
66
|
shareOrganQuery(query: string): string {
|
|
66
67
|
const userStore = useUserStore();
|
|
67
|
-
const referee = userStore.userInfo?.userId || "";
|
|
68
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
68
69
|
const organStore = useOrganStore();
|
|
69
70
|
const organTenant = organStore.organTenant || "";
|
|
70
71
|
return `referee=${referee}&organTenant=${organTenant}&${query}`;
|
|
@@ -92,7 +93,7 @@ class ShareUtil {
|
|
|
92
93
|
// 分享电商页给好友
|
|
93
94
|
shareMallPath(pagePath: string, query: string): string {
|
|
94
95
|
const userStore = useUserStore();
|
|
95
|
-
const referee = userStore.userInfo?.userId || "";
|
|
96
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
96
97
|
const shopStore = useShopStore();
|
|
97
98
|
if (shopStore.isShop) {
|
|
98
99
|
const shopId = shopStore.shopInfo?.shopId || "";
|
|
@@ -107,7 +108,7 @@ class ShareUtil {
|
|
|
107
108
|
// 分享电商页给朋友圈
|
|
108
109
|
shareMallQuery(query: string): string {
|
|
109
110
|
const userStore = useUserStore();
|
|
110
|
-
const referee = userStore.userInfo?.userId || "";
|
|
111
|
+
const referee = userStore.userInfo?.userId.replace(/-/g, "") || "";
|
|
111
112
|
const shopStore = useShopStore();
|
|
112
113
|
if (shopStore.isShop) {
|
|
113
114
|
const shopId = shopStore.shopInfo?.shopId || "";
|