# 页面数据结构说明 ## 通用 ### 商品信息 { id: 1, thumb: 'path/to/goods/img', url: '', name: '', salePrice: 500, price: 1000, tags: [ { is_new: true //NEW }, { is_discount: true //SALE }, { is_limited: false //限量商品 }, { is_yohood: // YOHOOD }, { is_advance: true //再到着 } ], is_soon_sold_out: true //即将售罄 } ### 侧栏导航 { sideNav:[ { textCn: '', textEn: '', icon: '', //boys,girls,kids,life,new,guang 等图标的url地址 url: '', //子菜单 subNav: { list: [ { textCn: '', textEn: '', back: true/false, isSelect: true/false, url: '' }, ... ] } }, ... ] } ### 站点头部和尾部 //header { pageHeader: { //页面主题标识 boys: true, girls: true, kids: true, lifeStyle: true, //对应页面有就传,没有就不传 navBack: true, navTitle: '', navHome: '' } } //footer已登录 { pageFooter: true } ### 筛选 { filter: { classify: [ { title: '性别', default: true/false, name: '全部性别', dataType: 'gender', //查询时字段名 subs: [ { dataId: 0, name: '全部性别', chosed: true //是否当前选中 }, ... ] }, { ... } ] } } ## 首页 { headerDownload: { img: '', url: '' }, homeHeader: { bgColor: '', searchUrl: '' }, content: [ //banner { banner: { list: [ { url: '', img: '' }, ... ] } }, //图标入口 { iconsEnter: { list: [ { url: '', img: '', text: '' }, ... ] } }, //热门分类 { hotCategory: { img: '', url: '', list: [ { img: '', url: '', textCn: '' }, ... ] } }, //热门品牌 { hotBrands: { img: '', url: '', list: [ { name: '', img: '', url: '' }, ... ] } }, //搭配 colloaction: { name: '潮人 ▪ 搭配', more: '', imgs: [ { img: '', url: '' }, ... ], recos: [ { img: '', url: '' }, ... ] }, //话题 topic: { name: '潮品 ▪ 话题', more: '', list: [ { url: '', img: '', title: '', time: '' }, ... ] }, //商品分类Block goodsCategory: { name: '经典裤装', more: '', banner: { list: [ { img: '', url: '' }, ... ] }, //TODO:与创意生活BLOCK的区别就是下面图片一个是5张一个是6张,是否可以合并成到此处 list: [ { img: '', url: '', textCn: '' }, ... ] }, //plus+Satr { plusStar: { name: '', url: '', img: '' } }, //你可能喜欢 { goods: [ {...}, //商品信息 ... ] }, //新人专享 freshOnly: { title: { title: '新人专享', 'more_url': '/boys/freshList' }, big_image: { url: '', img: '' }, list: [ { url: '', img: '', title: '' salePrice: '', price: '' } ] } ] } ## 逛 ### 资讯(公用) { id: 1, showTags: true/false, //是否显示标签 img: '', url: '', title: '', text: '', publishTime: '', pageView: '', //APP打开显示收藏,WAP打开显示点赞 like: { isLiked: true, count: 1 }, collect: { isCollected: true, url: '' }, share: false, isFashionMan: true, //标签分类:isTip、isCollocation、isFashionMan、isFashionGood、isTopic author: { url: '', avatar: '', name: '' } } ### 逛首页 { swiper: [ { url: '', img: '' }, ... ], navs: [ { typeId: 1, type: '最新', focus: true }, ... ], infos: [ [ {...}, //资讯 ... ], ... ] } ### 逛列表页 { infos: [ {...}, //标签 ... ] } ### 编辑页 { authorInfo: { avatar: '', name: '', info: '' }, infos: [ {...}, //标签 ... ] } ### 逛详情页 { id: '', author: { id: 1, avatar: '', name: '', intro: '', url: '' }, detail: { title: '', publishTime: '', pageView: 3445, content: [ { text: '' }, { bigImage: '' }, { smallImage: [ { src: '' }, { src: '' } ] }, { //onlyOne relatedReco: { id: 1, //必须字段 thumb: '', name: '', salePrice: 123, price: 213, url: '' } //多个 relatedReco: [ {...}, //商品信息 ... ] }, { collocation: [ { thumb: '', type: 'pants', goods: [ {...}, //商品信息 ... ] }, ... ] } ] }, relatedBrand: [ { thumb: '', name: '', url: '' }, ... ], relatedTag: [ { name: '', url: '' }, ... ], relatedInfo: [ { thumb: '', squareThumb: true, //是否为方图 title: '', url: '', publishTime: '' }, ... ] } ### PLUS+STAR //列表页 { ps: { sName: '', pName: '', star: [ { deps: '', //情况1:一张图 url: '', img: '', //情况2:多张图 imgs: [ { url: '', img: '' }, ... ] } ], plus: [ ... ] } } //详情页 { ps: { id: 1, banner: '', logo: '', name: '', isLike: '', likeUrl: '', intro: '', newArrival: { moreUrl: '', naList: [ {...}, //商品信息 ... ] }, infos: [ {...}, //资讯 ... ] } } ### 模板页 { content: [ { img: { src: '', url: '' } }, { text: '' }, { recommendation: { recos: [ {...}, //商品信息 ... ] } }, { brands: { list: [ { thumb: '', name: '', url: '' }, ... ] } }, { goods: { classify: [ { type: 'brand', name: '品牌' }, ... ], newPatterns: [ {...}, //商品信息 ... ] } } ] } ## SALE { headerBanner: { list: [ { url: '', img: '' }, ... ] }, saleSection: { list: [ { img: '', url: '' }, ... ] }, goodsContainer: { name: '最新降价', goodsNav: { newPatterns: true, price: true, salesVolume: true, screen: true }, goods: [ {...}, //商品信息 ... ] } } ## 登录、注册、找回密码 ### TIP:登录注册找回密码页面body有特有样式,因为数据中需要传一个isPassportPage为body添加一个class ### 通用头部(包含在每个页面中) { backUrl: '', //GO-BACK链接, 不显示则不传 showHeaderImg: true/false, //显示头部图片 headerText: '' //头部标题文字 } ### 区域列表 [ { areaCode: '+86', //区号 selected: true/false, name: '中国' }, ... ] ### 登录 //登录页 { account: '', //默认填入的用户名 registerUrl: '', //免费注册地址 aliLoginUrl: '', weiboLoginUrl: '', qqLoginUrl: '', internationalUrl: '', phoneRetriveUrl: '', emailRetriveUrl: '' } //国际账号登录页 { countrys: [...], //区域列表 countryCode: '', phoneNum: '' } ### 注册 //注册页 { countrys: [...], //区域列表 countryCode: '' //默认区号 } //验证码 { areaCode: '', phoneNum: '' } //密码页 { ... //仅头部 } ### 绑定手机号 //绑定页 { countrys: [...], //区域列表 areaCode: '', //默认区号 sourceType: 'qq', //用户在登录页选择的第三方登录平台 openId: '' //第三方登录平台id,用于绑定手机号 } //验证码 { areaCode: '', phoneNum: '' } //密码页 { ... //仅头部 } ### 找回密码 //邮箱找回&重置密码 { ... //仅头部 } //邮箱找回成功 { goEmail: '', resendUrl: '' } //手机找回 { countrys: [...], countryCode: '' } //手机找回验证码 { areaCode: '', phoneNum: '' } ## 分类 { searchUrl: '', class: [ { name: 'BOY', focus: true, //默认选中 ca: [ { name: '上衣', sub: [ { name: '全部分类', url: '' }, ... ] }, ... ] }, ... ] } ## 搜索 { hot: [ { name: '夹克', url: '' }, ... ], history: [ { name: '..', url: '' } ] } ## 品牌 { bannerTop: { list: [ { url: '', img: '' }, ... ] }, hotBrand: { list: [ { url: '', img: '', name: '' }, ... ] }, brandList: [ title: '', list: { name: '', url: '', isHot: true/false, isNew: true/false }, ... ] } ## 商品列表页 { goodList: { search: { default: '' }, //是否显示搜索栏并指定初始值 brandWay: { //品牌入口 url: '', thumb: '', name: '' }, brandHome: { id: 0, banner: '' intro: '...', collected: true //是否已收藏 }, new: [ { ... //商品信息 }, ... ], filter: { .. //筛选数据结构 } } } ## 购物车 { shoppingCart: { cartNav: true, //显示预售和普通switch导航 commonGoodsCount: 2, presellGoodsCount: 2, //普通商品和预售商品数目,显示在导航中 showLoginInfo: true, //是否显示登录提示 commonCart: { goods: [ //购物车商品(见下), ... ], freebieOrAdvanceBuy: true, //是否显示赠品和加价购 freebie: { url: '', count: 2 }, advanceBuy: { url: '', count: 1 }, price: 322, activityPrice: 223, //活动价 count: 8, sumPrice: 400 }, preSellCart: { //同普通购物车 ... } } } ### 选择尺码、数目、颜色面板 { thumb: '', name: '', price: '', salePrice: '', /**colors: [ { id: 1, chosed: true, name: '黄色', colorNum:10, shortUrl:'', }, ... ],**/ colors: [ { color:[//说明:第一行,其colorNum的值为其下所有尺码数量之和,不需要sizeNumStr的值. { id: 1, name: '黄色', colorNum:10, shortUrl:'', }, { id: 2, name: '红色', colorNum:20, shortUrl:'', } ] }, { color:[//说明:第二行至最后一行,其colorNum的值为其对应尺码的数量,不需要sizeNumStr的值. { id: 1, name: '黄色', colorNum:10, shortUrl:'', }, { id: 2, name: '红色', colorNum:20, shortUrl:'', } ] } ], sizes: [ { size:[//说明:第一行,显示所有的尺寸,即为下面的defaultSizes,不需要numStr的值 { id: 1, name: 'M', sizeNum: 2 }, { id: 2, name: 'X', sizeNum: 2 } ] }, { size:[//说明:第二行至最后一行,不需要numStr的值 { id: 3, name: 'M', sizeNum: 2 }, { id: 4, name: 'X', sizeNum: 2 } ] } ] /**defaultSizes: [ { numZero: true, name: 'X', numStr: '0/10' }, ... ] totalNum: 20**/ } ### 购物车商品 { id: 1, inValid: true, //是否是失效商品, showCheckbox: true, //是否显示checkbox【赠品和加价购不显示】 checked: true, //是否选中 thumb: '', isAdvanceBuy: true, //是否是加价购商品 isGift: ture, //是否是赠品 name: '', color: '黄色', size: 'L', appearDate: '12月', //上市期 price: 200, count: 2, soldOut: true, //售罄 lowStocks: true, //库存不足 } ### 赠品和加价购 { shoppingCart: { gift: [ //赠品(见下) ], //or advance: [ { title: '', goods: [ //加价购商品(见下) ] } ] } } ### 赠品和加价购商品 { id: 1, thumb: '', name: '', color: '黄色', size: 'L', //颜色和尺寸需要显示就传,不显示不传 price: 562, count: 3 } ### 订单确认 { orderEnsure: { name: '', phoneName: '', address: '', dispatchMode: [ { id: 1, name: '普通快递' }, ... ], dispatchTime: [ { id: 1, name: '只工作日配送' }, ... ], goods: [ { ... //订单商品 } ], coupon: { count: 3, //N张优惠券可用 notUsed: true, value: 10 //使用优惠券后优惠额,notUsed为true的情况下可不传 }, yohoCoin: '0', //String invoice: true, //发票 sumPrice: 900, salePrice: 90, freight: 0, price: 800 } } ## 个人中心 ### 会员等级 { vipGrade: { //会员等级页面 vip3: true, //vip等级(3,2,1,0),对应等级传true; name: '', //user name costOfThisYear: 3000, percent: 80, //当前消费等级进度条 costGap: 300, //距离升级所需消费金额(白金会员不传) sumCost: 600, privilege: [ { pic: '', title: '', description: '' }, ... ] } } ### 我的订单 { order: { navs: [ { name: '', active: true, typeId: 1, url: '' }, ... ] } } //订单列表 { orders: [ { ...//订单 } ] //当无订单时,不传order,返回walkwayUrl walkWayUrl: '' } //订单 { detailUrl: '', orderNum: '', orderStatus: '', goods: [ { thumb: '', gift: true, //是否赠品 advanceBuy: true, //是否加价购 name: '', color: '黄色', size: 'X', price: '588', count: 2 }, ... ], count: 1, sumCost: '199.00', //status completed: true, //已完成 canceled: true, //已取消 unpaid: true, //or 未支付 unreceived: '', //or 待收货(未发货/未收货),查看物流URL //待收货时传递物流参数 logisticsUrl: '' } ### 订单详情页 { orderDetail: { orderNum: '', //订单号 name: '', //收货人姓名 phoneNum: '', address: '', orderStatus: '订单成功', //订单取消...等订单状态 orderNum: '', orderTime: '', //订单状态 canceled: true, //是否是取消的订单 completed: true, //是否是已完成订单 unpaid: true, //是否是未支付订单 unreceived: true, //是否是未收货订单 //如果是待收货(未发货和未收货),传物流信息参数 logisticsUrl: '', logisticsCompany: '', logisticsNum: '', //end goods: [ { ... //订单商品 } ], sumPrice: '', salePrice: '', freight: '', yohoCoin: '', price: '' } } ### YOHO币 { yohoCoin: { coinNum: 10 } } ### 我的逛 { myGuang: { infos: [ {...} //逛资讯 .. ], //若无收藏则不传infos } } ### 商品详情页 { 'goodsDetailPage': true, 'pageHeader': { 'navBack': 'sss ', 'navHome': 'sss ', 'navTitle': '商品详情' }, 'bannerTop': { 'list': [ { 'img' : '' }, ... ] }, tags: [ { is_new: true //NEW }, { is_discount: true //SALE }, { is_limited: false //限量商品 }, { is_yohood: // YOHOOD }, { is_advance: true //再到着 }, { is_soon_sold_out: true //即将售罄 } ], 'goodsName' : 'Stussy No. 4 BOX TEE ', 'goodsSubtitle' : '【全民拼抢购】经典印花T恤,满4件免一件!', 'goodsPrice' : { 'currentPrice' : '¥298.00', 'previousPrice' : '¥598.00' }, 'periodOfMarket' : '11月', 'goodsTitle' : '¥298.00', 'vipLevel' : { 'list' : [ { 'text' : '¥284.00', 'currentLevel':true }, ... ] }, 'goodsDiscount' : { 'list' : [ { 'text' : '【BACK TO SCHOOL】满¥499赠送Paul Franke帽子一个,多买多送!' }, ... ] }, 'feedbacks' : { 'commentsNum' : 0, 'consultsNum' : 1, 'commentsUrl' : '', 'consultsUrl' : '', 'comments' : [ { 'userName' : 'Lynnic', 'desc' : '购买了白色Mate7', 'content' : '活动时买的', 'time' : '2014-08-12 10:24:26' }, ... ], 'consults' : [ { 'question' : '您好 我一米七七 140斤 穿M的行吗', 'time' : '2014-08-12 10:24:26', 'answer' : '' }, ... ] }, 'enterStore' : { 'img' : '', 'storeName' : 'Stussy', 'url' : 'http://stussy.m.yohobuy.com/' }, 'goodsDescription' : { 'title' : '商品描述', 'enTitle' : 'DESCRIPTON', 'detail' : { 'list':[ { 'param' : '编号: 51018059' }, ... ] }, 'desc': 'balabala' }, 'sizeInfo' : { 'title' : '尺码信息', 'enTitle' : '', 'detail' : { 'list' : [ { 'params' : [ { 'param' : '尺寸' }, ... ] }, ... ] } }, 'measurementMethod' : { 'title': '测量方式', 'enTitle': 'MEASUREMENT METHOD', 'img' : '', }, 'reference' : { 'title' : '模特试穿', 'enTitle' : '', 'detail' : { 'list' : [ { 'params':[ { 'param' =>'头像' }, ... ] }, ... ] } }, 'materials' : { 'title' : '商品材质', 'enTitle' : '', list:[ { 'img' : '', 'desc' : '用各种洗涤剂',//remark } ... ] }, 'washTips' : { 'list' : [ { "caption":"不可干洗", "img":"http://static.yohobuy.com/images/wash_5.png" } ... ] } 'productDetail' : { 'title' : '商品详情', 'enTitle' : '', 'desc' : 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计', 'list' : [ { 'img':'' } ... ] }, 'cartInfo' : { 'cartUrl':'购物车url', 'addToCartUrl':'添加购物车url', 'soldOut':'已售罄', 'notForSale':'非卖品', thumbs: [ { img : '' }, ... ], name: '', price: '', salePrice: '', colors: [ { id: 1, skcId:, chosed: true, name: '黄色', colorNum:10, sizeNumStr:'10/20/30' //对应的商品尺码数目,用斜杠分割 }, ... ], sizes: [ { id: 2, skuId:, goodId:, chosed: true, name: 'X', sizeNum: 2, colorNumStr:'10/20/30' //对应的商品颜色数目用斜杠分割 }, ... ] }, 'introUrl' : '', 'id' : '', 'preferenceUrl' :'', } ### 评价列表页面 { 'comments':{ 'list' : [ { 'userName':'', 'desc':'', 'content':'', 'time':'' } ... ] } } ### 咨询列表页面 { 'link' : '咨询表单跳转url', 'consults':{ 'list' : [ { 'question':'', 'time':'', 'answer':'' } ... ] } } ### 支付中心 { 'payAppInfo' : [ { 'appIcon' : 'http://static.yohobuy.com/images/icon.png', 'payLink' : '/weixin/pay/', 'appId': 'weixin', 'app' : '微信支付', 'hint' : '需下载微信客户端', 'subHint' : '推荐使用' },{ 'appIcon' : 'http://static.yohobuy.com/images/icon.png', 'payLink' : '/weixin/pay/', 'appId': 'alipay', 'app' : '支付宝支付', 'hint' : '需下载支付宝客户端', 'subHint' : '推荐使用' } ] } ### 物流详情 { 'logisticImg' : 'http://static.yohobuy.com/images/icon.png', 'logisticUrl' : 'http://www.shunfeng.com', 'logisticCompany' : '顺丰', 'logisticNumber' : '1231231231', 'logisticDetail' : [ { 'status' : '南京市 派送中', 'date' : '2015-12-03' }, { 'status' : '南京市 准备中', 'date' : '2015-12-03' } ] } ### 频道选择页 { 'background' : 'http://img11.static.yhbimg.com/yhb-img01/2015/12/14/03/0189f7499bcb98cbeb4d18d61275606716.png?imageView/2/w/640/h/800', 'searchUrl' : 'http://search.dev.yohobuy.com', 'channelList' : [ { 'href' : '/boys', 'title' : '男生', 'entitle' : 'BOYS', }, { 'href' : '/girls', 'title' : ' 女生', 'entitle' : 'GIRLS', }, { 'href' : '/kids', 'title' : '潮童', 'entitle' : KIDS'', }, { 'href' : '/lifestyle', 'title' : '创意生活', 'entitle' : 'LIFESTYLE', } ], 'showYohood' : true/false, 'yohoodHref' : '/yohood' } ### 新人专享列表页 { goods: [ {...}, //商品信息 ... ] }