1 发给一个axios_node_api-master 的压缩包 在压缩包里打开cmd窗口 下载依赖 cnpm install 然后在输入node index.js 启动文件 会出现服务器启动成功
2下载vant 在man.js文件中匹配
import Vue from ‘vue’
import App from ‘./App’
import router from ‘./router’
import “./rem”
import axios from ‘axios’
Vue.prototype.$axios=axios
import ‘swiper/css/swiper.min.css’
//这里是重点!!!!!!!!!
import {Button,ContactList,Toast,Popup, ContactEdit} from “vant”
import “vant/lib/index.css”
Vue.use(Button)
Vue.use(ContactList)
Vue.use(Toast)
Vue.use(Popup)
Vue.use(ContactEdit)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})
在vant中找到联系人模块复制
<template>
<div id="app">
<van-contact-list