发表于: 2020-02-24 22:29:28

1 1647




今天完成的事情:

1.推进任务,回顾知识


明天计划的事情:

1.推进任务



遇到的问题和收获:

1.从输入url到页面展示到底发生了什么

从输入url到页面展示总共经过如下几个过程:

  1. 域名解析(获得IP地址)
  2. 向WEB服务器发送HTTP请求
  3. 服务器处理请求
  4. 服务器返回HTTP响应
  5. 浏览器显示页面信息


watch:{
   '$route'(to, from) {
       this.$http({
           method: 'get',
           url: '/api/a/article/' + this.$route.query.id,
           data: this.$qs.stringify(this.editInfo)
       }).then(res => {
           // console.log(res);
           if (res.data.code === 0) {
               console.log(res);
               this.article.title = res.data.data.article.title
               this.article.type = res.data.data.article.type
               this.article.status = res.data.data.article.status
               this.article.content = res.data.data.article.content
               this.article.url = res.data.data.article.url
               this.article.industry = res.data.data.article.industry
               // this.$http.get('/api/a/article' + row.id, this.editInfo)
               // this.$router.push({
               //     path: '/home/details'
               // })
           }
       })
   }
},


在编辑这页监控路由变化。id发生变化时,请求查询详情接口。是这样不,似乎还是不对




返回列表 返回列表
评论

    分享到