public List<Setmeal> findAll();
public List<Setmeal> findAll() {
return setmealDao.findAll();
}
public List<Setmeal> findAll();
<select id="findAll" resultType="com.itheima.pojo.Setmeal">
select * from t_setmeal
</select>
function getUrlParam(paraName) {
var url = document.location.toString();
//alert(url);
var arrObj = url.split("?");
if (arrObj.length > 1) {
var arrPara = arrObj[1].split("&");
var arr;
for (var i = 0; i < arrPara.length; i++) {
arr = arrPara.split("=");
if (arr != null && arr[0] == paraName) {
return arr[1];
}
}
return "";
}
else {
return "";
}
}
<script>
var id = getUrlParam("id");
</script>
<script>
var vue = new Vue({
el:'#app',
data:{
imgUrl:null,//套餐对应的图片链接
setmeal:{}
},
mounted(){
axios.post("/setmeal/findById.do?id=" + id).then((response)
=> {
if(response.data.flag){
this.setmeal = response.data.data;
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |