发表于: 2020-02-24 10:06:11
2 1541
今天完成的事情:
后台管理模块页面
渲染出后台数据
明天计划的事情:
看如何通过数据渲染出导航栏
遇到的问题:
无
收获:
出了点小问题在循环中只能是数组而不是对象 我把循环变量设置成对象报错才找出来.
后台管理模块渲染
2.通过获得的父ID渲染出模块管理
3.模块管理下面有子模块在掉一个接口进行渲染。
3.要在子模块那进行判断是否是父模块ID在进行渲染.
在我们用get 或者post,put传值有以下几种方法
1.json传值<p style="box-sizing: border-box; color: rgb(51, 51, 51); font-family: Arial,"Times New Roman","Microsoft YaHei",SimSun,SimHei; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: inherit; word-break: break-all; word-spacing: 0px;" serif"="" times,="" roman',="" new="" 'times="" serif',="" 'pt="" 9,="" rgb(31,="" mdtype="paragraph" cid="n110">{"title":"肥皂","type":"1","image":"https://wangquan-picture-storage.oss-cn-beijing.aliyuncs.com/1575463158937.png","author":"1","introduction":"1","content":"<p>123按时到达说的1123</p>","id":"1"}
post()请求参数方法.是这样传递参数的。
JSON传递参数格式的请求头是这种格式,当然一般我们不加请求头的话传递参数都是默认这种JSON格式除了少许的我们需要加请求他如URL传递参数一些数值比较少的格式需要加请求头
2.url传递参数
total=38&size=10&title=123
这个多用于在git请求,当然这种传递参数也可以用JSON传递参数.
'Content-Type': 'application/x-www-form-urlencoded'
})
})
}
{"total":38,"size":10,"status":"0","id":1}
<p style="box-sizing: border-box; color: rgb(51, 51, 51); font-family: Arial,"Times New Roman","Microsoft YaHei",SimSun,SimHei; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: inherit; word-break: break-all; word-spacing: 0px;" serif"="" times,="" roman',="" new="" 'times="" serif',="" 'pt="" 9,="" rgb(31,="" mdtype="paragraph" cid="n125">要不你在第一道获取数据传递进去就是ulr格式,要不就是直接为json格式然后在通过序列化变成url格式
评论