addressService.js
881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import BaseService from '../../../libs/services/baseService.js';
const UFO_ADDRESS_LIST = 'app.address.gethidden';
const UFO_ADDRESS_SET_DEFAULT = 'app.address.setdefault';
export default class AddressService extends BaseService {
async fetchAddressList(params, complete) {
return await this.GET(
{
...params,
method: UFO_ADDRESS_LIST
},
{
complete
}
).then((data) => {
return data;
}).catch((error) => {
// 这里请抛出异常,不要return
throw error;
})
}
async fetchAddressDefault(params, complete) {
return await this.GET(
{
...params,
method: UFO_ADDRESS_SET_DEFAULT
},
{
complete
}
).then((data) => {
return data;
}).catch((error) => {
// 这里请抛出异常,不要return
throw error;
})
}
}