现在我们要将选中的购物车商品传递到支付页面,为了更加简洁的展现知识点,将从业务逻辑/知识点简述,将注意点和新知识点结合为知识点

0.业务逻辑

数据传递-----数据处理-----数据展示
1.bugs
1.模板语法
{{range _,addr=.addresses}}
{{range _,addr:=.addresses}}
2.后端遍历index无使用
for index,goodsId:=range goodsIds{
goodsBuffer[i]
i++
}
for index,goodsId:=range goodsIds{
goodsBuffer[index]
}
3.后端创建切片
var temp map[string]interface{}
temp:=make(map[string]interface{})
var goodsBuffer=make([]map[string]interface{},len(goodsIds))
var goodsBuffer=make([]map[string]interface{})
一.cart.html数据传递



二.order.go数据处理



三.order.html模板显示



网友评论