biz9-logic 4.8.219 → 4.8.223
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 +59 -0
- package/package.json +1 -1
- package/test.js +5 -4
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -191,6 +191,53 @@ class Page_Logic {
|
|
|
191
191
|
}
|
|
192
192
|
return item_list;
|
|
193
193
|
}
|
|
194
|
+
static get_section_property = (type,section_id,value_id,is_title) =>{
|
|
195
|
+
//page['section_1_value_1_type'] -- / text,note,photo,list
|
|
196
|
+
//page['section_1_value_1_text_value']
|
|
197
|
+
//page['section_1_value_1_note_value']
|
|
198
|
+
//page['section_1_value_1_photo_value']
|
|
199
|
+
//page['section_1_value_1_list_value_1']
|
|
200
|
+
//page['section_1_value_1_list_value_2']
|
|
201
|
+
//page['section_1_value_1_list_value_3']
|
|
202
|
+
let type_str = '';
|
|
203
|
+
switch(type){
|
|
204
|
+
case 'text':
|
|
205
|
+
type_str = 'text';
|
|
206
|
+
break;
|
|
207
|
+
case 'note':
|
|
208
|
+
type_str = 'note';
|
|
209
|
+
break;
|
|
210
|
+
case 'photo':
|
|
211
|
+
type_str = 'photo';
|
|
212
|
+
break;
|
|
213
|
+
case 'list':
|
|
214
|
+
type_str = 'list';
|
|
215
|
+
break;
|
|
216
|
+
};
|
|
217
|
+
return !is_title ? 'section_'+section_id + '_value_'+value_id + "_" + type_str + "_value" : 'Section '+section_id + ' Value '+value_id + " " + Str.get_title(type_str);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
static get_section_property_list = (type,section_id,value_id,row_id) =>{
|
|
221
|
+
//page['section_1_value_1_type'] -- / list
|
|
222
|
+
//page['section_1_value_1_list_field_1']
|
|
223
|
+
//page['section_1_value_1_list_value_1']
|
|
224
|
+
//page['section_1_value_1_list_field_2']
|
|
225
|
+
//page['section_1_value_1_list_value_2']
|
|
226
|
+
//page['section_1_value_1_list_field_3']
|
|
227
|
+
//page['section_1_value_1_list_value_3']
|
|
228
|
+
// section_1_value_2_list_field_value_3
|
|
229
|
+
let type_str = '';
|
|
230
|
+
switch(type){
|
|
231
|
+
case 'field':
|
|
232
|
+
type_str = 'field';
|
|
233
|
+
break;
|
|
234
|
+
case 'value':
|
|
235
|
+
type_str = 'value';
|
|
236
|
+
break;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
return 'section_'+section_id + '_value_'+value_id + "_list_" + type_str +"_" +row_id;
|
|
240
|
+
}
|
|
194
241
|
}
|
|
195
242
|
class Order_Logic {
|
|
196
243
|
static get_order_number = () => {
|
|
@@ -804,6 +851,14 @@ class FieldType {
|
|
|
804
851
|
|
|
805
852
|
static ACTIVITY_TYPE_LOGIN="login";
|
|
806
853
|
static ACTIVITY_TYPE_REGISTER="register";
|
|
854
|
+
|
|
855
|
+
static SECTION_PROPERTY_TYPE_TEXT="text";
|
|
856
|
+
static SECTION_PROPERTY_TYPE_NOTE="note";
|
|
857
|
+
static SECTION_PROPERTY_TYPE_PHOTO="photo";
|
|
858
|
+
static SECTION_PROPERTY_TYPE_LIST="list";
|
|
859
|
+
|
|
860
|
+
static SECTION_PROPERTY_TYPE_LIST_FIELD="field";
|
|
861
|
+
static SECTION_PROPERTY_TYPE_LIST_VALUE="value";
|
|
807
862
|
}
|
|
808
863
|
class Social {
|
|
809
864
|
static FACEBOOK_URL="https://facebook.com/";
|
|
@@ -893,6 +948,10 @@ class PageType {
|
|
|
893
948
|
|
|
894
949
|
}
|
|
895
950
|
class DataType {
|
|
951
|
+
|
|
952
|
+
static SECTION='section';
|
|
953
|
+
static SUB_SECTION='sub_section';
|
|
954
|
+
|
|
896
955
|
static ACTIVITY='activity_biz';
|
|
897
956
|
static APP='app_biz';
|
|
898
957
|
static BLANK='blank_biz';
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -31,10 +31,11 @@ describe("connect", () => {
|
|
|
31
31
|
series([
|
|
32
32
|
|
|
33
33
|
function(call) {
|
|
34
|
-
console.log('
|
|
35
|
-
console.log(
|
|
36
|
-
|
|
37
|
-
console.log(
|
|
34
|
+
console.log('PAGE-SECTION-START');
|
|
35
|
+
//console.log(Page_Logic.get_section_property('text',1,2,false));
|
|
36
|
+
console.log(Page_Logic.get_section_property_list(FieldType.SECTION_PROPERTY_TYPE_LIST_VALUE,1,2,3));
|
|
37
|
+
console.log(Page_Logic.get_section_property_list(FieldType.SECTION_PROPERTY_TYPE_LIST_FIELD,1,2,3));
|
|
38
|
+
console.log('PAGE-SECTION-END');
|
|
38
39
|
|
|
39
40
|
|
|
40
41
|
//console.log('PRODUCT-URL-START');
|