biz9-logic 3.0.15 → 3.0.16

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 (4) hide show
  1. package/biz9_config +1 -1
  2. package/main.js +0 -28
  3. package/package.json +1 -1
  4. package/test.js +28 -28
package/biz9_config CHANGED
@@ -1,4 +1,4 @@
1
- VERSION='3.1.5'
1
+ VERSION='3.1.6'
2
2
  TITLE='BiZ9-Logic';
3
3
  REPO='git@github.com:biz9framework/biz9-logic.git';
4
4
  BRANCH='main';
package/main.js CHANGED
@@ -26,11 +26,8 @@ const get_cloud_url_main = (app_title_id,domain_url,action_url,params) =>{
26
26
  }
27
27
  const get_biz_item_main=(biz9_config,item,options) =>{
28
28
  //option
29
- //get_photo = true
30
- //get_date = true
31
29
  //get_count = true
32
30
  //get_biz_map = true
33
- //
34
31
  if(options.get_count){
35
32
  if(!item.view_count){
36
33
  item.view_count='0';
@@ -42,31 +39,6 @@ const get_biz_item_main=(biz9_config,item,options) =>{
42
39
  item.review_count='0';
43
40
  }
44
41
  }
45
- //photo setting - start
46
- if(options.get_photo){
47
- //photo
48
- if(!item.photofilename){
49
- item.photofilename=null;
50
- }
51
- let no_photo_str='/images/no_image.png';
52
- let _photo_size_thumb='thumb_size_';
53
- let _photo_size_mid='mid_size_';
54
- let _photo_size_large='large_size_';
55
- let _photo_size_square_thumb='square_thumb_size_';
56
- let _photo_size_square_mid='square_mid_size_';
57
- let _photo_size_square_large='square_large_size_';
58
- item.photo_obj={
59
- album_url : (item.photofilename) ? biz9_config.PHOTO_URL+item.photofilename : no_photo_str,
60
- thumb_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_thumb+item.photofilename : no_photo_str,
61
- mid_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_mid+item.photofilename : no_photo_str,
62
- large_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_large+item.photofilename : no_photo_str,
63
- thumb_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_thumb+item.photofilename : no_photo_str,
64
- square_thumb_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_square_thumb+item.photofilename : no_photo_str,
65
- square_mid_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_square_thumb+item.photofilename : no_photo_str,
66
- square_large_url : (item.photofilename) ? biz9_config.PHOTO_URL+_photo_size_square_thumb+item.photofilename : no_photo_str,
67
- };
68
- }
69
- //photo setting - end
70
42
  //date setting - start
71
43
  if(options.get_date){
72
44
  let no_date_str='';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz9-logic",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
package/test.js CHANGED
@@ -53,7 +53,7 @@ describe("connect", () => {
53
53
  function(call) {
54
54
  console.log('GET-URL-START');
55
55
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
56
- let action_url = 'test_get_url_action';
56
+ let action_url = 'test_get_url';
57
57
  let params = '&myparam1=p1&myparam2=p2'
58
58
  let cloud_url = Url.get(biz9_config,action_url,params);
59
59
  Log.w('connect_url',cloud_url);
@@ -63,66 +63,66 @@ describe("connect", () => {
63
63
  function(call) {
64
64
  console.log('CONNECT-START');
65
65
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
66
- let cloud_url = Url.get_action_connect(biz9_config);
66
+ let cloud_url = Url.connect(biz9_config);
67
67
  Log.w('connect_url',cloud_url);
68
68
  console.log('CONNECT-SUCCESS');
69
69
  call()
70
70
  },
71
71
  function(call) {
72
- console.log('GET_URL-ACTION-UPDATE-ITEM-START');
72
+ console.log('GET_URL-UPDATE-ITEM-START');
73
73
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
74
74
  let data_type = 'dt_blank';
75
75
  let id = 0;
76
- let cloud_url = Url.get_action_update_item(biz9_config,data_type,id);
77
- Log.w('get_url_action_update_item',cloud_url);
78
- console.log('GET_URL-ACTION-UPDATE-ITEM-SUCCESS');
76
+ let cloud_url = Url.update_item(biz9_config,data_type,id);
77
+ Log.w('get_url_update_item',cloud_url);
78
+ console.log('GET_URL-UPDATE-ITEM-SUCCESS');
79
79
  call()
80
80
  },
81
81
  function(call) {
82
- console.log('GET_URL-ACTION-GET-ITEM-START');
82
+ console.log('GET_URL-GET-ITEM-START');
83
83
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
84
84
  let data_type = 'dt_blank';
85
85
  let id = 0;
86
- let cloud_url = Url.get_action_get_item(biz9_config,data_type,id);
87
- Log.w('get_url_action_get_item',cloud_url);
88
- console.log('GET_URL-ACTION-GET-ITEM-SUCCESS');
86
+ let cloud_url = Url.get_item(biz9_config,data_type,id);
87
+ Log.w('get_url_get_item',cloud_url);
88
+ console.log('GET_URL-GET-ITEM-SUCCESS');
89
89
  call()
90
90
  },
91
91
  function(call) {
92
- console.log('GET_URL-ACTION-DELETE-ITEM-START');
92
+ console.log('GET_URL-DELETE-ITEM-START');
93
93
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
94
94
  let data_type = 'dt_blank';
95
95
  let id = 0;
96
- let cloud_url = Url.get_action_delete_item(biz9_config,data_type,id);
97
- Log.w('get_url_action_delete_item',cloud_url);
98
- console.log('GET_URL-ACTION-DELETE-ITEM-SUCCESS');
96
+ let cloud_url = Url.delete_item(biz9_config,data_type,id);
97
+ Log.w('get_url_delete_item',cloud_url);
98
+ console.log('GET_URL-DELETE-ITEM-SUCCESS');
99
99
  call()
100
100
  },
101
101
  function(call) {
102
- console.log('GET_URL-ACTION-GET-LIST-ITEM-START');
102
+ console.log('GET_URL-GET-LIST-ITEM-START');
103
103
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
104
104
  let data_type = 'dt_blank';
105
- let cloud_url = Url.get_action_get_list(biz9_config,data_type);
106
- Log.w('get_url_action_get_list_item',cloud_url);
107
- console.log('GET_URL-ACTION-GET-LIST-ITEM-SUCCESS');
105
+ let cloud_url = Url.get_list(biz9_config,data_type);
106
+ Log.w('get_url_get_list',cloud_url);
107
+ console.log('GET_URL-GET-LIST-ITEM-SUCCESS');
108
108
  call()
109
109
  },
110
110
  function(call) {
111
- console.log('GET_URL-ACTION-DELETE-LIST-ITEM-START');
111
+ console.log('GET_URL-DELETE-LIST-ITEM-START');
112
112
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
113
113
  let data_type = 'dt_blank';
114
- let cloud_url = Url.get_action_delete_list(biz9_config,data_type);
115
- Log.w('get_url_action_delete_list_item',cloud_url);
116
- console.log('GET_URL-ACTION-DELETE-LIST-ITEM-SUCCESS');
114
+ let cloud_url = Url.delete_list(biz9_config,data_type);
115
+ Log.w('get_url_delete_list_item',cloud_url);
116
+ console.log('GET_URL-DELETE-LIST-ITEM-SUCCESS');
117
117
  call()
118
118
  },
119
119
  function(call) {
120
- console.log('GET_URL-ACTION-UPDATE-LIST-ITEM-START');
120
+ console.log('GET_URL-UPDATE-LIST-ITEM-START');
121
121
  let biz9_config = Scriptz.get_biz9_config({biz9_config_file:path.resolve('../../biz9_config')});
122
122
  let data_type = 'dt_blank';
123
- let cloud_url = Url.get_action_update_list(biz9_config,data_type);
124
- Log.w('get_url_action_update_list_item',cloud_url);
125
- console.log('GET_URL-ACTION-UPDATE-LIST-ITEM-SUCCESS');
123
+ let cloud_url = Url.update_list(biz9_config,data_type);
124
+ Log.w('get_url_update_list_item',cloud_url);
125
+ console.log('GET_URL-UPDATE-LIST-ITEM-SUCCESS');
126
126
  call()
127
127
  },
128
128
  function(call) {
@@ -133,7 +133,7 @@ describe("connect", () => {
133
133
  let page_current = 0;
134
134
  let page_size = 15;
135
135
  let filter_obj = Obj.get_filter(data_type,filter,sort_by,page_current,page_size);
136
- Log.w('get_url_action_filter_obj',filter_obj);
136
+ Log.w('get_filter_obj',filter_obj);
137
137
  console.log('GET_FILTER-OBJECT-SUCCESS');
138
138
  call()
139
139
  },
@@ -154,7 +154,7 @@ describe("connect", () => {
154
154
  item_test.value_2 = 'my_value_2';
155
155
  item_test.field_3 = 'my_field_3';
156
156
  item_test.value_3 = 'my_value_3';
157
- let item_biz = Item.get_biz(biz9_config,item_test,{get_photo:true,get_date:true,get_count:true,get_biz_map:true});
157
+ let item_biz = Item.get_biz(biz9_config,item_test,{get_date:true,get_count:true,get_biz_map:true});
158
158
  console.log(item_biz);
159
159
  console.log('SET-ITEM-BIZ-SUCCESS');
160
160
  call();