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.
20 lines
456 B
20 lines
456 B
8 years ago
|
const API_URL = 'https://api.bayekeji.com/v2'
|
||
|
|
||
|
function postAddress (data) {
|
||
|
return new Promise((resolve, reject) => {
|
||
|
wx.request({
|
||
|
method: POST,
|
||
|
url: `${API_URL}/addresses/new`,
|
||
|
data: Object.assign({}, data),
|
||
|
header: { 'Content-Type': 'application/json' },
|
||
|
success: resolve,
|
||
|
fail: reject
|
||
|
})
|
||
|
})
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
postAddress (data) {
|
||
|
return postAddress(data).then(res => res.data)
|
||
|
}
|
||
|
}
|