biz9-logic 4.0.38 → 4.0.40
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 +15 -2
- package/package.json +1 -1
- package/test.js +9 -2
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -665,15 +665,28 @@ class Obj {
|
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
667
|
class Category {
|
|
668
|
-
static get_test(){
|
|
668
|
+
static get_test(option){
|
|
669
|
+
if(!option){
|
|
670
|
+
option = {item_count:9,category_count:9,get_value:false,get_item:false,value_count:20};
|
|
671
|
+
}
|
|
669
672
|
let category = DataItem.get_new_full_item(
|
|
670
673
|
DataItem.get_new(DataType.CATEGORY,Number.get_id()),
|
|
671
674
|
DataItem.get_new(DataType.CATEGORY,0),
|
|
672
675
|
DataItem.get_new(DataType.CATEGORY,0),
|
|
673
676
|
Field.get_test("Category " +Number.get_id()));
|
|
674
|
-
category.type = Category.get_category_list()[Number.get_id(
|
|
677
|
+
category.type = Category.get_category_list()[Number.get_id(Category.get_category_list().length-1)].data_type;
|
|
675
678
|
return category;
|
|
676
679
|
}
|
|
680
|
+
static get_test_list=(option)=>{
|
|
681
|
+
if(!option){
|
|
682
|
+
option={category_count:10};
|
|
683
|
+
}
|
|
684
|
+
let item_list=[];
|
|
685
|
+
for(let a=0;a<option.category_count;a++){
|
|
686
|
+
item_list.push(Category.get_test(option));
|
|
687
|
+
}
|
|
688
|
+
return item_list;
|
|
689
|
+
};
|
|
677
690
|
static get_type_category_list(type,count){
|
|
678
691
|
let category_list = [];
|
|
679
692
|
for(let a=0;a<count;a++){
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -38,9 +38,9 @@ describe("connect", () => {
|
|
|
38
38
|
/* --CONFIG--END */
|
|
39
39
|
|
|
40
40
|
/* --PAGE--START */
|
|
41
|
+
/*
|
|
41
42
|
let page = Page.get_test({item_count:2,page_count:2,get_value:true,get_item:true,value_count:50})
|
|
42
43
|
Log.w("Page",page);
|
|
43
|
-
/*
|
|
44
44
|
let page = Page.get_test({item_count:9,page_count:19,get_item:true,get_value:true})
|
|
45
45
|
//let page = Page.get_test()
|
|
46
46
|
Log.w("Page_section_1",page.section_1);
|
|
@@ -62,9 +62,16 @@ describe("connect", () => {
|
|
|
62
62
|
//Log.w("BLog_Post_section_1_section_1_section_1",blog_post.section_1.section_1.section_1);
|
|
63
63
|
/* --BLOG_POST--END */
|
|
64
64
|
|
|
65
|
+
/* --CATEGORY--START */
|
|
66
|
+
let category_list=Category.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
|
|
67
|
+
Log.w('category_list',category_list);
|
|
68
|
+
/* --CATEGORY--END */
|
|
69
|
+
|
|
70
|
+
|
|
65
71
|
/* --PRODUCT--START */
|
|
66
|
-
//let
|
|
72
|
+
//let product_list=Product.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
|
|
67
73
|
//Log.w('product_list',product_list);
|
|
74
|
+
//let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
|
|
68
75
|
//Log.w('category_list',category_list);
|
|
69
76
|
|
|
70
77
|
//let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
|