biz9-logic 4.8.348 → 4.8.350
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/biz9_config +1 -1
- package/index.js +25 -5
- package/package.json +1 -1
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -265,7 +265,7 @@ class Type {
|
|
|
265
265
|
static RESIZE_SQUARE="squre";
|
|
266
266
|
static RESIZE_NONE="none";
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
static get_title = (type,plural)=>{
|
|
269
269
|
switch(type){
|
|
270
270
|
case Type.STAT_VIEW:
|
|
271
271
|
return "View";
|
|
@@ -273,7 +273,7 @@ class Type {
|
|
|
273
273
|
case Type.STAT_LIKE:
|
|
274
274
|
return "Like";
|
|
275
275
|
break;
|
|
276
|
-
case
|
|
276
|
+
case Type.STAT_FAVORITE:
|
|
277
277
|
return "Favorite";
|
|
278
278
|
break;
|
|
279
279
|
case Type.STAT_CART:
|
|
@@ -291,6 +291,24 @@ class Type {
|
|
|
291
291
|
case Type.STAT_REGISTER:
|
|
292
292
|
return "Register";
|
|
293
293
|
break;
|
|
294
|
+
case Type.PAGE_ABOUT:
|
|
295
|
+
case Type.PAGE_BLOG_POST:
|
|
296
|
+
case Type.PAGE_BLOG_POST_DETAIL:
|
|
297
|
+
case Type.PAGE_CONTACT:
|
|
298
|
+
case Type.PAGE_CATEGORY:
|
|
299
|
+
case Type.PAGE_EVENT:
|
|
300
|
+
case Type.PAGE_EVENT_DETAIL:
|
|
301
|
+
case Type.PAGE_FAQ:
|
|
302
|
+
case Type.PAGE_GALLERY:
|
|
303
|
+
case Type.PAGE_GALLERY_DETAIL:
|
|
304
|
+
case Type.PAGE_HOME:
|
|
305
|
+
case Type.PAGE_PRODUCT:
|
|
306
|
+
case Type.PAGE_PRODUCT_DETAIL:
|
|
307
|
+
case Type.PAGE_SERVICE:
|
|
308
|
+
case Type.PAGE_SERVICE_DETAIL:
|
|
309
|
+
return String(Str.get_title(type.replaceAll('_',' '))).trim();
|
|
310
|
+
break;
|
|
311
|
+
|
|
294
312
|
default:
|
|
295
313
|
return "N/A";
|
|
296
314
|
break;
|
|
@@ -327,7 +345,7 @@ class Stat_Logic {
|
|
|
327
345
|
}
|
|
328
346
|
class Page_Logic {
|
|
329
347
|
static get_page_list(){
|
|
330
|
-
|
|
348
|
+
return [
|
|
331
349
|
{value:Type.PAGE_ABOUT,label:Title.PAGE_ABOUT},
|
|
332
350
|
{value:Type.PAGE_BLOG_POST,label:Title.PAGE_BLOG_POST},
|
|
333
351
|
{value:Type.PAGE_CONTACT,label:Title.PAGE_CONTACT},
|
|
@@ -339,6 +357,7 @@ class Page_Logic {
|
|
|
339
357
|
{value:Type.PAGE_SERVICE,label:Title.PAGE_SERVICE},
|
|
340
358
|
];
|
|
341
359
|
};
|
|
360
|
+
/*
|
|
342
361
|
static get_page_title = (data_type) => {
|
|
343
362
|
if(!data_type){
|
|
344
363
|
return "";
|
|
@@ -346,6 +365,7 @@ class Page_Logic {
|
|
|
346
365
|
return String(Str.get_title(data_type.replaceAll('_',' '))).trim();
|
|
347
366
|
}
|
|
348
367
|
}
|
|
368
|
+
*/
|
|
349
369
|
static get_test = (title,option) =>{
|
|
350
370
|
[title,option] = Field_Logic.get_option_title(title,option);
|
|
351
371
|
option = Field_Logic.get_option(DataType.PAGE,option?option:{});
|
|
@@ -822,7 +842,7 @@ class Field_Logic {
|
|
|
822
842
|
return "";
|
|
823
843
|
};
|
|
824
844
|
}
|
|
825
|
-
static get_test_cost(){
|
|
845
|
+
static get_test_cost(){
|
|
826
846
|
return String(Num.get_id(999)) + "." + String(Num.get_id(99));
|
|
827
847
|
}
|
|
828
848
|
static get_test_note = () => {
|
|
@@ -1601,7 +1621,7 @@ class Image_Logic {
|
|
|
1601
1621
|
static get_process_list = (upload_dir,image_filename) =>{
|
|
1602
1622
|
upload_dir = upload_dir ? upload_dir : "";
|
|
1603
1623
|
image_filename = image_filename ? image_filename : "";
|
|
1604
|
-
|
|
1624
|
+
return [
|
|
1605
1625
|
{
|
|
1606
1626
|
image_filename:Type.SIZE_ORIGINAL+"_"+image_filename,
|
|
1607
1627
|
path_filename:upload_dir+"/"+Type.SIZE_ORIGINAL+"_"+image_filename,
|