ionic-vhframeworks 9.3.5 → 9.3.6
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.
|
@@ -13031,6 +13031,21 @@ export declare class VhQueryAutoWeb {
|
|
|
13031
13031
|
* @return Array(object) => array = [{},{},...]
|
|
13032
13032
|
*/
|
|
13033
13033
|
getlocalBranchs(): any[];
|
|
13034
|
+
/**
|
|
13035
|
+
* @example SET:
|
|
13036
|
+
* this.vhQueryAutoWeb.localStorageSET('local_name', {a=1, b='hai'});
|
|
13037
|
+
* this.vhQueryAutoWeb.localStorageSET('local_name', 15000);
|
|
13038
|
+
* this.vhQueryAutoWeb.localStorageSET('local_name', 'muoi lam nghin dong');
|
|
13039
|
+
* this.vhQueryAutoWeb.localStorageSET('local_name', null);
|
|
13040
|
+
* @returns
|
|
13041
|
+
*/
|
|
13042
|
+
localStorageSET(name: string, value: any): void | null;
|
|
13043
|
+
/**
|
|
13044
|
+
* @example GET:
|
|
13045
|
+
* let object = this.vhQueryAutoWeb.localStorageGET('local_name');
|
|
13046
|
+
* @returns
|
|
13047
|
+
*/
|
|
13048
|
+
localStorageGET(name: string): any;
|
|
13034
13049
|
/**
|
|
13035
13050
|
* Khi giao diện người dùng (user) hoặc trang quản trị (admin) khởi động xong và vào trang chủ xong thì dùng hàm getDefaultBranch() lấy chi nhánh mặc định về (lưu ở local), sẽ có 2 trường hợp xảy ra:
|
|
13036
13051
|
* + Trường hợp lấy về khác null thì kiểm tra chi nhánh này có tồn tại ở database không (dùng hàm getlocalBranch()). Nếu tồn tại thì
|
|
@@ -13620,6 +13635,15 @@ export declare class VhQueryAutoWeb {
|
|
|
13620
13635
|
* @return Promise => array(object) = [{},{},..]
|
|
13621
13636
|
*/
|
|
13622
13637
|
getNewFields_byFields_byPages(query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
13638
|
+
/**
|
|
13639
|
+
* this.vhQueryAutoWeb.getLanguageCodeList()
|
|
13640
|
+
.then((codelist:any)=>{
|
|
13641
|
+
}, error=>{
|
|
13642
|
+
reject(error)
|
|
13643
|
+
})
|
|
13644
|
+
* @returns codelist (array)
|
|
13645
|
+
*/
|
|
13646
|
+
private getLanguageCodeList;
|
|
13623
13647
|
/**
|
|
13624
13648
|
* @example:
|
|
13625
13649
|
* this.vhQueryAutoWeb.addProduct({name:'Sản phẩm 1'})
|
|
@@ -15127,6 +15151,35 @@ export declare class VhQueryAutoWeb {
|
|
|
15127
15151
|
* @return Promise object => response = {vcode, msg, data(array)}
|
|
15128
15152
|
*/
|
|
15129
15153
|
searchList(colname: string, value: any, query?: any, sort?: object): Promise<unknown>;
|
|
15154
|
+
/**
|
|
15155
|
+
* Hàm tìm kiếm textsearch:
|
|
15156
|
+
+ colname = 'products': value tìm trong trường 'name'
|
|
15157
|
+
+ colname = 'foods': value tìm trong trường 'name'
|
|
15158
|
+
+ colname = 'services': value tìm trong trường 'name'
|
|
15159
|
+
+ colname = 'newss': value tìm trong trường 'title' và 'content'
|
|
15160
|
+
* @example
|
|
15161
|
+
* this.vhQueryAutoWeb.searchList_textSearch('products', 'Điện Thoại', {price: {$gte: 10000}}, {price:1})
|
|
15162
|
+
.then(response=>{
|
|
15163
|
+
console.log('response', response);
|
|
15164
|
+
if(response.vcode === 0){
|
|
15165
|
+
let data_searched = response.data;
|
|
15166
|
+
let limit = 20;
|
|
15167
|
+
let page = 1;
|
|
15168
|
+
let data_page = new Array(); //mảng dữ liệu phân theo page
|
|
15169
|
+
for(let i=0; i<data_searched.length;i++){
|
|
15170
|
+
if((i>=limit*(page-1))&&(i<limit*page)) data_page.push(data_searched[i]);
|
|
15171
|
+
}
|
|
15172
|
+
let totalpages = Math.ceil(data_searched.length/limit); // tổng số page
|
|
15173
|
+
}
|
|
15174
|
+
},(error:any)=>{
|
|
15175
|
+
console.log('error', error)
|
|
15176
|
+
})
|
|
15177
|
+
* @param colname
|
|
15178
|
+
* @param query
|
|
15179
|
+
* @param value
|
|
15180
|
+
* @param sort null hoặc {}:không sắp xếp; {date:1}: sắp xếp date theo ASC; {date:-1}: sắp xếp date theo DESC
|
|
15181
|
+
* @return Promise object => response = {vcode, msg, data(array)}
|
|
15182
|
+
*/
|
|
15130
15183
|
searchList_textSearch(colname: string, value: any, query?: any, sort?: object): Promise<unknown>;
|
|
15131
15184
|
/**
|
|
15132
15185
|
* Hàm tìm kiếm likesearch:
|
|
@@ -19725,7 +19778,7 @@ export declare class VhBuildAutoWeb {
|
|
|
19725
19778
|
dynamic_getDetailFood(id_sub_or_food: any): Promise<unknown>;
|
|
19726
19779
|
/**
|
|
19727
19780
|
* @example
|
|
19728
|
-
* this.vhBuildAutoWeb.
|
|
19781
|
+
* this.vhBuildAutoWeb.searchList_textSearch('atw_products', 'Điện Thoại', {}, {})
|
|
19729
19782
|
.then(response=>{
|
|
19730
19783
|
console.log('response', response);
|
|
19731
19784
|
if(response.vcode === 0){
|
|
@@ -21413,7 +21466,7 @@ export declare class VhDesignAutoWeb {
|
|
|
21413
21466
|
static_getDocs_fromDatabase_byFields(database: string, colname: string, query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
21414
21467
|
/**
|
|
21415
21468
|
* @example
|
|
21416
|
-
* this.vhDesignAutoWeb.
|
|
21469
|
+
* this.vhDesignAutoWeb.searchList_textSearch('atw_products', 'Điện Thoại', 'vi', {}, {})
|
|
21417
21470
|
.then(response=>{
|
|
21418
21471
|
console.log('response', response);
|
|
21419
21472
|
if(response.vcode === 0){
|