前言
提示:这里可以添加本文要记录的大概内容:
小程序页面
- js :页面逻辑
- wxml:页面结构
- json:页面配置
- wxss: 页面样式
页面效果
列表
先获取接口数据
//生命周期函数--监听页面加载
onLoad(options) {
this.axios()
},
axios(){
this.data.p++
wx.request({
url: `http://localhost:8989/getData?p=${
this.data.p}`,
method:"get",
//请求成功后执行success函数res是我们请求成功后的数据
success:res=>{
// console.log(res);
if (res