let app = getApp(); import Notify from '@vant/weapp/notify/notify'; import { companyRq } from "../../../../api/meeting/visitorIinvitation.js" Page({ /** * 页面的初始数据 */ data: { IMG_NAME: app.IMG_NAME, detail: { customerId: null, //企业id customerName: null, //企业名称 userId: null, // 被访人id username: null, //被访人姓名 mobile: null, //被访人手机号 intervieweeId: null, // 访客id name: null, // 访客姓名 phone: null, // 访客手机号 joinTime: null, // 加入时间 visitTime: null, // 到访时间 leaveTime: null, // 离开时间 visitContent: null, // 来访事由 cardType: null, // 证件类型 cardNo: null, // 证件号 photo: null, // 头像 } }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { console.log('onLoad', options) let _this = this; _this.setData({ ...options }) // 页面初始化 options为页面跳转所带来的参数 wx.setNavigationBarTitle({ title: options.title }) }, // 跳转-索引栏(单位、人员) jumpIndexBar(e) { console.log('jumpIndexBar', e); let _this = this; let title = e.currentTarget.dataset.title // 校验是否选择“被访单位” 后 ,再选择被访人信息 if (title == '人员' && !_this.data.detail.customerId) { // 危险通知 Notify({ type: 'danger', message: '请先选择被访单位!' }); return ; } // url 参数 let param = '?title=' + title; if (title == '人员') { param = param + '&id=' + _this.data.detail.customerId; } wx.navigateTo({ url: '/pages/meeting/visitorIinvitation/indexBar/indexBar' + param, }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })