ionic-vhframeworks 8.8.2 → 8.8.4
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.
|
@@ -1869,7 +1869,7 @@ export declare class VhImage {
|
|
|
1869
1869
|
* + 'compress-screen': 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ị
|
|
1870
1870
|
* + '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ị
|
|
1871
1871
|
* @field resolution: {} hoặc {width, height} của màn hình hoặc {width, height} của khung hình
|
|
1872
|
-
* @returns Object => obj = {vcode, msg, data
|
|
1872
|
+
* @returns Object => obj = {vcode, msg, data} hoặc error
|
|
1873
1873
|
* vcode === 0 : upload ảnh thành công
|
|
1874
1874
|
* vcode === 1 : lỗi import file ảnh
|
|
1875
1875
|
* vcode === 2 : lỗi upload file ảnh
|
|
@@ -1968,6 +1968,47 @@ export declare class VhImage {
|
|
|
1968
1968
|
* vcode === 3 : không thể upload file ảnh lớn hơn 1Mb
|
|
1969
1969
|
*/
|
|
1970
1970
|
getImageFromURL(url: any, path: any, oldthumbnailURL?: any): Promise<any>;
|
|
1971
|
+
/**
|
|
1972
|
+
* Lấy hình ảnh từ url đẩy lên server với kích thước hình theo options truyền vào
|
|
1973
|
+
* @example:
|
|
1974
|
+
this.vhImage.getImageFromURL_Autoweb(url,"images/design/objects")
|
|
1975
|
+
.then((rsp:any)=>{
|
|
1976
|
+
console.log('rsp', rsp);
|
|
1977
|
+
if(rsp.vcode === 0){
|
|
1978
|
+
if(options.compress_type == 'no-compress'){
|
|
1979
|
+
|
|
1980
|
+
}else if(options.compress_type == 'compress-screen'){
|
|
1981
|
+
|
|
1982
|
+
}else if(options.compress_type == 'compress-frame'){
|
|
1983
|
+
|
|
1984
|
+
}
|
|
1985
|
+
}else if(rsp.vcode === 1){
|
|
1986
|
+
|
|
1987
|
+
}else if(rsp.vcode === 2){
|
|
1988
|
+
|
|
1989
|
+
}else if(rsp.vcode === 3){
|
|
1990
|
+
|
|
1991
|
+
}
|
|
1992
|
+
},error => {
|
|
1993
|
+
|
|
1994
|
+
}
|
|
1995
|
+
);
|
|
1996
|
+
* @param url: đường link ảnh (sống) tồn tại trên mạng internet
|
|
1997
|
+
* @param path: 'images/database/categories' or 'images/database/categories/products'
|
|
1998
|
+
* @param options: {compress_type, resolution}
|
|
1999
|
+
* @field compress_type:
|
|
2000
|
+
* + 'no-compress': Không nén ảnh sau khi tải lên
|
|
2001
|
+
* + 'compress-screen': 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ị
|
|
2002
|
+
* + '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ị
|
|
2003
|
+
* @field resolution: {} hoặc {width, height} của màn hình hoặc {width, height} của khung hình
|
|
2004
|
+
* @returns Object => obj = {vcode, msg, data} hoặc error
|
|
2005
|
+
* vcode === 0 : upload ảnh thành công
|
|
2006
|
+
* vcode === 1 : lỗi import file ảnh
|
|
2007
|
+
* vcode === 2 : lỗi upload file ảnh
|
|
2008
|
+
* vcode === 3 : không thể upload file ảnh lớn hơn maxSize (byte)
|
|
2009
|
+
* vcode === 4 : import file ảnh không đúng định dạng
|
|
2010
|
+
*/
|
|
2011
|
+
getImageFromURL_Autoweb(url: any, path: any, options: any): Promise<any>;
|
|
1971
2012
|
/**
|
|
1972
2013
|
* @example:Lấy hình ảnh từ nút insertImange của toolbar của Ckeditor
|
|
1973
2014
|
public onReady(editor: any): void {
|
|
@@ -15222,6 +15263,91 @@ export declare class VhQueryAutoWeb {
|
|
|
15222
15263
|
* @return Promise => array(object) = [{},{},..]
|
|
15223
15264
|
*/
|
|
15224
15265
|
getCommonDatas_byFields(query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
15266
|
+
/**
|
|
15267
|
+
* Hàm này dùng cho dữ liệu cấu hình, cài đặt trong quá trình thiết kế liên quan đến dự án, page, block, object và admin
|
|
15268
|
+
* @example:
|
|
15269
|
+
* this.vhQueryAutoWeb.addSetup({name:'config 1'})
|
|
15270
|
+
.then((rsp:any)=>{
|
|
15271
|
+
if(rsp.vcode === 0){
|
|
15272
|
+
let setup = rsp.data;
|
|
15273
|
+
}
|
|
15274
|
+
}, error=>{
|
|
15275
|
+
reject(error)
|
|
15276
|
+
})
|
|
15277
|
+
* @param data
|
|
15278
|
+
* @return Promise => rsp ={vcode, msg, data(object)} / error
|
|
15279
|
+
* @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
|
|
15280
|
+
* vcode == 0: success
|
|
15281
|
+
* vcode == 11: 'not logged in
|
|
15282
|
+
*/
|
|
15283
|
+
addSetup(data: any): Promise<unknown>;
|
|
15284
|
+
/**
|
|
15285
|
+
* @example:
|
|
15286
|
+
* this.vhQueryAutoWeb.updateSetup('5fb6780ca2148e09806c5b01', {quantity:400})
|
|
15287
|
+
.then((rsp:any)=>{
|
|
15288
|
+
if(rsp.vcode === 0){
|
|
15289
|
+
console.log('updateSetup succeed');
|
|
15290
|
+
}
|
|
15291
|
+
}, error=>{
|
|
15292
|
+
console.log('error', error);
|
|
15293
|
+
})
|
|
15294
|
+
* @param id_setup
|
|
15295
|
+
* @param data
|
|
15296
|
+
* @return Promise object => rsp ={vcode, msg, data(undefined)} / error
|
|
15297
|
+
* @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
|
|
15298
|
+
* vcode == 0: success
|
|
15299
|
+
* vcode == 11: 'not logged in
|
|
15300
|
+
*/
|
|
15301
|
+
updateSetup(id_setup: string, data: object): Promise<unknown>;
|
|
15302
|
+
/**
|
|
15303
|
+
* @example:
|
|
15304
|
+
* this.vhQueryAutoWeb.deleteSetup('5fb67fda87c0f21d484cbdf3')
|
|
15305
|
+
.then((rsp:any)=>{
|
|
15306
|
+
if(rsp.vcode === 0){
|
|
15307
|
+
console.log('deleteProduct succeed');
|
|
15308
|
+
}
|
|
15309
|
+
}, error=>{
|
|
15310
|
+
reject(error)
|
|
15311
|
+
})
|
|
15312
|
+
* @param id_setup
|
|
15313
|
+
* @return Promise => rsp ={vcode, msg} / error
|
|
15314
|
+
* @notice : hàm này chỉ add được dữ liệu sau khi khách hàng hoặc nhân viên đã đăng nhập
|
|
15315
|
+
* vcode == 0: success
|
|
15316
|
+
* vcode == 11: 'not logged in
|
|
15317
|
+
*/
|
|
15318
|
+
deleteSetup(id_setup: string): Promise<unknown>;
|
|
15319
|
+
/**
|
|
15320
|
+
* @example
|
|
15321
|
+
* this.vhQueryAutoWeb.getSetup('5fb67fda87c0f21d484cbdf3')
|
|
15322
|
+
.then((setup)=>{
|
|
15323
|
+
console.log('getSetup', setup);
|
|
15324
|
+
})
|
|
15325
|
+
* @param id_setup
|
|
15326
|
+
* @return Promise => obj ={} or null
|
|
15327
|
+
*/
|
|
15328
|
+
getSetup(id_setup: string): Promise<unknown>;
|
|
15329
|
+
/**
|
|
15330
|
+
* @example
|
|
15331
|
+
* this.vhQueryAutoWeb.getSetups()
|
|
15332
|
+
.then((response)=>{
|
|
15333
|
+
console.log('getSetups', response);
|
|
15334
|
+
})
|
|
15335
|
+
* @return array(object) = [{},{},..]
|
|
15336
|
+
*/
|
|
15337
|
+
private getSetups;
|
|
15338
|
+
/**
|
|
15339
|
+
* @example
|
|
15340
|
+
* this.vhQueryAutoWeb.getSetups_byFields({id_news:{$eq:'00Tm41GNYN0aYbAtuncH'}}, {}, {}, 0)
|
|
15341
|
+
.then((products)=>{
|
|
15342
|
+
console.log('getSetups_byFields', products);
|
|
15343
|
+
})
|
|
15344
|
+
* @param query
|
|
15345
|
+
* @param projection
|
|
15346
|
+
* @param sort
|
|
15347
|
+
* @param limit
|
|
15348
|
+
* @return Promise => array(object) = [{},{},..]
|
|
15349
|
+
*/
|
|
15350
|
+
getSetups_byFields(query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
15225
15351
|
/**
|
|
15226
15352
|
* @example:
|
|
15227
15353
|
* this.vhQueryAutoWeb.addNewsCategory({name:'Danh mục 1'})
|