// pages/index/index.js const app = getApp() Page({ /** * 页面的初始数据 */ data: { background: [ 'https://dy.shpr.top/recruit/index_top2.png', // 'https://dy.shpr.top/recruit/home_page.png' ], indicatorDots: true, vertical: false, autoplay: true, interval: 5000, duration: 500, userInfo:{ headerImg: "/images/new/head_img.png", nickName:'Friend' } }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { if(options.url){ let url = decodeURIComponent(options.url); wx.navigateTo({ url }) } }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: async function () { var openId = wx.getStorageSync('openId') if(openId){ await app.setUserInfo(openId) } let userInfo = await app.getWxUserInfo() if (userInfo) { this.setData({ userInfo: userInfo, }) } }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, //公司简介 gotoCompanyProfile:function(){ wx.navigateTo({ url: '../companyProfile/companyProfile' }) }, //工作环境 gotoWorkEnvironment:function(){ wx.navigateTo({ url: '../workEnvironment/workEnvironment' }) }, //校招行程 gotoSchoolTrip:function(){ wx.navigateTo({ url: '../schoolTrip/schoolTrip' }) }, //个人中心 gotoPerson:function(){ wx.switchTab({ url: '../person/person' }) }, //校招 gotoSchool:function(){ wx.navigateTo({ url: '../school/school' }) }, //社招 gotoSociology:function(){ wx.switchTab({ url: '../sociology/sociology' }) }, //员工待遇 gotoEmployeeBenefits:function(){ wx.navigateTo({ url: '../employeeBenefits/employeeBenefits' }) }, //企业文化 gotoCorporateCulture:function(){ wx.navigateTo({ url: '../corporateCulture/corporateCulture' }) }, })