1. 后端页面解析了解
1.1ui/li标签:可以将菜单一级一级地展现
2.商品展现
2.1JSON是啥?
json是一种轻量级的转换格式,其本质就是特使格式的字符串。
2.2JSON格式
2.1对象格式:
{"k1":"v1","k2":"v2"}
2.2数组格式:
["v1","v2","v3"]
2.3嵌套格式:

2.3MP分页???
public EasyUITable findItemByPage(Integer page, Integer rows) {
//1.定义分对象
IPage- iPage = new Page<>(page,rows);
//2.获取分页对象的其他数据
QueryWrapper
- queryWrapper = new QueryWrapper<>();
queryWrapper.orderByDesc("updated");//根据更新时间排序
iPage= itemMapper.selectPage(iPage,queryWrapper);
return new EasyUITable(iPage.getTotal(),iPage.getRecords());
}
2.4数据格式化??
2.4.1格式化价格:将价格缩小100倍后展现在页面上
价格 |
formatter:KindEditorUtil.formatPrice
2.4.2格式化时间:
让时间正常显示
2.4.3格式化状态:
把1在客户端显示为上架
把2在客户端显示为下架
3.分类操作
3.1
@TableName("表名")//和表中字段进行映射
@TableId(type = IdType.AUTO)//主键自增
3.2叶子类目的回显
$.ajax({
type:"GET",
url:"/itemCat/findItemCatById",
data:{id:val},
success:function(result){
#console.log(result.name)
name=result.name;
},
async:false#注意这里没有分号(;)
})
return name;