const app = getApp() import Notify from '@vant/weapp/notify/notify'; import { getMeetingRoomServiceAndEquipmentRq, queryServiceMsgRq } from "../../../../api/meeting/meetingRoom.js" Page({ /** * 页面的初始数据 */ data: { IMG_NAME: app.IMG_NAME, rId: '', checkUser: [], staffMusicList: [{ id: 1, name: '张三', isSelect: false }, { id: 2, name: '李四', isSelect: false }, { id: 3, name: '王五', isSelect: false }], staffServeList: [{ id: 4, name: '赵六', isSelect: false }, { id: 5, name: '朱七', isSelect: false }, { id: 6, name: '冯八', isSelect: false }] }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { let _this = this let rId = options.rId // console.log(ser) _this.setData({ rId: rId }) // 获取数据 _this.getData() }, // 获取数据 getData() { let _this = this; // ajax获取当前预约的人员以及会务人员列表 }, // 服务选择 checkBoxClick(e) { let _this = this console.log('checkBoxClick', e) // get param let id = e.target.dataset.id let type = e.target.dataset.type if (type === 'music') { let staffMusicList = _this.data.staffMusicList.map(item => { if (item.id == id) { item.isSelect = !item.isSelect } return item }) _this.setData({ staffMusicList }) } else { let staffServeList = _this.data.staffServeList.map(item => { if (item.id == id) { item.isSelect = !item.isSelect } return item }) _this.setData({ staffServeList }) } }, // 确定 submit() { let _this = this; // 提交 console.log(_this.data.staffMusicList) console.log(_this.data.staffServeList) // let pages = getCurrentPages(); //获取page // let prevPage = pages[pages.length - 2]; //上一个页面(父页面) // prevPage.setData({ // serviceList: _this.data.serviceList // }) // console.log(_this.data.serviceList) wx.navigateBack() }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })