代码提交

This commit is contained in:
黄少君
2023-11-15 19:59:37 +08:00
parent dcab74274f
commit 35b43ffd97
43 changed files with 1265 additions and 387 deletions

View File

@ -144,3 +144,21 @@ const request = ['post', 'put', 'patch'].reduce((request, method) => {
})
export default request
export const upload = (options)=>{
const token = cookie.get('accessToken')
return new Promise((resolve, reject)=>{
uni.showLoading({title:'上传中'})
uni.uploadFile({
...options,
header:{
...options.headers,
Authorization: 'Bearer ' + token.accessToken,
},
url:options.url?`${VUE_APP_API_URL}${options.url}`:VUE_APP_API_URL+'/member/user/update-avatar',
success:(res)=>resolve(res),
fail:(err)=>reject(err),
complete:()=>uni.hideLoading()
})
})
}

View File

@ -149,8 +149,8 @@ export function orderExpress(data) {
export const wechatPay = (data) => api.post(`/order/pay`, data)
/**
* 检查h5支付
* 检查支付
* @param data
* @returns {*}
*/
export const checkH5Pay = (data) => api.post(`/order/pay/orderQuery`, data)
export const checkPay = (data) => api.post(`/order/pay/orderQuery`, data)

View File

@ -41,3 +41,4 @@ export function updateMobile(data) {
* @returns {*}
*/
export const updateUserInfo = (data) => api.put(`/member/user/update-nickname?nickname=${ data.nickname }&birthday=${ data.birthday }&sex=${ data.sex }`)