biz9-logic 4.9.3 → 4.9.4
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 +3 -2
- package/package.json +1 -1
- package/test.js +25 -12
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -148,8 +148,10 @@ class Demo_Logic {
|
|
|
148
148
|
item_title_list.push(title+" " +Type.get_title(item.categorys[Num.get_id(item.categorys.length)].category)+" "+ b);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
const cat_item = item.categorys[Num.get_id(item.categorys.length)];
|
|
152
|
+
if(!cat_item.items){
|
|
152
153
|
cat_item.items = [];
|
|
154
|
+
}
|
|
153
155
|
for(const item of item_title_list){
|
|
154
156
|
let child_item = Item_Logic.get_new(item,option.item_data_type);
|
|
155
157
|
if(option.item_data_type == DataType.PRODUCT){
|
|
@@ -163,7 +165,6 @@ class Demo_Logic {
|
|
|
163
165
|
child_item.note = Field_Logic.get_test_note(),
|
|
164
166
|
cat_item.items.push(child_item);
|
|
165
167
|
}
|
|
166
|
-
}
|
|
167
168
|
}
|
|
168
169
|
return item;
|
|
169
170
|
};
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -31,19 +31,32 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
function(call) {
|
|
33
33
|
console.log('CONNECT-START');
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
let post_type_list = [
|
|
35
|
+
Demo_Logic.get_new_type('Computer 1',{
|
|
36
|
+
get_category:true,category_count:12,category_data_type:DataType.PRODUCT,categorys:'',
|
|
37
|
+
get_item:true,item_count:50,item_data_type:DataType.PRODUCT,items:null}),
|
|
38
|
+
Demo_Logic.get_new_type('Computer 2',{
|
|
39
|
+
get_category:true,category_count:12,category_data_type:DataType.PRODUCT,categorys:'',
|
|
40
|
+
get_item:true,item_count:50,item_data_type:DataType.PRODUCT,items:null})
|
|
41
|
+
];
|
|
39
42
|
|
|
40
|
-
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
Log.w('post_type_list',post_type_list);
|
|
44
|
+
let post_item_count = 0;
|
|
45
|
+
let post_category_count = 0;
|
|
46
|
+
for(const item_type of post_type_list){
|
|
47
|
+
for(const item_cat of item_type.categorys){
|
|
48
|
+
post_category_count = post_category_count+1;
|
|
49
|
+
if(!item_cat.items){
|
|
50
|
+
item_cat.items = []
|
|
51
|
+
}
|
|
52
|
+
for(const item_item of item_cat.items){
|
|
53
|
+
post_item_count = post_item_count+1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
Log.w('post_type_list',post_type_list);
|
|
59
|
+
Log.w('post_item_count',post_item_count);
|
|
47
60
|
|
|
48
61
|
console.log('CONNECT-END');
|
|
49
62
|
call();
|