0、知识点
- 如果有人在订餐其他人再次进入的时候直接进入点餐页面
- router
1、 如果有人在订餐其他人再次进入的时候直接进入点餐页面
- Start.vue
getPeopleInfoList(){
var uid=storage.get('roomid');
var api=this.api+'api/peopleInfoList?uid='+uid;
this.$http.get(api).then(response => {
this.showLoading=false;
//如果有用餐人数信息直接跳转到点餐页面
if(response.body.result.length>0){
this.$router.push({ path: 'home' }) // 跳转到home点餐页面
}
}, response => {
// error callback
});
}
}
created(){
//判断 有没有用餐人数的信息
this.getPeopleInfoList();
}