biz9-logic 4.8.284 → 4.8.289

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.
Files changed (3) hide show
  1. package/biz9_config +1 -1
  2. package/index.js +24 -17
  3. package/package.json +1 -1
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='7.6.4'
1
+ VERSION='7.6.9'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
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
- let favorite = DataItem.get_new(DataType.FAVORITE,0,{
1005
- item_data_type:itemitem_data_type,
1006
- item_id:item_id,
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 = (item_data_type,item_id,title,comment,rating) =>{
1047
+ static get_new = (parent_data_type,parent_id,user_id,title,comment,rating) =>{
1037
1048
  return DataItem.get_new(DataType.REVIEW,0,{
1038
- item_data_type:item_data_type,
1039
- item_id:item_id,
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) =>{
@@ -1239,10 +1250,6 @@ class Item_Url {
1239
1250
  let action_url="item/content/"+key;
1240
1251
  return get_cloud_url_main(app_id,url,action_url,params);
1241
1252
  };
1242
- static content = (app_id,url,key,params) => {
1243
- let action_url="item/content/"+key;
1244
- return get_cloud_url_main(app_id,url,action_url,params);
1245
- };
1246
1253
  static custom_field = (app_id,url,data_type,key,params) => {
1247
1254
  let action_url="item/custom_field/"+data_type+"/"+key;
1248
1255
  return get_cloud_url_main(app_id,url,action_url,params);
@@ -1252,7 +1259,7 @@ class Item_Url {
1252
1259
  return get_cloud_url_main(app_id,url,action_url,params);
1253
1260
  };
1254
1261
  static delete_cart = (app_id,url,id,params) => {
1255
- let action_url="item/delete_cart"+id;
1262
+ let action_url="item/delete_cart/"+id;
1256
1263
  return get_cloud_url_main(app_id,url,action_url,params);
1257
1264
  };
1258
1265
  static favorite = (app_id,url,parent_data_type,page_current,page_size,params) => {
@@ -1380,8 +1387,8 @@ class Url{
1380
1387
  let action_url = "main/crud/post/"+data_type + "/" + id;
1381
1388
  return get_cloud_url_main(app_id,url,action_url,params);
1382
1389
  };
1383
- static post_list = (app_id,url,data_type,params) => {
1384
- let action_url = "main/crud/post_list/"+data_type;
1390
+ static post_list = (app_id,url,params) => {
1391
+ let action_url = "main/crud/post_list";
1385
1392
  return get_cloud_url_main(app_id,url,action_url,params);
1386
1393
  };
1387
1394
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "4.8.284",
3
+ "version": "4.8.289",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"