biz9-logic 4.8.302 → 4.8.305
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 +20 -19
- package/package.json +1 -1
- package/test.js +7 -6
package/biz9_config
CHANGED
package/index.js
CHANGED
|
@@ -1255,10 +1255,6 @@ class Image_Url {
|
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
1257
|
class Item_Url {
|
|
1258
|
-
static activity = (app_id,url,param) => {
|
|
1259
|
-
let action_url="item/activity";
|
|
1260
|
-
return get_cloud_url_main(app_id,url,action_url,param);
|
|
1261
|
-
};
|
|
1262
1258
|
static cart = (app_id,url,cart_number,param) => {
|
|
1263
1259
|
let action_url="item/cart/"+cart_number;
|
|
1264
1260
|
return get_cloud_url_main(app_id,url,action_url,param);
|
|
@@ -1745,6 +1741,20 @@ class User_Logic {
|
|
|
1745
1741
|
{value:'guest',label:"Guest"},
|
|
1746
1742
|
];
|
|
1747
1743
|
};
|
|
1744
|
+
static get_role_title(role_type){
|
|
1745
|
+
switch(role_type){
|
|
1746
|
+
case FieldType.USER_ROLE_SUPER_ADMIN:
|
|
1747
|
+
return "Super Admin";
|
|
1748
|
+
case FieldType.USER_ROLE_ADMIN:
|
|
1749
|
+
return "Admin";
|
|
1750
|
+
case FieldType.USER_ROLE_Manager:
|
|
1751
|
+
return "Manager";
|
|
1752
|
+
case FieldType.USER_ROLE_USER:
|
|
1753
|
+
return "User";
|
|
1754
|
+
case FieldType.USER_ROLE_GUEST:
|
|
1755
|
+
return "Guest";
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1748
1758
|
static get_country_state_city(item){
|
|
1749
1759
|
let country_state_city = "";
|
|
1750
1760
|
if(item.country == "United States"){
|
|
@@ -1898,60 +1908,51 @@ class App_Logic {
|
|
|
1898
1908
|
}
|
|
1899
1909
|
class Image_Logic {
|
|
1900
1910
|
static get_url = (host,image_filename,size,param) =>{
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1911
|
+
host = host ? host : "";
|
|
1912
|
+
image_filename = image_filename ? image_filename : "";
|
|
1913
|
+
size = size ? size : "";
|
|
1914
|
+
param = param ? param : "";
|
|
1904
1915
|
return host+"/"+size + "_"+image_filename+param;
|
|
1905
1916
|
}
|
|
1906
1917
|
static get_process_list = (upload_dir,image_filename) =>{
|
|
1918
|
+
upload_dir = upload_dir ? upload_dir : "";
|
|
1919
|
+
image_filename = image_filename ? image_filename : "";
|
|
1907
1920
|
return [
|
|
1908
1921
|
{
|
|
1909
1922
|
image_filename:FieldType.IMAGE_SIZE_THUMB+"_"+image_filename,
|
|
1910
1923
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_THUMB+"_"+image_filename,
|
|
1911
1924
|
size:250,
|
|
1912
1925
|
is_square:false,
|
|
1913
|
-
post_file:false,
|
|
1914
|
-
post_cdn:false
|
|
1915
1926
|
},
|
|
1916
1927
|
{
|
|
1917
1928
|
image_filename:FieldType.IMAGE_SIZE_MID+"_"+image_filename,
|
|
1918
1929
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_MID+"_"+image_filename,
|
|
1919
1930
|
size:720,
|
|
1920
1931
|
is_square:false,
|
|
1921
|
-
post_file:false,
|
|
1922
|
-
post_cdn:false
|
|
1923
1932
|
},
|
|
1924
1933
|
{
|
|
1925
1934
|
image_filename:FieldType.IMAGE_SIZE_LARGE+"_"+image_filename,
|
|
1926
1935
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_LARGE+"_"+image_filename,
|
|
1927
1936
|
size:1000,
|
|
1928
1937
|
is_square:false,
|
|
1929
|
-
post_file:false,
|
|
1930
|
-
post_cdn:false
|
|
1931
1938
|
},
|
|
1932
1939
|
{
|
|
1933
1940
|
image_filename:FieldType.IMAGE_SIZE_SQUARE_THUMB+"_"+image_filename,
|
|
1934
1941
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_SQUARE_THUMB+"_"+image_filename,
|
|
1935
1942
|
size:250,
|
|
1936
1943
|
is_square:true,
|
|
1937
|
-
post_file:false,
|
|
1938
|
-
post_cdn:false
|
|
1939
1944
|
},
|
|
1940
1945
|
{
|
|
1941
1946
|
image_filename:FieldType.IMAGE_SIZE_SQUARE_MID+"_"+image_filename,
|
|
1942
1947
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_SQUARE_MID+"_"+image_filename,
|
|
1943
1948
|
size:720,
|
|
1944
1949
|
is_square:true,
|
|
1945
|
-
post_file:false,
|
|
1946
|
-
post_cdn:false
|
|
1947
1950
|
},
|
|
1948
1951
|
{
|
|
1949
1952
|
image_filename:FieldType.IMAGE_SIZE_SQUARE_LARGE+"_"+image_filename,
|
|
1950
1953
|
path_filename:upload_dir+"/"+FieldType.IMAGE_SIZE_SQUARE_LARGE+"_"+image_filename,
|
|
1951
1954
|
size:1000,
|
|
1952
1955
|
is_square:true,
|
|
1953
|
-
post_file:false,
|
|
1954
|
-
post_cdn:false
|
|
1955
1956
|
},
|
|
1956
1957
|
];
|
|
1957
1958
|
}
|
package/package.json
CHANGED
package/test.js
CHANGED
|
@@ -35,8 +35,8 @@ 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('cool');
|
|
39
|
-
console.log(Image_Logic.get_process_list('upload/photos','apple'));
|
|
38
|
+
//console.log('cool');
|
|
39
|
+
//console.log(Image_Logic.get_process_list('upload/photos','apple'));
|
|
40
40
|
//console.log(DataType.get_title(DataType.TEMPLATE,true));
|
|
41
41
|
//console.log(FieldType.get_title(FieldType.USER_ROLE_ADMIN));
|
|
42
42
|
//console.log('bbbbbb');
|
|
@@ -77,7 +77,7 @@ describe("connect", () => {
|
|
|
77
77
|
//let cloud_url = Category_Url.get_page(biz9_config,'cool');
|
|
78
78
|
//Log.w('cloud_url',cloud_url);
|
|
79
79
|
//console.log('GET-URL-SUCCESS');
|
|
80
|
-
|
|
80
|
+
call();
|
|
81
81
|
},
|
|
82
82
|
|
|
83
83
|
function(call) {
|
|
@@ -141,9 +141,10 @@ describe("connect", () => {
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
/* --USER--START */
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
console.log('aaaaa');
|
|
145
|
+
let user = {country:"United States",state:"Michigan",city:"cccccccccdddd"};
|
|
146
|
+
let country_state = User_Logic.get_country_state_city(user);
|
|
147
|
+
Log.w('country_state',country_state);
|
|
147
148
|
//let user = User_Logic.get_test();
|
|
148
149
|
//let user_list = User_Logic.get_test_list();
|
|
149
150
|
//Log.w('user',user);
|