page 頁面
{
"template": {
"pageId": 101, // 頁面ID鳞仙,類型:Number
"name": "頁面", // 名稱吉殃,類型:String
"className": "wrapper", // class類名馋吗,類型:String
"id": "template", // id類名蒋院,必須與對象名稱保持一致,類型:String
"html": "<!DOCTYPE html>\n<html lang=\"zh-cn\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"renderer\" content=\"webkit\">\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\" />\n<meta name=\"keywords\" content=\"{{=xq.config.keyword}}\">\n<meta name=\"description\" content=\"{{=xq.config.description}}\">\n<meta name=\"robots\" content=\"index,follow\">\n<title>{{=xq.config.title}}</title>\n{{? xq.config.favicon}}<link rel=\"shortcut icon\" type=\"image/ico\" href=\"{{! xq.config.favicon }}\" />{{?}}\n[[@@cssFiles]]\n[[@@css]]\n</head>\n<body>\n<!-- index layout -->\n<div class=\"{{=xq.className}}\"{{? xq.style}} style=\"{{!xq.style}}\"{{?}}>\n[[@@header]]\n[[@@modules]]\n[[@@footer]]\n</div>\n<!-- index layout -->\n</body>\n[[@@jsFiles]]\n[[@@javascript]]\n</html>\n</html>", // html結(jié)構(gòu)文檔烟零,類型:String
"css": "", // 頁面內(nèi)聯(lián)樣式媒役,類型:String
"javascript": "", // 頁面內(nèi)部調(diào)用腳本,類型:String
"cssFiles": [
"http://www.op110.com/Static/css/reset.css",
"http://www.op110.com/Static/css/short.css"
], // 外部css文件引入朦蕴,類型:Array
"jsFiles": [
"http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"
], // 外部js文件引入篮条,類型:Array
"configRules": {
"title": "網(wǎng)站標(biāo)題"
}, // 對config 對象中的變量說明文字,用于后臺上傳該字段的補(bǔ)充說明吩抓;類型:Object
"config": {
"title": "深圳同天下科技有限公司",
"keyword": "深圳同天下科技有限公司-關(guān)鍵字",
"description": "深圳同天下科技有限公司-描述",
"favicon": "/favicon.ico"
}, // 配置與業(yè)務(wù)邏輯無關(guān)聯(lián)的數(shù)據(jù)字段涉茧,類型:Object
"dataConfig": {}, // 對data對象中的變量說明文字,用于后臺上傳該字段的補(bǔ)充說明疹娶,類型:Object
"data": {}, // 配置與業(yè)務(wù)邏輯關(guān)聯(lián)的數(shù)據(jù)字段伴栓,類型:Object
"header": {
"moduleId": 102,
"name": "",
"className": "l-header",
"id": "header",
"html": "",
"css": "",
"javascript": "",
"cssFiles": [
"http://www.op110.com/Static/css/reset.css",
"http://www.op110.com/Static/css/short.css"
],
"jsFiles": [
"http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"
],
"configRules": {},
"config": {},
"dataConfig": {},
"data": {},
"elements": {}
}, // 頁面頭部,類型:Object
"footer": {
"moduleId": 205,
"name": "底部",
"className": "l-footer",
"id": "footer",
"html": "",
"css": "",
"javascript": "",
"cssFiles": [],
"jsFiles": [],
"configRules": {},
"config": {},
"dataConfig": {},
"data": {}
}, // 頁面尾部雨饺,類型:Object
"modules": {} // 頁面中所有的(除開頭部和尾部)模塊集合钳垮,類型:Object
}
}
module 模塊
"module": {
"moduleId": 102, // 模塊ID,類型:Number
"name": "模塊",
"className": "l-module",
"id": "module",
"html": "",
"css": "",
"javascript": "",
"cssFiles": [
"http://www.op110.com/Static/css/reset.css",
"http://www.op110.com/Static/css/short.css"
],
"jsFiles": [
"http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"
],
"configRules": {},
"config": {},
"dataConfig": {},
"data": {},
"elements": {} // 可選额港,當(dāng)前模塊下的所有組件集合饺窿,類型:Object
}
element 組件
"element": {
"elementId": 103, // 組件ID,類型:Number
"name": "組件",
"className": "m-element",
"id": "element",
"html": "",
"css": "",
"javascript": "",
"cssFiles": [],
"jsFiles": [],
"configRules": {},
"config": {},
"dataConfig": {},
"data": {},
"elements":{} // 可選移斩,組件中可以繼續(xù)插入組件肚医,類型:Object
}
data 字段說明
通用字段
- 資源地址使用
src
- 鏈接跳轉(zhuǎn)地址使用
url
- 標(biāo)題名稱使用
title
- 摘要描述使用
summary
- 數(shù)組循環(huán)輸出項(xiàng)(如:列表項(xiàng))使用
items
- 控制顯隱
isShow
- 是否在新窗口打開
isBlank
page頁面 和 module模塊 background設(shè)置
"data": {
bgImage: "",
bgColor: ""
}
導(dǎo)航
"data": {
"items": [
"name": "",
"url": "",
"children": [{
"name": "",
"url",
"children": []
}]
]
}
線路產(chǎn)品
"data": {
"items": [
"title": "",
"type": "",
"src": "",
"summary": "",
"url": "",
"isBlank": false,
"cols": [1, 2, 3, 4, 5, 6],
"prices": [],
"planDates": [],
"fromCitys": [],
"tags": [],
"sales": []
]
}
產(chǎn)品選項(xiàng)卡
"data": {
"items": [
"title": "tab選項(xiàng)一",
"ad": "",
"listMediaItems": [{
"title": "",
"type": "",
"url": "",
"summary": "",
"url": "",
"isBlank": false,
"cols": [1, 2, 3, 4, 5, 6],
"prices": [],
"planDates": [],
"fromCitys": [],
"tags": [],
"sales": []
}],
"ad2": "",
"box": {
"title": "",
"listMixItems": [{
"title": "",
"type": "",
"src": "",
"summary": "",
"url": "",
"isBlank": false,
"cols": [1, 2, 3, 4, 5, 6],
"prices": [],
"planDates": [],
"fromCitys": [],
"tags": [],
"sale": []
}]
}
]
}