getGirls(){
let defer = xx.defer();
// Your params
getGirls(city, age, function(data){
defer.resolve(data);
});
return defer.promise;
}
async indexAction(){
let data = await getGirls();
return this.success(data);
}
let defer = xx.defer();
// Your params
getGirls(city, age, function(data){
defer.resolve(data);
});
return defer.promise;
}
async indexAction(){
let data = await getGirls();
return this.success(data);
}