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.
17 lines
415 B
17 lines
415 B
|
|
|
|
module.exports = (options) => {
|
|
return new Promise((resolve, reject) => {
|
|
options = Object.assign(options, {
|
|
success(result) {
|
|
if (result.statusCode === 200) {
|
|
resolve(result.data);
|
|
} else {
|
|
reject(result);
|
|
}
|
|
},
|
|
fail: reject,
|
|
});
|
|
wx.request(options);
|
|
});
|
|
};
|