麻烦帮忙看一下,这个怎么不能打印?谢谢!
export const request=(params)=>{
return new Promise((resolve,reject)=>{
wx.request({
...params,
succes:(result)=>{
resolve(result);
},
fail:(err)=>{
reject(err);
}
});
})
}
import { request } from "../../request/index.js";
Page({
data: {
},
onLoad: function (options) {
this.getSwiperList();
},
getSwiperList(){
request({ url: "https://api-hmugo-web.itheima.net/api/public/v1/home/swiperdata" })
.then(result => {
console.log(result);
})
}
})