ionic-vhframeworks 8.2.6 → 8.2.8
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.
|
@@ -157,12 +157,12 @@ export declare class VhAlgorithm {
|
|
|
157
157
|
*/
|
|
158
158
|
isToday(date: any): boolean;
|
|
159
159
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
* @example SET:
|
|
161
|
+
* localStorageSET('local_name', {a=1, b='hai'});
|
|
162
|
+
* localStorageSET('local_name', 15000);
|
|
163
|
+
* localStorageSET('local_name', 'muoi lam nghin dong');
|
|
164
|
+
* @returns
|
|
165
|
+
*/
|
|
166
166
|
localStorageSET(name: string, value: any): void;
|
|
167
167
|
/**
|
|
168
168
|
* @example GET:
|
|
@@ -512,10 +512,11 @@ export declare class VhAuth {
|
|
|
512
512
|
*/
|
|
513
513
|
onAuthStateChanged(): Promise<unknown>;
|
|
514
514
|
signUpOwner_AutoWeb_Designer(email: string, password: string, phoneNumber: string, info: object): Promise<unknown>;
|
|
515
|
+
signUpOwner_AutoWeb_Mongo_Designer(email: string, password: string, phoneNumber: string, info: object): Promise<unknown>;
|
|
515
516
|
signUpOwner_AutoWeb_Developer(email: string, password: string, phoneNumber: string, info: any): Promise<unknown>;
|
|
516
517
|
/**
|
|
517
518
|
* @example:
|
|
518
|
-
* this.vhAuth.
|
|
519
|
+
* this.vhAuth.signInWithEmailAndPassword_AutoWeb_Designer('emp11@gmail.com', '123456')
|
|
519
520
|
.then((rsp)=>{
|
|
520
521
|
if(rsp.vcode===0){
|
|
521
522
|
this.vhQueryAutoWeb.syncCollections_Desktop()
|
|
@@ -880,6 +881,24 @@ export declare class VhAuth {
|
|
|
880
881
|
* @returns Promise
|
|
881
882
|
*/
|
|
882
883
|
initializeBuildProject(projectname: string, dbstorage: string, imgstorage: string, cssstorage: string, dbserverversion: string, camserverversion: string, fwcode: number, database: string): any;
|
|
884
|
+
/**
|
|
885
|
+
* @example:
|
|
886
|
+
* this.vhAuth.initializeDesignProject('vhsales','firebase-mongo', 'viethas', 'firebase', 'research', 'research', 324852)
|
|
887
|
+
.then(()=>{
|
|
888
|
+
resolve(null);
|
|
889
|
+
},error=>{
|
|
890
|
+
reject(error);
|
|
891
|
+
})
|
|
892
|
+
* @param projectname
|
|
893
|
+
* @param dbstorage: 'firebase', 'firebase-mongo', or 'mongo'
|
|
894
|
+
* @param imgstorage: 'firebase' or 'viethas'
|
|
895
|
+
* @param cssstorage : nơi css sẽ được lưu trữ 'local', 'firebase', 'mongo' or 'file'
|
|
896
|
+
* @param dbserverversion
|
|
897
|
+
* @param camserverversion
|
|
898
|
+
* @param fwcode
|
|
899
|
+
* @returns Promise
|
|
900
|
+
*/
|
|
901
|
+
initializeDesignProject(projectname: string, dbstorage: string, imgstorage: string, cssstorage: string, dbserverversion: string, camserverversion: string, fwcode: number): any;
|
|
883
902
|
/**
|
|
884
903
|
* @example:
|
|
885
904
|
* this.vhAuth.initializeWebAppProject('vhsales', 356842, 'all');
|
|
@@ -1754,6 +1773,53 @@ export declare class VhImage {
|
|
|
1754
1773
|
* vcode === 4 : import file ảnh không đúng định dạng
|
|
1755
1774
|
*/
|
|
1756
1775
|
getImageFromDesktop(file: any, path: any, oldthumbnailURL?: any, maxSize?: any): Promise<any>;
|
|
1776
|
+
/**
|
|
1777
|
+
* @example:Lấy hình ảnh từ Desktop đẩy lên server với kích thước hình theo options truyền vào
|
|
1778
|
+
* onUpload(e?) {
|
|
1779
|
+
const file = e.target.files[0];
|
|
1780
|
+
this.vhImage.getImageFromDesktop_Autoweb(file,"images/database/categories", options)
|
|
1781
|
+
.then((rsp:any)=>{
|
|
1782
|
+
console.log('rsp', rsp);
|
|
1783
|
+
if(rsp.vcode === 0){
|
|
1784
|
+
if(options.compress_type == 'no-compress-all'){
|
|
1785
|
+
|
|
1786
|
+
}else if(options.compress_type == 'no-compress-one'){
|
|
1787
|
+
|
|
1788
|
+
}else if(options.compress_type == 'compress-sreen'){
|
|
1789
|
+
|
|
1790
|
+
}else if(options.compress_type == 'compress-frame'){
|
|
1791
|
+
|
|
1792
|
+
}
|
|
1793
|
+
}else if(rsp.vcode === 1){
|
|
1794
|
+
|
|
1795
|
+
}else if(rsp.vcode === 2){
|
|
1796
|
+
|
|
1797
|
+
}else if(rsp.vcode === 3){
|
|
1798
|
+
|
|
1799
|
+
}
|
|
1800
|
+
this.vhComponent.showToast(2000, (this.languageService.translate("Image was loaded successfully")));
|
|
1801
|
+
},error => {
|
|
1802
|
+
this.vhComponent.showToast(2000, (this.languageService.translate("Image was failed")));
|
|
1803
|
+
}
|
|
1804
|
+
);
|
|
1805
|
+
}
|
|
1806
|
+
* @param file
|
|
1807
|
+
* @param path: 'images/database/categories' or 'images/database/categories/products'
|
|
1808
|
+
* @param options: {compress_type, resolution}
|
|
1809
|
+
* @field compress_type:
|
|
1810
|
+
* + 'no-compress-all': Không nén ảnh sau khi tải lên, 1 ảnh dùng chung cho tất cả các thiết bị (platform)
|
|
1811
|
+
* + 'no-compress-one': Không nén ảnh sau khi tải lên, mỗi thiết bị upload lên server 1 ảnh riêng
|
|
1812
|
+
* + 'compress-sreen': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi thiết bị
|
|
1813
|
+
* + 'compress-frame': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi khung hình thiết bị
|
|
1814
|
+
* @field resolution: {desktop: {width, height}, mobile_landscape: {}, mobile_portrait:{}, tablet_landscape:{}, tablet_portrait:{}}
|
|
1815
|
+
* @returns Object => obj = {vcode, message, data, error}
|
|
1816
|
+
* vcode === 0 : upload ảnh thành công
|
|
1817
|
+
* vcode === 1 : lỗi import file ảnh
|
|
1818
|
+
* vcode === 2 : lỗi upload file ảnh
|
|
1819
|
+
* vcode === 3 : không thể upload file ảnh lớn hơn maxSize (byte)
|
|
1820
|
+
* vcode === 4 : import file ảnh không đúng định dạng
|
|
1821
|
+
*/
|
|
1822
|
+
getImageFromDesktop_Autoweb(file: any, path: any, options: any): Promise<any>;
|
|
1757
1823
|
/**
|
|
1758
1824
|
* @example:Lấy hình file bất kỳ từ Desktop đẩy lên server với kích thước ko thay đổi
|
|
1759
1825
|
* onUpload(e?) {
|
|
@@ -12432,6 +12498,98 @@ export declare class VhQueryAutoWeb {
|
|
|
12432
12498
|
* @return Object => obj = {} hoặc null
|
|
12433
12499
|
*/
|
|
12434
12500
|
getUnit_byRatio(units: any, ratio: number): any;
|
|
12501
|
+
/**
|
|
12502
|
+
* @example:
|
|
12503
|
+
* let data = {
|
|
12504
|
+
* name: 'TCL',
|
|
12505
|
+
* code_type: 10,
|
|
12506
|
+
* type: 1
|
|
12507
|
+
* }
|
|
12508
|
+
* this.vhQueryAutoWeb.addEWADocument(data)
|
|
12509
|
+
.then((EWAdocument)=>{
|
|
12510
|
+
console.log('addEWADocument', EWAdocument);
|
|
12511
|
+
},(error:any)=>{
|
|
12512
|
+
console.log('error', error);
|
|
12513
|
+
})
|
|
12514
|
+
* @param id_EWAdocument
|
|
12515
|
+
* @param data : {}
|
|
12516
|
+
* @return Promise => obj = {} /error
|
|
12517
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
12518
|
+
*/
|
|
12519
|
+
addEWADocument(data: object): Promise<unknown>;
|
|
12520
|
+
/**
|
|
12521
|
+
* @example:
|
|
12522
|
+
* let data = {
|
|
12523
|
+
* name: 'TCL',
|
|
12524
|
+
* code_type: 10,
|
|
12525
|
+
* type: 1
|
|
12526
|
+
* }
|
|
12527
|
+
* this.vhQueryAutoWeb.addEWADocument_byID('5fb6780ca2148e09806c5b01', data)
|
|
12528
|
+
.then((EWAdocument)=>{
|
|
12529
|
+
console.log('addEWADocument_byID', EWAdocument);
|
|
12530
|
+
},(error:any)=>{
|
|
12531
|
+
console.log('error', error);
|
|
12532
|
+
})
|
|
12533
|
+
* @param id_EWAdocument
|
|
12534
|
+
* @param data : {}
|
|
12535
|
+
* @return Promise => obj = {} /error
|
|
12536
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
12537
|
+
*/
|
|
12538
|
+
addEWADocument_byID(id_EWAdocument: string, data: object): Promise<unknown>;
|
|
12539
|
+
/**
|
|
12540
|
+
* @example:
|
|
12541
|
+
* this.vhQueryAutoWeb.updateEWADocument('5fb6780ca2148e09806c5b01', {code_type: 9})
|
|
12542
|
+
.then(()=>{
|
|
12543
|
+
console.log('updateEWADocument');
|
|
12544
|
+
}, error=>{
|
|
12545
|
+
console.log('error');
|
|
12546
|
+
})
|
|
12547
|
+
* @param id_EWAdocument
|
|
12548
|
+
* @param value : {}
|
|
12549
|
+
* @return Promise => response = undefined / error
|
|
12550
|
+
*/
|
|
12551
|
+
updateEWADocument(id_EWAdocument: string, value: object): Promise<unknown>;
|
|
12552
|
+
/**
|
|
12553
|
+
* @example:
|
|
12554
|
+
* this.vhQueryAutoWeb.deleteEWADocument('5fb67fda87c0f21d484cbdf3')
|
|
12555
|
+
.then(()=>{
|
|
12556
|
+
console.log('deleteEWADocument');
|
|
12557
|
+
})
|
|
12558
|
+
* @param id_EWAdocument
|
|
12559
|
+
* @return Promise => response = undefined / error
|
|
12560
|
+
*/
|
|
12561
|
+
deleteEWADocument(id_EWAdocument: string): Promise<unknown>;
|
|
12562
|
+
/**
|
|
12563
|
+
* @example
|
|
12564
|
+
* this.vhQueryAutoWeb.getEWADocument('5fb67fda87c0f21d484cbdf3')
|
|
12565
|
+
.then((EWAdocument)=>{
|
|
12566
|
+
console.log('getEWADocument', EWAdocument);
|
|
12567
|
+
},(error:any)=>{
|
|
12568
|
+
console.log('error', error);
|
|
12569
|
+
})
|
|
12570
|
+
* @param id_EWAdocument
|
|
12571
|
+
* @return Promise => response ={} or null / error
|
|
12572
|
+
*/
|
|
12573
|
+
getEWADocument(id_EWAdocument: string): Promise<unknown>;
|
|
12574
|
+
/**
|
|
12575
|
+
* @example
|
|
12576
|
+
* this.vhQueryAutoWeb.getEWADocuments_byfields({name:{$eq:'name abc'}}, {},{},0)
|
|
12577
|
+
.then(response=>{
|
|
12578
|
+
console.log('response', response);
|
|
12579
|
+
if(response.vcode === 0){
|
|
12580
|
+
//-----------your code-----------
|
|
12581
|
+
let products = response.data;
|
|
12582
|
+
}
|
|
12583
|
+
},(error:any)=>{
|
|
12584
|
+
console.log('error', error)
|
|
12585
|
+
})
|
|
12586
|
+
* @param query
|
|
12587
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
12588
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
12589
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
12590
|
+
* @return Promise => array(object) = [{},{},..]
|
|
12591
|
+
*/
|
|
12592
|
+
getEWADocuments_byfields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
|
|
12435
12593
|
/**
|
|
12436
12594
|
* @example:
|
|
12437
12595
|
* this.vhQueryAutoWeb.addBranch({name:'Chi nhánh 2'})
|
|
@@ -12602,6 +12760,18 @@ export declare class VhQueryAutoWeb {
|
|
|
12602
12760
|
* @return Promise => page = {}
|
|
12603
12761
|
*/
|
|
12604
12762
|
getDetailPage(id_page: any): Promise<unknown>;
|
|
12763
|
+
/**
|
|
12764
|
+
* this.vhQueryAutoWeb.getCanBeClonedBlockOrObject(null, 'root')
|
|
12765
|
+
.then((array)=>{
|
|
12766
|
+
console.log('getCanBeClonedBlockOrObject', array);
|
|
12767
|
+
},(error:any)=>{
|
|
12768
|
+
console.log('error', error);
|
|
12769
|
+
})
|
|
12770
|
+
* @param id_node: id của node hover chuột lên
|
|
12771
|
+
* @param type: loại node là 'root', 'page', 'block', 'object'
|
|
12772
|
+
* @return Promise => array = [{_id, name, type},...]
|
|
12773
|
+
*/
|
|
12774
|
+
getCanBeClonedBlockOrObject(id_node: string, type: string): Promise<unknown>;
|
|
12605
12775
|
/**
|
|
12606
12776
|
* @example:
|
|
12607
12777
|
* this.vhQueryAutoWeb.CreatePageDetail({name:'Danh mục 1'})
|
|
@@ -13084,6 +13254,26 @@ export declare class VhQueryAutoWeb {
|
|
|
13084
13254
|
*/
|
|
13085
13255
|
getProducts_byFields(query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
13086
13256
|
/**
|
|
13257
|
+
* @example:
|
|
13258
|
+
* this.vhQueryAutoWeb.getProducts_byFields_byPages({name:{$eq:'name abc'}}, {},{},6,1)
|
|
13259
|
+
.then(response=>{
|
|
13260
|
+
console.log('response', response);
|
|
13261
|
+
if(response.vcode === 0){
|
|
13262
|
+
//-----------your code-----------
|
|
13263
|
+
let products = response.data;
|
|
13264
|
+
}
|
|
13265
|
+
},(error:any)=>{
|
|
13266
|
+
console.log('error', error)
|
|
13267
|
+
})
|
|
13268
|
+
* @param query
|
|
13269
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
13270
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
13271
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
13272
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
13273
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
13274
|
+
*/
|
|
13275
|
+
getProducts_byFields_byPages(query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
13276
|
+
/**
|
|
13087
13277
|
* @example
|
|
13088
13278
|
* let id_sub_or_product = id_subproduct?id_subproduct:id_product;
|
|
13089
13279
|
* this.vhQueryAutoWeb.getDetailProduct(id_sub_or_product)
|
|
@@ -13116,6 +13306,26 @@ export declare class VhQueryAutoWeb {
|
|
|
13116
13306
|
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
13117
13307
|
*/
|
|
13118
13308
|
getDetailProducts_byFields(query: object, projection?: object, sort?: object, limit?: number, page?: number): Promise<unknown>;
|
|
13309
|
+
/**
|
|
13310
|
+
* @example:
|
|
13311
|
+
* this.vhQueryAutoWeb.getDetailProductsByFields({name:{$eq:'name abc'}}, {},{},6,1)
|
|
13312
|
+
.then(response=>{
|
|
13313
|
+
console.log('response', response);
|
|
13314
|
+
if(response.vcode === 0){
|
|
13315
|
+
//-----------your code-----------
|
|
13316
|
+
let products = response.data;
|
|
13317
|
+
}
|
|
13318
|
+
},(error:any)=>{
|
|
13319
|
+
console.log('error', error)
|
|
13320
|
+
})
|
|
13321
|
+
* @param query
|
|
13322
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
13323
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
13324
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
13325
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
13326
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
13327
|
+
*/
|
|
13328
|
+
getDetailProducts_byFields_byPages(query: object, projection?: object, sort?: object, limit?: number, page?: number): Promise<unknown>;
|
|
13119
13329
|
/**
|
|
13120
13330
|
* hàm này tạo product và thêm subs vào product (lần đầu)
|
|
13121
13331
|
* Lưu ý: trong product, subProductArray không có các trường quantity, quantity_branch và subs
|
|
@@ -18937,6 +19147,120 @@ export declare class VhDesignAutoWeb {
|
|
|
18937
19147
|
* @return Promise => array(object) = [{},{},..]
|
|
18938
19148
|
*/
|
|
18939
19149
|
dynamic_getDocs_fromService_byFields(colname: string, query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
19150
|
+
/**
|
|
19151
|
+
* @example
|
|
19152
|
+
* this.vhDesignAutoWeb.dynamic_getProduct('categories', '5fb67fda87c0f21d484cbdf3')
|
|
19153
|
+
.then((doc)=>{
|
|
19154
|
+
console.log('dynamic_getProduct', doc);
|
|
19155
|
+
})
|
|
19156
|
+
* @param id_doc
|
|
19157
|
+
* @return null or object
|
|
19158
|
+
*/
|
|
19159
|
+
dynamic_getProduct(colname: string, id_doc: string): Promise<unknown>;
|
|
19160
|
+
/**
|
|
19161
|
+
* @example:
|
|
19162
|
+
* this.vhDesignAutoWeb.dynamic_getProducts_byFields('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
19163
|
+
.then(response=>{
|
|
19164
|
+
console.log('response', response);
|
|
19165
|
+
//-----------your code-----------
|
|
19166
|
+
let products = response.data;
|
|
19167
|
+
},(error:any)=>{
|
|
19168
|
+
console.log('error', error)
|
|
19169
|
+
})
|
|
19170
|
+
* @param colname
|
|
19171
|
+
* @param query
|
|
19172
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
19173
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
19174
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
19175
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
19176
|
+
* @return Promise => array(object) = [{},{},..]
|
|
19177
|
+
*/
|
|
19178
|
+
dynamic_getProducts_byFields(colname: string, query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
19179
|
+
/**
|
|
19180
|
+
* @example:
|
|
19181
|
+
* this.vhDesignAutoWeb.dynamic_getProducts_byFields_byPages('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
19182
|
+
.then(response=>{
|
|
19183
|
+
console.log('response', response);
|
|
19184
|
+
if(response.vcode === 0){
|
|
19185
|
+
//-----------your code-----------
|
|
19186
|
+
let products = response.data;
|
|
19187
|
+
}
|
|
19188
|
+
},(error:any)=>{
|
|
19189
|
+
console.log('error', error)
|
|
19190
|
+
})
|
|
19191
|
+
* @param colname
|
|
19192
|
+
* @param query
|
|
19193
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
19194
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
19195
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
19196
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
19197
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
19198
|
+
*/
|
|
19199
|
+
dynamic_getProducts_byFields_byPages(colname: string, query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
19200
|
+
/**
|
|
19201
|
+
* @example:
|
|
19202
|
+
* this.vhDesignAutoWeb.dynamic_getDetailProducts_byFields('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
19203
|
+
.then(response=>{
|
|
19204
|
+
console.log('response', response);
|
|
19205
|
+
//-----------your code-----------
|
|
19206
|
+
let products = response.data;
|
|
19207
|
+
},(error:any)=>{
|
|
19208
|
+
console.log('error', error)
|
|
19209
|
+
})
|
|
19210
|
+
* @param colname
|
|
19211
|
+
* @param query
|
|
19212
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
19213
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
19214
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
19215
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
19216
|
+
* @return Promise => array(object) = [{},{},..]
|
|
19217
|
+
*/
|
|
19218
|
+
dynamic_getDetailProducts_byFields(colname: string, query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
19219
|
+
/**
|
|
19220
|
+
* @example:
|
|
19221
|
+
* this.vhDesignAutoWeb.dynamic_getDetailProducts_byFields_byPages('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
19222
|
+
.then(response=>{
|
|
19223
|
+
console.log('response', response);
|
|
19224
|
+
if(response.vcode === 0){
|
|
19225
|
+
//-----------your code-----------
|
|
19226
|
+
let products = response.data;
|
|
19227
|
+
}
|
|
19228
|
+
},(error:any)=>{
|
|
19229
|
+
console.log('error', error)
|
|
19230
|
+
})
|
|
19231
|
+
* @param colname
|
|
19232
|
+
* @param query
|
|
19233
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
19234
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
19235
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
19236
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
19237
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
19238
|
+
*/
|
|
19239
|
+
dynamic_getDetailProducts_byFields_byPages(colname: string, query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
19240
|
+
/**
|
|
19241
|
+
* @example
|
|
19242
|
+
* this.vhDesignAutoWeb.dynamic_getDetailProduct_fromService('categories', '5fb67fda87c0f21d484cbdf3')
|
|
19243
|
+
.then((doc)=>{
|
|
19244
|
+
console.log('dynamic_getDetailProduct_fromService', doc);
|
|
19245
|
+
},(error:any)=>{
|
|
19246
|
+
console.log('error', error)
|
|
19247
|
+
})
|
|
19248
|
+
* @param id_sub_or_product
|
|
19249
|
+
* @Promise => obj ={} or null
|
|
19250
|
+
*/
|
|
19251
|
+
dynamic_getDetailProduct(id_sub_or_product: any): Promise<unknown>;
|
|
19252
|
+
/**
|
|
19253
|
+
* @example
|
|
19254
|
+
* this.vhDesignAutoWeb.dynamic_getDetailFood_fromService('categories', '5fb67fda87c0f21d484cbdf3')
|
|
19255
|
+
.then((doc)=>{
|
|
19256
|
+
console.log('dynamic_getDetailFood_fromService', doc);
|
|
19257
|
+
},(error:any)=>{
|
|
19258
|
+
console.log('error', error)
|
|
19259
|
+
})
|
|
19260
|
+
* @param id_sub_or_food
|
|
19261
|
+
* @Promise => obj ={} or null
|
|
19262
|
+
*/
|
|
19263
|
+
dynamic_getDetailFood(id_sub_or_food: any): Promise<unknown>;
|
|
18940
19264
|
/**
|
|
18941
19265
|
* @example:
|
|
18942
19266
|
* this.vhDesignAutoWeb.addDoc_fromDatabase('atw_pages',{name:name: 'Quảng cáo 1'})
|
|
@@ -18977,7 +19301,7 @@ export declare class VhDesignAutoWeb {
|
|
|
18977
19301
|
static_deleteDoc_fromDatabase(database: string, colname: string, id_doc: string): Promise<unknown>;
|
|
18978
19302
|
/**
|
|
18979
19303
|
* @example
|
|
18980
|
-
* this.vhDesignAutoWeb.
|
|
19304
|
+
* this.vhDesignAutoWeb.static_getDoc_fromService('a3y5AmtZEjx0FcRfGP7k', 'categories', '5fb67fda87c0f21d484cbdf3')
|
|
18981
19305
|
.then((doc)=>{
|
|
18982
19306
|
console.log('getDoc_fromService_vhuserweb', doc);
|
|
18983
19307
|
})
|
|
@@ -18997,13 +19321,9 @@ export declare class VhDesignAutoWeb {
|
|
|
18997
19321
|
static_getDoc_fromDatabase(database: string, colname: string, id_doc: string): Promise<unknown>;
|
|
18998
19322
|
/**
|
|
18999
19323
|
* @example:
|
|
19000
|
-
* this.vhDesignAutoWeb.
|
|
19001
|
-
.then(
|
|
19002
|
-
console.log('
|
|
19003
|
-
if(response.vcode === 0){
|
|
19004
|
-
//-----------your code-----------
|
|
19005
|
-
let products = response.data;
|
|
19006
|
-
}
|
|
19324
|
+
* this.vhDesignAutoWeb.static_getDocs_fromService_byFields('uvpDssEj8bizjfseCgAc', webapp_abouts', {name:{$eq:'ten abc'}}, {},{},1)
|
|
19325
|
+
.then(array=>{
|
|
19326
|
+
console.log('array', array);
|
|
19007
19327
|
},(error:any)=>{
|
|
19008
19328
|
console.log('error', error)
|
|
19009
19329
|
})
|
|
@@ -19036,30 +19356,6 @@ export declare class VhDesignAutoWeb {
|
|
|
19036
19356
|
* @return Promise => array(object) = [{},{},..]
|
|
19037
19357
|
*/
|
|
19038
19358
|
static_getDocs_fromDatabase_byFields(database: string, colname: string, query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
19039
|
-
/**
|
|
19040
|
-
* @example
|
|
19041
|
-
* this.vhDesignAutoWeb.dynamic_getDetailProduct_fromService('categories', '5fb67fda87c0f21d484cbdf3')
|
|
19042
|
-
.then((doc)=>{
|
|
19043
|
-
console.log('dynamic_getDetailProduct_fromService', doc);
|
|
19044
|
-
},(error:any)=>{
|
|
19045
|
-
console.log('error', error)
|
|
19046
|
-
})
|
|
19047
|
-
* @param id_sub_or_product
|
|
19048
|
-
* @Promise => obj ={} or null
|
|
19049
|
-
*/
|
|
19050
|
-
dynamic_getDetailProduct_fromService(database: string, id_sub_or_product: any): Promise<unknown>;
|
|
19051
|
-
/**
|
|
19052
|
-
* @example
|
|
19053
|
-
* this.vhDesignAutoWeb.dynamic_getDetailFood_fromService('categories', '5fb67fda87c0f21d484cbdf3')
|
|
19054
|
-
.then((doc)=>{
|
|
19055
|
-
console.log('dynamic_getDetailFood_fromService', doc);
|
|
19056
|
-
},(error:any)=>{
|
|
19057
|
-
console.log('error', error)
|
|
19058
|
-
})
|
|
19059
|
-
* @param id_sub_or_food
|
|
19060
|
-
* @Promise => obj ={} or null
|
|
19061
|
-
*/
|
|
19062
|
-
dynamic_getDetailFood_fromService(database: string, id_sub_or_food: any): Promise<unknown>;
|
|
19063
19359
|
/**
|
|
19064
19360
|
* @example
|
|
19065
19361
|
* this.vhDesignAutoWeb.searchList('atw_products',["name", "describe"], 'Điện Thoại', 20, 1)
|