再views中新建customer,在这里我是在detailed中进行的模拟数据
在api中新建customer
import request from '@/utils/request'
export function getCustomerDetail(data) {
return request({
url: '/vue-element-admin/customer/detail',
method: 'post',
data
})
}
然后再mock中新建customer
module.exports = [
{
url: '/vue-element-admin/customer/detail',
type: 'post',
response: config => {
return {
code: 20000,
data: {
aa: '123'
}
}
}
}
]
不要忘记在mock中index注册新增的customer
以上就可以了~~~~