import Vue from 'vue'; import {post,fetch,patch,put,del,upload} from './index' const _baseUrl=process.env.API_URL; Vue.prototype.$post=post; Vue.prototype.$fetch=fetch; Vue.prototype.$patch=patch; Vue.prototype.$put=put; Vue.prototype.$del=del; Vue.prototype.$upload = upload; const getBannerListUrl = `${_baseUrl}api/client/banner/list`; export const getBannerListApi = function () { return Vue.prototype.$fetch(getBannerListUrl) }; const getwechatParamUrl = `${_baseUrl}api/client/jssdk`; export const getwechatParam = function (json) { return Vue.prototype.$fetch(getwechatParamUrl,json) }; const getGoodsDetailUrl = `${_baseUrl}api/client/goods/info/`; export const getGoodsDetailApi = function (id) { return Vue.prototype.$fetch(`${getGoodsDetailUrl}${id}`) }; const getUserAdressUrl = `${_baseUrl}api/client/address/info`; export const getUserAdressApi = function () { return Vue.prototype.$fetch(getUserAdressUrl) }; const payUrl = `${_baseUrl}api/client/bill/wechat/pay` export const payApi = function (json) { return Vue.prototype.$fetch(payUrl,json) };