目前发现打不开的基本为ios系统,系统类型iOS 15.1.1、系统类型iOS 15.4.1、系统类型iOS 15.6.1
Page({
/**
* 页面的初始数据
*/
data: {
total: 0,
pageNo: 1,
pageSize: 10,
banner: [],
list: [],
myActivity: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.loadData(true, false)
this.myActivities()
this.rotationPic()
},
loadData(initPage, merge) {
let { pageNo, pageSize, total, list } = this.data
if (initPage) {
pageNo = 1;
} else {
let len = list.length;
if (!len) {
pageNo = 1;
} else {
pageNo = Math.ceil(len / pageSize) + 1;
}
}
const params = {
pageNo,
pageSize,
}
if (total && (total <= (pageNo - 1) * pageSize)) {
return;
};
return new Promise((resolve, reject) => {
getApp().request.actList(params).then(res => {
wx.stopPullDownRefresh()
if (res.code == '000') {
const data = res
list = merge ? [...list, ...data.data] : data.data;
const total = data.totalCount;
this.setData({
pageNo,
list,
total,
})
resolve()
}
}).catch(() => {
wx.stopPullDownRefresh()
})
})
},
// 已报名活动列表
myActivities() {
getApp().request.myActivities({}).then((res) => {
if (res.code == '000') {
this.setData({
myActivity: res.data
})
}
}).catch(() => {
})
},
// 广告
rotationPic() {
const params = {
type: '1007',
}
getApp().request.rotationPic(params).then((res) => {
if (res.code == '000') {
this.setData({
banner: res.data
})
}
}).catch(() => {
})
},
// 点赞
praise(e) {
const { i } = e.currentTarget.dataset
const { list } = this.data
const params = {
actId: list[i].actApplyset.id,
event: 2,
type: list[i].ifPraise ? 1 : 0,
}
getApp().request.operationAct(params).then((res) => {
if (res.code == '000') {
if (params.type == 0) {
// 点赞
list[i].ifPraise = true
list[i].actApplyset.praiseNum++
} else {
// 取消点赞
list[i].ifPraise = false
list[i].actApplyset.praiseNum--
}
this.setData({
list,
})
}
}).catch(() => {
})
},
preview(e) {
const { i } = e.currentTarget.dataset
const { banner } = this.data
wx.previewImage({
current: banner[i],
urls: banner,
})
},
detail(e) {
const { id } = e.currentTarget.dataset
wx.navigateTo({
url: '/member/pages/activity-detail/index?id=' + id,
})
},
navigate(e) {
const { value } = e.currentTarget.dataset
getApp().util.navigate(value)
},
myActivity() {
wx.navigateTo({
url: '/member/pages/my-activity/index',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.loadData(true, false)
this.myActivities()
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.loadData(false, true)
},
/**
* 用户点击右上角分享
*/
// onShareAppMessage: function () {
// }
})
请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。