@cloudbase/lowcode-builder 1.9.9 → 1.9.11
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.11",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -51,16 +51,18 @@ const CLOUD_CONFIG = {
|
|
|
51
51
|
__defaultLoginType__: '<%= defaultLoginType %>',
|
|
52
52
|
customConfig: {
|
|
53
53
|
async login({ app, auth, loginState, defaultLogin }) {
|
|
54
|
+
const publicPage = <%= publicPage %>;
|
|
55
|
+
|
|
54
56
|
if (!LOGIN_CONFIG?.access?.needLogin) {
|
|
55
57
|
if (<%= pureAnonymousLogin %>) {
|
|
56
58
|
return !loginState.isAnonymous && await auth.signInAnonymously();
|
|
57
59
|
} else if (!config.endpointType) {
|
|
58
60
|
return await auth.signInAnonymouslyInWx();
|
|
59
61
|
}
|
|
60
|
-
} else if (
|
|
62
|
+
} else if (publicPage){
|
|
61
63
|
const pages = getCurrentPages();
|
|
62
64
|
const currentPage = pages[pages.length - 1]?.route?.match(/^pages\/(.*)\//)?.[1] || getApp().app?.__internal__?.getConfig()?.page?.[0]?.id;
|
|
63
|
-
if (
|
|
65
|
+
if (publicPage.includes(currentPage)) {
|
|
64
66
|
// 未登录时,进入公开访问页面,则匿名登录
|
|
65
67
|
return !loginState.isAnonymous && await auth.signInAnonymously();
|
|
66
68
|
} else {
|
|
@@ -70,7 +72,8 @@ const CLOUD_CONFIG = {
|
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
return await defaultLogin();
|
|
73
|
-
}
|
|
75
|
+
},
|
|
76
|
+
loginConfig: { needSignIn: true }
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
79
|
|