biz9-logic 4.0.37 → 4.0.39
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 -2
- package/package.json +1 -1
- package/test.js +3 -2
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -80,7 +80,16 @@ class Product{
|
|
|
80
80
|
}
|
|
81
81
|
return product;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
static get_test_list=(option)=>{
|
|
84
|
+
if(!option){
|
|
85
|
+
option={product_count:10};
|
|
86
|
+
}
|
|
87
|
+
let item_list=[];
|
|
88
|
+
for(let a=0;a<option.product_count;a++){
|
|
89
|
+
item_list.push(Product.get_test(option));
|
|
90
|
+
}
|
|
91
|
+
return item_list;
|
|
92
|
+
};
|
|
84
93
|
static get_test_list_by_category = (option) =>{
|
|
85
94
|
let product_list = [];
|
|
86
95
|
let category_count = 9;
|
|
@@ -108,6 +117,7 @@ class Product{
|
|
|
108
117
|
}
|
|
109
118
|
return [category_list,product_list]
|
|
110
119
|
};
|
|
120
|
+
|
|
111
121
|
}
|
|
112
122
|
class Service{
|
|
113
123
|
static get_test = (option) =>{
|
|
@@ -655,7 +665,10 @@ class Obj {
|
|
|
655
665
|
}
|
|
656
666
|
};
|
|
657
667
|
class Category {
|
|
658
|
-
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
|
+
}
|
|
659
672
|
let category = DataItem.get_new_full_item(
|
|
660
673
|
DataItem.get_new(DataType.CATEGORY,Number.get_id()),
|
|
661
674
|
DataItem.get_new(DataType.CATEGORY,0),
|
|
@@ -664,6 +677,16 @@ class Category {
|
|
|
664
677
|
category.type = Category.get_category_list()[Number.get_id(category_list.length-1)].data_type;
|
|
665
678
|
return category;
|
|
666
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
|
+
};
|
|
667
690
|
static get_type_category_list(type,count){
|
|
668
691
|
let category_list = [];
|
|
669
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);
|
|
@@ -63,8 +63,9 @@ describe("connect", () => {
|
|
|
63
63
|
/* --BLOG_POST--END */
|
|
64
64
|
|
|
65
65
|
/* --PRODUCT--START */
|
|
66
|
+
let product_list=Product.get_test_list({category_count:5,product_count:9,get_value:false,get_item:false});
|
|
67
|
+
Log.w('product_list',product_list);
|
|
66
68
|
//let [category_list,product_list]=Product.get_test_list_by_category({category_count:5,product_count:9});
|
|
67
|
-
//Log.w('product_list',product_list);
|
|
68
69
|
//Log.w('category_list',category_list);
|
|
69
70
|
|
|
70
71
|
//let product = Product.get_test({item_count:9,product_count:19,get_item:true,get_value:true})
|