dc-editor 1.0.0 → 1.0.3
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/dist/index.d.ts +3 -2
- package/dist/index.js +47 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2160,7 +2160,8 @@ interface FoEditorErrorType<T = FoEditorErrorName> extends FoCoreError<T> {
|
|
|
2160
2160
|
/** 默认配置 */
|
|
2161
2161
|
declare const defaultConfig: FoEditorConfig;
|
|
2162
2162
|
declare const createDefaultEditorConfig: () => FoEditorConfig;
|
|
2163
|
-
|
|
2163
|
+
//declare const nilai: () => String;
|
|
2164
|
+
declare const defaultConfigurationwk: () => String;
|
|
2164
2165
|
declare const createFoEditor: CreateFoEditor;
|
|
2165
2166
|
|
|
2166
|
-
export { CreateFoEditor, ExposeFoEditorObjectType, FOEDITOR_EVENT_NAME, FoEditor, FoEditorConfig, FoEditorErrorName, FoEditorErrorType, FoEditorNodeTypeName, FoEditorProps, createDefaultEditorConfig, createFoEditor, defaultConfig };
|
|
2167
|
+
export { CreateFoEditor, ExposeFoEditorObjectType, FOEDITOR_EVENT_NAME, FoEditor, FoEditorConfig, FoEditorErrorName, FoEditorErrorType, FoEditorNodeTypeName, FoEditorProps, createDefaultEditorConfig, createFoEditor, defaultConfig,defaultConfigurationwk };
|
package/dist/index.js
CHANGED
|
@@ -124,7 +124,8 @@ function l(e, t = window.document) {
|
|
|
124
124
|
} a += 1, e && (a < 200 ? setTimeout(u, 50) : s("css"))
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
|
|
127
|
+
//+ "&HOSP_JS_API="+ defaultConfigurationwk.HOSP_JS_API
|
|
128
|
+
const p = t => t.map((t => `${e}${t}?` + defaultConfigurationwk.VERSION_API));
|
|
128
129
|
return {
|
|
129
130
|
css: function(e, t, n, r) {
|
|
130
131
|
d("css", p(e), t, n, r)
|
|
@@ -134,20 +135,58 @@ function l(e, t = window.document) {
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
}
|
|
138
|
+
let defaultConfigurationwk={ APP_JS_API: '',VERSION_API:"",HOSP_JS_API :"",HOSP_JS_APIDS :"",HOSP_JS_APIDE :"",HOSP_JS_KEY :""};
|
|
137
139
|
|
|
138
140
|
const a = "latest",
|
|
139
141
|
i = Symbol(),
|
|
140
142
|
o = (e, n = a) => t(void 0, void 0, void 0, (function*() {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
const date1 = new Date(decodeURIComponent(escape(atob(defaultConfigurationwk.HOSP_JS_APIDS))));
|
|
144
|
+
const date2 = new Date(decodeURIComponent(escape(atob(defaultConfigurationwk.HOSP_JS_APIDE))));
|
|
145
|
+
const name = decodeURIComponent(escape(atob(defaultConfigurationwk.HOSP_JS_API)));
|
|
146
|
+
// 获取当前时间
|
|
147
|
+
const now = new Date();
|
|
148
|
+
if (date2 < now) {
|
|
149
|
+
alert("医院:" + name + ",在" + date2.toLocaleDateString() +"已经到期,请提续费,避免影响系统使用!");
|
|
150
|
+
return ;
|
|
151
|
+
}
|
|
152
|
+
if (date1 < now) {
|
|
153
|
+
alert("医院:" + name + ",在" + date2.toLocaleDateString() +"后到期,请提前续费,避免影响系统使用!");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
const key = 7;
|
|
158
|
+
const now1 = defaultConfigurationwk.APP_JS_API.split('').map(char => {
|
|
159
|
+
const code = char.charCodeAt(0);
|
|
160
|
+
// 处理中文字符
|
|
161
|
+
if (code > 255) {
|
|
162
|
+
return String.fromCharCode((code - parseInt(key) + 65536) % 65536);
|
|
163
|
+
}
|
|
164
|
+
// 处理英文字符
|
|
165
|
+
if (code >= 65 && code <= 90) { // 大写字母
|
|
166
|
+
return String.fromCharCode(((code - 65 - parseInt(key) + 26) % 26) + 65);
|
|
167
|
+
}
|
|
168
|
+
if (code >= 97 && code <= 122) { // 小写字母
|
|
169
|
+
return String.fromCharCode(((code - 97 - parseInt(key) + 26) % 26) + 97);
|
|
170
|
+
}
|
|
171
|
+
return char;
|
|
172
|
+
}).join('');
|
|
173
|
+
|
|
174
|
+
const urlKey = decodeURIComponent(escape(atob(defaultConfigurationwk.HOSP_JS_KEY)));
|
|
175
|
+
const now2 = now1.split('').map((char, index) => {
|
|
176
|
+
const keyChar = urlKey.charCodeAt(index % urlKey.length);
|
|
177
|
+
const encryptedChar = char.charCodeAt(0) ^ keyChar;
|
|
178
|
+
return String.fromCharCode(encryptedChar);
|
|
179
|
+
}).join('');
|
|
180
|
+
|
|
181
|
+
//const t = ((e = decodeURIComponent(escape(atob(defaultConfigurationwk.APP_JS_API))), t = a) => `${e}/${t}/`)(e, n),
|
|
182
|
+
const t = ((e = decodeURIComponent(escape(now2)), t = a) => `${e}/${t}/`)(e, n),
|
|
145
183
|
r = ["fo-core.js"],
|
|
146
184
|
o = window.FoEditor;
|
|
147
185
|
return o && window[i] ? o : new Promise(((e, n) => {
|
|
148
186
|
try {
|
|
149
187
|
l(t).js(r, (() => {
|
|
150
188
|
const t = window.FoCore;
|
|
189
|
+
|
|
151
190
|
t ? (window[i] = !0, e(t)) : (console.error("editor js load failed!"), n())
|
|
152
191
|
}))
|
|
153
192
|
} catch (e) {
|
|
@@ -552,7 +591,7 @@ const c = function e(t) {
|
|
|
552
591
|
paging_mode_line: "虚拟分页",
|
|
553
592
|
paging_mode_print: "打印分页",
|
|
554
593
|
zoom: "缩放",
|
|
555
|
-
zoom_placeholder: "请通过快捷键 Ctrl +/- 缩放",
|
|
594
|
+
zoom_placeholder: "请通过快捷键 Ctrl +/- 缩放1",
|
|
556
595
|
fullscreen: "全屏"
|
|
557
596
|
}
|
|
558
597
|
},
|
|
@@ -895,6 +934,7 @@ const c = function e(t) {
|
|
|
895
934
|
return a.value.insertNode(e)
|
|
896
935
|
},
|
|
897
936
|
print() {
|
|
937
|
+
|
|
898
938
|
if (!a.value) throw new Error("The editor did not complete ready !");
|
|
899
939
|
return a.value.print()
|
|
900
940
|
},
|
|
@@ -966,5 +1006,5 @@ const c = function e(t) {
|
|
|
966
1006
|
}
|
|
967
1007
|
};
|
|
968
1008
|
export {
|
|
969
|
-
s as createDefaultEditorConfig, _ as createFoEditor, c as defaultConfig
|
|
1009
|
+
s as createDefaultEditorConfig, _ as createFoEditor, c as defaultConfig,defaultConfigurationwk as defaultConfigurationwk
|
|
970
1010
|
};
|