[水感应客户端最新]

This commit is contained in:
2023-06-21 17:14:39 +08:00
commit b3b4d4dae7
187 changed files with 12997 additions and 0 deletions

51
pages/user/help/help.js Normal file
View File

@@ -0,0 +1,51 @@
/*
* 手太欠
* 愿这世界都如故事里一样 美好而动人~
*/
Page({
data: {
helpsArr: [], //帮助列表
},
onLoad(options) {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 获取帮助分类
this.helpsNavInfo();
},
/**
* 帮助分类
*/
helpsNavInfo() {
wx.$api.user.helpsNav().then(res => {
let listArr = this.data.helpsArr,
newData = []
for(let i of res.data){
for(let j of i.children){
j.isMore = false
}
}
newData = listArr.concat(res.data)
this.setData({
helpsArr: newData
})
}).catch(err => {})
},
/**
* 文字展开
*/
textMore(e){
let childIndex = e.currentTarget.dataset.index,
parentIndex = e.currentTarget.dataset.parent
this.setData({
[`helpsArr[${parentIndex}].children[${childIndex}].isMore`]: !this.data.helpsArr[parentIndex].children[childIndex].isMore
});
}
})