bugfix: ORDERS_CREATE_UR修正为
MY_ORDERS_CREATE_URL
This commit is contained in:
parent
6b1ac948fd
commit
bbab09950b
@ -20,6 +20,11 @@ const GOODS_DETAIOL_URL = '/goods/detail'
|
||||
// 获取用户token
|
||||
const USERS_WXLOGIN_URL = '/users/wxlogin'
|
||||
|
||||
// 创建订单
|
||||
const MY_ORDERS_CREATE_URL = '/my/orders/create'
|
||||
|
||||
const token = uni.getStorageSync('token') || ''
|
||||
|
||||
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作
|
||||
const install = (Vue, vm) => {
|
||||
// 首页
|
||||
@ -44,7 +49,13 @@ const install = (Vue, vm) => {
|
||||
getCategories,
|
||||
getGoods,
|
||||
getGoodsDetail,
|
||||
getUserToken: (params = {}) => vm.$u.post(USERS_WXLOGIN_URL, params)
|
||||
// 获取token
|
||||
getUserToken: (params = {}) => vm.$u.post(USERS_WXLOGIN_URL, params),
|
||||
// 创建订单
|
||||
createOrders: (params = {}) => vm.$u.post(MY_ORDERS_CREATE_URL, params, {
|
||||
Authorization: token
|
||||
}),
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user