// pages/noData/noData.js import {selectMzGraduateInfo } from "../../api/index" const app = getApp() Page({ /** * 页面的初始数据 */ data: { msg:'暂无信息', idCard:'' }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { if(options){ this.setData({ msg:options.msg, idCard:options.idCard, statusHeight: app.globalData.deviceInfo.statusHeight, navigationHeight: app.globalData.deviceInfo.navigationHeight, }) this.selectMzGraduateInfo() } }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, back(){ wx.switchTab({ url: '/pages/index/index', }) }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { this.selectMzGraduateInfo() wx.stopPullDownRefresh(); }, selectMzGraduateInfo(){ console.log(this.data.idCard); selectMzGraduateInfo({idCard:this.data.idCard}).then(res=>{ if (res.data.signType === 0 && res.data.contract) { //线上支付去跳转签合同 app.globalData.userInfo.chooseRoomId = res.data.chooseRecId console.log(res.data.contract, '链接》》》》'); res.data.contract = res.data.contract.replace('https://h5.esign.cn', 'https://hxm5112004501.h5.esign.cn') wx.navigateTo({ url: '/pages/webView/webView?url=' + encodeURIComponent(res.data.contract), }) }else{ wx.showToast({ title: '暂无合同签订', icon:'none' }) } }).catch(err=>{ wx.showToast({ title: '暂无合同签订', icon:'none' }) }) }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })