getPages
الحصول على جميع كائنات الصفحات مع معلومات المنتج كمصفوفة.
الوصف
تسترجع هذه الطريقة جميع الصفحات التي تم إنشاؤها كمصفوفة من واجهة برمجة التطبيقات. تعيد Promise التي تحل إلى مصفوفة من الكائنات أو مصفوفة فارغة [] إذا لم يكن هناك بيانات.
Pages.getPages(
langCode
);
مخطط المعلمات
المخطط
langCode: string
رمز اللغة. الافتراضي: "en_US"
مثال: "en_US"
أمثلة
مثال بسيط
const response = await Pages.getPages();
مثال مع السمات
const response = await Pages.getPages('en_US');
مثال على الاستجابة
[
{
"id": 9,
"config": {},
"depth": 1,
"parentId": 8,
"pageUrl": "blog1",
"attributeSetIdentifier": null,
"localizeInfos": {
"title": "مدونة 1",
"menuTitle": "مدونة 1",
"htmlContent": "",
"plainContent": ""
},
"position": 1,
"isVisible": true,
"products": 0,
"childrenCount": 0,
"type": "common_page",
"templateIdentifier": null,
"isSync": false,
"attributeValues": {}
},
{
"id": 8,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "blog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "مدونة",
"menuTitle": "مدونة",
"htmlContent": "",
"plainContent": ""
},
"position": 2,
"isVisible": true,
"products": 0,
"childrenCount": 1,
"type": "common_page",
"templateIdentifier": "template",
"isSync": true,
"attributeValues": {
"text": {
"type": "string",
"value": "بعض النص",
"position": 0,
"additionalFields": []
},
"number": {
"type": "integer",
"value": 0,
"position": 1,
"additionalFields": []
},
"real": {
"type": "real",
"value": "",
"position": 2,
"additionalFields": []
},
"float": {
"type": "float",
"value": 0,
"position": 3,
"additionalFields": []
}
},
"template": {
"id": 4,
"attributeSetIdentifier": null,
"title": "قالب",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}
},
{
"id": 10,
"config": {},
"depth": 0,
"parentId": null,
"pageUrl": "catalog",
"attributeSetIdentifier": "page",
"localizeInfos": {
"title": "كتالوج",
"menuTitle": "كتالوج",
"htmlContent": "",
"plainContent": ""
},
"position": 3,
"isVisible": true,
"products": 3,
"childrenCount": 0,
"type": "catalog_page",
"templateIdentifier": "template",
"isSync": true,
"attributeValues": {
"text": {
"type": "string",
"value": "نص الكتالوج",
"position": 0,
"additionalFields": []
},
"number": {
"type": "integer",
"value": 0,
"position": 1,
"additionalFields": []
},
"real": {
"type": "real",
"value": "",
"position": 2,
"additionalFields": []
},
"float": {
"type": "float",
"value": 0,
"position": 3,
"additionalFields": []
}
},
"template": {
"id": 4,
"attributeSetIdentifier": null,
"title": "قالب",
"generalTypeId": 4,
"identifier": "template",
"version": 0,
"generalTypeName": "catalog_page",
"attributeValues": {},
"position": 1
}
}
]
مخطط الاستجابة
المخطط: IPagesEntity[]
id: number
معرف الكائن.
مثال: 8
parentId: number | null
معرف الصفحة الأصلية، إذا كان يحتوي على null، فإنه يكون الصفحة الرئيسية.
مثال: 10
pageUrl: string
رابط الصفحة الفريد.
مثال: "blog"
depth: number
عمق تعشيش الصفحة بالنسبة إلى parentId.
مثال: 10
localizeInfos: ILocalizeInfo
اسم الصفحة، مع الأخذ في الاعتبار التوطين.
مثال:
{
"title": "مدونة",
"menuTitle": "مدونة",
"htmlContent": "",
"plainContent": ""
}
isVisible: boolean
علامة رؤية الصفحة.
مثال: true
type: Types
نوع الصفحة.
مثال:
"common_page"
templateIdentifier: string | null
معرف المستخدم للقالب المرتبط.
مثال: "template"
attributeSetIdentifier: string | null
مجموعة معرفات السمات.
مثال: "page"
attributeValues: AttributeType
مصفوفة من قيم السمات من الفهرس (تمثل كزوج من معرف السمة: قيمة ا لسمة).
مثال:
{
"text": {
"type": "string",
"value": "بعض النص",
"position": 0,
"additionalFields": []
}
}
isSync: boolean
إشارة إلى فهرسة الصفحة.
مثال: true
template: any
كائن القالب.
position: number
رقم العنصر (لترتيب العناصر).
مثال: 2
config: any
إعدادات الإخراج لصفحات الكتالوج.
مثال:
{
"rowsPerPage": 1,
"productsPerRow": 1
}
products: number
عدد المنتجات المرتبطة بالصفحة.
مثال: 0
childrenCount: number
عدد الأطفال.
مثال: 1