biz9-logic 4.9.36 → 4.9.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 +8 -3
- package/package.json +1 -1
- package/test.js +7 -1
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -117,11 +117,15 @@ class Title {
|
|
|
117
117
|
static SOCIAL_URL_INSTAGRAM="https://instagram.com/";
|
|
118
118
|
static SOCIAL_URL_YOUTUBE="https://youtube.com/";
|
|
119
119
|
static SOCIAL_URL_LINKEDIN="https://linkedin.com/";
|
|
120
|
+
//type
|
|
121
|
+
static Type='Type';
|
|
120
122
|
}
|
|
121
123
|
class Demo_Logic {
|
|
122
124
|
static get_new_type = (title,option) => {
|
|
125
|
+
title = !Str.check_is_null(title)?title:Title.Type+" " +Num.get_id(999);
|
|
123
126
|
option = option ? option : {get_category:false,category_count:6,categorys:'',category_data_type:DataType.BLANK,get_item:false,items:'',item_data_type:DataType.BLANK,item_count:6};
|
|
124
127
|
const item = Item_Logic.get_new(title,DataType.TYPE);
|
|
128
|
+
//category
|
|
125
129
|
if(option.get_category){
|
|
126
130
|
item.categorys = [];
|
|
127
131
|
let category_title_list = [];
|
|
@@ -140,6 +144,7 @@ class Demo_Logic {
|
|
|
140
144
|
item.categorys.push(Category_Logic.get_new(cat_item,item.title,option.category_data_type));
|
|
141
145
|
});
|
|
142
146
|
}
|
|
147
|
+
//item
|
|
143
148
|
if(option.get_item){
|
|
144
149
|
let full_item_list = [];
|
|
145
150
|
|
|
@@ -429,9 +434,9 @@ class Stat_Logic {
|
|
|
429
434
|
stat.parent_cart_id = item.cart_id;
|
|
430
435
|
stat.parent_cart_number = item.cart_number;
|
|
431
436
|
}
|
|
432
|
-
if(item.data_type==DataType.
|
|
433
|
-
stat.parent_data_type=item.
|
|
434
|
-
stat.parent_id=item.
|
|
437
|
+
if(item.data_type==DataType.ORDER_ITEM){
|
|
438
|
+
stat.parent_data_type=item.parent_data_type;
|
|
439
|
+
stat.parent_id=item.parent_id;
|
|
435
440
|
stat.parent_order_id = item.order_id;
|
|
436
441
|
stat.parent_order_number = item.order_number;
|
|
437
442
|
}
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -44,6 +44,8 @@ describe("connect", () => {
|
|
|
44
44
|
let option = {get_category:true,category_count:category_count,category_data_type:category_type,categorys:val_category_title?val_category_title:null,
|
|
45
45
|
get_item:true,item_count:item_count,item_data_type:category_type,items:null}
|
|
46
46
|
|
|
47
|
+
console.log(Demo_Logic.get_new_type('',option));
|
|
48
|
+
/*
|
|
47
49
|
for(const item of category_type_title_list){
|
|
48
50
|
post_type_list.push(
|
|
49
51
|
Demo_Logic.get_new_type(item,option));
|
|
@@ -57,8 +59,10 @@ describe("connect", () => {
|
|
|
57
59
|
Log.w('55-post_type_list-b',post_type_list[0].categorys[3].items.length);
|
|
58
60
|
Log.w('55-post_type_list-b',post_type_list[0].categorys[4].items.length);
|
|
59
61
|
console.log('CONNECT-CMS-DEMO-SUCCESS');
|
|
62
|
+
*/
|
|
60
63
|
|
|
61
64
|
},
|
|
65
|
+
/*
|
|
62
66
|
function(call) {
|
|
63
67
|
//console.log('CONNECT-START');
|
|
64
68
|
//let post_cart = Cart_Logic.get_new(DataType.PRODUCT,0,);
|
|
@@ -77,8 +81,10 @@ describe("connect", () => {
|
|
|
77
81
|
//console.log('CONNECT-END');
|
|
78
82
|
//call();
|
|
79
83
|
},
|
|
84
|
+
*/
|
|
80
85
|
function(call) {
|
|
81
|
-
console.log('
|
|
86
|
+
console.log('BLANK-START');
|
|
87
|
+
console.log('BLANK-END');
|
|
82
88
|
},
|
|
83
89
|
], function(err) {
|
|
84
90
|
console.log(err.message) // "another thing"
|