You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
890 B
39 lines
890 B
//在这里面定义所有接口,一个文件管理所有接口,易于维护
|
|
import { http } from './http'; // 引入刚刚封装好的http模块,import属于ES6的语法,微信开发者工具必须打开ES6转ES5选项
|
|
|
|
// 授权登录接口
|
|
function login(params) {
|
|
http('/auth/wechat/login', 'post', params)
|
|
}
|
|
|
|
// 获取手机号接口
|
|
function getPhoneNumber(params) {
|
|
http('/auth/wechat/bind', 'post', params)
|
|
}
|
|
|
|
|
|
// 轮播
|
|
function carousel(params) {
|
|
http('/muhu/ads/list', 'get', params)
|
|
}
|
|
|
|
// 通知公告
|
|
function disaster(params) {
|
|
http('/muhu/warning/list', 'get', params)
|
|
}
|
|
|
|
// 地图导航药店诊所
|
|
function pharmacy(params) {
|
|
http('/muhu/info/list', 'get', params)
|
|
}
|
|
|
|
// 办事指南
|
|
function guidance(params) {
|
|
http('/muhu/guide/list', 'get', params)
|
|
}
|
|
|
|
|
|
|
|
export default { // 暴露接口
|
|
login,carousel,disaster,pharmacy,guidance,getPhoneNumber
|
|
}
|