biz9-logic 4.8.135 → 4.8.137
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 +16 -10
- package/package.json +1 -1
- package/test.js +2 -2
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -599,26 +599,30 @@ class Event_Logic {
|
|
|
599
599
|
class Field_Logic {
|
|
600
600
|
static get_test = (title,option) =>{
|
|
601
601
|
option = !Obj.check_is_empty(option) ? option : {};
|
|
602
|
-
let
|
|
602
|
+
let item = {};
|
|
603
603
|
if(option.get_blank == true){
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
604
|
+
option.category_title = "";
|
|
605
|
+
item = {
|
|
606
|
+
title:"",
|
|
607
|
+
title_url:"",
|
|
608
|
+
sub_note:"",
|
|
609
|
+
note:"",
|
|
610
|
+
date_create:"",
|
|
611
|
+
date_save:""
|
|
612
|
+
}
|
|
613
|
+
}else{
|
|
614
|
+
item = {
|
|
612
615
|
title:title,
|
|
613
616
|
setting_visible:"1",
|
|
614
617
|
title_url:Str.get_title_url(title),
|
|
615
|
-
sub_note:
|
|
618
|
+
sub_note:"Sub Note "+String(Number.get_id()),
|
|
616
619
|
note:Item_Logic.get_note(),
|
|
617
620
|
view_count:0,
|
|
618
621
|
id:0,
|
|
619
622
|
date_create:new moment().toISOString(),
|
|
620
623
|
date_save:new moment().toISOString()
|
|
621
624
|
}
|
|
625
|
+
}
|
|
622
626
|
if(!Str.check_is_null(option.category_title)){
|
|
623
627
|
item.category = 'Category ' + Number.get_id();
|
|
624
628
|
}
|
|
@@ -632,7 +636,9 @@ class Field_Logic {
|
|
|
632
636
|
let field_list = String(option.fields).split(',');
|
|
633
637
|
for(let a = 0; a<field_list.length;a++){
|
|
634
638
|
if(option.get_blank == true){
|
|
639
|
+
if(item[field_list[a]]){
|
|
635
640
|
item[field_list[a]] = "";
|
|
641
|
+
}
|
|
636
642
|
}else{
|
|
637
643
|
if(!Str.check_is_null(field_list[a])){
|
|
638
644
|
item[Str.get_title_url(field_list[a])] = Str.get_title(field_list[a]) +"_" + Number.get_id();
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -268,8 +268,8 @@ describe("connect", () => {
|
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
/* --ITEM-TEST--START */
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
let item = Item_Logic.get_test("Item_" +Number.get_id(),DataType.BLOG_POST,0,{get_blank:false});
|
|
272
|
+
Log.w('item',item);
|
|
273
273
|
/*
|
|
274
274
|
let item_list = Item_Logic.get_test_list(DataType.BLANK,{item_count:10,get_value:true});
|
|
275
275
|
Log.w('item_list',item_list);
|