//公共请求js
import {baseURL} from "./config.js"
export default function request(option){
return new Promise((resolve,reject)=>{
wx.request({
url: baseURL + option.url,
method: option.method || 'get',
data: option.data,
success: resolve,
fail:function(err){
reject(err)
}
})
})
}
//具体页面数据请求
import request from "./network.js"
export function getMultiData(){
return request({
url: '/home/multidata'
})
}
export function getHomeGoods(type,page){
return request({
url:'/home/data',
data:{
type,
page
}
})
}