biz9-logic 4.8.304 → 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 -7
- 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,12 +1908,15 @@ 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,
|
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);
|