biz9-logic 4.8.285 → 4.8.290
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 +27 -12
- package/package.json +1 -1
- package/test.js +3 -2
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -177,6 +177,17 @@ class Item_Logic {
|
|
|
177
177
|
return "";
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
|
+
static get_data_search_result = (app_id,data_type,item_count,page_count,filter,data_list,option) =>{
|
|
181
|
+
return{
|
|
182
|
+
option:option?option:{},
|
|
183
|
+
data_type:data_type?data_type:DataType.BLANK,
|
|
184
|
+
item_count:item_count?item_count:0,
|
|
185
|
+
page_count:page_count?page_count:1,
|
|
186
|
+
filter:filter?filter:{},
|
|
187
|
+
data_list:data_list?data_list:[],
|
|
188
|
+
app_id:app_id?app_id:null,
|
|
189
|
+
}
|
|
190
|
+
}
|
|
180
191
|
}
|
|
181
192
|
class Stat_Logic {
|
|
182
193
|
/*
|
|
@@ -1000,12 +1011,12 @@ class DataType {
|
|
|
1000
1011
|
};
|
|
1001
1012
|
}
|
|
1002
1013
|
class Favorite_Logic {
|
|
1003
|
-
static get_new = (parent_data_type,parent_id) =>{
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1014
|
+
static get_new = (parent_data_type,parent_id,user_id) =>{
|
|
1015
|
+
return DataItem.get_new(DataType.FAVORITE,0,{
|
|
1016
|
+
parent_data_type:parent_data_type,
|
|
1017
|
+
parent_id:parent_id,
|
|
1018
|
+
user_id:user_id
|
|
1007
1019
|
});
|
|
1008
|
-
return favorite;
|
|
1009
1020
|
}
|
|
1010
1021
|
static get_favorite_by_list = (favorite_list,item_list) =>{
|
|
1011
1022
|
favorite_list.forEach(item => {
|
|
@@ -1033,14 +1044,14 @@ class Favorite_Logic {
|
|
|
1033
1044
|
}
|
|
1034
1045
|
}
|
|
1035
1046
|
class Review_Logic {
|
|
1036
|
-
static get_new = (
|
|
1047
|
+
static get_new = (parent_data_type,parent_id,user_id,title,comment,rating) =>{
|
|
1037
1048
|
return DataItem.get_new(DataType.REVIEW,0,{
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1049
|
+
parent_data_type:parent_data_type,
|
|
1050
|
+
parent_id:parent_id,
|
|
1051
|
+
user_id:user_id,
|
|
1041
1052
|
title:title ? title : "",
|
|
1042
1053
|
comment:comment ? comment : "",
|
|
1043
|
-
rating:rating ? rating :
|
|
1054
|
+
rating:rating ? rating : 5
|
|
1044
1055
|
});
|
|
1045
1056
|
}
|
|
1046
1057
|
static get_user_search_filter = (item_data_type,user_id) =>{
|
|
@@ -1299,6 +1310,10 @@ class Item_Url {
|
|
|
1299
1310
|
let action_url="item/template/"+key;
|
|
1300
1311
|
return get_cloud_url_main(app_id,url,action_url,params);
|
|
1301
1312
|
};
|
|
1313
|
+
static cloud_flare_photo_list = (app_id,url,params) => {
|
|
1314
|
+
let action_url="item/cloud_flare_photo_list";
|
|
1315
|
+
return get_cloud_url_main(app_id,url,action_url,params);
|
|
1316
|
+
};
|
|
1302
1317
|
}
|
|
1303
1318
|
class Category_Url {
|
|
1304
1319
|
static detail = (app_id,url,key,params) => {
|
|
@@ -1376,8 +1391,8 @@ class Url{
|
|
|
1376
1391
|
let action_url = "main/crud/post/"+data_type + "/" + id;
|
|
1377
1392
|
return get_cloud_url_main(app_id,url,action_url,params);
|
|
1378
1393
|
};
|
|
1379
|
-
static post_list = (app_id,url,
|
|
1380
|
-
let action_url = "main/crud/post_list
|
|
1394
|
+
static post_list = (app_id,url,params) => {
|
|
1395
|
+
let action_url = "main/crud/post_list";
|
|
1381
1396
|
return get_cloud_url_main(app_id,url,action_url,params);
|
|
1382
1397
|
};
|
|
1383
1398
|
}
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -35,8 +35,9 @@ describe("connect", () => {
|
|
|
35
35
|
//let gallery = Gallery_Logic.get_test('Gallery 1',{get_blank:true});
|
|
36
36
|
//console.log(gallery);
|
|
37
37
|
//console.log('ITEM-END');
|
|
38
|
-
console.log('
|
|
39
|
-
console.log(
|
|
38
|
+
console.log('cool');
|
|
39
|
+
console.log(DataType.get_title(DataType.TEMPLATE,true));
|
|
40
|
+
//console.log(FieldType.get_title(FieldType.USER_ROLE_ADMIN));
|
|
40
41
|
console.log('bbbbbb');
|
|
41
42
|
let page = Page_Logic.get_test();
|
|
42
43
|
//page[Item_Logic.get_field_value_title(FieldType.ITEM_FIELD_VALUE_TYPE_TEXT,1)] = 'apple';
|