2018-10-23

coding

(用coding传项目的步骤)

1.git init 
2.git add .
3.git commit -m "first commit"
4.git remote add origin https://git.coding.net/wangwanghuixian/3wrw.git
5.git push -u origin master
6.开启Pages服务

创建项目

(创建项目的步骤)

0.安装淘宝镜像)npm install -g cnpm --registry=https://registry.npm.taobao.org
1.webpack)  cnpm install webpack -g
2.vue-cli)      cnpm install vue-cli -g
3.vue init webpack webpack-demo (创建项目名称)
4.检测) cnpm install (安装相关的依赖)
5.npm run dev(找到网址)

安装axios

1.cnpm install axios

链接axios的内容

mounted:function(){
      axios({
               var self=this;
                 method:'get',
                 url:'../../static/--.json'
               }).then(function(resp){
                   console.log(resp.data) 
                   self.txt=resp.data    
               }.catch(function(err){
               console.log(err)
            })
}

链接axios

  import axios from 'axios'

你可能感兴趣的:(2018-10-23)