Skip to content

Commit 793324f

Browse files
committed
Fix
1 parent 2b0d456 commit 793324f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

developers/src/components/AppForm/script.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ export default {
8989
if (state.app.description.length < 16 || state.app.description.length > 128) return useNotice('description_length');
9090
};
9191

92-
const toRawURLEncoding = (base64Str) {
93-
return base64Str
94-
.replace(/\+/g, '-') // '+' → '-'
95-
.replace(/\//g, '_') // '/' → '_'
96-
.replace(/=+$/, ''); // 移除尾部 '='
97-
}
98-
9992
const useSubmit = async () => {
10093
const capabilities = ['CONTACT', 'GROUP'];
10194
if (state.isImmersive) capabilities.push('IMMERSIVE');
@@ -110,7 +103,7 @@ export default {
110103
resource_patterns = resource_patterns.split('\n').map((r) => r.trim()).filter((r) => !!r);
111104

112105
const params = {
113-
toRawURLEncoding(icon_base64),
106+
icon_base64: icon_base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''),
114107
name: state.app.name,
115108
category: state.category,
116109
home_uri: state.app.home_uri,

0 commit comments

Comments
 (0)